| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- #ifndef _SOFT_TIMER_H
- #define _SOFT_TIMER_H
- #include "stdbool.h"
- #include "stdio.h"
- #include "common.h"
- typedef struct
- {
- bool seed;
- bool weight;
- bool pump;
- bool nozzle;
- bool arm;
- bool flow;
- bool checklow;
- bool radar;
- bool bms;
- bool L_pump1;
- bool L_pump2;
- bool part_radar;
- bool part_Fradar;
- bool part_Bradar;
- bool temperature;
- }Dev_timer;
- extern Dev_timer send_devinfo_time;
- extern uint32_t test_time[10];
- extern uint32_t test_priod;
- extern uint8_t utc_send_time;
- extern uint32_t utc_time;
- #define FOURYEARDAY (365+365+365+366) //4年一个周期内的总天数(1970~2038不存在2100这类年份,故暂不优化)
- #define TIMEZONE (8) //北京时区调整
- typedef struct rtc_time_struct
- {
- uint16_t ui8Year; // 1970~2038
- uint8_t ui8Month; // 1~12
- uint8_t ui8DayOfMonth; // 1~31
- uint8_t ui8Week;
- uint8_t ui8Hour; // 0~23
- uint8_t ui8Minute; // 0~59
- uint8_t ui8Second; // 0~59
-
- }rtc_time_t;
- extern rtc_time_t beijing_time;
- void covUnixTimeStp2Beijing( uint32_t unixTime, rtc_time_t *tempBeijing );
- void timer_function(void);
- extern bool vol_flag,engine_flag,devtype_flag,can_debug_flag,dev_version_flag,mimo360_radar_flag,pmu_heart_flag,pmu_to_DM4Dmsg_flag ;
- uint32_t Get_Systimer_Us(void);
- uint32_t check_period_func(uint32_t *time);
- #endif
|