![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Go to the source code of this file.
Data Structures | |
struct | IP_RTC_001_T |
Real Time Clock register block structure. More... | |
struct | IP_RTC_TIME_T |
Macros | |
#define | RTC_ILR_BITMASK ((0x00000003)) |
ILR register definitions. | |
#define | RTC_IRL_RTCCIF ((1 << 0)) |
#define | RTC_IRL_RTCALF ((1 << 1)) |
#define | RTC_CCR_BITMASK ((0x00000013)) |
CCR register definitions. | |
#define | RTC_CCR_CLKEN ((1 << 0)) |
#define | RTC_CCR_CTCRST ((1 << 1)) |
#define | RTC_CCR_CCALEN ((1 << 4)) |
#define | RTC_AMR_CIIR_IMSEC ((1 << 0)) |
CIIR and AMR register definitions. | |
#define | RTC_AMR_CIIR_IMMIN ((1 << 1)) |
#define | RTC_AMR_CIIR_IMHOUR ((1 << 2)) |
#define | RTC_AMR_CIIR_IMDOM ((1 << 3)) |
#define | RTC_AMR_CIIR_IMDOW ((1 << 4)) |
#define | RTC_AMR_CIIR_IMDOY ((1 << 5)) |
#define | RTC_AMR_CIIR_IMMON ((1 << 6)) |
#define | RTC_AMR_CIIR_IMYEAR ((1 << 7)) |
#define | RTC_AMR_CIIR_BITMASK ((0xFF)) |
#define | RTC_AUX_RTC_OSCF ((1 << 4)) |
RTC_AUX register definitions. | |
#define | RTC_AUXEN_RTC_OSCFEN ((1 << 4)) |
RTC_AUXEN register definitions. | |
#define | RTC_CTIME0_SECONDS_MASK ((0x3F)) |
Consolidated Time Register 0 definitions. | |
#define | RTC_CTIME0_MINUTES_MASK ((0x3F00)) |
#define | RTC_CTIME0_HOURS_MASK ((0x1F0000)) |
#define | RTC_CTIME0_DOW_MASK ((0x7000000)) |
#define | RTC_CTIME1_DOM_MASK ((0x1F)) |
Consolidated Time Register 1 definitions. | |
#define | RTC_CTIME1_MONTH_MASK ((0xF00)) |
#define | RTC_CTIME1_YEAR_MASK ((0xFFF0000)) |
#define | RTC_CTIME2_DOY_MASK ((0xFFF)) |
Consolidated Time Register 2 definitions. | |
#define | RTC_SEC_MASK (0x0000003F) |
Time Counter Group and Alarm register group. | |
#define | RTC_MIN_MASK (0x0000003F) |
#define | RTC_HOUR_MASK (0x0000001F) |
#define | RTC_DOM_MASK (0x0000001F) |
#define | RTC_DOW_MASK (0x00000007) |
#define | RTC_DOY_MASK (0x000001FF) |
#define | RTC_MONTH_MASK (0x0000000F) |
#define | RTC_YEAR_MASK (0x00000FFF) |
#define | RTC_SECOND_MAX 59 |
#define | RTC_MINUTE_MAX 59 |
#define | RTC_HOUR_MAX 23 |
#define | RTC_MONTH_MIN 1 |
#define | RTC_MONTH_MAX 12 |
#define | RTC_DAYOFMONTH_MIN 1 |
#define | RTC_DAYOFMONTH_MAX 31 |
#define | RTC_DAYOFWEEK_MAX 6 |
#define | RTC_DAYOFYEAR_MIN 1 |
#define | RTC_DAYOFYEAR_MAX 366 |
#define | RTC_YEAR_MAX 4095 |
#define | RTC_CALIBRATION_CALVAL_MASK ((0x1FFFF)) |
Calibration register. | |
#define | RTC_CALIBRATION_LIBDIR ((1 << 17)) |
#define | RTC_CALIBRATION_MAX ((0x20000)) |
#define | RTC_CALIB_DIR_FORWARD ((uint8_t) (0)) |
#define | RTC_CALIB_DIR_BACKWARD ((uint8_t) (1)) |
#define | PARAM_pRTC(x) (((uint32_t *) x) == ((uint32_t *) LPC_RTC)) |
#define | PARAM_RTC_INT(n) ((n == RTC_INT_COUNTER_INCREASE) || (n == RTC_INT_ALARM)) |
#define | PARAM_RTC_CALIB_DIR(n) ((n == RTC_CALIB_DIR_FORWARD) || (n == RTC_CALIB_DIR_BACKWARD)) |
Enumerations | |
enum | IP_RTC_TIMEINDEX_T { RTC_TIMETYPE_SECOND, RTC_TIMETYPE_MINUTE, RTC_TIMETYPE_HOUR, RTC_TIMETYPE_DAYOFMONTH, RTC_TIMETYPE_DAYOFWEEK, RTC_TIMETYPE_DAYOFYEAR, RTC_TIMETYPE_MONTH, RTC_TIMETYPE_YEAR, RTC_TIMETYPE_LAST } |
RTC time type option. More... | |
enum | IP_RTC_INT_OPT { RTC_INT_COUNTER_INCREASE = RTC_IRL_RTCCIF, RTC_INT_ALARM = RTC_IRL_RTCALF } |
RTC enumeration. More... | |
Functions | |
void | IP_RTC_Init (IP_RTC_001_T *pRTC) |
Initialize the RTC peripheral. | |
STATIC INLINE void | IP_RTC_DeInit (IP_RTC_001_T *pRTC) |
De-initialize the RTC peripheral. | |
void | IP_RTC_ResetClockTickCounter (IP_RTC_001_T *pRTC) |
Reset clock tick counter in the RTC peripheral. | |
void | IP_RTC_Enable (IP_RTC_001_T *pRTC, FunctionalState NewState) |
Start/Stop RTC peripheral. | |
void | IP_RTC_CntIncrIntConfig (IP_RTC_001_T *pRTC, uint32_t cntrMask, FunctionalState NewState) |
Enable/Disable Counter increment interrupt for a time type in the RTC peripheral. | |
void | IP_RTC_AlarmIntConfig (IP_RTC_001_T *pRTC, uint32_t alarmMask, FunctionalState NewState) |
Enable/Disable Alarm interrupt for a time type in the RTC peripheral. | |
void | IP_RTC_SetTime (IP_RTC_001_T *pRTC, IP_RTC_TIMEINDEX_T Timetype, uint32_t TimeValue) |
Set current time value for a time type in the RTC peripheral. | |
uint32_t | IP_RTC_GetTime (IP_RTC_001_T *pRTC, IP_RTC_TIMEINDEX_T Timetype) |
Get current time value for a type time type. | |
void | IP_RTC_SetFullTime (IP_RTC_001_T *pRTC, IP_RTC_TIME_T *pFullTime) |
Set full time in the RTC peripheral. | |
void | IP_RTC_GetFullTime (IP_RTC_001_T *pRTC, IP_RTC_TIME_T *pFullTime) |
Get full time from the RTC peripheral. | |
void | IP_RTC_SetAlarmTime (IP_RTC_001_T *pRTC, IP_RTC_TIMEINDEX_T Timetype, uint32_t ALValue) |
Set alarm time value for a time type. | |
uint32_t | IP_RTC_GetAlarmTime (IP_RTC_001_T *pRTC, IP_RTC_TIMEINDEX_T Timetype) |
Get alarm time value for a time type. | |
void | IP_RTC_SetFullAlarmTime (IP_RTC_001_T *pRTC, IP_RTC_TIME_T *pFullTime) |
Set full alarm time in the RTC peripheral. | |
void | IP_RTC_GetFullAlarmTime (IP_RTC_001_T *pRTC, IP_RTC_TIME_T *pFullTime) |
Get full alarm time in the RTC peripheral. | |
void | IP_RTC_CalibCounterCmd (IP_RTC_001_T *pRTC, FunctionalState NewState) |
Enable/Disable calibration counter in the RTC peripheral. | |
void | IP_RTC_CalibConfig (IP_RTC_001_T *pRTC, uint32_t CalibValue, uint8_t CalibDir) |
Configures Calibration in the RTC peripheral. | |
STATIC INLINE void | IP_RTC_ClearIntPending (IP_RTC_001_T *pRTC, uint32_t IntType) |
Clear specified Location interrupt pending in the RTC peripheral. | |
STATIC INLINE IntStatus | IP_RTC_GetIntPending (IP_RTC_001_T *pRTC, uint32_t IntType) |
Check whether if specified location interrupt in the RTC peripheral is set or not. | |