This module includes the platform abstraction for the alarm service.
More...
This module includes the platform abstraction for the alarm service.
typedef void(* otPlatUsecAlarmHandler)(void *aContext) |
This defines the callback for indicating when the alarm has expired.
- Parameters
-
[in] | aContext | A pointer to arbitrary context information. |
void otPlatAlarmFired |
( |
otInstance * |
aInstance | ) |
|
Signal that the alarm has fired.
- Parameters
-
[in] | aInstance | The 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] | aInstance | The OpenThread instance structure. |
[in] | aT0 | The reference time. |
[in] | aDt | The time delay in milliseconds from aT0 . |
void otPlatAlarmStop |
( |
otInstance * |
aInstance | ) |
|
Stop the alarm.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
void otPlatDiagAlarmFired |
( |
otInstance * |
aInstance | ) |
|
Signal diagnostics module that the alarm has fired.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
Get the current time.
- Parameters
-
[out] | aNow | The current time in milliseconds and microseconds. |
Set the alarm to fire at aDt
milliseconds and microseconds after aT0
.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |
[in] | aT0 | The reference time. |
[in] | aDt | The time delay in milliseconds and microseconds from aT0 . |
[in] | aHandler | A pointer to a function that is called when the timer expires. |
[in] | aContext | A pointer to arbitrary context information. |
void otPlatUsecAlarmStop |
( |
otInstance * |
aInstance | ) |
|
Stop the alarm.
- Parameters
-
[in] | aInstance | The OpenThread instance structure. |