查询间隔MS1_TO_SYSTEM_TIME
This commit is contained in:
parent
8f5f6447af
commit
f179752527
|
@ -122,17 +122,12 @@ void SensorData_Process(void)
|
||||||
// PRINT("T=%d.%d \r\n", (int)temp, ((int)(temp * 100.0f) % 100));
|
// 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)
|
uint16_t wf5803_ProcessEvent(uint8_t task_id, uint16_t events)
|
||||||
{
|
{
|
||||||
if (events & WF5803_EVT)
|
if (events & WF5803_EVT)
|
||||||
{
|
{
|
||||||
SensorData_Process();
|
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 (events ^ WF5803_EVT);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue