Merged in fbraghiroli/nuttx/fix_nrf24l01 (pull request #922)
nrf24l01: fix PIPENO/PKTLEN bitmask in rx fifo header In RX fifo header, the first byte should use 5 lsb to store PKTLEN and 3 msb to store PIPENO. However, FIFO_PIPENO_SHIFT was set to 4 which causes the lsb of pipe number to interfere with the received packet size stored in the fifo. This fix rx corruption when using pipe number > 0. Signed-off-by: Federico Braghiroli <federico.braghiroli@gmail.com> Approved-by: Gregory Nutt <gnutt@nuttx.org>
This commit is contained in:
parent
3f9ef89e19
commit
2dd1b330e5
@ -116,7 +116,7 @@
|
||||
#define FIFO_PKTLEN_MASK 0x1F /* 5 ls bits used to store packet length */
|
||||
#define FIFO_PKTLEN_SHIFT 0
|
||||
#define FIFO_PIPENO_MASK 0xE0 /* 3 ms bits used to store pipe # */
|
||||
#define FIFO_PIPENO_SHIFT 4
|
||||
#define FIFO_PIPENO_SHIFT 5
|
||||
|
||||
#define FIFO_PKTLEN(dev) \
|
||||
(((dev->rx_fifo[dev->nxt_read] & FIFO_PKTLEN_MASK) >> FIFO_PKTLEN_SHIFT) + 1)
|
||||
|
Loading…
Reference in New Issue
Block a user