feat: 完成弹力魔盒初版固件
This commit is contained in:
@@ -734,6 +734,17 @@ struct port_wakeup port0 = {
|
||||
.iomap = TCFG_IOKEY_POWER_ONE_PORT, //唤醒口选择
|
||||
};
|
||||
|
||||
#if BOARD_CHG_ENABLE
|
||||
/* R18 is not fitted on CBC3, so VBUS never reaches VPWR in softoff. Wake on
|
||||
* the fitted ME4054 CHG_ON signal instead; it falls when charging starts. */
|
||||
struct port_wakeup board_chg_wakeup_port = {
|
||||
.pullup_down_enable = ENABLE,
|
||||
.edge = FALLING_EDGE,
|
||||
.filter = PORT_FLT_8ms,
|
||||
.iomap = BOARD_CHG_PIN,
|
||||
};
|
||||
#endif
|
||||
|
||||
#if (TCFG_TEST_BOX_ENABLE || TCFG_CHARGESTORE_ENABLE || TCFG_ANC_BOX_ENABLE || TCFG_UMIDIGI_BOX_ENABLE)
|
||||
struct port_wakeup port1 = {
|
||||
.pullup_down_enable = DISABLE, //配置I/O 内部上下拉是否使能
|
||||
@@ -779,6 +790,9 @@ const struct wakeup_param wk_param = {
|
||||
.aport[1] = &vbat_port,
|
||||
.aport[2] = &ldoin_port,
|
||||
#endif
|
||||
#if BOARD_CHG_ENABLE
|
||||
.port[BOARD_CHG_WAKEUP_INDEX] = &board_chg_wakeup_port,
|
||||
#endif
|
||||
};
|
||||
|
||||
void gSensor_wkupup_disable(void)
|
||||
@@ -986,6 +1000,10 @@ void board_set_soft_poweroff(void)
|
||||
#if TCFG_IOKEY_ENABLE
|
||||
soff_gpio_protect(TCFG_IOKEY_POWER_ONE_PORT);
|
||||
#endif
|
||||
#if BOARD_CHG_ENABLE
|
||||
/* Preserve PG8 input state and its external pull-up for softoff wake. */
|
||||
soff_gpio_protect(BOARD_CHG_PIN);
|
||||
#endif
|
||||
|
||||
#if (!(TCFG_LP_TOUCH_KEY_ENABLE && TCFG_LP_TOUCH_KEY1_EN))
|
||||
//默认唤醒io
|
||||
@@ -1015,8 +1033,6 @@ void board_set_soft_poweroff(void)
|
||||
void sleep_exit_callback(u32 usec)
|
||||
{
|
||||
sleep_exit_callback_common(NULL);
|
||||
|
||||
putchar('>');
|
||||
}
|
||||
|
||||
void sleep_enter_callback(u8 step)
|
||||
@@ -1024,7 +1040,6 @@ void sleep_enter_callback(u8 step)
|
||||
/* 此函数禁止添加打印 */
|
||||
if (step == 1) {
|
||||
bsp_hw_sleep_pwm_off();
|
||||
putchar('<');
|
||||
} else {
|
||||
gpio_set_pull_up(TCFG_CHARGESTORE_PORT, 0);
|
||||
gpio_set_pull_down(TCFG_CHARGESTORE_PORT, 0);
|
||||
|
||||
Reference in New Issue
Block a user