查询间隔MS1_TO_SYSTEM_TIME

This commit is contained in:
stark1898y 2024-11-14 09:48:51 +08:00
parent 8f5f6447af
commit f179752527
1 changed files with 1 additions and 6 deletions

View File

@ -122,17 +122,12 @@ void SensorData_Process(void)
// PRINT("T=%d.%d \r\n", (int)temp, ((int)(temp * 100.0f) % 100));
}
// 1600 = 1s
// 1ms = 1.6
#define TICK_MS(x) (x * 1.6)
uint16_t wf5803_ProcessEvent(uint8_t task_id, uint16_t events)
{
if (events & WF5803_EVT)
{
SensorData_Process();
tmos_start_task(Peripheral_TaskID, WF5803_EVT, TICK_MS(100));
tmos_start_task(Peripheral_TaskID, WF5803_EVT, MS1_TO_SYSTEM_TIME(100));
return (events ^ WF5803_EVT);
}
return 0;