新手入门
- 积分
- 17
- 金钱
- 17
- 注册时间
- 2020-11-27
- 在线时间
- 4 小时
|
楼主 |
发表于 2020-12-18 14:11:47
|
显示全部楼层
#if (RTOS_MANAGEMENT > 0)
void TSL_Timer_ISR(void)
#else
INTERRUPT_HANDLER(TSL_Timer_ISR, 23)
#endif
{
TIMTICK->SR1 = 0; // clear overflow flag
TSL_Tick_Base++;
TSL_Timer_Check_10ms_Tick();
if (TSL_Tick_Flags.b.User1_Start_100ms) /* Application request */
{
TSL_Tick_Flags.b.User1_Start_100ms = 0;
TSL_Tick_Flags.b.User1_Flag_100ms = 0;
TSL_Tick_User1 = (TICK_FACTOR_10MS * 10);
}
if (TSL_Tick_Flags.b.User2_Start_100ms) /* Application request */
{
TSL_Tick_Flags.b.User2_Start_100ms = 0;
TSL_Tick_Flags.b.User2_Flag_100ms = 0;
TSL_Tick_User2 = (TICK_FACTOR_10MS * 10);
}
if (TSL_Tick_User1 > 0)
{
TSL_Tick_User1--;
if (TSL_Tick_User1 == 0)
{
TSL_Tick_Flags.b.User1_Flag_100ms = 1; /* Give information to Application */
}
}
if (TSL_Tick_User2 > 0)
{
TSL_Tick_User2--;
if (TSL_Tick_User2 == 0)
{
TSL_Tick_Flags.b.User2_Flag_100ms = 1; /* Give information to Application */
}
}
#if TIMER_CALLBACK
USER_TickTimerCallback();
#endif
}
|
|