1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

nrf24l01p: Remove superfluous delays in nrf24l01p_on, nrf24l01p_off.

The delays were introduced in an attempt to fix "inexplicable timing
errors", although the errors were in the SPI bus driver rather than the
nrf24l01p driver.

See also:
 - https://github.com/RIOT-OS/RIOT/pull/1704
 - https://github.com/RIOT-OS/RIOT/pull/2315

Signed-off-by: Joakim Gebart <joakim.gebart@eistec.se>
This commit is contained in:
Joakim Gebart 2015-01-19 16:34:52 +01:00
parent a991d7c58e
commit b6d94d9525

View File

@ -190,9 +190,7 @@ int nrf24l01p_on(nrf24l01p_t *dev)
int status;
nrf24l01p_read_reg(dev, REG_CONFIG, &read);
hwtimer_spin(DELAY_CS_TOGGLE_TICKS);
status = nrf24l01p_write_reg(dev, REG_CONFIG, (read | PWR_UP));
hwtimer_spin(DELAY_CS_TOGGLE_TICKS);
hwtimer_wait(DELAY_CHANGE_PWR_MODE_US);
@ -205,9 +203,7 @@ int nrf24l01p_off(nrf24l01p_t *dev)
int status;
nrf24l01p_read_reg(dev, REG_CONFIG, &read);
hwtimer_spin(DELAY_CS_TOGGLE_TICKS);
status = nrf24l01p_write_reg(dev, REG_CONFIG, (read & ~PWR_UP));
hwtimer_spin(DELAY_CS_TOGGLE_TICKS);
hwtimer_wait(DELAY_CHANGE_PWR_MODE_US);