g0b1vetx-board/middleware/softimer/softimer.c
2023-04-29 09:09:12 +08:00

37 lines
527 B
C

#include "softimer.h"
c_timer_t s_timer[MAX_SOFT_TIMER_COUNT] = {0};
static struct s_devier_t{
uint32_t UsedTimer;// ¿ÉÓö¨Ê±Æ÷¸öÊý
} s_devier;
void csoftimer_task(void)
{
for(int i =0;i <MAX_SOFT_TIMER_COUNT;i++)
{
if ((s_timer[i].Busy == 1) && (s_timer[i].Timer == 1))
{
}
}
}
void csoftimer_start(c_timer_t timer)
{
for (int i =0;i <MAX_SOFT_TIMER_COUNT;i++ )
{
if (s_timer[i].Busy == 0)
{
s_timer[i].callback = timer.callback;
s_timer[i].Timer = timer.Timer;
}
}
}