123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644 |
- /*********************************************************************
- *
- * 文件名: User_task.c
- * 功能描述:定时器任务
- * 作者: 陈俊超
- * 时间:2020-11-20
- *
- ********************************************************************/
- #include "User_task.h"
- #include "app_fifo.h"
- #include "main.h"
- /********************** 变量区 **************************************/
- APP_TIMER_DEF(m_MoveCheck_timer);
- APP_TIMER_DEF(m_CheckEsbCmd_timer);
- APP_TIMER_DEF(m_MilliSecond_timer);
- APP_TIMER_DEF(m_TranForStep_timer);
- static app_fifo_t m_MainEvent_fifo;
- volatile uint8_t SystemTimer_Minutes =0;//分钟计数器
- TranforStep_type m_tranforStep={0,0,0,0,false,false,{0}};
- ShoesInforMation_type m_shoes_info={0,0,{0}};
- Motion_Detect_type m_motion_detect={0,0,Motion_Release,Stop_Mode};
- motor_control_type m_motor_control={false,0};
- extern volatile bool HardWareTime_10ms_Flag;
- extern void process_motion(IMU_DAT_t* p);
- IMU_DAT_t m_IMU_DAT_t;
- /********************** 函数区 **************************************/
-
- /**********************************************************
- * 函数名字:AcquireTempPowerSend
- * 函数作用:获取电池电量并且通过ESB发送
- * 函数参数: SendTime: 发送次数
- * SendInternal_ms: 发送时间间隔
- * 函数返回值:无
- ***********************************************************/
- static void AcquireTempPowerSend(uint8_t SendTime,uint8_t SendInternal_ms)
- {
- uint8_t buf[100];
- uint8_t length=0;
- uint8_t Esb_sendTime=0;
- m_shoes_info.power=GetBatteryCurrentPersent();
- m_shoes_info.inner_temperature=Acquire_nrf_temp();
- m_shoes_info.pressure[2]=(m_IMU_DAT_t.h.press&0xff00)>>8;
- m_shoes_info.pressure[3]=m_IMU_DAT_t.h.press&0x00ff;
- buf[length++]=UPDATE_BASEINFO;
- buf[length++]=m_shoes_info.power;
- buf[length++]=m_shoes_info.inner_temperature;
- buf[length++]=m_shoes_info.pressure[0];
- buf[length++]=m_shoes_info.pressure[1];
- buf[length++]=m_shoes_info.pressure[2];
- buf[length++]=m_shoes_info.pressure[3];
- #if DEBUG_EN
- //SEGGER_RTT_printf(0,"output power= %d%% ,temperature= %d ,pressure= 0x%x 0x%x 0x%x 0x%x\n",m_shoes_info.power,m_shoes_info.inner_temperature,m_shoes_info.pressure[0],m_shoes_info.pressure[1],m_shoes_info.pressure[2],m_shoes_info.pressure[3]);
- #endif
- for(Esb_sendTime=0;Esb_sendTime<SendTime;Esb_sendTime++){
- send_protocol(DEX_NUM,CMD_UPDATE,buf,length);
- if(SendInternal_ms !=0)nrf_delay_ms(SendInternal_ms);
- }
- }
- /**********************************************************
- * 函数名字:Led_Pross
- * 函数作用:错误灯提示
- * 函数参数:void
- * 函数返回值:无
- ***********************************************************/
- static void SensorFailLed_Pross(void)
- {
- static uint32_t CurrentTime =0,led_R_time =0;
- static bool Led_G_flag =false;
- if(TIME_GetTicks()-CurrentTime>=1000){
- CurrentTime = TIME_GetTicks();
- if(0 == m_IMU_DAT_t.h.press){
- nrf_gpio_pin_toggle(LED_G);
- Led_G_flag =true;
- }
- else if(Led_G_flag){
- nrf_gpio_pin_write(LED_G,1);
- Led_G_flag =false;
- }
- }
- if(TIME_GetTicks()-led_R_time>=1200){
- led_R_time = TIME_GetTicks();
- if(0 == m_IMU_DAT_t.h.acc[2] && (Game_Mode == m_motion_detect.state))
- {
- nrf_gpio_pin_toggle(LED_R);
- }
- else nrf_gpio_pin_write(LED_R,1);
- }
- }
- /**********************************************************
- * 函数名字:FeedDog_Pross
- * 函数作用:喂狗定时任务
- * 函数参数:void
- * 函数返回值:无
- ***********************************************************/
- static void FeedDog_Pross(void)
- {
- static uint32_t CurrentTime =0;
- if(TIME_GetTicks()-CurrentTime>=FEED_WATCHDOG_INTERVAL){
- CurrentTime = TIME_GetTicks();
- User_Feed_watchDog();
- }
- }
- /**********************************************************
- * 函数名字:GetBatteryVoltage_Pross
- * 函数作用:获取电池电压的定时任务
- * 函数参数:void
- * 函数返回值:无
- ***********************************************************/
- static void GetBatteryVoltage_Pross(void)
- {
- static uint32_t GetBattery_time =0;
- if(TIME_GetTicks()-GetBattery_time>=GET_BATTERY_INTERVAL){
- GetBattery_time = TIME_GetTicks();
- User_SAADC_DisOrEnable(Enable);
- GetBatteryVoltage_adc();
- User_SAADC_DisOrEnable(DisEnable);
- }
- }
- /**********************************************************
- * 函数名字:OneHourSaveStep_To_Flash
- * 函数作用:
- * 函数参数:无
- * 函数返回值:无
- ***********************************************************/
- static uint8_t SaveStepflag =0;
- static void SaveStepToFlash_pross(void)
- {
- static uint32_t one_time =0;
- static uint8_t SaveTime =0;
- switch(SaveStepflag){
- case 1:
- if(Update_StepToflash())SaveStepflag =0;
- else {
- SaveStepflag =2;
- SaveTime =0;
- one_time = TIME_GetTicks();
- }
- break;
- case 2:
- if(TIME_GetTicks()-one_time >= 200){
- one_time = TIME_GetTicks();
- if(Update_StepToflash() || SaveTime > 3){
- SaveStepflag =0;
- }
- else SaveTime++;
- }
- break;
- }
- }
- /**********************************************************
- * 函数名字:一分钟定时任务
- * 函数作用:获取电池电压的定时任务
- * 函数参数:void
- * 函数返回值:无
- ***********************************************************/
- static void OneMinutes_pross(void)
- {
- static uint32_t one_time =0;
- if(TIME_GetTicks()-one_time>=60000){
- one_time = TIME_GetTicks();
- SystemTimer_Minutes++;
- if(SystemTimer_Minutes >= UpdateFlashTimer_INTERVAL){//1小时
- SystemTimer_Minutes =0;
- TranforMainEvent_Fifo(UpdateStep_Event);
- OneHour_Step();
- }
- }
- }
- /**
- @brief 电量灯指示
- @param callinterval_ms:函数调用间隔,单位为ms
- */
- static void powerled_indicate(uint32_t callinterval_ms)
- {
- IMU_DAT_t mIMU;
- uint16_t power_val = 0;
- int16_t acc_z = 0;
- static uint8_t powerled_lightcount = 0,resetflag = 0;
- static bool ReverseLedFlag = false;
- MPU9250_ReadData(mIMU.h.gyr,mIMU.h.acc,mIMU.h.mag,&mIMU.h.temperature);
- acc_z = mIMU.h.acc[2];
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"h_az=%d\n",acc_z);
- #endif
- //倾斜范围 -3000 ~ 400
- if(acc_z >= -3000 && acc_z<=900 &&resetflag){ //-2252 ~ -2058 倾斜
- powerled_lightcount = 9000 / callinterval_ms; //亮灯时间:9s
- ReverseLedFlag = true;
- }
- //平躺范围 >= 1800
- if(acc_z >= 1800){ //1990-2005 平躺
- resetflag = 1;
- }
-
- //灯亮
- if(powerled_lightcount > 0){
- powerled_lightcount--;
- power_val = GetBatteryCurrentPersent();
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"currentPower:%d\n",power_val);
- #endif
- if(power_val >= 20){ //20%的电量
- nrf_gpio_pin_write(LED_G,0);
- }
- else{
- //橙灯亮
- nrf_gpio_pin_write(LED_R,0);
- nrf_gpio_pin_write(LED_G,0);
- }
- resetflag = 0;
- }
- else{
- if(!ReverseLedFlag)return;
- nrf_gpio_pin_write(LED_R,1);
- nrf_gpio_pin_write(LED_G,1);
- nrf_gpio_pin_write(LED_B,1);
- ReverseLedFlag = false;
- }
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"powerled_lightcount=%d\r,resetflag=%d\n",powerled_lightcount, resetflag);
- #endif
- }
- /**********************************************************
- * 函数名字:Battery_led_process
- * 函数作用:电池状态灯显示
- * 函数参数:无
- * 函数返回值:无
- ***********************************************************/
- void Battery_led_process(void)
- {
- static uint32_t tim=0;
-
- if(TIME_GetTicks()-tim>=3000){ tim = TIME_GetTicks();
- powerled_indicate(3000);
- }
-
- }
- /**********************************************************
- * 函数名字:Battery_led_process
- * 函数作用:电池状态灯显示
- * 函数参数:无
- * 函数返回值:无
- ***********************************************************/
- void Charge_led_process(void)
- {
- static uint32_t tim=0;
- static uint8_t charge_Flag = 0;
- if(TIME_GetTicks()-tim>=1000){
- tim = TIME_GetTicks();
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"led state:%d\n",nrf_gpio_pin_read(8));
- #endif
- // if(1 == charge_Flag){
- // if(1 == nrf_gpio_pin_read(8)){//充满电拔出
- // charge_Flag =0;
- // nrf_gpio_pin_write(LED_R,1);
- // nrf_gpio_pin_write(LED_G,1);
- // nrf_gpio_cfg_input(8,NRF_GPIO_PIN_PULLUP);
- // }
- // }
- // else{
- if(0 == nrf_gpio_pin_read(8)){
- if(GetBatteryCurrentPersent() >=100)
- {
- nrf_gpio_pin_write(LED_R,1);
- nrf_gpio_pin_write(LED_G,0);
- //if(charge_Flag !=1)nrf_gpio_cfg_input(8,NRF_GPIO_PIN_NOPULL);
- charge_Flag =1;
- }
- else {
- nrf_gpio_pin_write(LED_R,0);
- nrf_gpio_pin_write(LED_G,0);
- charge_Flag =2;
- }
- }
- else if(charge_Flag != 0){
- charge_Flag =0;
- nrf_gpio_pin_write(LED_R,1);
- nrf_gpio_pin_write(LED_G,1);
- nrf_gpio_cfg_input(8,NRF_GPIO_PIN_PULLUP);
- }
- // }
- }
- }
-
- /**********************************************************
- * 函数名字:TranforMainEvent_Fifo
- * 函数作用:传输事件到队列当中
- * 函数参数:m_event:需要传输的事件
- * 函数返回值:无
- ***********************************************************/
- void TranforMainEvent_Fifo(MainEvent m_event)
- {
- uint8_t data=0;
- uint32_t length=1,ret_code=0;
- data = m_event;
- ret_code = app_fifo_write(&m_MainEvent_fifo,&data,&length);
- #if DEBUG_EN
- if(ret_code != NRF_SUCCESS)SEGGER_RTT_printf(0,"fifo error:%d\n",ret_code);
- #endif
- }
- /**********************************************************
- * 函数名字:User_Task_loop
- * 函数作用: 循环检测主任务
- * 函数参数: 无
- * 函数返回值:无
- ***********************************************************/
- extern volatile bool SetpSendFLag;
- void User_Task_loop(void)
- {
- uint8_t msg_Event;
- uint32_t err_code;
- static bool Current_Movestate =false;//鞋子当前状态,静止,移动
- uint8_t systemtime_temp[8]={0};
- #if 0
-
- static uint32_t tim=0;
- static uint32_t fps=0;
- static uint32_t fps_max=0;
- fps = TIME_GetTicks()-fps;
- if(fps_max<fps) fps_max = fps;
- fps = TIME_GetTicks();
- if(TIME_GetTicks()-tim>=1000){
- tim = TIME_GetTicks();
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"main timer=%d\rms\n",fps_max);
- #endif
- fps_max = 0;
- }
- #endif
- if(HardWareTime_10ms_Flag){
- OY_SetValue_False(HardWareTime_10ms_Flag);
- //process_motion(&m_IMU_DAT_t);
- (void) nrf_esb_flush_tx();
- (void) nrf_esb_start_rx();
- }
- if(SetpSendFLag && m_tranforStep.StartFlag){
- User_Esb_Set(Enable);
- SendStep_Packet_ToEsb();
- nrf_delay_ms(1);
- SetpSendFLag =false;
- }
- FeedDog_Pross();
- GetBatteryVoltage_Pross();
- OneMinutes_pross();
- SaveStepToFlash_pross();
- Charge_led_process();
- if(m_motion_detect.state != Game_Mode)Battery_led_process();
- else SensorFailLed_Pross();
- if(app_fifo_get(&m_MainEvent_fifo, &msg_Event) == NRF_SUCCESS)
- {
- switch(msg_Event)
- {
- case Move_Event:
- if(Current_Movestate)return;
- OY_SetValue_True(Current_Movestate);
- err_code = app_timer_stop(m_CheckEsbCmd_timer);
- APP_ERROR_CHECK(err_code);
- err_code = app_timer_start(m_CheckEsbCmd_timer, APP_TIMER_TICKS(300), NULL);
- APP_ERROR_CHECK(err_code);
- break;
- case No_MoveOverTime_Event:
- if(!Current_Movestate)return;
- OY_SetValue_False(Current_Movestate);
- err_code = app_timer_stop(m_CheckEsbCmd_timer);
- APP_ERROR_CHECK(err_code);
- err_code = app_timer_start(m_CheckEsbCmd_timer, APP_TIMER_TICKS(CheckEsbCmd_INTERVAL), NULL);
- APP_ERROR_CHECK(err_code);
- break;
- case Quit_GameMode_Event:
- User_HardwareTime_Set(DisEnable);
- User_Esb_Set(Enable);
- send_protocol_game(OutGameMode_cmd,2,1);
- nrf_gpio_pin_write(LED_RUN,1);
- if(Stop_Mode == m_motion_detect.state)return;
- #if (MPU_SENSOR == MPU_SENSOR_6050)
- MPU6050_sheep();
- #else
- MPU9250_LowPowerAccelModeInit();
- #endif
- m_motion_detect.state = Stop_Mode;
- User_Esb_Set(DisEnable);
- nrf_gpio_pin_write(MT_EN,0);
- break;
- case Into_GameMode_Event:
- User_Esb_Set(Enable);
- send_protocol_game(InGameMode_cmd,2,1);
- if(Game_Mode == m_motion_detect.state)return;
- OY_ClearValue_Zero(m_motion_detect.QuitGameHoldTime);
- #if (MPU_SENSOR == MPU_SENSOR_6050)
- MPU6050_Init_reg();
- #else
- MPU9250_init();
- #endif
- m_motion_detect.state = Game_Mode;
- User_HardwareTime_Set(Enable);
- break;
- case CheckEsbRxData_Event:
- User_Esb_Set(Enable);
- AcquireTempPowerSend(3,1);
- if(!m_tranforStep.StartFlag){
- nrf_delay_ms(2);
- User_Esb_Set(DisEnable);
- }
- break;
- case UpdateStep_Event:
- SaveStepflag = 1;
- break;
- case Resquest_Step_Event:
- if(m_tranforStep.StartFlag){
- User_Esb_Set(Enable);
- Rsponse_ReqStepCmd(m_tranforStep.Packetlength);
- return;
- }
- memcpy(systemtime_temp, &m_tranforStep.systemtime[0],8);
- memset(&m_tranforStep,0,sizeof(TranforStep_type));
- memcpy(&m_tranforStep.systemtime[0],systemtime_temp,8);
- m_tranforStep.CurrentPacket =0x01;
- Calculate_Send_Packet();
- User_Esb_Set(Enable);
- Rsponse_ReqStepCmd(m_tranforStep.Packetlength);
- if(m_tranforStep.Packetlength >=1){//有数据的时候启动定时器发送
- OY_SetValue_True(m_tranforStep.StartFlag);
- app_timer_stop(m_TranForStep_timer);
- err_code = app_timer_start(m_TranForStep_timer, APP_TIMER_TICKS(TranforStep_INTERVAL), NULL);
- APP_ERROR_CHECK(err_code);
- }
- else OY_SetValue_False(m_tranforStep.StartFlag);
- break;
- case SendStep_Packet_Event:
- User_Esb_Set(Enable);
- SendStep_Packet_ToEsb();
- //User_Esb_Set(DisEnable);
- break;
- case Stop_SendStep_Packet_Event:
- app_timer_stop(m_TranForStep_timer);
- APP_ERROR_CHECK(err_code);
- OY_SetValue_False(m_tranforStep.StartFlag);
- User_Esb_Set(DisEnable);
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"Stop Send Step\n");
- #endif
- break;
- case EsbError_Event:
- #if DEBUG_EN
- SEGGER_RTT_printf(0,"Esb send Error Event\n");
- #endif
- if(m_motion_detect.state == Game_Mode){
- m_motion_detect.state = Stop_Mode;
- User_Esb_Set(DisEnable);
- User_Esb_Set(Enable);
- m_motion_detect.state = Game_Mode;
- }
- else{
- User_Esb_Set(DisEnable);
- User_Esb_Set(Enable);
- }
- break;
- default:
- break;
- }
- }
- }
- /**********************************************************
- * 函数名字:MoveCheck_handler
- * 函数作用:鞋子运动检测,检测气压传感器判断鞋子是否在运动
- * 函数参数:p_context:上下文
- * 函数返回值:无
- ***********************************************************/
- static void MoveCheck_handler(void * p_context)
- {
- m_IMU_DAT_t.h.press = (uint16_t)(ReadPressure()>>8);
- ReadPressure_Pre(); //MSE5611下一次读取做准备
- if(m_IMU_DAT_t.h.press >MSE5611_PRESS_MAX){
- OY_ClearValue_Zero(m_motion_detect.ReleaseHoldTime);
- if(Motion_Release == m_motion_detect.Motion_state) {
- m_motion_detect.Motion_state =Motion_Press;
- if(!m_tranforStep.StartFlag)Add_Step();//步数+1,步数传输过程当中不允许更改步数
- }
- TranforMainEvent_Fifo(Move_Event);
- }
- else if(m_IMU_DAT_t.h.press < MSE5611_PRESS_MIN){
- m_motion_detect.ReleaseHoldTime++;
- if(Game_Mode == m_motion_detect.state){//游戏模式无压力退出
- m_motion_detect.QuitGameHoldTime++;
- if(m_motion_detect.QuitGameHoldTime > QuitGameMode_Hold_MAX_TIME){
- OY_ClearValue_Zero( m_motion_detect.QuitGameHoldTime);
- TranforMainEvent_Fifo(Quit_GameMode_Event);
- }
- }
- if(Motion_Press == m_motion_detect.Motion_state)m_motion_detect.Motion_state =Motion_Release;
- }
- if(m_motion_detect.ReleaseHoldTime > (SHOES_REALSE_MAX_TIME/MoveCheck_INTERVAL)){
- TranforMainEvent_Fifo(No_MoveOverTime_Event);
- OY_ClearValue_Zero(m_motion_detect.ReleaseHoldTime);
- }
- }
- /**********************************************************
- * 函数名字:TIME_GetTicks
- * 函数作用:系统滴答计时器
- * 函数参数:无
- * 函数返回值:无
- ***********************************************************/
- volatile static uint32_t time_100ms = 0;
- uint32_t TIME_GetTicks(void)
- {
- return time_100ms;
- }
- /**********************************************************
- * 函数名字:MilliSecond_handler
- * 函数作用:20ms定时器中断回调
- * 函数参数:p_context:上下文
- * 函数返回值:无
- ***********************************************************/
- static void MilliSecond_handler(void * p_context)
- {
- time_100ms+=100;//电机控制
- }
- /**********************************************************
- * 函数名字:CheckEsbCmd_handler
- * 函数作用:主动发送设备信息,并且短暂进入ESB接收状态
- * 函数参数:p_context:上下文
- * 函数返回值:无
- ***********************************************************/
- static void CheckEsbCmd_handler(void * p_context)
- {
- static uint8_t temp =0;
- if(Game_Mode == m_motion_detect.state)
- {
- temp++;
- if(temp >=30){
- temp = 0;
- TranforMainEvent_Fifo(CheckEsbRxData_Event);
- }
- }
- else TranforMainEvent_Fifo(CheckEsbRxData_Event);
- }
- /**********************************************************
- * 函数名字:TranforStep_handler
- * 函数作用:传输脚步数据
- * 函数参数:p_context:上下文
- * 函数返回值:无
- ***********************************************************/
- static void TranforStep_handler(void * p_context)
- {
- if(m_tranforStep.NumberTransfers >= TranforStep_MAX_NUMBER){
- OY_SetValue_True(m_tranforStep.StopFlag);
- }
- if(m_tranforStep.StopFlag){//发送超时
- TranforMainEvent_Fifo(Stop_SendStep_Packet_Event);
- }
- else {
- TranforMainEvent_Fifo(SendStep_Packet_Event);
- m_tranforStep.NumberTransfers++;
- }
-
- }
- /**********************************************************
- * 函数名字:UserTask_init
- * 函数作用:用户任务初始化
- * 函数参数: 无
- * 函数返回值:无
- ***********************************************************/
- void User_Task_init(void)
- {
- static uint8_t MainEvent_buff[MAIN_EVENT_BUFF_SIZE];
- ret_code_t err_code;
- //创建主任务管理队列
- err_code = app_fifo_init(&m_MainEvent_fifo, MainEvent_buff, sizeof(MainEvent_buff));
- APP_ERROR_CHECK(err_code);
- //创建并启动运动检测任务
- err_code = app_timer_create(&m_MoveCheck_timer,
- APP_TIMER_MODE_REPEATED,
- MoveCheck_handler);
- APP_ERROR_CHECK(err_code);
- err_code = app_timer_start(m_MoveCheck_timer, APP_TIMER_TICKS(MoveCheck_INTERVAL), NULL);
- APP_ERROR_CHECK(err_code);
- //创建并启动ESB数据检测任务
- err_code = app_timer_create(&m_CheckEsbCmd_timer,
- APP_TIMER_MODE_REPEATED,
- CheckEsbCmd_handler);
- APP_ERROR_CHECK(err_code);
- err_code = app_timer_start(m_CheckEsbCmd_timer, APP_TIMER_TICKS(CheckEsbCmd_INTERVAL), NULL);
- APP_ERROR_CHECK(err_code);
- //创建并启动1ms软件定时器
- err_code = app_timer_create(&m_MilliSecond_timer,
- APP_TIMER_MODE_REPEATED,
- MilliSecond_handler);
- APP_ERROR_CHECK(err_code);
- err_code = app_timer_start(m_MilliSecond_timer, APP_TIMER_TICKS(100), NULL);
- APP_ERROR_CHECK(err_code);
- //创建脚步传输定时器
- err_code = app_timer_create(&m_TranForStep_timer,
- APP_TIMER_MODE_REPEATED,
- TranforStep_handler);
- APP_ERROR_CHECK(err_code);
-
- m_IMU_DAT_t.h.press =0xFFFF;
- }
|