EVE 1.0
bsp.h
1 #ifndef BSP_H_INCLUDED
2 #define BSP_H_INCLUDED
3 
4 #include <stdbool.h>
5 #include <string.h>
6 #include <app_util.h>
7 #include <lib/assert.h>
8 
9 #define SILABS_RADIO_SI4455
10 #define RADIO_DRIVER_EXTENDED_SUPPORT
11 #define RADIO_DRIVER_FULL_SUPPORT
12 
13 //#define SI4455_USER_CONFIG_USE_FRR_ABC_FOR_NIRQ
14 
15 #define SEGMENT_VARIABLE(name, type, segment) \
16  type name
17 
18 #define SEGMENT_VARIABLE_SEGMENT_POINTER(name, type, segment1, segment2) \
19  type *name
20 
21 #define WRITE_TO_BIT_ARRAY(dst, src) \
22  do { STATIC_ASSERT(sizeof(dst) == 1); \
23  STATIC_ASSERT(sizeof(src) == 1); \
24  memcpy(&dst, &src, sizeof(uint8_t)); } while (0)
25 
26 #define BITS(name, length) \
27  STATIC_ASSERT(length <= 8); \
28  uint8_t name
29 
30 #define SI_LSB 0
31 #define SI_MSB 1
32 #define SI_b0 0
33 #define SI_b1 1
34 #define SI_b2 2
35 #define SI_b3 3
36 
37 #define RADIO_COMM_ERROR_CALLBACK(Instance) assert(false && "Radio comm error");
38 
39 typedef bool BIT;
40 
41 typedef signed char S8;
42 typedef unsigned char U8;
43 
44 typedef signed short S16;
45 typedef unsigned short U16;
46 
47 typedef union {
48  uint8_t U8[2];
49  uint16_t U16;
50 } UU16;
51 
52 typedef signed long S32;
53 typedef unsigned long U32;
54 
55 typedef union {
56  uint8_t U8[4];
57  uint32_t U32;
58 } UU32;
59 
60 #endif /* BSP_H_INCLUDED */