1/*
2 * Copyright 2016, Data61
3 * Commonwealth Scientific and Industrial Research Organisation (CSIRO)
4 * ABN 41 687 119 230.
5 *
6 * This software may be distributed and modified according to the terms of
7 * the BSD 2-Clause license. Note that NO WARRANTY is provided.
8 * See "LICENSE_BSD2.txt" for details.
9 *
10 * @TAG(D61_BSD)
11 */
12
13#ifndef _TIMER_SERVER_BADGE_H_
14#define _TIMER_SERVER_BADGE_H_
15
16#include <refos/refos.h>
17
18/*! @file
19    @brief Timer Server badge space definitions.
20
21    Since Timer server needs to recieve both asynchronous device IRQ and synchronous syscall
22    messages, similar to the console server. The solution is thus also similar to console server.
23    Please look in @ref console_server/src/badge.h for a more detailed explanation.
24*/
25
26#define TIMESERV_DSPACE_BADGE_TIMER 0x26    /*!< @brief Timer dataspace badge value. */
27
28/* ---- BadgeID 48 to 4143 : Clients ---- */
29#define TIMESERV_CLIENT_BADGE_BASE 0x30
30
31/* ---- Async BadgeIDs  ---- */
32
33#define TIMESERV_ASYNC_BADGE_MASK (1 << 19)
34#define TIMESERV_ASYNC_NOTIFY_BADGE (1 << 0)
35
36#define TIMESERV_IRQ_BADGE_BASE_POW 1
37#define TIMESERV_IRQ_BADGE_BASE_POW_TOP 18
38#define TIMESERV_IRQ_BADGE_NCHANNELS \
39        ((TIMESERV_IRQ_BADGE_BASE_POW_TOP - TIMESERV_IRQ_BADGE_BASE_POW) + 1)
40
41#endif /* _TIMER_SERVER_BADGE_H_ */
42