Miscellaneous
This module includes platform abstractions for miscellaneous behaviors.
Summary
Enumerations |
|
---|---|
otPlatMcuPowerState{
|
enum Enumeration of micro-controller's power states. |
otPlatResetReason
|
enum Enumeration of possible reset reason codes. |
Functions |
|
---|---|
otPlatAssertFail(const char *aFilename, int aLineNumber)
|
void
Provides a platform specific implementation for assert.
|
otPlatGetMcuPowerState(otInstance *aInstance)
|
Gets the current desired MCU power state.
|
otPlatGetResetReason(otInstance *aInstance)
|
Returns the reason for the last platform reset.
|
otPlatLogCrashDump(void)
|
Logs a crash dump using OpenThread logging APIs.
|
otPlatReset(otInstance *aInstance)
|
void
Performs a software reset on the platform, if supported.
|
otPlatResetToBootloader(otInstance *aInstance)
|
Performs a hardware reset on the platform to launch bootloader mode, if supported.
|
otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState)
|
Sets the desired MCU power state.
|
otPlatWakeHost(void)
|
void
Performs a platform specific operation to wake the host MCU.
|
Enumerations
otPlatMcuPowerState
otPlatMcuPowerState
Enumeration of micro-controller's power states.
These values are used for NCP configuration when OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL
is enabled.
The power state specifies the desired power state of NCP's micro-controller (MCU) when the underlying platform's operating system enters idle mode (i.e., all active tasks/events are processed and the MCU can potentially enter a energy-saving power state).
The power state primarily determines how the host should interact with the NCP and whether the host needs an external trigger (a "poke") to NCP before it can communicate with the NCP or not.
After a reset, the MCU power state MUST be OT_PLAT_POWER_STATE_ON
.
Properties | |
---|---|
OT_PLAT_MCU_POWER_STATE_LOW_POWER
|
NCP's MCU can enter low-power (energy-saving) state. When the NCP's desired power state is set to While power state is set to
|
OT_PLAT_MCU_POWER_STATE_OFF
|
NCP is fully off. An NCP hardware reset (via a RESET pin) is required to bring the NCP back to |
OT_PLAT_MCU_POWER_STATE_ON
|
NCP's MCU stays on and active all the time. When the NCP's desired power state is set to
|
otPlatResetReason
otPlatResetReason
Enumeration of possible reset reason codes.
These are in the same order as the Spinel reset reason codes.
Functions
otPlatAssertFail
void otPlatAssertFail( const char *aFilename, int aLineNumber )
Provides a platform specific implementation for assert.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatGetMcuPowerState
otPlatMcuPowerState otPlatGetMcuPowerState( otInstance *aInstance )
Gets the current desired MCU power state.
This is only applicable and used for NCP configuration when OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL
is enabled.
After a reset, the power state MUST return OT_PLAT_POWER_STATE_ON
. During operation, power state SHOULD only change through an explicit successful call to otPlatSetMcuPowerState()
.
Details | |||
---|---|---|---|
Parameters |
|
||
Returns |
The current power state.
|
otPlatGetResetReason
otPlatResetReason otPlatGetResetReason( otInstance *aInstance )
Returns the reason for the last platform reset.
Details | |||
---|---|---|---|
Parameters |
|
otPlatLogCrashDump
otError otPlatLogCrashDump( void )
Logs a crash dump using OpenThread logging APIs.
Details | |||||
---|---|---|---|---|---|
Return Values |
|
otPlatReset
void otPlatReset( otInstance *aInstance )
Performs a software reset on the platform, if supported.
Details | |||
---|---|---|---|
Parameters |
|
otPlatResetToBootloader
otError otPlatResetToBootloader( otInstance *aInstance )
Performs a hardware reset on the platform to launch bootloader mode, if supported.
Used when OPENTHREAD_CONFIG_PLATFORM_BOOTLOADER_MODE_ENABLE
is enabled.
Details | |||||||
---|---|---|---|---|---|---|---|
Parameters |
|
||||||
Return Values |
|
otPlatSetMcuPowerState
otError otPlatSetMcuPowerState( otInstance *aInstance, otPlatMcuPowerState aState )
Sets the desired MCU power state.
This is only applicable and used for NCP configuration when OPENTHREAD_CONFIG_NCP_ENABLE_MCU_POWER_STATE_CONTROL
is enabled.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
||||
Return Values |
|
otPlatWakeHost
void otPlatWakeHost( void )
Performs a platform specific operation to wake the host MCU.
This is used only for NCP configurations.
Resources
OpenThread API Reference topics originate from the source code, available on GitHub. For more information, or to contribute to our documentation, refer to Resources.