![]() |
PDL for FM4
Version1.2
Peripheral Driverl Library for FM4
|

Go to the source code of this file.
Data Structures | |
| struct | stc_rtc_interrupts |
| Interrupt configuration structure. More... | |
| struct | stc_rtc_alarm_enable |
| Alarm Register En- and Disable. More... | |
| struct | stc_rtc_time |
| Real Time Clock Date and Time structure. More... | |
| struct | stc_rtc_alarm |
| Real Time Clock Alarm structure. More... | |
| struct | stc_rtc_config |
| Real Time Clock configuration. More... | |
| struct | stc_rtc_timer_config |
| Real Time Clock Timer configuration. More... | |
| struct | stc_rtc_intern_data |
| Datatype for holding internal data needed for RTC. More... | |
Macros | |
| #define | RTC0 (*((volatile stc_rtcn_t *)FM4_RTC_BASE)) |
| Rtccallback function prototypes. More... | |
| #define | RTC_INTERRUPT_ENABLE_MASK (0xFFu) |
| Number of Irq bit fields, see stc_rtc_interrupts_t. More... | |
| #define | RTC_POLLING_TIMEOUT (100000u) |
| Timeout for WTCR2.CREAD bit polling. More... | |
| #define | RTC_BUSY_POLLING_TIMEOUT (200000u) |
| Timeout for BUSY bit polling. More... | |
| #define | RTC_TRANS_POLLING_TIMEOUT (500000u) |
| Timeout for TRANS bit polling. More... | |
| #define | Rtc_Year(a) ((a) - 2000) |
| Year calculation macro for adjusting RTC year format. More... | |
| #define | RTC_WTCR11_MIEN_FLAG_POSITION (0x01u) |
| Year calculation macro for adjusting RTC year format. More... | |
| #define | RTC_WTCR11_HEN_FLAG_POSITION (0x02u) |
| #define | RTC_WTCR11_DEN_FLAG_POSITION (0x04u) |
| #define | RTC_WTCR11_MOEN_FLAG_POSITION (0x08u) |
| #define | RTC_WTCR11_YEN_FLAG_POSITION (0x10u) |
| #define | RTC_WTCR11_ALL_FLAG_POSITION (0x1Fu) |
| #define | RTC_WTCR12_INTSSI_FLAG_POSITION (0x01u) |
| Bit Positions of Interrupt Flasgs in WTCR12. More... | |
| #define | RTC_WTCR12_INTSI_FLAG_POSITION (0x02u) |
| #define | RTC_WTCR12_INTMI_FLAG_POSITION (0x04u) |
| #define | RTC_WTCR12_INTHI_FLAG_POSITION (0x08u) |
| #define | RTC_WTCR12_INTTMI_FLAG_POSITION (0x10u) |
| #define | RTC_WTCR12_INTALI_FLAG_POSITION (0x20u) |
| #define | RTC_WTCR12_INTERI_FLAG_POSITION (0x40u) |
| #define | RTC_WTCR12_INTCRI_FLAG_POSITION (0x80u) |
| #define | RTC_MAX_FREQ_CORR_VALUE (0x3FFu) |
| Maxmimum Frequency Correction Value. More... | |
| #define | RTC_MAX_FREQ_CORR_CYCLE_SET_VALUE (0x3Fu) |
| Maxmimum Frequency Correction Cycle Setting Value. More... | |
| #define | RTC_MAX_TIMER_SET_VALUE (0x2A2FFu) |
| Maxmimum Timer Setting Value. More... | |
| #define | RTC_BKUP_REG_BASE (FM4_PERIPH_BASE + 0x3B200UL) /* Backup registers */ |
| Backup register area. More... | |
Typedefs | |
| typedef FM4_RTC_TypeDef | stc_rtcn_t |
| typedef void(* | func_ptr_rtc_arglist_t )(uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t) |
| typedef enum en_rtc_month | en_rtc_month_t |
| Month name definitions (not used in driver - to be used by user applciation) More... | |
| typedef enum en_rtc_day_of_week | en_rtc_day_of_week_t |
| Day of week name definitions (not used in driver - to be used by user applciation) More... | |
| typedef enum en_rtc_timer_status | en_rtc_timer_status_t |
| Rtc Timer Status. More... | |
| typedef enum en_rtc_trans_status | en_rtc_trans_status_t |
| RTC Transmission Status. More... | |
| typedef enum en_rtc_divider_ratio | en_rtc_divider_ratio_t |
| Rtc Divider Ratio Setting. More... | |
| typedef enum en_rtc_co_div | en_rtc_co_div_t |
| Rtc CO Division. More... | |
| typedef enum en_rtc_bkup_reg_size | en_rtc_bkup_reg_size_t |
| Backup register access size. More... | |
| typedef enum en_rtc_bkup_reg_area | en_rtc_bkup_reg_area_t |
| Backup register area. More... | |
| typedef struct stc_rtc_interrupts | stc_rtc_interrupts_t |
| Interrupt configuration structure. More... | |
| typedef struct stc_rtc_alarm_enable | stc_rtc_alarm_enable_t |
| Alarm Register En- and Disable. More... | |
| typedef struct stc_rtc_time | stc_rtc_time_t |
| Real Time Clock Date and Time structure. More... | |
| typedef struct stc_rtc_alarm | stc_rtc_alarm_t |
| Real Time Clock Alarm structure. More... | |
| typedef struct stc_rtc_config | stc_rtc_config_t |
| Real Time Clock configuration. More... | |
| typedef struct stc_rtc_timer_config | stc_rtc_timer_config_t |
| Real Time Clock Timer configuration. More... | |
| typedef struct stc_rtc_intern_data | stc_rtc_intern_data_t |
| Datatype for holding internal data needed for RTC. More... | |
Functions | |
| void | RtcIrqHandler (void) |
| RTC interrupt service routine. More... | |
| en_result_t | Rtc_Init (stc_rtc_config_t *pstcConfig, stc_rtc_time_t *pstcTime, stc_rtc_alarm_t *pstcAlarm, boolean_t bTouchNvic, boolean_t bResetNoReInit) |
| Initialize RTC. More... | |
| boolean_t | Rtc_GetRunStatus (void) |
| Initialize RTC. More... | |
| en_result_t | Rtc_SetDateTime (stc_rtc_time_t *pstcRtcTime) |
| Check and Set RTC Date and RTC Time. More... | |
| en_result_t | Rtc_SetAlarmDateTime (stc_rtc_alarm_t *pstcRtcAlarm) |
| Check and Set Alarm Date and Alarm Time. More... | |
| en_result_t | Rtc_EnableDisableInterrupts (stc_rtc_config_t *pstcConfig) |
| Enable and/or Disable RTC (and Timer) Interrupts. More... | |
| en_result_t | Rtc_EnableDisableAlarmRegisters (stc_rtc_alarm_enable_t *pstcRtcAlarmEn) |
| Enable and/or Disable RTC Alarm Register. More... | |
| en_result_t | Rtc_ReadDateTimePolling (stc_rtc_time_t *pstcRtcTime) |
| Read recent Time of RTC in polling mode. More... | |
| en_result_t | Rtc_RequestDateTime (void) |
| Request for Read recent Time of RTC. More... | |
| en_result_t | Rtc_TimerSet (stc_rtc_timer_config_t *pstcConfig) |
| Set Timer Status of RTC. More... | |
| en_result_t | Rtc_TimerStart (void) |
| Start Timer Status of RTC. More... | |
| en_result_t | Rtc_TimerStop (void) |
| Stops Timer Status of RTC. More... | |
| en_rtc_timer_status_t | Rtc_TimerStatusRead (void) |
| Read Timer Status of RTC. More... | |
| en_rtc_trans_status_t | Rtc_TransStatusRead (void) |
| Read Transmission Status of RTC. More... | |
| en_result_t | Rtc_DeInit (void) |
| De-Initialize RTC. More... | |
| time_t | Rtc_GetRawTime (stc_rtc_time_t *pstcRtcTime) |
| Get raw time. More... | |
| en_result_t | Rtc_SetDayOfWeek (stc_rtc_time_t *pstcRtcTime) |
| Set Day of the Week. More... | |
| en_result_t | Rtc_SetTime (stc_rtc_time_t *pstcRtcTime, time_t tRawTime) |
| Sets the RTC time structure from raw time. More... | |
| en_result_t | Rtc_WriteBkupReg8 (uint8_t u8Data, uint8_t u8Area) |
| Write the data to Backup Register (byte access) More... | |
| en_result_t | Rtc_WriteBkupReg16 (uint16_t u16Data, uint8_t u8Area) |
| Write the data to Backup Register (half word access) More... | |
| en_result_t | Rtc_WriteBkupReg32 (uint32_t u32Data, uint8_t u8Area) |
| Write the data to Backup Register (word access) More... | |
| uint8_t | Rtc_ReadBkupReg8 (uint8_t u8Area) |
| Read the data from Backup Register (byte access) More... | |
| uint16_t | Rtc_ReadBkupReg16 (uint8_t u8Area) |
| Read the data from Backup Register (half word access) More... | |
| uint32_t | Rtc_ReadBkupReg32 (uint8_t u8Area) |
| Read the data from Backup Register (word access) More... | |
Headerfile for RTC functions
History:
Definition in file rtc.h.