uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
RTC Private Macros

Macros

#define RTC_ILR_BITMASK   ((0x00000003))
 
#define RTC_IRL_RTCCIF   ((1<<0))
 
#define RTC_IRL_RTCALF   ((1<<1))
 
#define RTC_CCR_BITMASK   ((0x00000013))
 
#define RTC_CCR_CLKEN   ((1<<0))
 
#define RTC_CCR_CTCRST   ((1<<1))
 
#define RTC_CCR_CCALEN   ((1<<4))
 
#define RTC_CIIR_IMSEC   ((1<<0))
 
#define RTC_CIIR_IMMIN   ((1<<1))
 
#define RTC_CIIR_IMHOUR   ((1<<2))
 
#define RTC_CIIR_IMDOM   ((1<<3))
 
#define RTC_CIIR_IMDOW   ((1<<4))
 
#define RTC_CIIR_IMDOY   ((1<<5))
 
#define RTC_CIIR_IMMON   ((1<<6))
 
#define RTC_CIIR_IMYEAR   ((1<<7))
 
#define RTC_CIIR_BITMASK   ((0xFF))
 
#define RTC_AMR_AMRSEC   ((1<<0))
 
#define RTC_AMR_AMRMIN   ((1<<1))
 
#define RTC_AMR_AMRHOUR   ((1<<2))
 
#define RTC_AMR_AMRDOM   ((1<<3))
 
#define RTC_AMR_AMRDOW   ((1<<4))
 
#define RTC_AMR_AMRDOY   ((1<<5))
 
#define RTC_AMR_AMRMON   ((1<<6))
 
#define RTC_AMR_AMRYEAR   ((1<<7))
 
#define RTC_AMR_BITMASK   ((0xFF))
 
#define RTC_AUX_RTC_OSCF   ((1<<4))
 
#define RTC_AUXEN_RTC_OSCFEN   ((1<<4))
 
#define RTC_CTIME0_SECONDS_MASK   ((0x3F))
 
#define RTC_CTIME0_MINUTES_MASK   ((0x3F00))
 
#define RTC_CTIME0_HOURS_MASK   ((0x1F0000))
 
#define RTC_CTIME0_DOW_MASK   ((0x7000000))
 
#define RTC_CTIME1_DOM_MASK   ((0x1F))
 
#define RTC_CTIME1_MONTH_MASK   ((0xF00))
 
#define RTC_CTIME1_YEAR_MASK   ((0xFFF0000))
 
#define RTC_CTIME2_DOY_MASK   ((0xFFF))
 
#define RTC_SEC_MASK   (0x0000003F)
 
#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))
 
#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_RTCx(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_TIMETYPE(n)
 
#define PARAM_RTC_CALIB_DIR(n)   ((n==RTC_CALIB_DIR_FORWARD) || (n==RTC_CALIB_DIR_BACKWARD))
 
#define PARAM_RTC_GPREG_CH(n)   ((n>=0) && (n<=4))
 

Detailed Description

Macro Definition Documentation

#define PARAM_RTC_CALIB_DIR (   n)    ((n==RTC_CALIB_DIR_FORWARD) || (n==RTC_CALIB_DIR_BACKWARD))

Definition at line 208 of file lpc17xx_rtc.h.

#define PARAM_RTC_GPREG_CH (   n)    ((n>=0) && (n<=4))

Definition at line 211 of file lpc17xx_rtc.h.

#define PARAM_RTC_INT (   n)    ((n==RTC_INT_COUNTER_INCREASE) || (n==RTC_INT_ALARM))

Definition at line 199 of file lpc17xx_rtc.h.

#define PARAM_RTC_TIMETYPE (   n)
#define PARAM_RTCx (   x)    (((uint32_t *)x)==((uint32_t *)LPC_RTC))

Macro to determine if it is valid RTC peripheral

Definition at line 196 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRDOM   ((1<<3))

