sys_time.h

来自「小区巡检系统,MSPF437,里面主要参考的内容为TI单片机的低功耗处理,仅供参」· C头文件 代码 · 共 47 行

H
47
字号
/* sys_time.h */

#ifndef SYS_TIME_H
#define SYS_TIME_H


#ifdef __cplusplus
extern "C"
{
#endif

#define TICK_CNT_PER_SECOND 4

// time
typedef struct _sys_time_
{
    unsigned char chksum;
    //seconds
    unsigned char seconds;
    //minutes
    unsigned char minutes;
    //hours
    unsigned char hours;
    //week
    unsigned char week;
    //days
    unsigned char days;
    //months
    unsigned char months;
    //year
    unsigned char years;
} _sys_time_s;
extern _sys_time_s  _sys_time;
extern unsigned char _tick_counter;

extern void second_up(void);
extern void _get_sys_time_bcd(unsigned char *time_bcd);
extern void _set_sys_time_hex(unsigned char *time_hex);

#ifdef __cplusplus
}
#endif


#endif /* SYS_TIME_H */

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?