mt2523How press powerkey to achieve shutdown?
时间:10-02
整理:3721RD
点击:
1、powerkey driver only detect the power key event, like press, longpress, repeat and release. whether shutdonw or not , it determined by PMU module.
2、If PMU set to longpress shutdonw, when press on powerkey over than the PMU shutdonw setting time(default 8S), the MCU will be shutdown immediately.
PS: The longpress is the PMU longpress, not the powerkey driver longpress. In powerkey driver, the PMU longpress named as HAL_keypad_KEY_PMU_LONG_PRESS.
3、If PMU set to longpress not shutdown, when press on powerkey over than the PMU shutdonw setting time(default 8S), the powerkey driver call your callback function, you can get the key event HAL_KEYPAD_KEY_PMU_LONG_PRESS with API hal_keypad_powerkey_get_key(), and do something about shutdown flow in your callback function.
2、If PMU set to longpress shutdonw, when press on powerkey over than the PMU shutdonw setting time(default 8S), the MCU will be shutdown immediately.
PS: The longpress is the PMU longpress, not the powerkey driver longpress. In powerkey driver, the PMU longpress named as HAL_keypad_KEY_PMU_LONG_PRESS.
3、If PMU set to longpress not shutdown, when press on powerkey over than the PMU shutdonw setting time(default 8S), the powerkey driver call your callback function, you can get the key event HAL_KEYPAD_KEY_PMU_LONG_PRESS with API hal_keypad_powerkey_get_key(), and do something about shutdown flow in your callback function.
