Go to the source code of this file.
◆ CI24R1_Init()
| void CI24R1_Init |
( |
void |
| ) |
|
Definition at line 163 of file ci24r1.c.
164{
166#if (CI24R1_PLOAD_WIDTH == 0)
167
170#else
171
174
176
178#endif
180
182
184
186
188
191}
void CI24R1_WriteReg(uint8_t reg, uint8_t value)
#define CI24R1_REG_RX_PW_P1
#define CI24R1_PLOAD_WIDTH
#define CI24R1_RF_SETUP_11DB
#define CI24R1_REG_FEATURE
#define CI24R1_REG_SETUP_AW
#define CI24R1_REG_SETUP_RETR
#define CI24R1_RF_SETUP_1M
#define CI24R1_REG_RF_SETUP
#define CI24R1_REG_RX_PW_P0
#define CI24R1_REG_EN_RXADDR
#define CI24R1_CMD_W_REGISTER
#define CI24R1_REG_CONFIG
◆ CI24R1_PrintStatus()
| uint8_t CI24R1_PrintStatus |
( |
void |
| ) |
|
Definition at line 269 of file ci24r1.c.
270{
272
275
278
281
284
287
290
293
296
299
302 for (
i = 0;
i < 5;
i++) {
304 }
305
308 for (
i = 0;
i < 5;
i++) {
310 }
313 for (
i = 0;
i < 5;
i++) {
315 }
324
328
332
336
344
357
360
363
366
371 return status;
372}
uint8_t CI24R1_ReadStatus(void)
uint8_t CI24R1_ReadReg(uint8_t reg)
void CI24R1_Switch1F_AF(uint8_t af)
void CI24R1_ReadToBuf(uint8_t reg, uint8_t *pBuf, uint8_t len)
#define CI24R1_EN_RXADDR_BT
#define CI24R1_CMD_R_REGISTER
#define CI24R1_REG_RX_PW_P5
#define CI24R1_REG_FIFO_STATUS
#define CI24R1_REG_TX_ADDR
#define CI24R1_EN_RXADDR_BT_CRC_M
#define CI24R1_EN_RXADDR_BT_CRC_H
#define CI24R1_REG_RX_PW_P4
#define CI24R1_REG_RX_ADDR_P2
#define CI24R1_REG_RX_ADDR_P1
#define CI24R1_REG_RX_ADDR_P3
#define CI24R1_REG_RX_PW_P2
#define CI24R1_REG_OBSERVE_TX
#define CI24R1_EN_RXADDR_OSC_C
#define CI24R1_EN_RXADDR_CRC
#define CI24R1_REG_RX_ADDR_P4
#define CI24R1_REG_RX_ADDR_P0
#define CI24R1_EN_RXADDR_BT_CRC_L
#define CI24R1_REG_RX_PW_P3
#define CI24R1_REG_RX_ADDR_P5AF
void UART1_TxString(uint8_t *str)
void UART1_TxHex(uint8_t hex)
◆ CI24R1_ReadByte()
Definition at line 42 of file ci24r1.c.
43{
45
48 for (
i = 0;
i < 8;
i++)
49 {
50 RxData = RxData << 1;
53 {
54 RxData |= 0x01;
55 }
56 else
57 {
58 RxData &= 0xfe;
59 }
61 }
63 return RxData;
64}
#define CI24R1_DATA_READ()
#define CI24R1_CLK_HIGH()
◆ CI24R1_ReadReg()
Definition at line 74 of file ci24r1.c.
75{
81 return reg_val;
82}
uint8_t CI24R1_ReadByte(void)
void CI24R1_WriteByte(uint8_t value)
#define CI24R1_NSS_HIGH()
◆ CI24R1_ReadStatus()
Definition at line 249 of file ci24r1.c.
250{
252}
#define CI24R1_REG_STATUS
◆ CI24R1_ReadToBuf()
Definition at line 103 of file ci24r1.c.
104{
108 for (ctr = 0; ctr < len; ctr++)
109 {
111 }
113
114}
◆ CI24R1_Rx()
Definition at line 217 of file ci24r1.c.
218{
230 {
231#if CI24R1_PLOAD_WIDTH == 0
233#else
235#endif
236
238
241 for (
i = 0;
i < rxplWidth;
i++)
242 {
244 }
245 }
246 return status;
247}
__IDATA uint8_t xbuf[CI24R1_PLOAD_MAX_WIDTH+1]
#define CI24R1_CMD_SELIRQ
#define CI24R1_DATA_OUT()
#define CI24R1_FLAG_RX_READY
#define CI24R1_CMD_FLUSH_RX
#define CI24R1_CMD_SELSPI
#define CI24R1_CMD_R_RX_PL_WID
#define CI24R1_CMD_R_RX_PAYLOAD
void UART1_TxChar(char dat)
◆ CI24R1_SetChannel()
| void CI24R1_SetChannel |
( |
uint8_t |
channel | ) |
|
Definition at line 157 of file ci24r1.c.
158{
159 if (channel > 125) channel = 125;
161}
◆ CI24R1_SetRxAddress()
| void CI24R1_SetRxAddress |
( |
uint8_t * |
address | ) |
|
Definition at line 152 of file ci24r1.c.
153{
155}
void CI24R1_WriteFromBuf(uint8_t reg, const uint8_t *pBuf, uint8_t len)
◆ CI24R1_SetRxMode()
| void CI24R1_SetRxMode |
( |
void |
| ) |
|
◆ CI24R1_SetTxAddress()
| void CI24R1_SetTxAddress |
( |
uint8_t * |
address | ) |
|
◆ CI24R1_SetTxMode()
| void CI24R1_SetTxMode |
( |
void |
| ) |
|
◆ CI24R1_SPI_Test()
Definition at line 132 of file ci24r1.c.
133{
139 for (
i = 0;
i < 5;
i++) {
142 }
144}
◆ CI24R1_Switch1F_AF()
| void CI24R1_Switch1F_AF |
( |
uint8_t |
af | ) |
|
Definition at line 254 of file ci24r1.c.
255{
257
260 val |= (af & 0x03) << 6;
262
265 val |= (af & 0x0C) << 4;
267}
uint8_t val[MAX7219_BLOCKS]
◆ CI24R1_Tx()
Definition at line 193 of file ci24r1.c.
194{
196#if (CI24R1_PLOAD_WIDTH == 0)
198#else
200#endif
209 {
211 }
212
214 return status;
215}
void CI24R1_WriteCmd(uint8_t cmd)
#define CI24R1_CMD_W_TX_PAYLOAD
#define CI24R1_CMD_FLUSH_TX
#define CI24R1_FLAG_MAX_RT
◆ CI24R1_WriteByte()
| void CI24R1_WriteByte |
( |
uint8_t |
value | ) |
|
Definition at line 20 of file ci24r1.c.
21{
25 for (
i = 0;
i < 8;
i++)
26 {
29 {
31 }
32 else
33 {
35 }
38 }
40}
#define CI24R1_DATA_HIGH()
#define CI24R1_DATA_LOW()
◆ CI24R1_WriteCmd()
| void CI24R1_WriteCmd |
( |
uint8_t |
cmd | ) |
|
◆ CI24R1_WriteFromBuf()
Definition at line 91 of file ci24r1.c.
92{
96 for (ctr = 0; ctr < len; ctr++)
97 {
99 }
101}
◆ CI24R1_WriteReg()
◆ cbuf
◆ xbuf
◆ xbuf_data