Re-implement sleep/wakeup for touch panel, display, NOR Flash, SPI and TWI.
This commit is contained in:
@@ -137,4 +137,16 @@ void TwiMaster::Write(uint8_t deviceAddress, const uint8_t *data, size_t size, b
|
||||
uint32_t error = twiBaseAddress->ERRORSRC;
|
||||
twiBaseAddress->ERRORSRC = error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void TwiMaster::Sleep() {
|
||||
nrf_gpio_cfg_default(6);
|
||||
nrf_gpio_cfg_default(7);
|
||||
twiBaseAddress->ENABLE = 0;
|
||||
NRF_LOG_INFO("[TWIMASTER] Sleep");
|
||||
}
|
||||
|
||||
void TwiMaster::Wakeup() {
|
||||
Init();
|
||||
NRF_LOG_INFO("[TWIMASTER] Wakeup");
|
||||
}
|
||||
|
Reference in New Issue
Block a user