From: penglei <1624952103@qq.com> Date: Fri, 7 Jun 2024 01:19:55 +0000 (+0800) Subject: Merge branch 'sdk602patch0521' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0... X-Git-Tag: release_V1.2.70_20241020_135402~1025^2~5 X-Git-Url: http://git.snicker.com.cn/css/static/gitweb.css?a=commitdiff_plain;h=36e89eb4e7edb66918e74d4481030d040b012c4f;p=mirrors%2FFD230.git Merge branch 'sdk602patch0521' of https://codeup.aliyun.com/64191456b9581d62e8f81ac0/FD230 into remotes/origin/sdk602patch0521 --- 36e89eb4e7edb66918e74d4481030d040b012c4f diff --cc code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h index e585505f8,3ed74a4dc..1073ee74e --- a/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h +++ b/code/sdk/drivers/boards/brandy_evb/board_config/board_evb.h @@@ -173,6 -173,6 +173,7 @@@ const hal_pio_config_t g_pio_function_c { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L17 HX3507_INT not use { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L18 VDDEN //暂时无用,采用VDDIO 默认开启 EXt V3.0 EXt V1.8 { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L19 G_INT2 //暂时不用 ++ { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_DOWN, HAL_PIO_IE_DISABLE }, // S_AGPIO_L19 G_INT2 //暂时不用 { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE }, // S_AGPIO_L20 0.2C_CHRG { HAL_PIO_FUNC_GPIO, HAL_PIO_DRIVE_MAX, HAL_PIO_PULL_MAX, HAL_PIO_IE_DISABLE }, // S_AGPIO_L21 NTC_VDD_ON 给低打开 NTC上拉电源 diff --cc code/sdk/drivers/peripheral/cywee/src/main_dml.c index b6c48a847,317d8fe88..fa4308329 --- a/code/sdk/drivers/peripheral/cywee/src/main_dml.c +++ b/code/sdk/drivers/peripheral/cywee/src/main_dml.c @@@ -479,9 -494,23 +494,24 @@@ void CWM_AP_SensorListen(pSensorEVT_t s (int)sensorEVT->fData[10]); memset(&c_inactivity_result_t,0,sizeof(cywee_inactivity_result_t)); c_inactivity_result_t.output_number = (int)sensorEVT->fData[0]; ++ c_inactivity_result_t.output_number = (int)sensorEVT->fData[0]; c_inactivity_result_t.sedentary_status = (int)sensorEVT->fData[2]; c_inactivity_result_t.stand_freq = (int)sensorEVT->fData[3]; - cywee_func(CYWEE_MSG_TYPE_INACTIVITY_UPDATE,&c_inactivity_result_t,sizeof(cywee_inactivity_result_t)); + + if(c_inactivity_result_t.sedentary_status == 1) + { + sedentary_interval_count++; + if(sedentary_interval_count == sedentary_interval) + { + sedentary_interval_count = 0; + cywee_func(CYWEE_MSG_TYPE_INACTIVITY_UPDATE,&c_inactivity_result_t,sizeof(cywee_inactivity_result_t)); + } + } + else if(c_inactivity_result_t.sedentary_status != 3) + { + sedentary_interval_count = 0; + cywee_func(CYWEE_MSG_TYPE_INACTIVITY_UPDATE,&c_inactivity_result_t,sizeof(cywee_inactivity_result_t)); + } }else if((int)sensorEVT->fData[0] == 21){ CWM_OS_dbgPrintf("inactivity_mode_number[%d], sleep status[%d], month[%d], day[%d], hour[%d], min[%d]\n", @@@ -781,9 -827,9 +828,9 @@@ int cywee_main_dml(void memset(&scl, 0, sizeof(scl)); scl.iData[0] = 1; scl.iData[7] = 5; //轴向配置 -#if 0 +#if 1 scl.iData[3] = 2; - scl.iData[4] = 2; //1 anytime 2 fifo + scl.iData[4] = 1; //1 anytime 2 fifo scl.iData[6] = 25; //先設定5 scl.iData[8] = 26; // for st sensor(52Hz) #else