diff --git a/ChangeLog b/ChangeLog index 7ed20c82d2..eafb935383 100755 --- a/ChangeLog +++ b/ChangeLog @@ -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). diff --git a/drivers/wireless/nrf24l01.c b/drivers/wireless/nrf24l01.c index ab7402d773..eb6c3f68c8 100644 --- a/drivers/wireless/nrf24l01.c +++ b/drivers/wireless/nrf24l01.c @@ -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);