Date: March 20, 2011 This library is created from "LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library (GNU, Keil, IAR) (Jan 28, 2011)", available from NXP's website, under "All microcontrollers support documents" [[http://ics.nxp.com/support/documents/microcontrollers/?type=software]] You will need to follow [[/projects/libraries/svn/mbed/trunk/LPC1768/LPC17xx.h]] while using this library Examples provided here [[/users/frank26080115/programs/LPC1700CMSIS_Examples/]] The beautiful thing is that NXP does not place copyright protection on any of the files in here Only a few modifications are made to make it compile with the mbed online compiler, I fixed some warnings as well. This is untested as of March 20, 2011 Forum post about this library: [[/forum/mbed/topic/2030/]]

Committer:
frank26080115
Date:
Sun Mar 20 18:45:15 2011 +0000
Revision:
0:84d7747641aa

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
frank26080115 0:84d7747641aa 1 /***********************************************************************//**
frank26080115 0:84d7747641aa 2 * @file lpc17xx_rtc.h
frank26080115 0:84d7747641aa 3 * @brief Contains all macro definitions and function prototypes
frank26080115 0:84d7747641aa 4 * support for RTC firmware library on LPC17xx
frank26080115 0:84d7747641aa 5 * @version 2.0
frank26080115 0:84d7747641aa 6 * @date 21. May. 2010
frank26080115 0:84d7747641aa 7 * @author NXP MCU SW Application Team
frank26080115 0:84d7747641aa 8 **************************************************************************
frank26080115 0:84d7747641aa 9 * Software that is described herein is for illustrative purposes only
frank26080115 0:84d7747641aa 10 * which provides customers with programming information regarding the
frank26080115 0:84d7747641aa 11 * products. This software is supplied "AS IS" without any warranties.
frank26080115 0:84d7747641aa 12 * NXP Semiconductors assumes no responsibility or liability for the
frank26080115 0:84d7747641aa 13 * use of the software, conveys no license or title under any patent,
frank26080115 0:84d7747641aa 14 * copyright, or mask work right to the product. NXP Semiconductors
frank26080115 0:84d7747641aa 15 * reserves the right to make changes in the software without
frank26080115 0:84d7747641aa 16 * notification. NXP Semiconductors also make no representation or
frank26080115 0:84d7747641aa 17 * warranty that such application will be suitable for the specified
frank26080115 0:84d7747641aa 18 * use without further testing or modification.
frank26080115 0:84d7747641aa 19 **************************************************************************/
frank26080115 0:84d7747641aa 20
frank26080115 0:84d7747641aa 21 /* Peripheral group ----------------------------------------------------------- */
frank26080115 0:84d7747641aa 22 /** @defgroup RTC RTC
frank26080115 0:84d7747641aa 23 * @ingroup LPC1700CMSIS_FwLib_Drivers
frank26080115 0:84d7747641aa 24 * @{
frank26080115 0:84d7747641aa 25 */
frank26080115 0:84d7747641aa 26
frank26080115 0:84d7747641aa 27 #ifndef LPC17XX_RTC_H_
frank26080115 0:84d7747641aa 28 #define LPC17XX_RTC_H_
frank26080115 0:84d7747641aa 29
frank26080115 0:84d7747641aa 30 /* Includes ------------------------------------------------------------------- */
frank26080115 0:84d7747641aa 31 #include "LPC17xx.h"
frank26080115 0:84d7747641aa 32 #include "lpc_types.h"
frank26080115 0:84d7747641aa 33
frank26080115 0:84d7747641aa 34
frank26080115 0:84d7747641aa 35 #ifdef __cplusplus
frank26080115 0:84d7747641aa 36 extern "C"
frank26080115 0:84d7747641aa 37 {
frank26080115 0:84d7747641aa 38 #endif
frank26080115 0:84d7747641aa 39
frank26080115 0:84d7747641aa 40
frank26080115 0:84d7747641aa 41 /* Private Macros ------------------------------------------------------------- */
frank26080115 0:84d7747641aa 42 /** @defgroup RTC_Private_Macros RTC Private Macros
frank26080115 0:84d7747641aa 43 * @{
frank26080115 0:84d7747641aa 44 */
frank26080115 0:84d7747641aa 45
frank26080115 0:84d7747641aa 46 /* ----------------------- BIT DEFINITIONS ----------------------------------- */
frank26080115 0:84d7747641aa 47 /* Miscellaneous register group --------------------------------------------- */
frank26080115 0:84d7747641aa 48 /**********************************************************************
frank26080115 0:84d7747641aa 49 * ILR register definitions
frank26080115 0:84d7747641aa 50 **********************************************************************/
frank26080115 0:84d7747641aa 51 /** ILR register mask */
frank26080115 0:84d7747641aa 52 #define RTC_ILR_BITMASK ((0x00000003))
frank26080115 0:84d7747641aa 53 /** Bit inform the source interrupt is counter increment*/
frank26080115 0:84d7747641aa 54 #define RTC_IRL_RTCCIF ((1<<0))
frank26080115 0:84d7747641aa 55 /** Bit inform the source interrupt is alarm match*/
frank26080115 0:84d7747641aa 56 #define RTC_IRL_RTCALF ((1<<1))
frank26080115 0:84d7747641aa 57
frank26080115 0:84d7747641aa 58 /**********************************************************************
frank26080115 0:84d7747641aa 59 * CCR register definitions
frank26080115 0:84d7747641aa 60 **********************************************************************/
frank26080115 0:84d7747641aa 61 /** CCR register mask */
frank26080115 0:84d7747641aa 62 #define RTC_CCR_BITMASK ((0x00000013))
frank26080115 0:84d7747641aa 63 /** Clock enable */
frank26080115 0:84d7747641aa 64 #define RTC_CCR_CLKEN ((1<<0))
frank26080115 0:84d7747641aa 65 /** Clock reset */
frank26080115 0:84d7747641aa 66 #define RTC_CCR_CTCRST ((1<<1))
frank26080115 0:84d7747641aa 67 /** Calibration counter enable */
frank26080115 0:84d7747641aa 68 #define RTC_CCR_CCALEN ((1<<4))
frank26080115 0:84d7747641aa 69
frank26080115 0:84d7747641aa 70 /**********************************************************************
frank26080115 0:84d7747641aa 71 * CIIR register definitions
frank26080115 0:84d7747641aa 72 **********************************************************************/
frank26080115 0:84d7747641aa 73 /** Counter Increment Interrupt bit for second */
frank26080115 0:84d7747641aa 74 #define RTC_CIIR_IMSEC ((1<<0))
frank26080115 0:84d7747641aa 75 /** Counter Increment Interrupt bit for minute */
frank26080115 0:84d7747641aa 76 #define RTC_CIIR_IMMIN ((1<<1))
frank26080115 0:84d7747641aa 77 /** Counter Increment Interrupt bit for hour */
frank26080115 0:84d7747641aa 78 #define RTC_CIIR_IMHOUR ((1<<2))
frank26080115 0:84d7747641aa 79 /** Counter Increment Interrupt bit for day of month */
frank26080115 0:84d7747641aa 80 #define RTC_CIIR_IMDOM ((1<<3))
frank26080115 0:84d7747641aa 81 /** Counter Increment Interrupt bit for day of week */
frank26080115 0:84d7747641aa 82 #define RTC_CIIR_IMDOW ((1<<4))
frank26080115 0:84d7747641aa 83 /** Counter Increment Interrupt bit for day of year */
frank26080115 0:84d7747641aa 84 #define RTC_CIIR_IMDOY ((1<<5))
frank26080115 0:84d7747641aa 85 /** Counter Increment Interrupt bit for month */
frank26080115 0:84d7747641aa 86 #define RTC_CIIR_IMMON ((1<<6))
frank26080115 0:84d7747641aa 87 /** Counter Increment Interrupt bit for year */
frank26080115 0:84d7747641aa 88 #define RTC_CIIR_IMYEAR ((1<<7))
frank26080115 0:84d7747641aa 89 /** CIIR bit mask */
frank26080115 0:84d7747641aa 90 #define RTC_CIIR_BITMASK ((0xFF))
frank26080115 0:84d7747641aa 91
frank26080115 0:84d7747641aa 92 /**********************************************************************
frank26080115 0:84d7747641aa 93 * AMR register definitions
frank26080115 0:84d7747641aa 94 **********************************************************************/
frank26080115 0:84d7747641aa 95 /** Counter Increment Select Mask bit for second */
frank26080115 0:84d7747641aa 96 #define RTC_AMR_AMRSEC ((1<<0))
frank26080115 0:84d7747641aa 97 /** Counter Increment Select Mask bit for minute */
frank26080115 0:84d7747641aa 98 #define RTC_AMR_AMRMIN ((1<<1))
frank26080115 0:84d7747641aa 99 /** Counter Increment Select Mask bit for hour */
frank26080115 0:84d7747641aa 100 #define RTC_AMR_AMRHOUR ((1<<2))
frank26080115 0:84d7747641aa 101 /** Counter Increment Select Mask bit for day of month */
frank26080115 0:84d7747641aa 102 #define RTC_AMR_AMRDOM ((1<<3))
frank26080115 0:84d7747641aa 103 /** Counter Increment Select Mask bit for day of week */
frank26080115 0:84d7747641aa 104 #define RTC_AMR_AMRDOW ((1<<4))
frank26080115 0:84d7747641aa 105 /** Counter Increment Select Mask bit for day of year */
frank26080115 0:84d7747641aa 106 #define RTC_AMR_AMRDOY ((1<<5))
frank26080115 0:84d7747641aa 107 /** Counter Increment Select Mask bit for month */
frank26080115 0:84d7747641aa 108 #define RTC_AMR_AMRMON ((1<<6))
frank26080115 0:84d7747641aa 109 /** Counter Increment Select Mask bit for year */
frank26080115 0:84d7747641aa 110 #define RTC_AMR_AMRYEAR ((1<<7))
frank26080115 0:84d7747641aa 111 /** AMR bit mask */
frank26080115 0:84d7747641aa 112 #define RTC_AMR_BITMASK ((0xFF))
frank26080115 0:84d7747641aa 113
frank26080115 0:84d7747641aa 114 /**********************************************************************
frank26080115 0:84d7747641aa 115 * RTC_AUX register definitions
frank26080115 0:84d7747641aa 116 **********************************************************************/
frank26080115 0:84d7747641aa 117 /** RTC Oscillator Fail detect flag */
frank26080115 0:84d7747641aa 118 #define RTC_AUX_RTC_OSCF ((1<<4))
frank26080115 0:84d7747641aa 119
frank26080115 0:84d7747641aa 120 /**********************************************************************
frank26080115 0:84d7747641aa 121 * RTC_AUXEN register definitions
frank26080115 0:84d7747641aa 122 **********************************************************************/
frank26080115 0:84d7747641aa 123 /** Oscillator Fail Detect interrupt enable*/
frank26080115 0:84d7747641aa 124 #define RTC_AUXEN_RTC_OSCFEN ((1<<4))
frank26080115 0:84d7747641aa 125
frank26080115 0:84d7747641aa 126 /* Consolidated time register group ----------------------------------- */
frank26080115 0:84d7747641aa 127 /**********************************************************************
frank26080115 0:84d7747641aa 128 * Consolidated Time Register 0 definitions
frank26080115 0:84d7747641aa 129 **********************************************************************/
frank26080115 0:84d7747641aa 130 #define RTC_CTIME0_SECONDS_MASK ((0x3F))
frank26080115 0:84d7747641aa 131 #define RTC_CTIME0_MINUTES_MASK ((0x3F00))
frank26080115 0:84d7747641aa 132 #define RTC_CTIME0_HOURS_MASK ((0x1F0000))
frank26080115 0:84d7747641aa 133 #define RTC_CTIME0_DOW_MASK ((0x7000000))
frank26080115 0:84d7747641aa 134
frank26080115 0:84d7747641aa 135 /**********************************************************************
frank26080115 0:84d7747641aa 136 * Consolidated Time Register 1 definitions
frank26080115 0:84d7747641aa 137 **********************************************************************/
frank26080115 0:84d7747641aa 138 #define RTC_CTIME1_DOM_MASK ((0x1F))
frank26080115 0:84d7747641aa 139 #define RTC_CTIME1_MONTH_MASK ((0xF00))
frank26080115 0:84d7747641aa 140 #define RTC_CTIME1_YEAR_MASK ((0xFFF0000))
frank26080115 0:84d7747641aa 141
frank26080115 0:84d7747641aa 142 /**********************************************************************
frank26080115 0:84d7747641aa 143 * Consolidated Time Register 2 definitions
frank26080115 0:84d7747641aa 144 **********************************************************************/
frank26080115 0:84d7747641aa 145 #define RTC_CTIME2_DOY_MASK ((0xFFF))
frank26080115 0:84d7747641aa 146
frank26080115 0:84d7747641aa 147 /**********************************************************************
frank26080115 0:84d7747641aa 148 * Time Counter Group and Alarm register group
frank26080115 0:84d7747641aa 149 **********************************************************************/
frank26080115 0:84d7747641aa 150 /** SEC register mask */
frank26080115 0:84d7747641aa 151 #define RTC_SEC_MASK (0x0000003F)
frank26080115 0:84d7747641aa 152 /** MIN register mask */
frank26080115 0:84d7747641aa 153 #define RTC_MIN_MASK (0x0000003F)
frank26080115 0:84d7747641aa 154 /** HOUR register mask */
frank26080115 0:84d7747641aa 155 #define RTC_HOUR_MASK (0x0000001F)
frank26080115 0:84d7747641aa 156 /** DOM register mask */
frank26080115 0:84d7747641aa 157 #define RTC_DOM_MASK (0x0000001F)
frank26080115 0:84d7747641aa 158 /** DOW register mask */
frank26080115 0:84d7747641aa 159 #define RTC_DOW_MASK (0x00000007)
frank26080115 0:84d7747641aa 160 /** DOY register mask */
frank26080115 0:84d7747641aa 161 #define RTC_DOY_MASK (0x000001FF)
frank26080115 0:84d7747641aa 162 /** MONTH register mask */
frank26080115 0:84d7747641aa 163 #define RTC_MONTH_MASK (0x0000000F)
frank26080115 0:84d7747641aa 164 /** YEAR register mask */
frank26080115 0:84d7747641aa 165 #define RTC_YEAR_MASK (0x00000FFF)
frank26080115 0:84d7747641aa 166
frank26080115 0:84d7747641aa 167 #define RTC_SECOND_MAX 59 /*!< Maximum value of second */
frank26080115 0:84d7747641aa 168 #define RTC_MINUTE_MAX 59 /*!< Maximum value of minute*/
frank26080115 0:84d7747641aa 169 #define RTC_HOUR_MAX 23 /*!< Maximum value of hour*/
frank26080115 0:84d7747641aa 170 #define RTC_MONTH_MIN 1 /*!< Minimum value of month*/
frank26080115 0:84d7747641aa 171 #define RTC_MONTH_MAX 12 /*!< Maximum value of month*/
frank26080115 0:84d7747641aa 172 #define RTC_DAYOFMONTH_MIN 1 /*!< Minimum value of day of month*/
frank26080115 0:84d7747641aa 173 #define RTC_DAYOFMONTH_MAX 31 /*!< Maximum value of day of month*/
frank26080115 0:84d7747641aa 174 #define RTC_DAYOFWEEK_MAX 6 /*!< Maximum value of day of week*/
frank26080115 0:84d7747641aa 175 #define RTC_DAYOFYEAR_MIN 1 /*!< Minimum value of day of year*/
frank26080115 0:84d7747641aa 176 #define RTC_DAYOFYEAR_MAX 366 /*!< Maximum value of day of year*/
frank26080115 0:84d7747641aa 177 #define RTC_YEAR_MAX 4095 /*!< Maximum value of year*/
frank26080115 0:84d7747641aa 178
frank26080115 0:84d7747641aa 179 /**********************************************************************
frank26080115 0:84d7747641aa 180 * Calibration register
frank26080115 0:84d7747641aa 181 **********************************************************************/
frank26080115 0:84d7747641aa 182 /* Calibration register */
frank26080115 0:84d7747641aa 183 /** Calibration value */
frank26080115 0:84d7747641aa 184 #define RTC_CALIBRATION_CALVAL_MASK ((0x1FFFF))
frank26080115 0:84d7747641aa 185 /** Calibration direction */
frank26080115 0:84d7747641aa 186 #define RTC_CALIBRATION_LIBDIR ((1<<17))
frank26080115 0:84d7747641aa 187 /** Calibration max value */
frank26080115 0:84d7747641aa 188 #define RTC_CALIBRATION_MAX ((0x20000))
frank26080115 0:84d7747641aa 189 /** Calibration definitions */
frank26080115 0:84d7747641aa 190 #define RTC_CALIB_DIR_FORWARD ((uint8_t)(0))
frank26080115 0:84d7747641aa 191 #define RTC_CALIB_DIR_BACKWARD ((uint8_t)(1))
frank26080115 0:84d7747641aa 192
frank26080115 0:84d7747641aa 193
frank26080115 0:84d7747641aa 194 /* ---------------- CHECK PARAMETER DEFINITIONS ---------------------------- */
frank26080115 0:84d7747641aa 195 /** Macro to determine if it is valid RTC peripheral */
frank26080115 0:84d7747641aa 196 #define PARAM_RTCx(x) (((uint32_t *)x)==((uint32_t *)LPC_RTC))
frank26080115 0:84d7747641aa 197
frank26080115 0:84d7747641aa 198 /* Macro check RTC interrupt type */
frank26080115 0:84d7747641aa 199 #define PARAM_RTC_INT(n) ((n==RTC_INT_COUNTER_INCREASE) || (n==RTC_INT_ALARM))
frank26080115 0:84d7747641aa 200
frank26080115 0:84d7747641aa 201 /* Macro check RTC time type */
frank26080115 0:84d7747641aa 202 #define PARAM_RTC_TIMETYPE(n) ((n==RTC_TIMETYPE_SECOND) || (n==RTC_TIMETYPE_MINUTE) \
frank26080115 0:84d7747641aa 203 || (n==RTC_TIMETYPE_HOUR) || (n==RTC_TIMETYPE_DAYOFWEEK) \
frank26080115 0:84d7747641aa 204 || (n==RTC_TIMETYPE_DAYOFMONTH) || (n==RTC_TIMETYPE_DAYOFYEAR) \
frank26080115 0:84d7747641aa 205 || (n==RTC_TIMETYPE_MONTH) || (n==RTC_TIMETYPE_YEAR))
frank26080115 0:84d7747641aa 206
frank26080115 0:84d7747641aa 207 /* Macro check RTC calibration type */
frank26080115 0:84d7747641aa 208 #define PARAM_RTC_CALIB_DIR(n) ((n==RTC_CALIB_DIR_FORWARD) || (n==RTC_CALIB_DIR_BACKWARD))
frank26080115 0:84d7747641aa 209
frank26080115 0:84d7747641aa 210 /* Macro check RTC GPREG type */
frank26080115 0:84d7747641aa 211 #define PARAM_RTC_GPREG_CH(n) ((n)<=4)
frank26080115 0:84d7747641aa 212
frank26080115 0:84d7747641aa 213 /**
frank26080115 0:84d7747641aa 214 * @}
frank26080115 0:84d7747641aa 215 */
frank26080115 0:84d7747641aa 216
frank26080115 0:84d7747641aa 217
frank26080115 0:84d7747641aa 218 /* Public Types --------------------------------------------------------------- */
frank26080115 0:84d7747641aa 219 /** @defgroup RTC_Public_Types RTC Public Types
frank26080115 0:84d7747641aa 220 * @{
frank26080115 0:84d7747641aa 221 */
frank26080115 0:84d7747641aa 222
frank26080115 0:84d7747641aa 223 /** @brief Time structure definitions for easy manipulate the data */
frank26080115 0:84d7747641aa 224 typedef struct {
frank26080115 0:84d7747641aa 225 uint32_t SEC; /*!< Seconds Register */
frank26080115 0:84d7747641aa 226 uint32_t MIN; /*!< Minutes Register */
frank26080115 0:84d7747641aa 227 uint32_t HOUR; /*!< Hours Register */
frank26080115 0:84d7747641aa 228 uint32_t DOM; /*!< Day of Month Register */
frank26080115 0:84d7747641aa 229 uint32_t DOW; /*!< Day of Week Register */
frank26080115 0:84d7747641aa 230 uint32_t DOY; /*!< Day of Year Register */
frank26080115 0:84d7747641aa 231 uint32_t MONTH; /*!< Months Register */
frank26080115 0:84d7747641aa 232 uint32_t YEAR; /*!< Years Register */
frank26080115 0:84d7747641aa 233 } RTC_TIME_Type;
frank26080115 0:84d7747641aa 234
frank26080115 0:84d7747641aa 235 /** @brief RTC interrupt source */
frank26080115 0:84d7747641aa 236 typedef enum {
frank26080115 0:84d7747641aa 237 RTC_INT_COUNTER_INCREASE = RTC_IRL_RTCCIF, /*!< Counter Increment Interrupt */
frank26080115 0:84d7747641aa 238 RTC_INT_ALARM = RTC_IRL_RTCALF, /*!< The alarm interrupt */
frank26080115 0:84d7747641aa 239 } RTC_INT_OPT;
frank26080115 0:84d7747641aa 240
frank26080115 0:84d7747641aa 241
frank26080115 0:84d7747641aa 242 /** @brief RTC time type option */
frank26080115 0:84d7747641aa 243 typedef enum {
frank26080115 0:84d7747641aa 244 RTC_TIMETYPE_SECOND = 0, /*!< Second */
frank26080115 0:84d7747641aa 245 RTC_TIMETYPE_MINUTE = 1, /*!< Month */
frank26080115 0:84d7747641aa 246 RTC_TIMETYPE_HOUR = 2, /*!< Hour */
frank26080115 0:84d7747641aa 247 RTC_TIMETYPE_DAYOFWEEK = 3, /*!< Day of week */
frank26080115 0:84d7747641aa 248 RTC_TIMETYPE_DAYOFMONTH = 4, /*!< Day of month */
frank26080115 0:84d7747641aa 249 RTC_TIMETYPE_DAYOFYEAR = 5, /*!< Day of year */
frank26080115 0:84d7747641aa 250 RTC_TIMETYPE_MONTH = 6, /*!< Month */
frank26080115 0:84d7747641aa 251 RTC_TIMETYPE_YEAR = 7, /*!< Year */
frank26080115 0:84d7747641aa 252 } RTC_TIMETYPE_Num;
frank26080115 0:84d7747641aa 253
frank26080115 0:84d7747641aa 254 /**
frank26080115 0:84d7747641aa 255 * @}
frank26080115 0:84d7747641aa 256 */
frank26080115 0:84d7747641aa 257
frank26080115 0:84d7747641aa 258
frank26080115 0:84d7747641aa 259
frank26080115 0:84d7747641aa 260 /* Public Functions ----------------------------------------------------------- */
frank26080115 0:84d7747641aa 261 /** @defgroup RTC_Public_Functions RTC Public Functions
frank26080115 0:84d7747641aa 262 * @{
frank26080115 0:84d7747641aa 263 */
frank26080115 0:84d7747641aa 264
frank26080115 0:84d7747641aa 265 void RTC_Init (LPC_RTC_TypeDef *RTCx);
frank26080115 0:84d7747641aa 266 void RTC_DeInit(LPC_RTC_TypeDef *RTCx);
frank26080115 0:84d7747641aa 267 void RTC_ResetClockTickCounter(LPC_RTC_TypeDef *RTCx);
frank26080115 0:84d7747641aa 268 void RTC_Cmd (LPC_RTC_TypeDef *RTCx, FunctionalState NewState);
frank26080115 0:84d7747641aa 269 void RTC_CntIncrIntConfig (LPC_RTC_TypeDef *RTCx, uint32_t CntIncrIntType, \
frank26080115 0:84d7747641aa 270 FunctionalState NewState);
frank26080115 0:84d7747641aa 271 void RTC_AlarmIntConfig (LPC_RTC_TypeDef *RTCx, uint32_t AlarmTimeType, \
frank26080115 0:84d7747641aa 272 FunctionalState NewState);
frank26080115 0:84d7747641aa 273 void RTC_SetTime (LPC_RTC_TypeDef *RTCx, uint32_t Timetype, uint32_t TimeValue);
frank26080115 0:84d7747641aa 274 uint32_t RTC_GetTime(LPC_RTC_TypeDef *RTCx, uint32_t Timetype);
frank26080115 0:84d7747641aa 275 void RTC_SetFullTime (LPC_RTC_TypeDef *RTCx, RTC_TIME_Type *pFullTime);
frank26080115 0:84d7747641aa 276 void RTC_GetFullTime (LPC_RTC_TypeDef *RTCx, RTC_TIME_Type *pFullTime);
frank26080115 0:84d7747641aa 277 void RTC_SetAlarmTime (LPC_RTC_TypeDef *RTCx, uint32_t Timetype, uint32_t ALValue);
frank26080115 0:84d7747641aa 278 uint32_t RTC_GetAlarmTime (LPC_RTC_TypeDef *RTCx, uint32_t Timetype);
frank26080115 0:84d7747641aa 279 void RTC_SetFullAlarmTime (LPC_RTC_TypeDef *RTCx, RTC_TIME_Type *pFullTime);
frank26080115 0:84d7747641aa 280 void RTC_GetFullAlarmTime (LPC_RTC_TypeDef *RTCx, RTC_TIME_Type *pFullTime);
frank26080115 0:84d7747641aa 281 IntStatus RTC_GetIntPending (LPC_RTC_TypeDef *RTCx, uint32_t IntType);
frank26080115 0:84d7747641aa 282 void RTC_ClearIntPending (LPC_RTC_TypeDef *RTCx, uint32_t IntType);
frank26080115 0:84d7747641aa 283 void RTC_CalibCounterCmd(LPC_RTC_TypeDef *RTCx, FunctionalState NewState);
frank26080115 0:84d7747641aa 284 void RTC_CalibConfig(LPC_RTC_TypeDef *RTCx, uint32_t CalibValue, uint8_t CalibDir);
frank26080115 0:84d7747641aa 285 void RTC_WriteGPREG (LPC_RTC_TypeDef *RTCx, uint8_t Channel, uint32_t Value);
frank26080115 0:84d7747641aa 286 uint32_t RTC_ReadGPREG (LPC_RTC_TypeDef *RTCx, uint8_t Channel);
frank26080115 0:84d7747641aa 287
frank26080115 0:84d7747641aa 288 /**
frank26080115 0:84d7747641aa 289 * @}
frank26080115 0:84d7747641aa 290 */
frank26080115 0:84d7747641aa 291
frank26080115 0:84d7747641aa 292 #ifdef __cplusplus
frank26080115 0:84d7747641aa 293 }
frank26080115 0:84d7747641aa 294 #endif
frank26080115 0:84d7747641aa 295
frank26080115 0:84d7747641aa 296 #endif /* LPC17XX_RTC_H_ */
frank26080115 0:84d7747641aa 297
frank26080115 0:84d7747641aa 298 /**
frank26080115 0:84d7747641aa 299 * @}
frank26080115 0:84d7747641aa 300 */
frank26080115 0:84d7747641aa 301
frank26080115 0:84d7747641aa 302 /* --------------------------------- End Of File ------------------------------ */