You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

26 lines
674 B

6 months ago
/** \file sw_timer.h */
#if !defined(SW_TIMER_H__8AF06FDD_AC0A_4693_88C3_8ACCF1AB4372__INCLUDED_)
#define SW_TIMER_H__8AF06FDD_AC0A_4693_88C3_8ACCF1AB4372__INCLUDED_
#include "define.h"
#include "board_config.h"
#define MAX_SW_TIMER_REGISTER_COUNT 10
typedef enum
{
SW_TIMER_RUN_NONE,
SW_TIMER_RUN_ONNY_ONCE,
SW_TIMER_RUN_CONTINUE,
}SW_TIMER_CALLBACK_TYPE;
typedef void (*SW_TIMER_CALLBACK_FN) (void);
bool SW_Timer_Callback_Register(SW_TIMER_CALLBACK_TYPE type, uint32_t PeriodTime, SW_TIMER_CALLBACK_FN pTimerCallback);
bool SW_Timer_Callback_UnRegister(SW_TIMER_CALLBACK_FN pSwTimerCallbackFunc);
void SW_Timer_Callback_Process(void);
#endif