本帖最后由 knight_21ic 于 2012-2-9 14:10 编辑
/*******************************************************
* @file stm32l1xx_rtc.h
* @author MCD Application Team
* @version V1.0.0
* @date 31-December-2010
* @brief This file contains all the functions prototypes for the RTC firmware
* library.
*****************************************************
......
#define RTC_Month_January ((uint32_t)0x00000001)
#define RTC_Month_February ((uint32_t)0x00000002)
#define RTC_Month_March ((uint32_t)0x00000003)
#define RTC_Month_April ((uint32_t)0x00000004)
#define RTC_Month_May ((uint32_t)0x00000005)
#define RTC_Month_June ((uint32_t)0x00000006)
#define RTC_Month_July ((uint32_t)0x00000007)
#define RTC_Month_August ((uint32_t)0x00000008)
#define RTC_Month_September ((uint32_t)0x00000009)
#define RTC_Month_October ((uint32_t)0x000000010)/*<------此处应该是 0x00000000A*/
#define RTC_Month_November ((uint32_t)0x000000011)/*<------此处应该是 0x00000000B*/
#define RTC_Month_December ((uint32_t)0x000000012) /*<------此处应该是 0x00000000C*/
#define IS_RTC_MONTH(MONTH) (((MONTH) >= 1) && ((MONTH) <= 12))/*<------要么就是此处验证MONTH范围有错误 */
#define IS_RTC_DATE(DATE) (((DATE) >= 1) && ((DATE) <= 31)) |