NRF24L01: Fix backward calculation of relative frequency. Noted by Henry Zhang
This commit is contained in:
parent
84cd720479
commit
1f8212679c
@ -11649,4 +11649,6 @@
|
||||
configurations (2015-04-14).
|
||||
* Framebuffer driver: Add a display number to each interface in order
|
||||
to support multiple display devices (2015-04-14).
|
||||
* drivers/wireless/nrf24l01.c: Fix backward calculation of relative
|
||||
frequency. Noted by Henry Zhang (2015-04-15).
|
||||
|
||||
|
@ -1590,7 +1590,7 @@ int nrf24l01_setradiofreq(FAR struct nrf24l01_dev_s *dev, uint32_t freq)
|
||||
|
||||
CHECK_ARGS(dev && freq >= NRF24L01_MIN_FREQ && freq <= NRF24L01_MAX_FREQ);
|
||||
|
||||
value = NRF24L01_MIN_FREQ - freq;
|
||||
value = freq - NRF24L01_MIN_FREQ;
|
||||
nrf24l01_lock(dev->spi);
|
||||
nrf24l01_writeregbyte(dev, NRF24L01_RF_CH, value);
|
||||
nrf24l01_unlock(dev->spi);
|
||||
|
Loading…
Reference in New Issue
Block a user