![]() |
NUC472_NUC442_BSP V3.03.005
The Board Support Package for NUC472/NUC442
|
Macros | |
#define | RTC_READ_SPARE_REGISTER(u32RegNum) |
Read spare register. More... | |
#define | RTC_WRITE_SPARE_REGISTER(u32RegNum, u32RegValue) |
Write spare register. More... | |
#define | RTC_IS_LEAP_YEAR |
According to current time, return this year is leap year or not. More... | |
#define | RTC_CLEAR_ALARM_INT_FLAG |
Clear alarm interrupt status. More... | |
#define | RTC_CLEAR_TICK_INT_FLAG |
Clear tick interrupt status. More... | |
#define | RTC_CLEAR_TAMPER_FLAG(u32PinNum) |
Clear tamper detect pin status. More... | |
#define | RTC_GET_ALARM_INT_FLAG |
Get alarm interrupt status. More... | |
#define | RTC_GET_TICK_INT_FLAG |
Get alarm interrupt status. More... | |
#define | RTC_GET_TAMPER_FLAG(u32PinNum) |
Get tamper detect pin status. More... | |
Functions | |
void | RTC_Open (S_RTC_TIME_DATA_T *sPt) |
This function is used to: More... | |
void | RTC_Close (void) |
Disable RTC clock. More... | |
void | RTC_32KCalibration (int32_t i32FrequencyX100) |
Set Frequency Compensation Data. More... | |
void | RTC_SetTickPeriod (uint32_t u32TickSelection) |
The function is used to set time tick period for periodic time tick Interrupt. More... | |
void | RTC_EnableInt (uint32_t u32IntFlagMask) |
The function is used to enable specified interrupt. More... | |
void | RTC_DisableInt (uint32_t u32IntFlagMask) |
The function is used to disable specified interrupt. More... | |
uint32_t | RTC_GetDayOfWeek (void) |
This function is used to get day of week. More... | |
void | RTC_DisableTamperDetection (uint32_t u32PinNumber) |
This function is used to disable tamper detection function. More... | |
void | RTC_EnableTamperDetection (uint32_t u32PinNumber, uint32_t u32PinCondition, uint32_t u32IntFlag, uint32_t u32ClearFlag, uint32_t u32DestroyEn) |
This function is used to: More... | |
int32_t | RTC_EnableSpareAccess (void) |
The spare registers access enable. More... | |
void | RTC_SetAlarmTime (uint32_t u32Hour, uint32_t u32Minute, uint32_t u32Second, uint32_t u32TimeMode, uint32_t u32AmPm) |
This function is used to set alarm date to RTC. More... | |
void | RTC_SetAlarmDate (uint32_t u32Year, uint32_t u32Month, uint32_t u32Day) |
This function is used to set alarm date to RTC. More... | |
void | RTC_SetTime (uint32_t u32Hour, uint32_t u32Minute, uint32_t u32Second, uint32_t u32TimeMode, uint32_t u32AmPm) |
This function is used to update time to RTC. More... | |
void | RTC_SetDate (uint32_t u32Year, uint32_t u32Month, uint32_t u32Day, uint32_t u32DayOfWeek) |
This function is used to update date to RTC. More... | |
void | RTC_SetAlarmDateAndTime (S_RTC_TIME_DATA_T *sPt) |
This function is used to set alarm date/time to RTC. More... | |
void | RTC_SetDateAndTime (S_RTC_TIME_DATA_T *sPt) |
This function is used to update date/time to RTC. More... | |
void | RTC_GetAlarmDateAndTime (S_RTC_TIME_DATA_T *sPt) |
Read alarm date/time from RTC setting. More... | |
void | RTC_GetDateAndTime (S_RTC_TIME_DATA_T *sPt) |
Read current date/time from RTC setting. More... | |
Variables | |
uint32_t | S_RTC_TIME_DATA_T::u32Year |
uint32_t | S_RTC_TIME_DATA_T::u32Month |
uint32_t | S_RTC_TIME_DATA_T::u32Day |
uint32_t | S_RTC_TIME_DATA_T::u32DayOfWeek |
uint32_t | S_RTC_TIME_DATA_T::u32Hour |
uint32_t | S_RTC_TIME_DATA_T::u32Minute |
uint32_t | S_RTC_TIME_DATA_T::u32Second |
uint32_t | S_RTC_TIME_DATA_T::u32TimeScale |
uint32_t | S_RTC_TIME_DATA_T::u32AmPm |
#define RTC_CLEAR_ALARM_INT_FLAG |
#define RTC_CLEAR_TAMPER_FLAG | ( | u32PinNum | ) |
Clear tamper detect pin status.
[in] | u32PinNum | tamper detect pin number. [ RTC_TAMPER_0 / RTC_TAMPER_1] |
#define RTC_CLEAR_TICK_INT_FLAG |
#define RTC_GET_ALARM_INT_FLAG |
#define RTC_GET_TAMPER_FLAG | ( | u32PinNum | ) |
Get tamper detect pin status.
[in] | u32PinNum | tamper detect pin number. [ RTC_TAMPER_0 / RTC_TAMPER_1] |
#define RTC_GET_TICK_INT_FLAG |
#define RTC_IS_LEAP_YEAR |
#define RTC_READ_SPARE_REGISTER | ( | u32RegNum | ) |
#define RTC_WRITE_SPARE_REGISTER | ( | u32RegNum, | |
u32RegValue | |||
) |
void RTC_32KCalibration | ( | int32_t | i32FrequencyX100 | ) |
void RTC_DisableInt | ( | uint32_t | u32IntFlagMask | ) |
The function is used to disable specified interrupt.
[in] | u32IntFlagMask | The structure of interrupt source. It consists of: RTC_INTEN_ALMIEN_Msk : Alarm interrupt RTC_INTEN_TICKIEN_Msk : Tick interrupt |
void RTC_DisableTamperDetection | ( | uint32_t | u32PinNumber | ) |
This function is used to disable tamper detection function.
[in] | u32PinNumber | tamper detect pin number: RTC_TAMPER_0, RTC_TAMPER_1 |
void RTC_EnableInt | ( | uint32_t | u32IntFlagMask | ) |
The function is used to enable specified interrupt.
[in] | u32IntFlagMask | The structure of interrupt source. It consists of: RTC_INTEN_ALMIEN_Msk : Alarm interrupt RTC_INTEN_TICKIEN_Msk : Tick interrupt |
int32_t RTC_EnableSpareAccess | ( | void | ) |
void RTC_EnableTamperDetection | ( | uint32_t | u32PinNumber, |
uint32_t | u32PinCondition, | ||
uint32_t | u32IntFlag, | ||
uint32_t | u32ClearFlag, | ||
uint32_t | u32DestroyEn | ||
) |
This function is used to:
[in] | u32PinNumber | tamper detect pin number. [ RTC_TAMPER_0 / RTC_TAMPER_1] |
[in] | u32PinCondition | set tamper detection condition: 1=High level detect, 0=Low level detect |
[in] | u32IntFlag | Enable/Disable tamper interrupt: 1=Enable, 0=Disable |
[in] | u32ClearFlag | Clear tamper status |
[in] | u32DestroyEn | Enable/Disable Destroy Spare Register when tamper detected: 1=Enable, 0=Disable |
void RTC_GetAlarmDateAndTime | ( | S_RTC_TIME_DATA_T * | sPt | ) |
Read alarm date/time from RTC setting.
[out] | sPt | Specify the time property and current time. It includes: u32Year: Year value u32Month: Month value u32Day: Day value u32DayOfWeek: Day of week u32Hour: Hour value u32Minute: Minute value u32Second: Second value u32TimeScale: RTC_CLOCK_12 / RTC_CLOCK_24 u8AmPm: RTC_AM / RTC_PM |
void RTC_GetDateAndTime | ( | S_RTC_TIME_DATA_T * | sPt | ) |
Read current date/time from RTC setting.
[out] | sPt | Specify the time property and current time. It includes: u32Year: Year value u32Month: Month value u32Day: Day value u32DayOfWeek: Day of week u32Hour: Hour value u32Minute: Minute value u32Second: Second value u32TimeScale: RTC_CLOCK_12 / RTC_CLOCK_24 u8AmPm: RTC_AM / RTC_PM |
uint32_t RTC_GetDayOfWeek | ( | void | ) |
void RTC_Open | ( | S_RTC_TIME_DATA_T * | sPt | ) |
This function is used to:
[in] | sPt | Specify the time property and current time. It includes: u32Year: Year value. u32Month: Month value. u32Day: Day value. u32DayOfWeek: Day of week. [ RTC_SUNDAY / RTC_MONDAY / RTC_TUESDAY / RTC_WEDNESDAY / RTC_THURSDAY / RTC_FRIDAY / RTC_SATURDAY] u32Hour: Hour value. u32Minute: Minute value. u32Second: Second value. u32TimeScale: [ RTC_CLOCK_12 / RTC_CLOCK_24] u8AmPm: [ RTC_AM / RTC_PM] |
void RTC_SetAlarmDate | ( | uint32_t | u32Year, |
uint32_t | u32Month, | ||
uint32_t | u32Day | ||
) |
void RTC_SetAlarmDateAndTime | ( | S_RTC_TIME_DATA_T * | sPt | ) |
This function is used to set alarm date/time to RTC.
[in] | sPt | Specify the time property and current time. It includes: u32Year: Year value. u32Month: Month value. u32Day: Day value. u32DayOfWeek: Day of week. [ RTC_SUNDAY / RTC_MONDAY / RTC_TUESDAY / RTC_WEDNESDAY / RTC_THURSDAY / RTC_FRIDAY / RTC_SATURDAY] u32Hour: Hour value. u32Minute: Minute value. u32Second: Second value. u32TimeScale: [ RTC_CLOCK_12 / RTC_CLOCK_24] u8AmPm: [ RTC_AM / RTC_PM] |
void RTC_SetAlarmTime | ( | uint32_t | u32Hour, |
uint32_t | u32Minute, | ||
uint32_t | u32Second, | ||
uint32_t | u32TimeMode, | ||
uint32_t | u32AmPm | ||
) |
This function is used to set alarm date to RTC.
[in] | u32Hour | The Hour Time Digit of Alarm Setting. |
[in] | u32Minute | The Minute Time Digit of Alarm Setting |
[in] | u32Second | The Second Time Digit of Alarm Setting |
[in] | u32TimeMode | The 24-Hour / 12-Hour Time Scale Selection. [ RTC_CLOCK_12 / RTC_CLOCK_24] |
[in] | u32AmPm | 12-hour time scale with AM and PM indication. Only Time Scale select 12-hour used. [ RTC_AM / RTC_PM] |
void RTC_SetDate | ( | uint32_t | u32Year, |
uint32_t | u32Month, | ||
uint32_t | u32Day, | ||
uint32_t | u32DayOfWeek | ||
) |
This function is used to update date to RTC.
[in] | u32Year | The Year Calendar Digit of Alarm Setting |
[in] | u32Month | The Month Calendar Digit of Alarm Setting |
[in] | u32Day | The Day Calendar Digit of Alarm Setting |
[in] | u32DayOfWeek | The Day of Week. [ RTC_SUNDAY / RTC_MONDAY / RTC_TUESDAY / RTC_WEDNESDAY / RTC_THURSDAY / RTC_FRIDAY / RTC_SATURDAY] |
void RTC_SetDateAndTime | ( | S_RTC_TIME_DATA_T * | sPt | ) |
This function is used to update date/time to RTC.
[in] | sPt | Specify the time property and current time. It includes: u32Year: Year value. u32Month: Month value. u32Day: Day value. u32DayOfWeek: Day of week. [ RTC_SUNDAY / RTC_MONDAY / RTC_TUESDAY / RTC_WEDNESDAY / RTC_THURSDAY / RTC_FRIDAY / RTC_SATURDAY] u32Hour: Hour value. u32Minute: Minute value. u32Second: Second value. u32TimeScale: [ RTC_CLOCK_12 / RTC_CLOCK_24] u8AmPm: [ RTC_AM / RTC_PM] |
void RTC_SetTickPeriod | ( | uint32_t | u32TickSelection | ) |
The function is used to set time tick period for periodic time tick Interrupt.
[in] | u32TickSelection | It is used to set the RTC time tick period for Periodic Time Tick Interrupt request. It consists of:
|
void RTC_SetTime | ( | uint32_t | u32Hour, |
uint32_t | u32Minute, | ||
uint32_t | u32Second, | ||
uint32_t | u32TimeMode, | ||
uint32_t | u32AmPm | ||
) |
This function is used to update time to RTC.
[in] | u32Hour | The Hour Time Digit of Alarm Setting. |
[in] | u32Minute | The Month Calendar Digit of Alarm Setting |
[in] | u32Second | The Day Calendar Digit of Alarm Setting |
[in] | u32TimeMode | The 24-Hour / 12-Hour Time Scale Selection. [ RTC_CLOCK_12 / RTC_CLOCK_24] |
[in] | u32AmPm | 12-hour time scale with AM and PM indication. Only Time Scale select 12-hour used. [ RTC_AM / RTC_PM] |
uint32_t S_RTC_TIME_DATA_T::u32AmPm |