bsp_date.h 343 B

123456789101112131415161718192021
  1. #ifndef __DATE_H
  2. #define __DATE_H
  3. #include <rtthread.h>
  4. #include "stm32g0xx_hal.h"
  5. struct rtc_time {
  6. int tm_sec;
  7. int tm_min;
  8. int tm_hour;
  9. int tm_mday;
  10. int tm_mon;
  11. int tm_year;
  12. int tm_wday;
  13. };
  14. void GregorianDay(struct rtc_time * tm);
  15. uint32_t mktimev(struct rtc_time *tm);
  16. void to_tm(uint32_t tim, struct rtc_time * tm);
  17. #endif