Counter Increment Select Mask bit for day of month

Definition at line 102 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRDOW   ((1<<4))

Counter Increment Select Mask bit for day of week

Definition at line 104 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRDOY   ((1<<5))

Counter Increment Select Mask bit for day of year

Definition at line 106 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRHOUR   ((1<<2))

Counter Increment Select Mask bit for hour

Definition at line 100 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRMIN   ((1<<1))

Counter Increment Select Mask bit for minute

Definition at line 98 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRMON   ((1<<6))

Counter Increment Select Mask bit for month

Definition at line 108 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRSEC   ((1<<0))

Counter Increment Select Mask bit for second

Definition at line 96 of file lpc17xx_rtc.h.

#define RTC_AMR_AMRYEAR   ((1<<7))

Counter Increment Select Mask bit for year

Definition at line 110 of file lpc17xx_rtc.h.

#define RTC_AMR_BITMASK   ((0xFF))

AMR bit mask

Definition at line 112 of file lpc17xx_rtc.h.

#define RTC_AUX_RTC_OSCF   ((1<<4))

RTC Oscillator Fail detect flag

Definition at line 118 of file lpc17xx_rtc.h.

#define RTC_AUXEN_RTC_OSCFEN   ((1<<4))

Oscillator Fail Detect interrupt enable

Definition at line 124 of file lpc17xx_rtc.h.

#define RTC_CALIB_DIR_BACKWARD   ((uint8_t)(1))

Definition at line 191 of file lpc17xx_rtc.h.

#define RTC_CALIB_DIR_FORWARD   ((uint8_t)(0))

Calibration definitions

Definition at line 190 of file lpc17xx_rtc.h.

#define RTC_CALIBRATION_CALVAL_MASK   ((0x1FFFF))

Calibration value

Definition at line 184 of file lpc17xx_rtc.h.

#define RTC_CALIBRATION_LIBDIR   ((1<<17))

Calibration direction

Definition at line 186 of file lpc17xx_rtc.h.

#define RTC_CALIBRATION_MAX   ((0x20000))

Calibration max value

Definition at line 188 of file lpc17xx_rtc.h.

#define RTC_CCR_BITMASK   ((0x00000013))

CCR register mask

Definition at line 62 of file lpc17xx_rtc.h.

#define RTC_CCR_CCALEN   ((1<<4))

Calibration counter enable

Definition at line 68 of file lpc17xx_rtc.h.

#define RTC_CCR_CLKEN   ((1<<0))

Clock enable

Definition at line 64 of file lpc17xx_rtc.h.

#define RTC_CCR_CTCRST   ((1<<1))

Clock reset

Definition at line 66 of file lpc17xx_rtc.h.

#define RTC_CIIR_BITMASK   ((0xFF))

CIIR bit mask

Definition at line 90 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMDOM   ((1<<3))

Counter Increment Interrupt bit for day of month

Definition at line 80 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMDOW   ((1<<4))

Counter Increment Interrupt bit for day of week

Definition at line 82 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMDOY   ((1<<5))

Counter Increment Interrupt bit for day of year

Definition at line 84 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMHOUR   ((1<<2))

Counter Increment Interrupt bit for hour

Definition at line 78 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMMIN   ((1<<1))

Counter Increment Interrupt bit for minute

Definition at line 76 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMMON   ((1<<6))

Counter Increment Interrupt bit for month

Definition at line 86 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMSEC   ((1<<0))

Counter Increment Interrupt bit for second

Definition at line 74 of file lpc17xx_rtc.h.

#define RTC_CIIR_IMYEAR   ((1<<7))

Counter Increment Interrupt bit for year

Definition at line 88 of file lpc17xx_rtc.h.

#define RTC_CTIME0_DOW_MASK   ((0x7000000))

Definition at line 133 of file lpc17xx_rtc.h.

#define RTC_CTIME0_HOURS_MASK   ((0x1F0000))

