AIROC™ BTSDK v4.8 - Documentation | ||||
Data Structures | |
struct | wiced_rtc_time_t |
Defines a driver to facilitate interfacing with the RTC. More... | |
union | wiced_real_time_clock_t |
Real time clock read from hardware (48 bits) More... | |
Functions | |
void | wiced_rtc_init (void) |
Function wiced_rtc_init. More... | |
void | wiced_rtc_get_raw_clock (wiced_real_time_clock_t *rtcClock) |
Function wiced_rtc_get_raw_clock. More... | |
void | wiced_rtc_get_time (wiced_rtc_time_t *timebuf) |
Function wiced_rtc_get_time. More... | |
void | wiced_rtc_set_reference_time (wiced_rtc_time_t *ref_time) |
Function wiced_rtc_set_reference_time. More... | |
wiced_bool_t | wiced_set_rtc_time (wiced_rtc_time_t *newTime) |
Function wiced_set_rtc_time. More... | |
wiced_bool_t | wiced_rtc_ctime (wiced_rtc_time_t *timer, char *outbuf) |
Function wiced_rtc_ctime. More... | |
void | wiced_seconds_to_rtc_time (uint32_t second, wiced_rtc_time_t *rtctime) |
Function wiced_seconds_to_rtc_time. More... | |
void | wiced_rtc_time_to_seconds (wiced_rtc_time_t *rtctime, uint32_t *second) |
Function wiced_rtc_time_to_seconds. More... | |
wiced_bool_t wiced_rtc_ctime | ( | wiced_rtc_time_t * | timer, |
char * | outbuf | ||
) |
Function wiced_rtc_ctime.
This function call will convert the wiced_rtc_time_t object pointed by wiced_rtc_time_t to c string containing a human-readable verion of the corresponding local time and data. Caller should make sure *outbuf size larger then 22 bytes.
The returned string has the following format Mmm dd hh:mm:ss yyyy where Mmm - the month in letters dd - the day of the month hh:mm:ss - time yyyy - year
[in] | timer | : timer object pointer to be converted |
[out] | outbuf | : buffer for the converted string |
void wiced_rtc_get_raw_clock | ( | wiced_real_time_clock_t * | rtcClock | ) |
Function wiced_rtc_get_raw_clock.
Reads Real time clock value from hardware clock.
[out] | rtcClock | : buffer to for the read data |
void wiced_rtc_get_time | ( | wiced_rtc_time_t * | timebuf | ) |
Function wiced_rtc_get_time.
Get current time in wiced_rtc_time_t broken-down calender format
[out] | timebuf | : timer object pointer to be stored for the return value |
void wiced_rtc_init | ( | void | ) |
Function wiced_rtc_init.
Initialize the RTC block.
[in] | void |
void wiced_rtc_set_reference_time | ( | wiced_rtc_time_t * | ref_time | ) |
Function wiced_rtc_set_reference_time.
Set the reference time to the given reference. Useful when the app sets one time and then enters deep sleep, and then wakes up and then wants the ref time to still be the one that was set the reference to the original wiced_set_rtc_time call.
[out] | ref_time | : The original reference time |
void wiced_rtc_time_to_seconds | ( | wiced_rtc_time_t * | rtctime, |
uint32_t * | second | ||
) |
Function wiced_rtc_time_to_seconds.
Convert RTC_time broken-down format to 32-bits seconds
[in] | rtctime | : timer object pointer to be converted |
[out] | second | : converted uint32_t seconds |
void wiced_seconds_to_rtc_time | ( | uint32_t | second, |
wiced_rtc_time_t * | rtctime | ||
) |
Function wiced_seconds_to_rtc_time.
convert the 32 bit seconds to RTC_time broken down format
[in] | second | : 32-bits seconds to be converted |
[out] | rtctime | : converted timer object pointer |
wiced_bool_t wiced_set_rtc_time | ( | wiced_rtc_time_t * | newTime | ) |
Function wiced_set_rtc_time.
Set the current time.
[in] | newTime | : timer object pointer for current time |
Note : This function call will assume the current time is later then 2010/1/1.