原廠診斷 - 平台
這個模組包含診斷功能的平台抽象化機制。
摘要
列舉 |
|
---|---|
otGpioMode{
|
列舉 定義 Gpio 模式。 |
函式 |
|
---|---|
otPlatDiagAlarmCallback(otInstance *aInstance)
|
void
處理鬧鐘事件。
|
otPlatDiagChannelSet(uint8_t aChannel)
|
void
設定用於工廠診斷的管道。
|
otPlatDiagGpioGet(uint32_t aGpio, bool *aValue)
|
取得 gpio 值。
|
otPlatDiagGpioGetMode(uint32_t aGpio, otGpioMode *aMode)
|
取得 gpio 模式。
|
otPlatDiagGpioSet(uint32_t aGpio, bool aValue)
|
設定 gpio 值。
|
otPlatDiagGpioSetMode(uint32_t aGpio, otGpioMode aMode)
|
設定 gpio 模式。
|
otPlatDiagModeGet(void)
|
bool
指出是否啟用原廠診斷模式。
|
otPlatDiagModeSet(bool aMode)
|
void
啟用/停用原廠診斷模式。
|
otPlatDiagProcess(otInstance *aInstance, uint8_t aArgsLength, char *aArgs[], char *aOutput, size_t aOutputMaxLen)
|
處理工廠診斷指令列。
|
otPlatDiagRadioGetPowerSettings(otInstance *aInstance, uint8_t aChannel, int16_t *aTargetPower, int16_t *aActualPower, uint8_t *aRawPowerSetting, uint16_t *aRawPowerSettingLength)
|
取得指定頻道的電源設定。
|
otPlatDiagRadioGetRawPowerSetting(otInstance *aInstance, uint8_t *aRawPowerSetting, uint16_t *aRawPowerSettingLength)
|
取得診斷模組的無線電原始電源設定。
|
otPlatDiagRadioRawPowerSettingEnable(otInstance *aInstance, bool aEnable)
|
啟用/停用平台層即可使用
otPlatDiagRadioSetRawPowerSetting() 設定的原始電源設定。 |
otPlatDiagRadioReceived(otInstance *aInstance, otRadioFrame *aFrame, otError aError)
|
void
處理接收的無線電影格。
|
otPlatDiagRadioSetRawPowerSetting(otInstance *aInstance, const uint8_t *aRawPowerSetting, uint16_t aRawPowerSettingLength)
|
設定診斷模組的無線電原始電源設定。
|
otPlatDiagRadioTransmitCarrier(otInstance *aInstance, bool aEnable)
|
啟動/停止平台層來傳輸連續電信業者波段。
|
otPlatDiagRadioTransmitStream(otInstance *aInstance, bool aEnable)
|
啟動/停止平台層來傳輸字元串流。
|
otPlatDiagTxPowerSet(int8_t aTxPower)
|
void
設定用於工廠診斷的傳輸功率。
|
列舉
函式
otPlatDiagAlarmCallback
void otPlatDiagAlarmCallback(
otInstance *aInstance
)
處理鬧鐘事件。
詳細說明 | |||
---|---|---|---|
參數 |
|
otPlatDiagChannelSet
void otPlatDiagChannelSet(
uint8_t aChannel
)
設定用於工廠診斷的管道。
詳細說明 | |||
---|---|---|---|
參數 |
|
otPlatDiagGpioGet
otError otPlatDiagGpioGet(
uint32_t aGpio,
bool *aValue
)
取得 gpio 值。
詳細說明 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||
傳回值 |
|
otPlatDiagGpioGetMode
otError otPlatDiagGpioGetMode(
uint32_t aGpio,
otGpioMode *aMode
)
取得 gpio 模式。
詳細說明 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||
傳回值 |
|
otPlatDiagGpioSet
otError otPlatDiagGpioSet(
uint32_t aGpio,
bool aValue
)
設定 gpio 值。
詳細說明 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||
傳回值 |
|
otPlatDiagGpioSetMode
otError otPlatDiagGpioSetMode(
uint32_t aGpio,
otGpioMode aMode
)
設定 gpio 模式。
詳細說明 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||
傳回值 |
|
otPlatDiagModeGet
bool otPlatDiagModeGet(
void
)
指出是否啟用原廠診斷模式。
詳細說明 | |
---|---|
傳回 |
如果工廠診斷模式已啟用,則為 TRUE,否則傳回 FALSE。
|
otPlatDiagModeSet
void otPlatDiagModeSet(
bool aMode
)
啟用/停用原廠診斷模式。
詳細說明 | |||
---|---|---|---|
參數 |
|
otPlatDiagProcess
otError otPlatDiagProcess(
otInstance *aInstance,
uint8_t aArgsLength,
char *aArgs[],
char *aOutput,
size_t aOutputMaxLen
)
處理工廠診斷指令列。
這個函式的輸出內容 (寫入 aOutput
的內容) 必須以 \0
終止,且 \0
位於輸出緩衝區中。
詳細說明 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||
傳回值 |
|
otPlatDiagRadioGetPowerSettings
otError otPlatDiagRadioGetPowerSettings(
otInstance *aInstance,
uint8_t aChannel,
int16_t *aTargetPower,
int16_t *aActualPower,
uint8_t *aRawPowerSetting,
uint16_t *aRawPowerSettingLength
)
取得指定頻道的電源設定。
詳細說明 | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||||||
傳回值 |
|
otPlatDiagRadioGetRawPowerSetting
otError otPlatDiagRadioGetRawPowerSetting(
otInstance *aInstance,
uint8_t *aRawPowerSetting,
uint16_t *aRawPowerSettingLength
)
取得診斷模組的無線電原始電源設定。
詳細說明 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||
傳回值 |
|
otPlatDiagRadioRawPowerSettingEnable
otError otPlatDiagRadioRawPowerSettingEnable(
otInstance *aInstance,
bool aEnable
)
啟用/停用平台層即可使用 otPlatDiagRadioSetRawPowerSetting()
設定的原始電源設定。
詳細說明 | |||||
---|---|---|---|---|---|
參數 |
|
||||
傳回值 |
|
otPlatDiagRadioReceived
void otPlatDiagRadioReceived(
otInstance *aInstance,
otRadioFrame *aFrame,
otError aError
)
處理接收的無線電影格。
詳細說明 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
otPlatDiagRadioSetRawPowerSetting
otError otPlatDiagRadioSetRawPowerSetting(
otInstance *aInstance,
const uint8_t *aRawPowerSetting,
uint16_t aRawPowerSettingLength
)
設定診斷模組的無線電原始電源設定。
詳細說明 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回值 |
|
otPlatDiagRadioTransmitCarrier
otError otPlatDiagRadioTransmitCarrier(
otInstance *aInstance,
bool aEnable
)
啟動/停止平台層來傳輸連續電信業者波段。
詳細說明 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回值 |
|
otPlatDiagRadioTransmitStream
otError otPlatDiagRadioTransmitStream(
otInstance *aInstance,
bool aEnable
)
啟動/停止平台層來傳輸字元串流。
詳細說明 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
傳回值 |
|
otPlatDiagTxPowerSet
void otPlatDiagTxPowerSet(
int8_t aTxPower
)
設定用於工廠診斷的傳輸功率。
詳細說明 | |||
---|---|---|---|
參數 |
|
資源
OpenThread API 參考資料主題源自原始碼,請前往 GitHub 取得。如要瞭解詳情或對說明文件做出貢獻,請參閱資源。