Definition at line 132 of file lpc17xx_rtc.h.

#define RTC_CTIME0_MINUTES_MASK   ((0x3F00))

Definition at line 131 of file lpc17xx_rtc.h.

#define RTC_CTIME0_SECONDS_MASK   ((0x3F))

Definition at line 130 of file lpc17xx_rtc.h.

#define RTC_CTIME1_DOM_MASK   ((0x1F))

Definition at line 138 of file lpc17xx_rtc.h.

#define RTC_CTIME1_MONTH_MASK   ((0xF00))

Definition at line 139 of file lpc17xx_rtc.h.

#define RTC_CTIME1_YEAR_MASK   ((0xFFF0000))

Definition at line 140 of file lpc17xx_rtc.h.

#define RTC_CTIME2_DOY_MASK   ((0xFFF))

Definition at line 145 of file lpc17xx_rtc.h.

#define RTC_DAYOFMONTH_MAX   31

Maximum value of day of month

Definition at line 173 of file lpc17xx_rtc.h.

#define RTC_DAYOFMONTH_MIN   1

Minimum value of day of month

Definition at line 172 of file lpc17xx_rtc.h.

#define RTC_DAYOFWEEK_MAX   6

Maximum value of day of week

Definition at line 174 of file lpc17xx_rtc.h.

#define RTC_DAYOFYEAR_MAX   366

Maximum value of day of year

Definition at line 176 of file lpc17xx_rtc.h.

#define RTC_DAYOFYEAR_MIN   1

Minimum value of day of year

Definition at line 175 of file lpc17xx_rtc.h.

#define RTC_DOM_MASK   (0x0000001F)

DOM register mask

Definition at line 157 of file lpc17xx_rtc.h.

#define RTC_DOW_MASK   (0x00000007)

DOW register mask

Definition at line 159 of file lpc17xx_rtc.h.

#define RTC_DOY_MASK   (0x000001FF)

DOY register mask

Definition at line 161 of file lpc17xx_rtc.h.

#define RTC_HOUR_MASK   (0x0000001F)

HOUR register mask

Definition at line 155 of file lpc17xx_rtc.h.

#define RTC_HOUR_MAX   23

Maximum value of hour

Definition at line 169 of file lpc17xx_rtc.h.

#define RTC_ILR_BITMASK   ((0x00000003))

ILR register mask

Definition at line 52 of file lpc17xx_rtc.h.

#define RTC_IRL_RTCALF   ((1<<1))

Bit inform the source interrupt is alarm match

Definition at line 56 of file lpc17xx_rtc.h.

#define RTC_IRL_RTCCIF   ((1<<0))

Bit inform the source interrupt is counter increment

Definition at line 54 of file lpc17xx_rtc.h.

#define RTC_MIN_MASK   (0x0000003F)

MIN register mask

Definition at line 153 of file lpc17xx_rtc.h.

#define RTC_MINUTE_MAX   59

Maximum value of minute

Definition at line 168 of file lpc17xx_rtc.h.

#define RTC_MONTH_MASK   (0x0000000F)

MONTH register mask

Definition at line 163 of file lpc17xx_rtc.h.

#define RTC_MONTH_MAX   12

Maximum value of month

Definition at line 171 of file lpc17xx_rtc.h.

#define RTC_MONTH_MIN   1

Minimum value of month

Definition at line 170 of file lpc17xx_rtc.h.

#define RTC_SEC_MASK   (0x0000003F)

SEC register mask

Definition at line 151 of file lpc17xx_rtc.h.

#define RTC_SECOND_MAX   59

Maximum value of second

Definition at line 167 of file lpc17xx_rtc.h.

#define RTC_YEAR_MASK   (0x00000FFF)

YEAR register mask

Definition at line 165 of file lpc17xx_rtc.h.

#define RTC_YEAR_MAX   4095

Maximum value of year

Definition at line 177 of file lpc17xx_rtc.h.