drivers/nrf24l01: Change pipe addrs in test to match Arduino addrs.

These addresses were initially chosen to match the nRF24 Arduino library
examples but they are byte-reversed.  So change them to be on-air
compatible with the Arduino library.

Also, the data sheet for the nRF24 says that RX data pipes 1-5 must share
the same top 32-bits, and must differ only in the LSbyte.  The addresses
used here (while correct because they are on TX pipe and RX pipe 0) are
misleading in this sense, because it looks like they were chosen to share
the top 32-bits per the datasheet.
v1.13-wasp-os
Peter Hinch 2020-02-11 06:31:16 +00:00 committed by Damien George
parent baf11f237b
commit d2f22ea953
1 changed files with 3 additions and 1 deletions

View File

@ -23,7 +23,9 @@ elif sys.platform == 'esp32': # Software SPI
else:
raise ValueError('Unsupported platform {}'.format(sys.platform))
pipes = (b'\xf0\xf0\xf0\xf0\xe1', b'\xf0\xf0\xf0\xf0\xd2')
# Addresses are in little-endian format. They correspond to big-endian
# 0xf0f0f0f0e1, 0xf0f0f0f0d2
pipes = (b'\xe1\xf0\xf0\xf0\xf0', b'\xd2\xf0\xf0\xf0\xf0')
def master():
csn = Pin(cfg['csn'], mode=Pin.OUT, value=1)