From: penglei <1624952103@qq.com> Date: Thu, 25 Apr 2024 01:57:50 +0000 (+0800) Subject: 低功耗优化,添加抬腕亮屏功能 X-Git-Tag: release_V1.2.70_20241020_135402~1131^2~2 X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=refs%2Fchanges%2F78%2Fhead;p=mirrors%2FFD230.git 低功耗优化,添加抬腕亮屏功能 --- diff --git a/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h b/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h index 9a4cdaa6a..1216792cd 100755 --- a/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h +++ b/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h @@ -291,7 +291,7 @@ const hal_gpio_config_t g_gpio_function_config[PIN_MAX_NUMBER] = { #ifdef ENABLE_CYWEE /**G sensor G_INT1 S_AGPIO_L11 G_INT2 S_AGPIO_L19*/ //{ S_AGPIO_L11, HAL_GPIO_DIRECTION_INPUT, HAL_GPIO_LEVEL_LOW, GPIO_INTERRUPT_RISING_EDGE, cywee_int1_callback }, - { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_RISING_EDGE, cywee_int1_callback }, + { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, NULL, GPIO_INTERRUPT_DEDGE, cywee_int1_callback }, // { S_AGPIO_L19, HAL_GPIO_DIRECTION_INPUT, HAL_GPIO_LEVEL_LOW, 0, NULL }, #endif /**S_AGPIO_R1 GPO alipay默认resetpin*/ diff --git a/code/sdk/drivers/peripheral/cywee/service/cywee_service.c b/code/sdk/drivers/peripheral/cywee/service/cywee_service.c index 27f6eb282..392d5013d 100644 --- a/code/sdk/drivers/peripheral/cywee/service/cywee_service.c +++ b/code/sdk/drivers/peripheral/cywee/service/cywee_service.c @@ -401,6 +401,7 @@ errcode_t uapi_cywee_service_init(void) void cywee_int1_callback(pin_t pin, uintptr_t param) { // PRINT("cywee_int1_callback %d 0x%X\n",pin,param); + uapi_gpio_clear_interrupt(pin); do_cywee_service_check_msg(CYWEE_SERVICE_CMD_TIMER_CHECK, NULL); } diff --git a/code/sdk/drivers/peripheral/cywee/src/main_dml.c b/code/sdk/drivers/peripheral/cywee/src/main_dml.c index a4325f545..793de1b15 100644 --- a/code/sdk/drivers/peripheral/cywee/src/main_dml.c +++ b/code/sdk/drivers/peripheral/cywee/src/main_dml.c @@ -41,10 +41,6 @@ static uint8_t hrs = 0; uint8_t hrs_mode_state = 0; -static float s_data[25][3] = {0}; - -static int i = 0; - void hand_updown_switch(int cmd) { if(cmd == 1) @@ -856,7 +852,7 @@ int cywee_main_dml(void) CWM_Sensor_Enable(IDX_REQUEST_SENSOR); // //CWM_OS_dbgPrintf("[DBG] %s %d\n", __func__,__LINE__); - + CWM_Sensor_Enable(IDX_ALGO_WATCH_HANDUP); CWM_Sensor_Enable(IDX_ALGO_ACTIVITY_OUTPUT); //CWM_Sensor_Enable(IDX_ALGO_INACTIVITY_OUTPUT); //CWM_Sensor_Enable(IDX_ALGO_SEDENTARY); @@ -892,25 +888,5 @@ int cywee_main_dml(void) void cywee_int_handler(void) { - // uint64_t ts_ns =CWM_OS_GetTimeNs(); - - // int ret = CWM_CustomSensorInput_Fifo_Start(CUSTOM_ACC, ts_ns , 40*1e6); - // CWM_OS_dbgPrintf("cywee_int_handler ts_seconds %d , CWM_CustomSensorInput_Fifo_Start ret 0x%X \r\n",ts_ns,ret); - // if (ret == 0 ) - // { - // for (int i = 0; i < 25; i ++) - // { - // memset(&csd, 0, sizeof(CustomSensorData)); - // csd.sensorType = CUSTOM_ACC; - // csd.fData[0] = s_data[i][0]; - // csd.fData[1] = s_data[i][1]; - // csd.fData[2] = s_data[i][2]; - // CWM_CustomSensorInput(&csd); - // } - - // } - // CWM_CustomSensorInput_Fifo_End(CUSTOM_ACC); - - // ret = CWM_Dml_process(); CWM_Dml_process(); } diff --git a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c index 8f69c3422..a0b722367 100644 --- a/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c +++ b/code/sdk/drivers/peripheral/ppg/hx3695/hx3695.c @@ -337,7 +337,6 @@ void hx3695_5000ms_timer_cfg(bool en) } else { - PRINT("555\r\n"); hx3695_wear_mode_timers_stop(); }