![]() |
M471M/R1/S BSP V3.01.000
The Board Support Package for M4521
|
M471M/R1/S RTC driver header file. More...
Go to the source code of this file.
Data Structures | |
struct | S_RTC_TIME_DATA_T |
Macros | |
#define | RTC_INIT_KEY 0xA5EB1357UL |
#define | RTC_WRITE_KEY 0x0000A965UL |
#define | RTC_CLOCK_12 0 |
#define | RTC_CLOCK_24 1 |
#define | RTC_AM 1 |
#define | RTC_PM 2 |
#define | RTC_TICK_1_SEC 0x0UL |
#define | RTC_TICK_1_2_SEC 0x1UL |
#define | RTC_TICK_1_4_SEC 0x2UL |
#define | RTC_TICK_1_8_SEC 0x3UL |
#define | RTC_TICK_1_16_SEC 0x4UL |
#define | RTC_TICK_1_32_SEC 0x5UL |
#define | RTC_TICK_1_64_SEC 0x6UL |
#define | RTC_TICK_1_128_SEC 0x7UL |
#define | RTC_SUNDAY 0x0UL |
#define | RTC_MONDAY 0x1UL |
#define | RTC_TUESDAY 0x2UL |
#define | RTC_WEDNESDAY 0x3UL |
#define | RTC_THURSDAY 0x4UL |
#define | RTC_FRIDAY 0x5UL |
#define | RTC_SATURDAY 0x6UL |
#define | RTC_SNOOPER_LOW_LEVEL 0x0UL |
#define | RTC_SNOOPER_HIGH_LEVEL 0x2UL |
#define | RTC_SNOOPER_FALLING_EDGE 0x8UL |
#define | RTC_SNOOPER_RISING_EDGE 0xAUL |
#define | RTC_SNOOPER_DETECT_Msk 0xAUL |
#define | RTC_WAIT_COUNT 0xFFFFFFFF |
#define | RTC_YEAR2000 2000 |
#define | RTC_FCR_REFERENCE 32761 |
#define | RTC_IS_LEAP_YEAR() (RTC->LEAPYEAR & RTC_LEAPYEAR_LEAPYEAR_Msk ? 1:0) |
Indicate is Leap Year or not. More... | |
#define | RTC_CLEAR_ALARM_INT_FLAG() (RTC->INTSTS = (RTC->INTSTS & ~(RTC_INTSTS_TICKIF_Msk | RTC_INTSTS_SNPDIF_Msk)) | RTC_INTSTS_ALMIF_Msk) |
Clear RTC Alarm Interrupt Flag. More... | |
#define | RTC_CLEAR_TICK_INT_FLAG() (RTC->INTSTS = (RTC->INTSTS & ~(RTC_INTSTS_ALMIF_Msk | RTC_INTSTS_SNPDIF_Msk)) | RTC_INTSTS_TICKIF_Msk) |
Clear RTC Tick Interrupt Flag. More... | |
#define | RTC_CLEAR_SNOOPER_INT_FLAG() (RTC->INTSTS = (RTC->INTSTS & ~(RTC_INTSTS_ALMIF_Msk | RTC_INTSTS_TICKIF_Msk)) | RTC_INTSTS_SNPDIF_Msk) |
Clear RTC Snooper Interrupt Flag. More... | |
#define | RTC_GET_ALARM_INT_FLAG() ((RTC->INTSTS & RTC_INTSTS_ALMIF_Msk)? 1:0) |
Get RTC Alarm Interrupt Flag. More... | |
#define | RTC_GET_TICK_INT_FLAG() ((RTC->INTSTS & RTC_INTSTS_TICKIF_Msk)? 1:0) |
Get RTC Time Tick Interrupt Flag. More... | |
#define | RTC_GET_SNPPOER_INT_FLAG() ((RTC->INTSTS & RTC_INTSTS_SNPDIF_Msk)? 1:0) |
Get RTC Snooper Interrupt Flag. More... | |
#define | RTC_READ_SPARE_REGISTER(u32RegNum) (RTC->SPR[(u32RegNum)]) |
Read Spare Register. More... | |
#define | RTC_WRITE_SPARE_REGISTER(u32RegNum, u32RegValue) (RTC->SPR[(u32RegNum)] = (u32RegValue)) |
Write Spare Register. More... | |
Functions | |
static __INLINE int32_t | RTC_WaitAccessEnable (void) |
Wait RTC Access Enable. More... | |
int32_t | RTC_Open (S_RTC_TIME_DATA_T *sPt) |
Initialize RTC module and start counting. More... | |
void | RTC_Close (void) |
Disable RTC Clock. More... | |
void | RTC_32KCalibration (int32_t i32FrequencyX100) |
Set 32k Frequency Compensation Data. More... | |
void | RTC_GetDateAndTime (S_RTC_TIME_DATA_T *sPt) |
Get Current RTC Date and Time. More... | |
void | RTC_GetAlarmDateAndTime (S_RTC_TIME_DATA_T *sPt) |
Get RTC Alarm Date and Time. More... | |
void | RTC_SetDateAndTime (S_RTC_TIME_DATA_T *sPt) |
Update Current RTC Date and Time. More... | |
void | RTC_SetAlarmDateAndTime (S_RTC_TIME_DATA_T *sPt) |
Update RTC Alarm Date and Time. More... | |
void | RTC_SetDate (uint32_t u32Year, uint32_t u32Month, uint32_t u32Day, uint32_t u32DayOfWeek) |
Update RTC Current Date. More... | |
void | RTC_SetTime (uint32_t u32Hour, uint32_t u32Minute, uint32_t u32Second, uint32_t u32TimeMode, uint32_t u32AmPm) |
Update RTC Current Time. More... | |
void | RTC_SetAlarmDate (uint32_t u32Year, uint32_t u32Month, uint32_t u32Day) |
Update RTC Alarm Date. More... | |
void | RTC_SetAlarmTime (uint32_t u32Hour, uint32_t u32Minute, uint32_t u32Second, uint32_t u32TimeMode, uint32_t u32AmPm) |
Update RTC Alarm Time. More... | |
uint32_t | RTC_GetDayOfWeek (void) |
Get Day of the Week. More... | |
void | RTC_SetTickPeriod (uint32_t u32TickSelection) |
Set RTC Tick Period Time. More... | |
void | RTC_EnableInt (uint32_t u32IntFlagMask) |
Enable RTC Interrupt. More... | |
void | RTC_DisableInt (uint32_t u32IntFlagMask) |
Disable RTC Interrupt. More... | |
void | RTC_EnableSpareAccess (void) |
Enable Spare Registers Access. More... | |
void | RTC_DisableSpareRegister (void) |
Disable Spare Register. More... | |
void | RTC_EnableSnooperDetection (uint32_t u32PinCondition) |
Enable Snooper Pin Detect. More... | |
void | RTC_DisableSnooperDetection (void) |
Disable Snooper Pin Detect. More... | |
M471M/R1/S RTC driver header file.
SPDX-License-Identifier: Apache-2.0
Definition in file rtc.h.