2024-07-18 11:29:28 +08:00
|
|
|
#ifndef __TIMER_H
|
|
|
|
#define __TIMER_H
|
|
|
|
|
|
|
|
#include "main.h"
|
|
|
|
|
2024-07-21 08:13:13 +08:00
|
|
|
#define EVENT_LED 0
|
|
|
|
#define EVENT_BUZZER 1
|
|
|
|
#define EVENT_BLUETOOTH 2
|
|
|
|
#define EVENT_SERVO 3
|
|
|
|
#define EVENT_LINESEEK 4
|
|
|
|
#define EVENT_INFRARED 5
|
|
|
|
#define EVENT_SONAR 6
|
|
|
|
#define EVENT_BLOCK 7
|
|
|
|
#define EVENT_MAX 8
|
2024-07-18 11:29:28 +08:00
|
|
|
|
|
|
|
void TIMER_Init(void);
|
2024-07-21 08:19:42 +08:00
|
|
|
void TIMER_AddLoopEvent(uint8_t type, void (*func)(void), uint16_t loop_time);
|
|
|
|
void TIMER_DelLoopEvent(uint8_t type);
|
2024-07-18 11:29:28 +08:00
|
|
|
|
|
|
|
#endif
|