工廠診斷 - 平台
這個模組包含診斷功能的平台抽象層。
摘要
列舉 |
|
---|---|
otGpioMode{
|
列舉 此列舉會定義 gpio 模式。 |
Functions |
|
---|---|
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)
|
啟動/停止平台層以傳輸連續的聲波。
|
otPlatDiagTxPowerSet(int8_t aTxPower)
|
void
這項函式可以設定用來進行工廠診斷的傳輸功率。
|
列舉
Functions
otPlatDiagAlarmCallback
void otPlatDiagAlarmCallback( otInstance *aInstance )
這個函式會處理鬧鐘事件。
詳細資料 | |||
---|---|---|---|
參數 |
|
otPlatDiagChannelSet
void otPlatDiagChannelSet( uint8_t aChannel )
這個函式會設定要使用的頻道進行診斷。
詳細資料 | |||
---|---|---|---|
參數 |
|
otPlatDiagGpio 取得
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 )
取得診斷模組的無線電原始電源設定。
詳細資料 | |||||||||
---|---|---|---|---|---|---|---|---|---|
參數 |
|
||||||||
回傳值 |
|
otPlatDiagRadioRawPowerSetting 啟用
otError otPlatDiagRadioRawPowerSettingEnable( otInstance *aInstance, bool aEnable )
啟用/停用平台層以使用「otPlatDiagRadioSetRawPowerSetting()
」設定的原始電源設定。
詳細資料 | |||||
---|---|---|---|---|---|
參數 |
|
||||
回傳值 |
|
OTPPDiDiggRadioReceived
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 )
啟動/停止平台層以傳輸連續的聲波。
詳細資料 | |||||||
---|---|---|---|---|---|---|---|
參數 |
|
||||||
回傳值 |
|
otPlatDiagTxPowerSet
void otPlatDiagTxPowerSet( int8_t aTxPower )
這項函式可以設定用來進行工廠診斷的傳輸功率。
詳細資料 | |||
---|---|---|---|
參數 |
|
資源
OpenThread API 參考資料主題來自原始碼,可在 GitHub 取得。如需詳細資訊或為說明文件貢獻一己之力,請參閱資源。