sysTime.h 617 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef _SYSTIME_H
  2. #define _SYSTIME_H
  3. #ifdef CPU_FUXI
  4. typedef struct
  5. {
  6. uint16_t A;
  7. uint16_t B;
  8. struct timespec ts;//ʱ¼ä´Á
  9. uint16_t crc;
  10. }SHM_TS_T;
  11. #endif
  12. typedef struct TIME_SHOW
  13. {
  14. WORD year;
  15. WORD month;
  16. WORD day;
  17. WORD hour;
  18. WORD min;
  19. WORD sec;
  20. }TIME_SHOW;
  21. void sys_time_init(void);
  22. void sys_time_get(struct rtc_time_t *pct);
  23. int sys_time_set(struct rtc_time_t *pct);
  24. #ifdef CPU_FUXI
  25. int sys_time_set_kernal(struct rtc_time_t *pct);
  26. void sys_time_check(void);
  27. #endif
  28. void sys_time_set_rmt(struct rtc_time_t *pt) ;
  29. void sys_time_change(struct rtc_time_t *p_ct);
  30. void clk_app(void);
  31. #endif