Commit 89ee96e
authored
Merge pull request #22 from TMRh20/Adjust-Available
Adjust available function to let the radio receive more data immediately
- Move TASKS_START from the read() function to end of available() : Essentially utilize the 2-layer FIFO instead of single layer - Start reception as soon as the available() function ends, so that the radio can receive a packet while we are reading in the already received packet that has been copied into the user buffer
- When returning from available(), only restart reception by calling NRF_RADIO->TASKS_START = 1; if in listening mode.1 file changed
+21
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
207 | | - | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
208 | 210 | | |
209 | 211 | | |
210 | 212 | | |
211 | | - | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
212 | 216 | | |
213 | 217 | | |
214 | 218 | | |
215 | | - | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
| |||
299 | 305 | | |
300 | 306 | | |
301 | 307 | | |
302 | | - | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
303 | 311 | | |
304 | 312 | | |
305 | 313 | | |
| |||
312 | 320 | | |
313 | 321 | | |
314 | 322 | | |
315 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
316 | 326 | | |
317 | 327 | | |
318 | 328 | | |
319 | 329 | | |
320 | 330 | | |
321 | 331 | | |
322 | | - | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
323 | 335 | | |
324 | 336 | | |
325 | 337 | | |
| |||
339 | 351 | | |
340 | 352 | | |
341 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
342 | 357 | | |
343 | 358 | | |
344 | 359 | | |
| |||
354 | 369 | | |
355 | 370 | | |
356 | 371 | | |
357 | | - | |
358 | | - | |
359 | | - | |
360 | 372 | | |
361 | 373 | | |
362 | 374 | | |
| |||
0 commit comments