Analog Devices Wi-Fi Software Reference Manual  Release 1.0.0
Macros | Functions

Timestamp Interface. More...

Macros

#define INIT_TIME()   adi_RTCInit()
 
#define GET_TIME()   adi_GetRTCTime()
 
#define ADI_RTC_DEVICE_NUM   (1u)
 
#define ADI_RTC_PRESCALAR   (5u)
 

Functions

void adi_RTCInit (void)
 Initialize RTC. More...
 
uint32_t adi_GetRTCTime (void)
 Get the current RTC timestamp. More...
 

Detailed Description

Timestamp Interface.

Abstraction layer for timestamp implementation.

Macro Definition Documentation

§ ADI_RTC_DEVICE_NUM

#define ADI_RTC_DEVICE_NUM   (1u)

RTC device number

§ ADI_RTC_PRESCALAR

#define ADI_RTC_PRESCALAR   (5u)

The RTC prescalar can be caluculated using the equation: 1/(32768/2^Prescalar). Set prescalar to 5u for .97 ms precision

§ GET_TIME

#define GET_TIME ( )    adi_GetRTCTime()

Get the current timestamp valu.e

§ INIT_TIME

#define INIT_TIME ( )    adi_RTCInit()

Initialize the timestamp. In the no os case this will configure the RTC for ~1ms ticks.

Function Documentation

§ adi_GetRTCTime()

uint32_t adi_GetRTCTime ( void  )

Get the current RTC timestamp.

Returns
The current RTC time in .97 ms precision.

§ adi_RTCInit()

void adi_RTCInit ( void  )

Initialize RTC.

This API is used to initialize the RTC to .97 ms per tick.