summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <daniel.friesel@uos.de>2020-10-26 09:30:50 +0100
committerDaniel Friesel <daniel.friesel@uos.de>2020-10-26 09:30:50 +0100
commit3f6539e947e10859a81f808263d53e989e070e46 (patch)
tree1138f2c005d8c421e9d718cdbdcdd87129120503
parentc5a37ca21e3360059bcd2caf006c764947b73e58 (diff)
nrf24: Add powerDown transitionmerge-prep/lennart
-rw-r--r--model/driver/nrf24l01.dfa3
-rw-r--r--src/driver/nrf24l01.cc2
2 files changed, 4 insertions, 1 deletions
diff --git a/model/driver/nrf24l01.dfa b/model/driver/nrf24l01.dfa
index b5bcb6e..56b498d 100644
--- a/model/driver/nrf24l01.dfa
+++ b/model/driver/nrf24l01.dfa
@@ -69,6 +69,9 @@ transition:
datarate: 'Nrf24l01::RF24_1MBPS'
tx_power: 'Nrf24l01::RF24_PA_MAX'
channel: 76
+ powerDown:
+ src: [STANDBY1]
+ dst: POWEROFF
setAutoAck:
src: [STANDBY1]
dst: STANDBY1
diff --git a/src/driver/nrf24l01.cc b/src/driver/nrf24l01.cc
index 1cde2ba..bdb7d7f 100644
--- a/src/driver/nrf24l01.cc
+++ b/src/driver/nrf24l01.cc
@@ -128,7 +128,7 @@ void Nrf24l01::powerUp(void)
// For nRF24L01+ to go from power down mode to TX or RX mode it must first pass through stand-by mode.
// There must be a delay of Tpd2stby (see Table 16.) after the nRF24L01+ leaves power down mode before
// the CEis set high. - Tpd2stby can be up to 5ms per the 1.0 datasheet
- arch.delay_us(5);
+ arch.delay_ms(5);
}
}