Mouse code for the MacroRat

Dependencies:   ITG3200 QEI

Committer:
sahilmgandhi
Date:
Sun May 14 23:18:57 2017 +0000
Revision:
18:6a4db94011d3
Publishing again

Who changed what in which revision?

UserRevisionLine numberNew contents of line
sahilmgandhi 18:6a4db94011d3 1 /**************************************************************************//**
sahilmgandhi 18:6a4db94011d3 2 * @file rtc.h
sahilmgandhi 18:6a4db94011d3 3 * @version V3.00
sahilmgandhi 18:6a4db94011d3 4 * $Revision: 10 $
sahilmgandhi 18:6a4db94011d3 5 * $Date: 15/08/11 10:26a $
sahilmgandhi 18:6a4db94011d3 6 * @brief M451 series RTC driver header file
sahilmgandhi 18:6a4db94011d3 7 *
sahilmgandhi 18:6a4db94011d3 8 * @note
sahilmgandhi 18:6a4db94011d3 9 * Copyright (C) 2013~2015 Nuvoton Technology Corp. All rights reserved.
sahilmgandhi 18:6a4db94011d3 10 *****************************************************************************/
sahilmgandhi 18:6a4db94011d3 11 #ifndef __RTC_H__
sahilmgandhi 18:6a4db94011d3 12 #define __RTC_H__
sahilmgandhi 18:6a4db94011d3 13
sahilmgandhi 18:6a4db94011d3 14 #ifdef __cplusplus
sahilmgandhi 18:6a4db94011d3 15 extern "C"
sahilmgandhi 18:6a4db94011d3 16 {
sahilmgandhi 18:6a4db94011d3 17 #endif
sahilmgandhi 18:6a4db94011d3 18
sahilmgandhi 18:6a4db94011d3 19
sahilmgandhi 18:6a4db94011d3 20 /** @addtogroup Standard_Driver Standard Driver
sahilmgandhi 18:6a4db94011d3 21 @{
sahilmgandhi 18:6a4db94011d3 22 */
sahilmgandhi 18:6a4db94011d3 23
sahilmgandhi 18:6a4db94011d3 24 /** @addtogroup RTC_Driver RTC Driver
sahilmgandhi 18:6a4db94011d3 25 @{
sahilmgandhi 18:6a4db94011d3 26 */
sahilmgandhi 18:6a4db94011d3 27
sahilmgandhi 18:6a4db94011d3 28 /** @addtogroup RTC_EXPORTED_CONSTANTS RTC Exported Constants
sahilmgandhi 18:6a4db94011d3 29 @{
sahilmgandhi 18:6a4db94011d3 30 */
sahilmgandhi 18:6a4db94011d3 31 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 32 /* RTC Initial Keyword Constant Definitions */
sahilmgandhi 18:6a4db94011d3 33 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 34 #define RTC_INIT_KEY 0xA5EB1357UL /*!< RTC Initiation Key to make RTC leaving reset state */
sahilmgandhi 18:6a4db94011d3 35 #define RTC_WRITE_KEY 0x0000A965UL /*!< RTC Register Access Enable Key to enable RTC read/write accessible and kept 1024 RTC clock */
sahilmgandhi 18:6a4db94011d3 36
sahilmgandhi 18:6a4db94011d3 37 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 38 /* RTC Time Attribute Constant Definitions */
sahilmgandhi 18:6a4db94011d3 39 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 40 #define RTC_CLOCK_12 0 /*!< RTC as 12-hour time scale with AM and PM indication */
sahilmgandhi 18:6a4db94011d3 41 #define RTC_CLOCK_24 1 /*!< RTC as 24-hour time scale */
sahilmgandhi 18:6a4db94011d3 42 #define RTC_AM 1 /*!< RTC as AM indication */
sahilmgandhi 18:6a4db94011d3 43 #define RTC_PM 2 /*!< RTC as PM indication */
sahilmgandhi 18:6a4db94011d3 44
sahilmgandhi 18:6a4db94011d3 45 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 46 /* RTC Tick Period Constant Definitions */
sahilmgandhi 18:6a4db94011d3 47 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 48 #define RTC_TICK_1_SEC 0x0UL /*!< RTC time tick period is 1 second */
sahilmgandhi 18:6a4db94011d3 49 #define RTC_TICK_1_2_SEC 0x1UL /*!< RTC time tick period is 1/2 second */
sahilmgandhi 18:6a4db94011d3 50 #define RTC_TICK_1_4_SEC 0x2UL /*!< RTC time tick period is 1/4 second */
sahilmgandhi 18:6a4db94011d3 51 #define RTC_TICK_1_8_SEC 0x3UL /*!< RTC time tick period is 1/8 second */
sahilmgandhi 18:6a4db94011d3 52 #define RTC_TICK_1_16_SEC 0x4UL /*!< RTC time tick period is 1/16 second */
sahilmgandhi 18:6a4db94011d3 53 #define RTC_TICK_1_32_SEC 0x5UL /*!< RTC time tick period is 1/32 second */
sahilmgandhi 18:6a4db94011d3 54 #define RTC_TICK_1_64_SEC 0x6UL /*!< RTC time tick period is 1/64 second */
sahilmgandhi 18:6a4db94011d3 55 #define RTC_TICK_1_128_SEC 0x7UL /*!< RTC time tick period is 1/128 second */
sahilmgandhi 18:6a4db94011d3 56
sahilmgandhi 18:6a4db94011d3 57 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 58 /* RTC Day of Week Constant Definitions */
sahilmgandhi 18:6a4db94011d3 59 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 60 #define RTC_SUNDAY 0x0UL /*!< Day of the Week is Sunday */
sahilmgandhi 18:6a4db94011d3 61 #define RTC_MONDAY 0x1UL /*!< Day of the Week is Monday */
sahilmgandhi 18:6a4db94011d3 62 #define RTC_TUESDAY 0x2UL /*!< Day of the Week is Tuesday */
sahilmgandhi 18:6a4db94011d3 63 #define RTC_WEDNESDAY 0x3UL /*!< Day of the Week is Wednesday */
sahilmgandhi 18:6a4db94011d3 64 #define RTC_THURSDAY 0x4UL /*!< Day of the Week is Thursday */
sahilmgandhi 18:6a4db94011d3 65 #define RTC_FRIDAY 0x5UL /*!< Day of the Week is Friday */
sahilmgandhi 18:6a4db94011d3 66 #define RTC_SATURDAY 0x6UL /*!< Day of the Week is Saturday */
sahilmgandhi 18:6a4db94011d3 67
sahilmgandhi 18:6a4db94011d3 68 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 69 /* RTC Snooper Detection Mode Constant Definitions */
sahilmgandhi 18:6a4db94011d3 70 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 71 #define RTC_SNOOPER_LOW_LEVEL 0x0UL /*!< Snooper pin detected is low-level trigger */
sahilmgandhi 18:6a4db94011d3 72 #define RTC_SNOOPER_HIGH_LEVEL 0x2UL /*!< Snooper pin detected is high-level trigger */
sahilmgandhi 18:6a4db94011d3 73 #define RTC_SNOOPER_FALLING_EDGE 0x8UL /*!< Snooper pin detected is falling-edge trigger */
sahilmgandhi 18:6a4db94011d3 74 #define RTC_SNOOPER_RISING_EDGE 0xAUL /*!< Snooper pin detected is rising-edge trigger */
sahilmgandhi 18:6a4db94011d3 75 #define RTC_SNOOPER_DETECT_Msk 0xAUL /*!< Snooper pin detected mask bits */
sahilmgandhi 18:6a4db94011d3 76
sahilmgandhi 18:6a4db94011d3 77 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 78 /* RTC Miscellaneous Constant Definitions */
sahilmgandhi 18:6a4db94011d3 79 /*---------------------------------------------------------------------------------------------------------*/
sahilmgandhi 18:6a4db94011d3 80 #define RTC_WAIT_COUNT 0xFFFFFFFF /*!< Initial Time-out Value */
sahilmgandhi 18:6a4db94011d3 81 #define RTC_YEAR2000 2000 /*!< RTC Reference for compute year data */
sahilmgandhi 18:6a4db94011d3 82 #define RTC_FCR_REFERENCE 32761 /*!< RTC Reference for frequency compensation */
sahilmgandhi 18:6a4db94011d3 83
sahilmgandhi 18:6a4db94011d3 84 /*@}*/ /* end of group RTC_EXPORTED_CONSTANTS */
sahilmgandhi 18:6a4db94011d3 85
sahilmgandhi 18:6a4db94011d3 86
sahilmgandhi 18:6a4db94011d3 87 /** @addtogroup RTC_EXPORTED_STRUCTS RTC Exported Structs
sahilmgandhi 18:6a4db94011d3 88 @{
sahilmgandhi 18:6a4db94011d3 89 */
sahilmgandhi 18:6a4db94011d3 90 /**
sahilmgandhi 18:6a4db94011d3 91 * @details RTC define Time Data Struct
sahilmgandhi 18:6a4db94011d3 92 */
sahilmgandhi 18:6a4db94011d3 93 typedef struct
sahilmgandhi 18:6a4db94011d3 94 {
sahilmgandhi 18:6a4db94011d3 95 uint32_t u32Year; /*!< Year value */
sahilmgandhi 18:6a4db94011d3 96 uint32_t u32Month; /*!< Month value */
sahilmgandhi 18:6a4db94011d3 97 uint32_t u32Day; /*!< Day value */
sahilmgandhi 18:6a4db94011d3 98 uint32_t u32DayOfWeek; /*!< Day of week value */
sahilmgandhi 18:6a4db94011d3 99 uint32_t u32Hour; /*!< Hour value */
sahilmgandhi 18:6a4db94011d3 100 uint32_t u32Minute; /*!< Minute value */
sahilmgandhi 18:6a4db94011d3 101 uint32_t u32Second; /*!< Second value */
sahilmgandhi 18:6a4db94011d3 102 uint32_t u32TimeScale; /*!< 12-Hour, 24-Hour */
sahilmgandhi 18:6a4db94011d3 103 uint32_t u32AmPm; /*!< Only Time Scale select 12-hr used */
sahilmgandhi 18:6a4db94011d3 104 } S_RTC_TIME_DATA_T;
sahilmgandhi 18:6a4db94011d3 105
sahilmgandhi 18:6a4db94011d3 106 /*@}*/ /* end of group RTC_EXPORTED_STRUCTS */
sahilmgandhi 18:6a4db94011d3 107
sahilmgandhi 18:6a4db94011d3 108
sahilmgandhi 18:6a4db94011d3 109 /** @addtogroup RTC_EXPORTED_FUNCTIONS RTC Exported Functions
sahilmgandhi 18:6a4db94011d3 110 @{
sahilmgandhi 18:6a4db94011d3 111 */
sahilmgandhi 18:6a4db94011d3 112
sahilmgandhi 18:6a4db94011d3 113 /**
sahilmgandhi 18:6a4db94011d3 114 * @brief Indicate is Leap Year or not
sahilmgandhi 18:6a4db94011d3 115 *
sahilmgandhi 18:6a4db94011d3 116 * @param None
sahilmgandhi 18:6a4db94011d3 117 *
sahilmgandhi 18:6a4db94011d3 118 * @retval 0 This year is not a leap year
sahilmgandhi 18:6a4db94011d3 119 * @retval 1 This year is a leap year
sahilmgandhi 18:6a4db94011d3 120 *
sahilmgandhi 18:6a4db94011d3 121 * @details According to current date, return this year is leap year or not.
sahilmgandhi 18:6a4db94011d3 122 */
sahilmgandhi 18:6a4db94011d3 123 #define RTC_IS_LEAP_YEAR() (RTC->LEAPYEAR & RTC_LEAPYEAR_LEAPYEAR_Msk ? 1:0)
sahilmgandhi 18:6a4db94011d3 124
sahilmgandhi 18:6a4db94011d3 125 /**
sahilmgandhi 18:6a4db94011d3 126 * @brief Clear RTC Alarm Interrupt Flag
sahilmgandhi 18:6a4db94011d3 127 *
sahilmgandhi 18:6a4db94011d3 128 * @param None
sahilmgandhi 18:6a4db94011d3 129 *
sahilmgandhi 18:6a4db94011d3 130 * @return None
sahilmgandhi 18:6a4db94011d3 131 *
sahilmgandhi 18:6a4db94011d3 132 * @details This macro is used to clear RTC alarm interrupt flag.
sahilmgandhi 18:6a4db94011d3 133 */
sahilmgandhi 18:6a4db94011d3 134 #define RTC_CLEAR_ALARM_INT_FLAG() (RTC->INTSTS = (RTC->INTSTS & ~(RTC_INTSTS_TICKIF_Msk | RTC_INTSTS_SNPDIF_Msk)) | RTC_INTSTS_ALMIF_Msk)
sahilmgandhi 18:6a4db94011d3 135
sahilmgandhi 18:6a4db94011d3 136 /**
sahilmgandhi 18:6a4db94011d3 137 * @brief Clear RTC Tick Interrupt Flag
sahilmgandhi 18:6a4db94011d3 138 *
sahilmgandhi 18:6a4db94011d3 139 * @param None
sahilmgandhi 18:6a4db94011d3 140 *
sahilmgandhi 18:6a4db94011d3 141 * @return None
sahilmgandhi 18:6a4db94011d3 142 *
sahilmgandhi 18:6a4db94011d3 143 * @details This macro is used to clear RTC tick interrupt flag.
sahilmgandhi 18:6a4db94011d3 144 */
sahilmgandhi 18:6a4db94011d3 145 #define RTC_CLEAR_TICK_INT_FLAG() (RTC->INTSTS = (RTC->INTSTS & ~(RTC_INTSTS_ALMIF_Msk | RTC_INTSTS_SNPDIF_Msk)) | RTC_INTSTS_TICKIF_Msk)
sahilmgandhi 18:6a4db94011d3 146
sahilmgandhi 18:6a4db94011d3 147 /**
sahilmgandhi 18:6a4db94011d3 148 * @brief Clear RTC Snooper Interrupt Flag
sahilmgandhi 18:6a4db94011d3 149 *
sahilmgandhi 18:6a4db94011d3 150 * @param None
sahilmgandhi 18:6a4db94011d3 151 *
sahilmgandhi 18:6a4db94011d3 152 * @return None
sahilmgandhi 18:6a4db94011d3 153 *
sahilmgandhi 18:6a4db94011d3 154 * @details This macro is used to clear RTC snooper pin interrupt flag.
sahilmgandhi 18:6a4db94011d3 155 */
sahilmgandhi 18:6a4db94011d3 156 #define RTC_CLEAR_SNOOPER_INT_FLAG() (RTC->INTSTS = (RTC->INTSTS & ~(RTC_INTSTS_ALMIF_Msk | RTC_INTSTS_TICKIF_Msk)) | RTC_INTSTS_SNPDIF_Msk)
sahilmgandhi 18:6a4db94011d3 157
sahilmgandhi 18:6a4db94011d3 158 /**
sahilmgandhi 18:6a4db94011d3 159 * @brief Get RTC Alarm Interrupt Flag
sahilmgandhi 18:6a4db94011d3 160 *
sahilmgandhi 18:6a4db94011d3 161 * @param None
sahilmgandhi 18:6a4db94011d3 162 *
sahilmgandhi 18:6a4db94011d3 163 * @retval 0 RTC alarm interrupt did not occur
sahilmgandhi 18:6a4db94011d3 164 * @retval 1 RTC alarm interrupt occurred
sahilmgandhi 18:6a4db94011d3 165 *
sahilmgandhi 18:6a4db94011d3 166 * @details This macro indicates RTC alarm interrupt occurred or not.
sahilmgandhi 18:6a4db94011d3 167 */
sahilmgandhi 18:6a4db94011d3 168 #define RTC_GET_ALARM_INT_FLAG() ((RTC->INTSTS & RTC_INTSTS_ALMIF_Msk)? 1:0)
sahilmgandhi 18:6a4db94011d3 169
sahilmgandhi 18:6a4db94011d3 170 /**
sahilmgandhi 18:6a4db94011d3 171 * @brief Get RTC Time Tick Interrupt Flag
sahilmgandhi 18:6a4db94011d3 172 *
sahilmgandhi 18:6a4db94011d3 173 * @param None
sahilmgandhi 18:6a4db94011d3 174 *
sahilmgandhi 18:6a4db94011d3 175 * @retval 0 RTC time tick interrupt did not occur
sahilmgandhi 18:6a4db94011d3 176 * @retval 1 RTC time tick interrupt occurred
sahilmgandhi 18:6a4db94011d3 177 *
sahilmgandhi 18:6a4db94011d3 178 * @details This macro indicates RTC time tick interrupt occurred or not.
sahilmgandhi 18:6a4db94011d3 179 */
sahilmgandhi 18:6a4db94011d3 180 #define RTC_GET_TICK_INT_FLAG() ((RTC->INTSTS & RTC_INTSTS_TICKIF_Msk)? 1:0)
sahilmgandhi 18:6a4db94011d3 181
sahilmgandhi 18:6a4db94011d3 182 /**
sahilmgandhi 18:6a4db94011d3 183 * @brief Get RTC Snooper Interrupt Flag
sahilmgandhi 18:6a4db94011d3 184 *
sahilmgandhi 18:6a4db94011d3 185 * @param None
sahilmgandhi 18:6a4db94011d3 186 *
sahilmgandhi 18:6a4db94011d3 187 * @retval 0 RTC snooper pin interrupt did not occur
sahilmgandhi 18:6a4db94011d3 188 * @retval 1 RTC snooper pin interrupt occurred
sahilmgandhi 18:6a4db94011d3 189 *
sahilmgandhi 18:6a4db94011d3 190 * @details This macro indicates RTC snooper pin interrupt occurred or not.
sahilmgandhi 18:6a4db94011d3 191 */
sahilmgandhi 18:6a4db94011d3 192 #define RTC_GET_SNPPOER_INT_FLAG() ((RTC->INTSTS & RTC_INTSTS_SNPDIF_Msk)? 1:0)
sahilmgandhi 18:6a4db94011d3 193
sahilmgandhi 18:6a4db94011d3 194 /**
sahilmgandhi 18:6a4db94011d3 195 * @brief Read Spare Register
sahilmgandhi 18:6a4db94011d3 196 *
sahilmgandhi 18:6a4db94011d3 197 * @param[in] u32RegNum The spare register number, 0~19.
sahilmgandhi 18:6a4db94011d3 198 *
sahilmgandhi 18:6a4db94011d3 199 * @return Spare register content
sahilmgandhi 18:6a4db94011d3 200 *
sahilmgandhi 18:6a4db94011d3 201 * @details Read the specify spare register content.
sahilmgandhi 18:6a4db94011d3 202 * @note The returned value is valid only when SPRRDY(SPRCTL[7] SPR Register Ready) bit is set. \n
sahilmgandhi 18:6a4db94011d3 203 * And its controlled by RTC Access Enable Register.
sahilmgandhi 18:6a4db94011d3 204 */
sahilmgandhi 18:6a4db94011d3 205 #define RTC_READ_SPARE_REGISTER(u32RegNum) (RTC->SPR[(u32RegNum)])
sahilmgandhi 18:6a4db94011d3 206
sahilmgandhi 18:6a4db94011d3 207 /**
sahilmgandhi 18:6a4db94011d3 208 * @brief Write Spare Register
sahilmgandhi 18:6a4db94011d3 209 *
sahilmgandhi 18:6a4db94011d3 210 * @param[in] u32RegNum The spare register number, 0~19.
sahilmgandhi 18:6a4db94011d3 211 * @param[in] u32RegValue The spare register value.
sahilmgandhi 18:6a4db94011d3 212 *
sahilmgandhi 18:6a4db94011d3 213 * @return None
sahilmgandhi 18:6a4db94011d3 214 *
sahilmgandhi 18:6a4db94011d3 215 * @details Write specify data to spare register.
sahilmgandhi 18:6a4db94011d3 216 * @note This macro is effect only when SPRRDY(SPRCTL[7] SPR Register Ready) bit is set. \n
sahilmgandhi 18:6a4db94011d3 217 * And its controlled by RTC Access Enable Register(RTC_RWEN).
sahilmgandhi 18:6a4db94011d3 218 */
sahilmgandhi 18:6a4db94011d3 219 #define RTC_WRITE_SPARE_REGISTER(u32RegNum, u32RegValue) (RTC->SPR[(u32RegNum)] = (u32RegValue))
sahilmgandhi 18:6a4db94011d3 220
sahilmgandhi 18:6a4db94011d3 221 /**
sahilmgandhi 18:6a4db94011d3 222 * @brief Wait RTC Access Enable
sahilmgandhi 18:6a4db94011d3 223 *
sahilmgandhi 18:6a4db94011d3 224 * @param None
sahilmgandhi 18:6a4db94011d3 225 *
sahilmgandhi 18:6a4db94011d3 226 * @return None
sahilmgandhi 18:6a4db94011d3 227 *
sahilmgandhi 18:6a4db94011d3 228 * @details This function is used to enable the maximum RTC read/write accessible time.
sahilmgandhi 18:6a4db94011d3 229 */
sahilmgandhi 18:6a4db94011d3 230 static __INLINE void RTC_WaitAccessEnable(void)
sahilmgandhi 18:6a4db94011d3 231 {
sahilmgandhi 18:6a4db94011d3 232 /* To wait RWENF bit is cleared and enable RWENF bit (Access Enable bit) again */
sahilmgandhi 18:6a4db94011d3 233 while((RTC->RWEN & RTC_RWEN_RWENF_Msk) == RTC_RWEN_RWENF_Msk);
sahilmgandhi 18:6a4db94011d3 234 RTC->RWEN = RTC_WRITE_KEY;
sahilmgandhi 18:6a4db94011d3 235
sahilmgandhi 18:6a4db94011d3 236 /* To wait RWENF bit is set and user can access the protected-register of RTC from now on */
sahilmgandhi 18:6a4db94011d3 237 while((RTC->RWEN & RTC_RWEN_RWENF_Msk) == 0x0);
sahilmgandhi 18:6a4db94011d3 238 }
sahilmgandhi 18:6a4db94011d3 239
sahilmgandhi 18:6a4db94011d3 240 void RTC_Open(S_RTC_TIME_DATA_T *sPt);
sahilmgandhi 18:6a4db94011d3 241 void RTC_Close(void);
sahilmgandhi 18:6a4db94011d3 242 void RTC_32KCalibration(int32_t i32FrequencyX100);
sahilmgandhi 18:6a4db94011d3 243 void RTC_GetDateAndTime(S_RTC_TIME_DATA_T *sPt);
sahilmgandhi 18:6a4db94011d3 244 void RTC_GetAlarmDateAndTime(S_RTC_TIME_DATA_T *sPt);
sahilmgandhi 18:6a4db94011d3 245 void RTC_SetDateAndTime(S_RTC_TIME_DATA_T *sPt);
sahilmgandhi 18:6a4db94011d3 246 void RTC_SetAlarmDateAndTime(S_RTC_TIME_DATA_T *sPt);
sahilmgandhi 18:6a4db94011d3 247 void RTC_SetDate(uint32_t u32Year, uint32_t u32Month, uint32_t u32Day, uint32_t u32DayOfWeek);
sahilmgandhi 18:6a4db94011d3 248 void RTC_SetTime(uint32_t u32Hour, uint32_t u32Minute, uint32_t u32Second, uint32_t u32TimeMode, uint32_t u32AmPm);
sahilmgandhi 18:6a4db94011d3 249 void RTC_SetAlarmDate(uint32_t u32Year, uint32_t u32Month, uint32_t u32Day);
sahilmgandhi 18:6a4db94011d3 250 void RTC_SetAlarmTime(uint32_t u32Hour, uint32_t u32Minute, uint32_t u32Second, uint32_t u32TimeMode, uint32_t u32AmPm);
sahilmgandhi 18:6a4db94011d3 251 uint32_t RTC_GetDayOfWeek(void);
sahilmgandhi 18:6a4db94011d3 252 void RTC_SetTickPeriod(uint32_t u32TickSelection);
sahilmgandhi 18:6a4db94011d3 253 void RTC_EnableInt(uint32_t u32IntFlagMask);
sahilmgandhi 18:6a4db94011d3 254 void RTC_DisableInt(uint32_t u32IntFlagMask);
sahilmgandhi 18:6a4db94011d3 255 void RTC_EnableSpareAccess(void);
sahilmgandhi 18:6a4db94011d3 256 void RTC_DisableSpareRegister(void);
sahilmgandhi 18:6a4db94011d3 257 void RTC_EnableSnooperDetection(uint32_t u32PinCondition);
sahilmgandhi 18:6a4db94011d3 258 void RTC_DisableSnooperDetection(void);
sahilmgandhi 18:6a4db94011d3 259
sahilmgandhi 18:6a4db94011d3 260 /*@}*/ /* end of group RTC_EXPORTED_FUNCTIONS */
sahilmgandhi 18:6a4db94011d3 261
sahilmgandhi 18:6a4db94011d3 262 /*@}*/ /* end of group RTC_Driver */
sahilmgandhi 18:6a4db94011d3 263
sahilmgandhi 18:6a4db94011d3 264 /*@}*/ /* end of group Standard_Driver */
sahilmgandhi 18:6a4db94011d3 265
sahilmgandhi 18:6a4db94011d3 266 #ifdef __cplusplus
sahilmgandhi 18:6a4db94011d3 267 }
sahilmgandhi 18:6a4db94011d3 268 #endif
sahilmgandhi 18:6a4db94011d3 269
sahilmgandhi 18:6a4db94011d3 270 #endif //__RTC_H__
sahilmgandhi 18:6a4db94011d3 271
sahilmgandhi 18:6a4db94011d3 272 /*** (C) COPYRIGHT 2013~2015 Nuvoton Technology Corp. ***/