📄 timer.h
字号:
/***********************************************
name: timer.h
create by skier 2005.06.19
for LPG2104 TIMER driver
*********************************************/
#ifndef TIMER_H
#define TIMER_H
#include "lwip/sys.h"
#ifndef MAX_SYS_TIMER
#define MAX_SYS_TIMER 3
#endif
#define SYS_TICK 50
//#define TIMEOUT ( (T0IR & 0x01) NEQ 0)
typedef struct
{
u32_t sec_tick;
u32_t ms_tick;
u16_t day;
u8_t hour;
u8_t min;
u8_t sec;
u16_t ms;
}sys_time;
#ifndef TIMER_C
extern void sys_timer_stop(sys_timeout_handler h, void *arg);
extern void sys_timer_start(u32_t msecs, sys_timeout_handler h, void *arg);
extern void lpc2104_timer1_start(u16_t ms);
extern void sys_timer_init(void);
extern void sys_time_tick(void);
extern void check_sys_timer(void);
extern u32_t get_sys_tick(void);
extern sys_time get_sys_time(void);
extern u32_t sys_jiffies(void);
extern void debug_sys_time(void);
#else
void sys_timer_stop(sys_timeout_handler h, void *arg);
void sys_timer_start(u32_t msecs, sys_timeout_handler h, void *arg);
void lpc2104_timer1_start(u16_t ms);
void sys_timer_init(void);
void sys_time_tick(void);
void check_sys_timer(void);
u32_t get_sys_tick(void);
sys_time get_sys_time(void);
u32_t sys_jiffies(void);
void debug_sys_time(void);
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -