Furi_hal_rtc: new function (#3294)

* furi_hal_rtc_timestamp_to_datetime added
* hw targets api version sync
* hw targets api version sync, bump
* FuriHal: update rtc docs
* unit tests added

Co-authored-by: hedger <hedger@users.noreply.github.com>
Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Leptopt1los
2024-01-14 17:07:42 +09:00
committed by GitHub
co-authored by hedger Aleksandr Kutuzov
parent 1f9fd4c42a
commit 3fd5f15e7f
5 changed files with 81 additions and 1 deletions
+12 -1
View File
@@ -252,13 +252,24 @@ uint32_t furi_hal_rtc_get_pin_fails();
uint32_t furi_hal_rtc_get_timestamp();
/** Convert DateTime to UNIX timestamp
*
* @warning Mind timezone when perform conversion
*
* @param datetime The datetime
* @param datetime The datetime (UTC)
*
* @return UNIX Timestamp in seconds from UNIX epoch start
*/
uint32_t furi_hal_rtc_datetime_to_timestamp(FuriHalRtcDateTime* datetime);
/** Convert UNIX timestamp to DateTime
*
* @warning Mind timezone when perform conversion
*
* @param[in] timestamp UNIX Timestamp in seconds from UNIX epoch start
* @param[out] datetime The datetime (UTC)
*/
void furi_hal_rtc_timestamp_to_datetime(uint32_t timestamp, FuriHalRtcDateTime* datetime);
/** Gets the number of days in the year according to the Gregorian calendar.
*
* @param year Input year.