|
|
@ -25,7 +25,7 @@ void debug_light_init(int io_index) { |
|
|
|
nrf_gpio_cfg(m_debug_light_io_index, // |
|
|
|
NRF_GPIO_PIN_DIR_OUTPUT, // |
|
|
|
NRF_GPIO_PIN_INPUT_DISCONNECT, // |
|
|
|
NRF_GPIO_PIN_NOPULL, // |
|
|
|
NRF_GPIO_PIN_PULLUP, // |
|
|
|
NRF_GPIO_PIN_S0S1, // |
|
|
|
NRF_GPIO_PIN_NOSENSE); |
|
|
|
|
|
|
@ -45,9 +45,11 @@ static void enter_sleep_tmr_cb(void* p_context) { |
|
|
|
ZLOGI("enter sleep mode, wakeup io index: %d", m_wakeup_io_index); |
|
|
|
|
|
|
|
if (m_wakeup_io_mirror) { |
|
|
|
nrf_gpio_cfg_sense_input(m_wakeup_io_index, BUTTON_PULL, NRF_GPIO_PIN_SENSE_LOW); |
|
|
|
nrf_gpio_cfg_sense_input(m_wakeup_io_index, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_LOW); |
|
|
|
nrf_gpio_cfg_sense_set(m_wakeup_io_index, NRF_GPIO_PIN_SENSE_LOW); |
|
|
|
} else { |
|
|
|
nrf_gpio_cfg_sense_input(m_wakeup_io_index, BUTTON_PULL, NRF_GPIO_PIN_SENSE_HIGH); |
|
|
|
nrf_gpio_cfg_sense_input(m_wakeup_io_index, NRF_GPIO_PIN_PULLUP, NRF_GPIO_PIN_SENSE_HIGH); |
|
|
|
nrf_gpio_cfg_sense_set(m_wakeup_io_index, NRF_GPIO_PIN_SENSE_HIGH); |
|
|
|
} |
|
|
|
|
|
|
|
// Go to system-off mode (this function will not return; wakeup will cause a reset). |
|
|
@ -80,7 +82,7 @@ static void gpio_io_state_monitor_tmr_cb(void* p_context) { |
|
|
|
ZLOGI("iostate %d:%d %d:%d %d:%d", m_io_index[0], nrf_gpio_pin_read(m_io_index[0]), // |
|
|
|
m_io_index[1], nrf_gpio_pin_read(m_io_index[1]), // |
|
|
|
m_io_index[2], nrf_gpio_pin_read(m_io_index[2])); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void zbsp_gpio_state_monitor_without_initio(int dumpstate_period, uint8_t* io_index, int32_t nio) { |
|
|
|