nRF5 SDK for Thread v0.10.0
Data Structures | Typedefs | Functions

This module includes the platform abstraction for the alarm service. More...

Data Structures

struct  otPlatUsecAlarmTime
 

Typedefs

typedef void(* otPlatUsecAlarmHandler )(void *aContext)
 

Functions

void otPlatAlarmStartAt (otInstance *aInstance, uint32_t aT0, uint32_t aDt)
 
void otPlatAlarmStop (otInstance *aInstance)
 
uint32_t otPlatAlarmGetNow (void)
 
void otPlatAlarmFired (otInstance *aInstance)
 
void otPlatDiagAlarmFired (otInstance *aInstance)
 
void otPlatUsecAlarmStartAt (otInstance *aInstance, const otPlatUsecAlarmTime *aT0, const otPlatUsecAlarmTime *aDt, otPlatUsecAlarmHandler aHandler, void *aContext)
 
void otPlatUsecAlarmStop (otInstance *aInstance)
 
void otPlatUsecAlarmGetNow (otPlatUsecAlarmTime *aNow)
 

Detailed Description

This module includes the platform abstraction for the alarm service.

Typedef Documentation

typedef void(* otPlatUsecAlarmHandler)(void *aContext)

This defines the callback for indicating when the alarm has expired.

Parameters
[in]aContextA pointer to arbitrary context information.

Function Documentation

void otPlatAlarmFired ( otInstance *  aInstance)

Signal that the alarm has fired.

Parameters
[in]aInstanceThe OpenThread instance structure.
uint32_t otPlatAlarmGetNow ( void  )

Get the current time.

Returns
The current time in milliseconds.
void otPlatAlarmStartAt ( otInstance *  aInstance,
uint32_t  aT0,
uint32_t  aDt 
)

Set the alarm to fire at aDt milliseconds after aT0.

Parameters
[in]aInstanceThe OpenThread instance structure.
[in]aT0The reference time.
[in]aDtThe time delay in milliseconds from aT0.
void otPlatAlarmStop ( otInstance *  aInstance)

Stop the alarm.

Parameters
[in]aInstanceThe OpenThread instance structure.
void otPlatDiagAlarmFired ( otInstance *  aInstance)

Signal diagnostics module that the alarm has fired.

Parameters
[in]aInstanceThe OpenThread instance structure.
void otPlatUsecAlarmGetNow ( otPlatUsecAlarmTime aNow)

Get the current time.

Parameters
[out]aNowThe current time in milliseconds and microseconds.
void otPlatUsecAlarmStartAt ( otInstance *  aInstance,
const otPlatUsecAlarmTime aT0,
const otPlatUsecAlarmTime aDt,
otPlatUsecAlarmHandler  aHandler,
void *  aContext 
)

Set the alarm to fire at aDt milliseconds and microseconds after aT0.

Parameters
[in]aInstanceThe OpenThread instance structure.
[in]aT0The reference time.
[in]aDtThe time delay in milliseconds and microseconds from aT0.
[in]aHandlerA pointer to a function that is called when the timer expires.
[in]aContextA pointer to arbitrary context information.
void otPlatUsecAlarmStop ( otInstance *  aInstance)

Stop the alarm.

Parameters
[in]aInstanceThe OpenThread instance structure.

Documentation feedback | Developer Zone | Subscribe | Updated