微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 手机设计讨论 > MTK手机平台交流 > mt2523How press powerkey to achieve shutdown?

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.

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top