Infineon Logo AIROC BTSDK v4.7 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages

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...
 

Detailed Description

Function Documentation

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

Parameters
[in]timer: timer object pointer to be converted
[out]outbuf: buffer for the converted string
Returns
WICED_TRUE if success else return WICED_FALSE
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.

Parameters
[out]rtcClock: buffer to for the read data
Returns
void
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

Parameters
[out]timebuf: timer object pointer to be stored for the return value
Returns
void
void wiced_rtc_init ( void  )

Function wiced_rtc_init.

Initialize the RTC block.

Parameters
[in]void
Returns
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.

Parameters
[out]ref_time: The original reference time
Returns
void
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

Parameters
[in]rtctime: timer object pointer to be converted
[out]second: converted uint32_t seconds
Returns
void
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

Parameters
[in]second: 32-bits seconds to be converted
[out]rtctime: converted timer object pointer
Returns
void
wiced_bool_t wiced_set_rtc_time ( wiced_rtc_time_t newTime)

Function wiced_set_rtc_time.

Set the current time.

Parameters
[in]newTime: timer object pointer for current time
Returns
WICED_TRUE if success else return WICED_FALSE

Note : This function call will assume the current time is later then 2010/1/1.