@@ -125,33 +125,38 @@ because as i mentioned nrf24 does not returns in default values even after power
125125Enable/disable DPL:
126126
127127enable:
128+
128129 nrf24_dpl(enable);
129130
130131 nrf24_set_rx_dpl(pipe, enable);
131132
132133
133134disable:
134- nrf24_dpl(disable);
135135
136+ nrf24_dpl(disable);
137+
136138 nrf24_set_rx_dpl(pipe, disable);
137139
138140
139141
140142Enable/disable AUTO_ACK:
141143
142144enable:
145+
143146 nrf24_auto_ack_all(auto_ack);
144147
145148disable:
149+
146150 nrf24_auto_ack_all(no_auto_ack);
147151
148-
149- Can be enabled/disabled auto_ack on each pipe individualy:
152+ //Can be enabled/disabled auto_ack on each pipe individualy:
150153
151154enable:
155+
152156 nrf24_auto_ack(pipe, auto_ack);
153157
154158disable:
159+
155160 nrf24_auto_ack(pipe, no_auto_ack);
156161
157162 nrf24_auto_retr_delay(0);
@@ -162,12 +167,13 @@ disable:
162167Enable/disable ACK with payload:
163168
164169enable:
170+
165171 nrf24_auto_ack_all(auto_ack);
166172 nrf24_en_ack_pld(enable);
167173
168174 nrf24_auto_retr_delay(0);
169175 nrf24_auto_retr_limit(15);
170- ...........
176+
171177
172178disable:
173179
@@ -176,74 +182,74 @@ disable:
176182
177183 nrf24_auto_retr_delay(0);
178184 nrf24_auto_retr_limit(15);
179- ...........
185+
180186
181187
182188
183189Enable/disable and configure CRC:
184190
185191 nrf24_set_crc(en_crc, _1byte);
186192
187- First argument can be set as en_crc, which enables CRC, or no_crc, which disables CRC.
188- As second argument can be used _1byte or _2byte.
193+ // First argument can be set as en_crc, which enables CRC, or no_crc, which disables CRC.
194+ // As second argument can be used _1byte or _2byte.
189195
190196
191197
192198Set TX RF power:
193199
194200 nrf24_tx_pwr(_0dbm);
195201
196- Can be set used:
197- n18dbm = 0 -> MIN
198- n12dbm = 1
199- n6dbm = 2
200- _0dbm = 3 -> MAX
202+ // Can be set used:
203+ // n18dbm = 0 -> MIN
204+ // n12dbm = 1
205+ // n6dbm = 2
206+ // _0dbm = 3 -> MAX
201207
202208
203209
204210Set data rate:
205211
206212 nrf24_data_rate(_250kbps);
207213
208- Can be set used:
209- _1mbps = 0
210- _2mbps = 1
211- _250kbps = 2
214+ // Can be set used:
215+ // _1mbps = 0
216+ // _2mbps = 1
217+ // _250kbps = 2
212218
213219
214220
215221Set channel:
216222
217223 nrf24_set_channel(90);
218224
219- Can be used from 0 to 126 which is equivalent of 2400mhz to 2525mhz.
220- 1 = 1mhz
225+ // Can be used from 0 to 126 which is equivalent of 2400mhz to 2525mhz.
226+ // 1 = 1mhz
221227
222228
223229
224230Set payload size on individual pipe:
225231
226232 nrf24_pipe_pld_size(pipe, payload_size);
227233
228- pipe can be from 0 to 5
234+ // pipe can be from 0 to 5
229235
230- payload_size can be from 1 to 32
236+ // payload_size can be from 1 to 32
231237
232238
233239
234240Set Delay betwen Auto-retransmissions:
235241
236242 nrf24_auto_retr_delay(0);
237243
238- Can be set from 0 to 15.
244+ // Can be set from 0 to 15.
239245
240246
241247
242248Set Auto-retransmissions limit:
243249
244250 nrf24_auto_retr_limit(15);
245251
246- Can be set from 0 to 15
252+ // Can be set from 0 to 15
247253
248254
249255
@@ -261,11 +267,8 @@ Transmit:
261267
262268 nrf24_auto_ack_all(auto_ack);
263269 nrf24_en_ack_pld(enable);
264- ....
270+
265271 //and other configurations as well
266- ....
267-
268- ...............
269272
270273 uint8_t dataT[PLD_SIZE] = {"Hello"};
271274 uint8_t tx_ack_pld[PLD_SIZE];
@@ -282,11 +285,8 @@ Transmit:
282285
283286 nrf24_auto_ack_all(auto_ack);
284287 nrf24_en_ack_pld(enable);
285- ....
288+
286289 //and other configurations as well
287- ....
288-
289- ...............
290290
291291 uint8_t dataT[PLD_SIZE] = {"Hello"};
292292 nrf24_transmit_no_ack(dataT, sizeof(dataT));
@@ -312,21 +312,19 @@ Receive:
312312
313313 nrf24_auto_ack_all(auto_ack);
314314 nrf24_en_ack_pld(enable);
315- ....
315+
316316 //and other configurations as well
317- ....
318317
319- ...............
320318
321319 uint8_t dataR[PLD_SIZE];
322320 uint8_t rx_ack_pld[PLD_SIZE] = {"OK"}
323321
324- nrf24_listen();
322+ nrf24_listen();
325323
326- if(nrf24_data_available()){
327- nrf24_receive(dataR, sizeof(dataR));
328- nrf24_transmit_rx_ack_pld(0, rx_ack_pld, sizeof(rx_ack_pld));
329- }
324+ if(nrf24_data_available()){
325+ nrf24_receive(dataR, sizeof(dataR));
326+ nrf24_transmit_rx_ack_pld(0, rx_ack_pld, sizeof(rx_ack_pld));
327+ }
330328
331329
332330
0 commit comments