add led and wakeup support

This commit is contained in:
Shuanglei Tao
2024-11-16 15:33:12 +08:00
parent 107f639b0b
commit 0cfacae939
8 changed files with 133 additions and 55 deletions

3
main.c
View File

@@ -187,6 +187,9 @@ static void conn_params_init(void)
*/
static void sleep_mode_enter(void)
{
// Prepare wakeup pin
ble_epd_sleep_prepare(&m_epd);
// Go to system-off mode (this function will not return; wakeup will cause a reset).
uint32_t err_code = sd_power_system_off();
APP_ERROR_CHECK(err_code);