libsi24: basic setup
[libsi24] / libsi24reg.h
1 /**
2  * File              : libsi24reg.h
3  * Author            : Robin Krens <robin@robinkrens.nl>
4  * Date              : 18.01.2023
5  * Last Modified Date: 18.01.2023
6  * Last Modified By  : Robin Krens <robin@robinkrens.nl>
7  */
8
9
10 #define SI24_READ_REG 0x00
11 #define SI24_WRITE_REG 0x20
12 #define SI24_R_RX_PAYLOAD 0x61
13 #define SI24_W_TX_PAYLOAD 0xA0
14 #define SI24_FLUSH_TX 0xE1
15
16 typedef struct {
17     union {
18         unsigned char byte;
19         struct {
20             unsigned PRIM_XR : 1;
21             unsigned PWR_UP : 1;
22             unsigned CRCO : 1;
23             unsigned EN_CRC : 1;
24             unsigned MASK_MAX_RT : 1;
25             unsigned MASK_TX_DS : 1;
26             unsigned MAKS_RX_DS : 1;
27             unsigned _RESERVED : 1;
28         } bits;
29     };
30 } config_reg_t;
31
32