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
This function provides a platform specific implementation for assert.
|
otPlatGetMcuPowerState(otInstance *aInstance)
|
This function gets the current desired MCU power state.
|
otPlatGetResetReason(otInstance *aInstance)
|
This function returns the reason for the last platform reset.
|
otPlatReset(otInstance *aInstance)
|
void
This function performs a software reset on the platform, if supported.
|
otPlatSetMcuPowerState(otInstance *aInstance, otPlatMcuPowerState aState)
|
This function sets the desired MCU power state.
|
otPlatWakeHost(void)
|
void
This function 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 )
This function provides a platform specific implementation for assert.
Details | |||||
---|---|---|---|---|---|
Parameters |
|
otPlatGetMcuPowerState
otPlatMcuPowerState otPlatGetMcuPowerState( otInstance *aInstance )
This function 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 )
This function returns the reason for the last platform reset.
Details | |||
---|---|---|---|
Parameters |
|
otPlatReset
void otPlatReset( otInstance *aInstance )
This function performs a software reset on the platform, if supported.
Details | |||
---|---|---|---|
Parameters |
|
otPlatSetMcuPowerState
otError otPlatSetMcuPowerState( otInstance *aInstance, otPlatMcuPowerState aState )
This function 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 )
This function 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.