![]() |
Imt.Base C++ API V4.1.1.0
|
Go to the source code of this file.
Classes | |
struct | RTC_ModuleRegisters |
Init and configure RTC. More... | |
struct | BKP_ModuleRegisters |
Backup Registers. More... | |
struct | RTC_Time |
RTC Time structure definition. More... | |
struct | RTC_Config |
RTC Configuration Structure definition. More... | |
struct | RTC_Date |
RTC Date structure definition. More... | |
struct | RTC_Handle |
RTC Time Handle Structure definition. More... | |
Macros | |
#define | RTC ((RTC_ModuleRegisters*)RTC_BASE) |
#define | BKP ((BKP_ModuleRegisters*)BKP_BASE) |
#define | BKP_RTCCR_CCO ((uint32_t)0x00000080) |
#define | BKP_RTCCR_ASOE ((uint32_t)0x00000100) |
#define | BKP_RTCCR_ASOS ((uint32_t)0x00000200) |
#define | RTC_AUTO_1_SECOND 0xFFFFFFFFU |
Enumerations | |
enum | RTC_RTCState { RTC_STATE_RESET = 0x00U , RTC_STATE_READY = 0x01U , RTC_STATE_BUSY = 0x02U , RTC_STATE_TIMEOUT = 0x03U , RTC_STATE_ERROR = 0x04U } |
RTC State structures definition. More... | |
enum | RTC_OutputSource { RTC_OUTPUTSOURCE_NONE = 0x00000000U , RTC_OUTPUTSOURCE_CALIBCLOCK = BKP_RTCCR_CCO , RTC_OUTPUTSOURCE_ALARM = BKP_RTCCR_ASOE , RTC_OUTPUTSOURCE_SECOND = (BKP_RTCCR_ASOS | BKP_RTCCR_ASOE) } |
Enumeration of RTC output source structures definition. More... | |
enum | RTC_Month { RTC_MONTH_JANUARY = ((uint8_t)0x01) , RTC_MONTH_FEBRUARY = ((uint8_t)0x02) , RTC_MONTH_MARCH = ((uint8_t)0x03) , RTC_MONTH_APRIL = ((uint8_t)0x04) , RTC_MONTH_MAY = ((uint8_t)0x05) , RTC_MONTH_JUNE = ((uint8_t)0x06) , RTC_MONTH_JULY = ((uint8_t)0x07) , RTC_MONTH_AUGUST = ((uint8_t)0x08) , RTC_MONTH_SEPTEMBER = ((uint8_t)0x09) , RTC_MONTH_OCTOBER = ((uint8_t)0x10) , RTC_MONTH_NOVEMBER = ((uint8_t)0x11) , RTC_MONTH_DECEMBER = ((uint8_t)0x12) } |
Enumeration of RTC Month structures definition, coded in BCD format. More... | |
enum | RTC_Weekday { RTC_WEEKDAY_MONDAY = ((uint8_t)0x01) , RTC_WEEKDAY_TUESDAY = ((uint8_t)0x02) , RTC_WEEKDAY_WEDNESDAY = ((uint8_t)0x03) , RTC_WEEKDAY_THURSDAY = ((uint8_t)0x04) , RTC_WEEKDAY_FRIDAY = ((uint8_t)0x05) , RTC_WEEKDAY_SATURDAY = ((uint8_t)0x06) , RTC_WEEKDAY_SUNDAY = ((uint8_t)0x07) } |
Enumeration of RTC Month structures definition. More... | |
enum | RTC_Lock { RTC_UNLOCKED = 0x00U , RTC_LOCKED = 0x01U } |
RTC Lock structures definition. More... | |
enum | RTC_Status { RTC_OK = 0 , RTC_ERROR , RTC_BUSY , RTC_TIMEOUT } |
Enumeration of RTC Status structures definition. More... | |
enum | RTC_Format { RTC_FORMAT_BIN = 0x000000000U , RTC_FORMAT_BCD = 0x000000001U } |
Enumeration of RTC format structures definition. More... | |
Functions | |
RTC_Status | RTC_Init (RTC_Handle *hrtc) |
Initializes the RTC peripheral. | |
RTC_Status | RTC_DeInit (RTC_Handle *hrtc) |
De-Initializes the RTC peripheral. | |
RTC_Status | RTC_SetTime (RTC_Handle *hrtc, RTC_Time *sTime, RTC_Format Format) |
Sets RTC current time. | |
RTC_Status | RTC_GetTime (RTC_Handle *hrtc, RTC_Time *sTime, RTC_Format Format) |
Gets RTC current time. | |
RTC_Status | RTC_SetDate (RTC_Handle *hrtc, RTC_Date *sDate, RTC_Format Format) |
Sets RTC current date. | |
RTC_Status | RTC_GetDate (RTC_Handle *hrtc, RTC_Date *sDate, RTC_Format Format) |
Gets RTC current date. | |
void | RTC_StoreDateIntoBkpReg (RTC_Date const *dateRtc) |
Store date information into backup register. | |
void | RTC_LoadDateFromBkpReg (RTC_Date *dateRtc) |
Load date information from backup register. | |
#define BKP ((BKP_ModuleRegisters*)BKP_BASE) |
Definition at line 91 of file SystemPeripherals_RTC.h.
#define BKP_RTCCR_ASOE ((uint32_t)0x00000100) |
Definition at line 95 of file SystemPeripherals_RTC.h.
#define BKP_RTCCR_ASOS ((uint32_t)0x00000200) |
Definition at line 96 of file SystemPeripherals_RTC.h.
#define BKP_RTCCR_CCO ((uint32_t)0x00000080) |
Definition at line 94 of file SystemPeripherals_RTC.h.
#define RTC ((RTC_ModuleRegisters*)RTC_BASE) |
Definition at line 36 of file SystemPeripherals_RTC.h.
#define RTC_AUTO_1_SECOND 0xFFFFFFFFU |
Definition at line 98 of file SystemPeripherals_RTC.h.
enum RTC_Format |
Enumeration of RTC format structures definition.
Enumerator | |
---|---|
RTC_FORMAT_BIN | |
RTC_FORMAT_BCD |
Definition at line 214 of file SystemPeripherals_RTC.h.
enum RTC_Lock |
RTC Lock structures definition.
Enumerator | |
---|---|
RTC_UNLOCKED | |
RTC_LOCKED |
Definition at line 185 of file SystemPeripherals_RTC.h.
enum RTC_Month |
Enumeration of RTC Month structures definition, coded in BCD format.
Definition at line 144 of file SystemPeripherals_RTC.h.
enum RTC_OutputSource |
Enumeration of RTC output source structures definition.
Enumerator | |
---|---|
RTC_OUTPUTSOURCE_NONE | |
RTC_OUTPUTSOURCE_CALIBCLOCK | |
RTC_OUTPUTSOURCE_ALARM | |
RTC_OUTPUTSOURCE_SECOND |
Definition at line 123 of file SystemPeripherals_RTC.h.
enum RTC_RTCState |
RTC State structures definition.
Enumerator | |
---|---|
RTC_STATE_RESET | |
RTC_STATE_READY | |
RTC_STATE_BUSY | |
RTC_STATE_TIMEOUT | |
RTC_STATE_ERROR |
Definition at line 112 of file SystemPeripherals_RTC.h.
enum RTC_Status |
Enumeration of RTC Status structures definition.
Enumerator | |
---|---|
RTC_OK | |
RTC_ERROR | |
RTC_BUSY | |
RTC_TIMEOUT |
Definition at line 204 of file SystemPeripherals_RTC.h.
enum RTC_Weekday |
Enumeration of RTC Month structures definition.
Enumerator | |
---|---|
RTC_WEEKDAY_MONDAY | |
RTC_WEEKDAY_TUESDAY | |
RTC_WEEKDAY_WEDNESDAY | |
RTC_WEEKDAY_THURSDAY | |
RTC_WEEKDAY_FRIDAY | |
RTC_WEEKDAY_SATURDAY | |
RTC_WEEKDAY_SUNDAY |
Definition at line 162 of file SystemPeripherals_RTC.h.
RTC_Status RTC_DeInit | ( | RTC_Handle * | hrtc | ) |
De-Initializes the RTC peripheral.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
RTC_Status RTC_GetDate | ( | RTC_Handle * | hrtc, |
RTC_Date * | sDate, | ||
RTC_Format | Format | ||
) |
Gets RTC current date.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sDate | Pointer to Date structure |
Format | Specifies the format of the entered parameters. This parameter can be one of the following values: |
RTC_Status RTC_GetTime | ( | RTC_Handle * | hrtc, |
RTC_Time * | sTime, | ||
RTC_Format | Format | ||
) |
Gets RTC current time.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sTime | Pointer to Time structure |
Format | Specifies the format of the entered parameters. |
RTC_Status RTC_Init | ( | RTC_Handle * | hrtc | ) |
Initializes the RTC peripheral.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
void RTC_LoadDateFromBkpReg | ( | RTC_Date * | dateRtc | ) |
Load date information from backup register.
dateRtc | pointer to a RTC_Date structure that contains the date information |
RTC_Status RTC_SetDate | ( | RTC_Handle * | hrtc, |
RTC_Date * | sDate, | ||
RTC_Format | Format | ||
) |
Sets RTC current date.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sDate | Pointer to date structure |
Format | specifies the format of the entered parameters. |
RTC_Status RTC_SetTime | ( | RTC_Handle * | hrtc, |
RTC_Time * | sTime, | ||
RTC_Format | Format | ||
) |
Sets RTC current time.
hrtc | pointer to a RTC_HandleTypeDef structure that contains the configuration information for RTC. |
sTime | Pointer to Time structure |
Format | Specifies the format of the entered parameters. |