24#ifndef NRF24L01_INTERNALS_HH
25#define NRF24L01_INTERNALS_HH
29namespace devices::rf::nrf24l01p_internals
34 const uint8_t MASK_RX_DR = 6;
35 const uint8_t MASK_TX_DS = 5;
36 const uint8_t MASK_MAX_RT = 4;
37 const uint8_t EN_CRC = 3;
38 const uint8_t CRCO = 2;
39 const uint8_t PWR_UP = 1;
40 const uint8_t PRIM_RX = 0;
45 const uint8_t ENAA_P5 = 5;
46 const uint8_t ENAA_P4 = 4;
47 const uint8_t ENAA_P3 = 3;
48 const uint8_t ENAA_P2 = 2;
49 const uint8_t ENAA_P1 = 1;
50 const uint8_t ENAA_P0 = 0;
51 const uint8_t ENAA_PA = 0x3f;
56 const uint8_t ERX_P5 = 5;
57 const uint8_t ERX_P4 = 4;
58 const uint8_t ERX_P3 = 3;
59 const uint8_t ERX_P2 = 2;
60 const uint8_t ERX_P1 = 1;
61 const uint8_t ERX_P0 = 0;
62 const uint8_t ERX_PA = 0x3f;
68 const uint8_t AW_3BYTES = 1;
69 const uint8_t AW_4BYTES = 2;
70 const uint8_t AW_5BYTES = 3;
75 const uint8_t ARD = 4;
77 const uint8_t ARC = 0;
80 const uint8_t DEFAULT_ARC = 15;
81 const uint8_t DEFAULT_ARD = 1;
86 const uint8_t CONT_WAVE = 7;
87 const uint8_t RF_DR_LOW = 5;
88 const uint8_t PLL_LOCK_SIGNAL = 4;
89 const uint8_t RF_DR_HIGH = 3;
90 const uint8_t RF_PWR = 1;
95 const uint8_t RF_DR_1MBPS = 0;
96 const uint8_t RF_DR_2MBPS =
bits::BV8(RF_DR_HIGH);
97 const uint8_t RF_DR_250KBPS =
bits::BV8(RF_DR_LOW);
102 const uint8_t RF_PWR_18DBM = 0;
103 const uint8_t RF_PWR_12DBM = 2;
104 const uint8_t RF_PWR_6DBM = 4;
105 const uint8_t RF_PWR_0DBM = 6;
110 const uint8_t RX_DR = 6;
111 const uint8_t TX_DS = 5;
112 const uint8_t MAX_RT = 4;
113 const uint8_t RX_P_NO = 1;
114 const uint8_t RX_P_NO_MASK = 0x0e;
115 const uint8_t RX_P_NO_NONE = 0x07;
116 const uint8_t TX_FIFO_FULL = 0;
121 const uint8_t PLOS_CNT = 4;
122 const uint8_t ARC_CNT = 0;
127 const uint8_t TX_REUSE = 6;
128 const uint8_t TX_FULL = 5;
129 const uint8_t TX_EMPTY = 4;
130 const uint8_t RX_FULL = 1;
131 const uint8_t RX_EMPTY = 0;
136 const uint8_t DPL_P5 = 5;
137 const uint8_t DPL_P4 = 4;
138 const uint8_t DPL_P3 = 3;
139 const uint8_t DPL_P2 = 2;
140 const uint8_t DPL_P1 = 1;
141 const uint8_t DPL_P0 = 0;
142 const uint8_t DPL_PA = 0x3f;
147 const uint8_t EN_DPL = 2;
148 const uint8_t EN_ACK_PAY = 1;
149 const uint8_t EN_DYN_ACK = 0;
154 const uint16_t Tpd2stby_ms = 3;
155 const uint16_t Tstby2a_us = 130;
156 const uint16_t Thce_us = 10;
161 const uint8_t AW_MAX = 5;
162 const uint8_t PIPE_MAX = 6;
static constexpr uint8_t BV8(uint8_t bit)
Create a uint8_t bitmask for the given bit number.