|
TM STM32Fxxx HAL Libraries
v1.0.0
Libraries for STM32Fxxx (F0, F4 and F7 series) devices based on HAL drivers from ST from Tilen Majerle
|
Library Functions. More...
Functions | |
| uint32_t | TM_RTC_Init (TM_RTC_ClockSource_t source) |
| Initializes RTC and starts counting. More... | |
| uint32_t | TM_RTC_GetUnixTimeStamp (TM_RTC_t *data) |
| Gets number of seconds from date and time since 01.01.1970 00:00:00. More... | |
| TM_RTC_Result_t | TM_RTC_GetDateTimeFromUnix (TM_RTC_t *data, uint32_t unix) |
| Gets formatted time from seconds till 01.01.1970 00:00:00 It fills struct with valid data. More... | |
| TM_RTC_Result_t | TM_RTC_Interrupts (TM_RTC_Int_t int_value) |
| Selects RTC wakeup interrupts interval. More... | |
| TM_RTC_Result_t | TM_RTC_SetDateTime (TM_RTC_t *data, TM_RTC_Format_t format) |
| Sets date and time to internal RTC registers. More... | |
| TM_RTC_Result_t | TM_RTC_SetDateTimeString (char *str) |
| Sets date and time using string formatted date time. More... | |
| TM_RTC_Result_t | TM_RTC_GetDateTime (TM_RTC_t *data, TM_RTC_Format_t format) |
| Gets date and time from internal RTC registers. More... | |
| uint8_t | TM_RTC_GetDaysInMonth (uint8_t month, uint8_t year) |
| Gets number of days in month. More... | |
| uint16_t | TM_RTC_GetDaysInYear (uint8_t year) |
| Gets number of days in specific year. More... | |
| void | TM_RTC_WriteBackupRegister (uint8_t location, uint32_t value) |
| Writes RTC backup register value. This method allows you to write 32bit value from backup register 0 - 18 for STM32F4xx and 0 - 30 for STM32F7xx. More... | |
| uint32_t | TM_RTC_ReadBackupRegister (uint8_t location) |
| Reads RTC backup register value. This method allows you to read 32bit value from backup register 0 - 18 for STM32F4xx and 0 - 30 for STM32F7xx. More... | |
| TM_RTC_Result_t | TM_RTC_EnableAlarm (TM_RTC_Alarm_t Alarm, TM_RTC_AlarmTime_t *AlarmTime, TM_RTC_Format_t format) |
| Enables alarm A or alarm B. More... | |
| TM_RTC_Result_t | TM_RTC_DisableAlarm (TM_RTC_Alarm_t Alarm) |
| Disables specific alarm. More... | |
| void | TM_RTC_WakeupHandler (void) |
| RTC Wakeup handler function. Called when wakeup interrupt is triggered. More... | |
| void | TM_RTC_AlarmAHandler (void) |
| RTC Alarm A handler function. Called when interrupt is triggered for alarm A. More... | |
| void | TM_RTC_AlarmBHandler (void) |
| RTC Alarm B handler function. Called when interrupt is triggered for alarm B. More... | |
Library Functions.
| void TM_RTC_AlarmAHandler | ( | void | ) |
RTC Alarm A handler function. Called when interrupt is triggered for alarm A.
| None |
| None |
| void TM_RTC_AlarmBHandler | ( | void | ) |
RTC Alarm B handler function. Called when interrupt is triggered for alarm B.
| None |
| None |
| TM_RTC_Result_t TM_RTC_DisableAlarm | ( | TM_RTC_Alarm_t | Alarm | ) |
Disables specific alarm.
| Alarm | Select which alarm you want to disable. This parameter can be a value of TM_RTC_Alarm_t enumeration |
| Member | of TM_RTC_Result_t enumeration |
| TM_RTC_Result_t TM_RTC_EnableAlarm | ( | TM_RTC_Alarm_t | Alarm, |
| TM_RTC_AlarmTime_t * | AlarmTime, | ||
| TM_RTC_Format_t | format | ||
| ) |
Enables alarm A or alarm B.
| Alarm | Specify which alarm to set. This parameter can be a value of TM_RTC_Alarm_t enumeration |
| *AlarmTime | Pointer to TM_RTC_AlarmTime_t structure to get data from. |
| format | RTC date and time format. This parameter can be a value of TM_RTC_Format_t enumeration. |
| Member | of TM_RTC_Result_t enumeration |
| TM_RTC_Result_t TM_RTC_GetDateTime | ( | TM_RTC_t * | data, |
| TM_RTC_Format_t | format | ||
| ) |
Gets date and time from internal RTC registers.
| *data | Pointer to TM_RTC_t structure to save data to |
| format | Format of your structure. This parameter can be a value of TM_RTC_Format_t enumeration |
| Member | of TM_RTC_Result_t enumeration |
| TM_RTC_Result_t TM_RTC_GetDateTimeFromUnix | ( | TM_RTC_t * | data, |
| uint32_t | unix | ||
| ) |
Gets formatted time from seconds till 01.01.1970 00:00:00 It fills struct with valid data.
| *data | Pointer to TM_RTC_Time_t struct to store formatted data in |
| unix | Seconds from 01.01.1970 00:00:00 to calculate user friendly time |
| Member | of TM_RTC_Result_t enumeration |
| uint8_t TM_RTC_GetDaysInMonth | ( | uint8_t | month, |
| uint8_t | year | ||
| ) |
Gets number of days in month.
| month | Month number in year, valid numbers are 1 - 12 |
| year | Year number where you want to get days in month, last 2 digits |
| Number | of days in specific month and year |
| uint16_t TM_RTC_GetDaysInYear | ( | uint8_t | year | ) |
Gets number of days in specific year.
| year | Year number where you want to get days in month, last 2 digits |
| Number | of days in year |
| uint32_t TM_RTC_GetUnixTimeStamp | ( | TM_RTC_t * | data | ) |
Gets number of seconds from date and time since 01.01.1970 00:00:00.
| *data | Pointer to TM_RTC_t data structure |
| Calculated | seconds from date and time since 01.01.1970 00:00:00 |
| uint32_t TM_RTC_Init | ( | TM_RTC_ClockSource_t | source | ) |
Initializes RTC and starts counting.
| source. | RTC Clock source TM_RTC_ClockSource_t to be used for RTC |
| Returns | RTC status.
|
| TM_RTC_Result_t TM_RTC_Interrupts | ( | TM_RTC_Int_t | int_value | ) |
Selects RTC wakeup interrupts interval.
| int_value | Look for TM_RTC_Int_t for valid inputs |
| Member | of TM_RTC_Result_t enumeration |
| uint32_t TM_RTC_ReadBackupRegister | ( | uint8_t | location | ) |
Reads RTC backup register value. This method allows you to read 32bit value from backup register 0 - 18 for STM32F4xx and 0 - 30 for STM32F7xx.
| location | RTC backup register location 0 - 18 for STM32F4xx and 0 - 30 for STM32F7xx are valid |
| Value | at specific RTC backup register location |
| TM_RTC_Result_t TM_RTC_SetDateTime | ( | TM_RTC_t * | data, |
| TM_RTC_Format_t | format | ||
| ) |
Sets date and time to internal RTC registers.
| *data | Pointer to filled TM_RTC_t structure with date and time |
| format | Format of your structure. This parameter can be a value of TM_RTC_Format_t enumeration |
| Member | of TM_RTC_Result_t enumeration
|
| TM_RTC_Result_t TM_RTC_SetDateTimeString | ( | char * | str | ) |
Sets date and time using string formatted date time.
| *str | Pointer to string with datetime format |
| RTC | datetime status TM_RTC_Result_t:
|
| void TM_RTC_WakeupHandler | ( | void | ) |
RTC Wakeup handler function. Called when wakeup interrupt is triggered.
| None |
| None |
| void TM_RTC_WriteBackupRegister | ( | uint8_t | location, |
| uint32_t | value | ||
| ) |
Writes RTC backup register value. This method allows you to write 32bit value from backup register 0 - 18 for STM32F4xx and 0 - 30 for STM32F7xx.
| location | RTC backup register location 0 - 18 for STM32F4xx and 0 - 30 for STM32F7xx are valid |
| value | 32-bit long value to be stored in RTC backup register |
| Value | at specific RTC backup register location |