| LibDriver NRF24L01 1.0.0 NRF24L01 full function driver

driver_nrf24l01_basic.h
Go to the documentation of this file.
1
37 #ifndef DRIVER_NRF24L01_BASIC_H
38 #define DRIVER_NRF24L01_BASIC_H
39
40 #include "driver_nrf24l01_interface.h"
41
42 #ifdef __cplusplus
43 extern "C"{
44 #endif
45
56 #define NRF24L01_BASIC_DEFAULT_CRCO NRF24L01_BOOL_TRUE
57 #define NRF24L01_BASIC_DEFAULT_ENABLE_CRC NRF24L01_BOOL_TRUE
58 #define NRF24L01_BASIC_DEFAULT_PIPE_0_AUTO_ACKNOWLEDGMENT NRF24L01_BOOL_TRUE
59 #define NRF24L01_BASIC_DEFAULT_PIPE_1_AUTO_ACKNOWLEDGMENT NRF24L01_BOOL_TRUE
60 #define NRF24L01_BASIC_DEFAULT_PIPE_2_AUTO_ACKNOWLEDGMENT NRF24L01_BOOL_TRUE
61 #define NRF24L01_BASIC_DEFAULT_PIPE_3_AUTO_ACKNOWLEDGMENT NRF24L01_BOOL_TRUE
62 #define NRF24L01_BASIC_DEFAULT_PIPE_4_AUTO_ACKNOWLEDGMENT NRF24L01_BOOL_TRUE
63 #define NRF24L01_BASIC_DEFAULT_PIPE_5_AUTO_ACKNOWLEDGMENT NRF24L01_BOOL_TRUE
64 #define NRF24L01_BASIC_DEFAULT_RX_PIPE_0 NRF24L01_BOOL_TRUE
65 #define NRF24L01_BASIC_DEFAULT_RX_PIPE_1 NRF24L01_BOOL_TRUE
66 #define NRF24L01_BASIC_DEFAULT_RX_PIPE_2 NRF24L01_BOOL_TRUE
67 #define NRF24L01_BASIC_DEFAULT_RX_PIPE_3 NRF24L01_BOOL_TRUE
68 #define NRF24L01_BASIC_DEFAULT_RX_PIPE_4 NRF24L01_BOOL_TRUE
69 #define NRF24L01_BASIC_DEFAULT_RX_PIPE_5 NRF24L01_BOOL_TRUE
70 #define NRF24L01_BASIC_DEFAULT_ADDRESS_WIDTH NRF24L01_ADDRESS_WIDTH_5_BYTES
71 #define NRF24L01_BASIC_DEFAULT_RETRANSMIT_DELAY 750
72 #define NRF24L01_BASIC_DEFAULT_RETRANSMIT_COUNT 10
73 #define NRF24L01_BASIC_DEFAULT_CHANNEL_FREQUENCY 20
74 #define NRF24L01_BASIC_DEFAULT_DATA_RATE NRF24L01_DATA_RATE_2M
75 #define NRF24L01_BASIC_DEFAULT_OUTPUT_POWER NRF24L01_OUTPUT_POWER_0_DBM
76 #define NRF24L01_BASIC_DEFAULT_PIPE_0_PAYLOAD 32
77 #define NRF24L01_BASIC_DEFAULT_PIPE_1_PAYLOAD 32
78 #define NRF24L01_BASIC_DEFAULT_PIPE_2_PAYLOAD 32
79 #define NRF24L01_BASIC_DEFAULT_PIPE_3_PAYLOAD 32
80 #define NRF24L01_BASIC_DEFAULT_PIPE_4_PAYLOAD 32
81 #define NRF24L01_BASIC_DEFAULT_PIPE_5_PAYLOAD 32
82 #define NRF24L01_BASIC_DEFAULT_PIPE_0_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
83 #define NRF24L01_BASIC_DEFAULT_PIPE_1_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
84 #define NRF24L01_BASIC_DEFAULT_PIPE_2_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
85 #define NRF24L01_BASIC_DEFAULT_PIPE_3_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
86 #define NRF24L01_BASIC_DEFAULT_PIPE_4_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
87 #define NRF24L01_BASIC_DEFAULT_PIPE_5_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
88 #define NRF24L01_BASIC_DEFAULT_DYNAMIC_PAYLOAD NRF24L01_BOOL_TRUE
89 #define NRF24L01_BASIC_DEFAULT_PAYLOAD_WITH_ACK NRF24L01_BOOL_FALSE
90 #define NRF24L01_BASIC_DEFAULT_TX_PAYLOAD_WITH_NO_ACK NRF24L01_BOOL_FALSE
91 #define NRF24L01_BASIC_DEFAULT_RX_ADDR_0 {0x1A, 0x01, 0x02, 0x03, 0x00}
92 #define NRF24L01_BASIC_DEFAULT_RX_ADDR_1 {0x1B, 0x01, 0x02, 0x03, 0x01}
93 #define NRF24L01_BASIC_DEFAULT_RX_ADDR_2 {0x1B, 0x01, 0x02, 0x03, 0x02}
94 #define NRF24L01_BASIC_DEFAULT_RX_ADDR_3 {0x1B, 0x01, 0x02, 0x03, 0x03}
95 #define NRF24L01_BASIC_DEFAULT_RX_ADDR_4 {0x1B, 0x01, 0x02, 0x03, 0x04}
96 #define NRF24L01_BASIC_DEFAULT_RX_ADDR_5 {0x1B, 0x01, 0x02, 0x03, 0x05}
101 typedef enum
102 {
103 NRF24L01_TYPE_TX = 0x00,
104 NRF24L01_TYPE_RX = 0x01,
105 } nrf24l01_type_t;
106
114 uint8_t nrf24l01_interrupt_irq_handler(void);
115
125 uint8_t nrf24l01_basic_init(nrf24l01_type_t type, void (*callback)(uint8_t type, uint8_t num, uint8_t *buf, uint8_t len));
126
134 uint8_t nrf24l01_basic_deinit(void);
135
146 uint8_t nrf24l01_basic_send(uint8_t *addr, uint8_t *buf, uint8_t len);
147
152 #ifdef __cplusplus
153 }
154 #endif
155
156 #endif
driver_nrf24l01_interface.h
driver nrf24l01 interface header file
nrf24l01_basic_send
uint8_t nrf24l01_basic_send(uint8_t *addr, uint8_t *buf, uint8_t len)
basic example send
Definition: driver_nrf24l01_basic.c:719
nrf24l01_type_t
nrf24l01_type_t
nrf24l01 type enumeration definition
Definition: driver_nrf24l01_basic.h:102
nrf24l01_interrupt_irq_handler
uint8_t nrf24l01_interrupt_irq_handler(void)
nrf24l01 irq
Definition: driver_nrf24l01_basic.c:48
nrf24l01_basic_deinit
uint8_t nrf24l01_basic_deinit(void)
basic example deinit
Definition: driver_nrf24l01_basic.c:697
nrf24l01_basic_init
uint8_t nrf24l01_basic_init(nrf24l01_type_t type, void(*callback)(uint8_t type, uint8_t num, uint8_t *buf, uint8_t len))
basic example init
Definition: driver_nrf24l01_basic.c:69
NRF24L01_TYPE_RX
@ NRF24L01_TYPE_RX
Definition: driver_nrf24l01_basic.h:104
NRF24L01_TYPE_TX
@ NRF24L01_TYPE_TX
Definition: driver_nrf24l01_basic.h:103