]> rtime.felk.cvut.cz Git - can-benchmark.git/blob - rtems/gw/cangw/app_def.h
c2f13eb23cfffeb86b79f47396850df2d226484b
[can-benchmark.git] / rtems / gw / cangw / app_def.h
1 #ifndef _APP_DEF_H
2 #define _APP_DEF_H
3
4 #ifndef COND_EXTERN
5   #ifdef CONFIGURE_INIT
6     #define COND_EXTERN
7   #else
8     #define COND_EXTERN extern
9   #endif
10 #endif
11
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15
16 COND_EXTERN rtems_id   CAN_A_to_B_id;           /* task listening on A, sends through B */\r
17 COND_EXTERN rtems_id   CAN_B_to_A_id;           /* task listening on B, sends through A */\r
18 COND_EXTERN rtems_name CAN_A_to_B_name;         /* First task's name */
19 COND_EXTERN rtems_name CAN_B_to_A_name;         /* Seconds task's name */\r
20
21 rtems_task CAN_GW_1(rtems_task_argument arg);\r
22 rtems_task CAN_GW_2(rtems_task_argument arg);
23
24 void bad_rtems_status(rtems_status_code status, int fail_level, const char *text);
25
26 static inline
27 void check_rtems_status(rtems_status_code status, int fail_level, const char *text)
28 {
29    if(!rtems_is_status_successful(status))
30      bad_rtems_status(status, fail_level, text);
31 }
32
33 #define CANGW_PRIORITY     30
34 #define SHELL_TASK_PRIORITY 50
35
36 #ifdef __cplusplus
37 }
38 #endif
39
40 #endif /*_APP_DEF_H*/