鬧鐘
這個模組包含鬧鐘服務的平台抽象化機制。
摘要
函式 |
|
|---|---|
otPlatAlarmMicroFired(otInstance *aInstance)
|
void
讓鬧鐘已觸發的訊號。
|
otPlatAlarmMicroGetNow(void)
|
uint32_t
取得當前時間。
|
otPlatAlarmMicroStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
|
void
設定鬧鐘在
aT0 後 aDt 微秒觸發。 |
otPlatAlarmMicroStop(otInstance *aInstance)
|
void
停止鬧鐘。
|
otPlatAlarmMilliFired(otInstance *aInstance)
|
void
讓鬧鐘已觸發的訊號。
|
otPlatAlarmMilliGetNow(void)
|
uint32_t
取得當前時間。
|
otPlatAlarmMilliStartAt(otInstance *aInstance, uint32_t aT0, uint32_t aDt)
|
void
設定鬧鐘在
aT0 後 aDt 毫秒觸發。 |
otPlatAlarmMilliStop(otInstance *aInstance)
|
void
停止鬧鐘。
|
otPlatDiagAlarmFired(otInstance *aInstance)
|
void
鬧鐘已觸發的信號診斷模組。
|
函式
otPlatAlarmMicroFired
void otPlatAlarmMicroFired( otInstance *aInstance )
讓鬧鐘已觸發的訊號。
| 詳細說明 | |||
|---|---|---|---|
| 參數 |
|
||
otPlatAlarmMicroGetNow
uint32_t otPlatAlarmMicroGetNow( void )
取得當前時間。
目前時間「必須」代表免費執行計時器。在維持目前時間時,時間值「必須」使用整個 [0, 2^32-1] 範圍,且「不得」在 2^32 之前納入此範圍。
| 詳細說明 | |
|---|---|
| 傳回 |
目前時間,以微秒為單位。
|
otPlatAlarmMicroStartAt
void otPlatAlarmMicroStartAt( otInstance *aInstance, uint32_t aT0, uint32_t aDt )
設定鬧鐘在 aT0 後 aDt 微秒觸發。
如果是 aT0,平台「必須」支援 [0, 2^32-1] 中的所有值。如果是 aDt,平台「必須」支援 [0, 2^31-1] 中的所有值。
| 詳細說明 | |||||||
|---|---|---|---|---|---|---|---|
| 參數 |
|
||||||
otPlatAlarmMicroStop
void otPlatAlarmMicroStop( otInstance *aInstance )
停止鬧鐘。
| 詳細說明 | |||
|---|---|---|---|
| 參數 |
|
||
otPlatAlarmMilliFired
void otPlatAlarmMilliFired( otInstance *aInstance )
讓鬧鐘已觸發的訊號。
| 詳細說明 | |||
|---|---|---|---|
| 參數 |
|
||
otPlatAlarmMilliGetNow
uint32_t otPlatAlarmMilliGetNow( void )
取得當前時間。
目前時間「必須」代表免費執行計時器。在維持目前時間時,時間值「必須」使用整個 [0, 2^32-1] 範圍,且「不得」在 2^32 之前納入此範圍。
| 詳細說明 | |
|---|---|
| 傳回 |
目前時間,以毫秒為單位。
|
otPlatAlarmMilliStartAt
void otPlatAlarmMilliStartAt( otInstance *aInstance, uint32_t aT0, uint32_t aDt )
設定鬧鐘在 aT0 後 aDt 毫秒觸發。
如果是 aT0,平台「必須」支援 [0, 2^32-1] 中的所有值。如果是 aDt,平台「必須」支援 [0, 2^31-1] 中的所有值。
| 詳細說明 | |||||||
|---|---|---|---|---|---|---|---|
| 參數 |
|
||||||
otPlatAlarmMilliStop
void otPlatAlarmMilliStop( otInstance *aInstance )
停止鬧鐘。
| 詳細說明 | |||
|---|---|---|---|
| 參數 |
|
||
otPlatDiagAlarmFired
void otPlatDiagAlarmFired( otInstance *aInstance )
鬧鐘已觸發的信號診斷模組。
| 詳細說明 | |||
|---|---|---|---|
| 參數 |
|
||
資源
OpenThread API 參考資料主題源自原始碼,請前往 GitHub 取得。如要瞭解詳情或對說明文件做出貢獻,請參閱資源。