rtc_calendar.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * File : rtc_calendar.h
  3. * This file is part of RT-Thread RTOS
  4. * COPYRIGHT (C) 2006, RT-Thread Develop Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2010-02-10 Gary Lee first implementation
  13. */
  14. #ifndef __RTCLEAP_H__
  15. #define __RTCLEAP_H__
  16. #include <rthw.h>
  17. #include <rtthread.h>
  18. #include "s3c24x0.h"
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22. #define DEFAULT_YEAR_MONTH_DAY (DEFAULT_YEAR*10000+DEFAULT_MONTH*100+DEFAULT_DAY)
  23. #define DEFAULT_YEAR 2010
  24. #define DEFAULT_MONTH 02
  25. #define DEFAULT_DAY 10
  26. rt_int32_t rt_rtc_isleap(rt_uint32_t year);
  27. rt_int32_t rt_rtc_week_of_newyears_day(rt_uint32_t year);
  28. void rt_rtc_show_calendar(void);
  29. void rt_rtc_print_calendar(rt_uint32_t year);
  30. rt_int32_t rt_rtc_month_day_num(rt_int32_t month, rt_int32_t leapyn);
  31. rt_int32_t rt_rtc_space_days(rt_int32_t month, rt_int32_t year);
  32. rt_int32_t rt_rtc_weekday_month(rt_int32_t month, rt_int32_t year);
  33. void rt_rtc_print_common_fmt(rt_uint8_t month, rt_uint8_t weekday, rt_uint8_t leapyear);
  34. void rt_rtc_print_one_month(rt_int32_t month, rt_int32_t year);
  35. void rt_rtc_weekdate_calculate(void);
  36. #ifdef __cplusplus
  37. }
  38. #endif
  39. #endif /*__MMU_H__*/