-
Notifications
You must be signed in to change notification settings - Fork 1.1k
AliOS Things API HAL SOC RTC Guide
void hal_rtc_init(rtc_dev_t *rtc)
-
Description
This function will initialize the on board CPU real time clock
-
Parameters
IN/OUT NAME DESC [in] rtc rtc device -
Returns
0 : on success, EIO : if an error occurred with any step
int32_t hal_rtc_get_time(rtc_dev_t *rtc, rtc_time_t *time)
-
Description
This function will return the value of time read from the on board CPU real time clock.
-
Parameters
IN/OUT NAME DESC [in] rtc rtc device [out] time pointer to a time structure -
Returns
0 : on success, EIO : if an error occurred with any step
int32_t hal_rtc_set_time(rtc_dev_t *rtc, const rtc_time_t *time)
-
Description
This function will set MCU RTC time to a new value.
-
Parameters
IN/OUT NAME DESC [in] rtc rtc device [out] time pointer to a time structure -
Returns
0 : on success, EIO : if an error occurred with any step
void hal_rtc_finalize(rtc_dev_t *rtc)
-
Description
This function will finalize the on board CPU real time clock
-
Parameters
IN/OUT NAME DESC [in] rtc rtc device -
Returns
0 : on success, EIO : if an error occurred with any step
| Home | Tutorial | Hardware | Porting Guide | Utilities | API Reference | Technical Docs | Certification |
Crafted with ❤️ by AliOS Things Team.