Skip to content

Commit

Permalink
(wip) OPENTHREAD-2346: Add 'bootloader' spinel reset type
Browse files Browse the repository at this point in the history
  • Loading branch information
lmnotran committed Oct 5, 2023
1 parent 42bc3d4 commit 36e6d15
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/lib/spinel/spinel.h
Original file line number Diff line number Diff line change
Expand Up @@ -899,8 +899,9 @@ enum

enum
{
SPINEL_RESET_PLATFORM = 1,
SPINEL_RESET_STACK = 2,
SPINEL_RESET_PLATFORM = 1,
SPINEL_RESET_STACK = 2,
SPINEL_RESET_BOOTLOADER = 3,
};

enum
Expand Down Expand Up @@ -930,8 +931,10 @@ enum
* `PROP_LAST_STATUS` has been set to `STATUS_RESET_SOFTWARE`.
*
* The optional command payload specifies the reset type, can be
* `SPINEL_RESET_PLATFORM` or `SPINEL_RESET_STACK`. Defaults to stack
* reset if unspecified.
* `SPINEL_RESET_PLATFORM`, `SPINEL_RESET_STACK`, or
* `SPINEL_RESET_BOOTLOADER`.
*
* Defaults to stack reset if unspecified.
*
* If an error occurs, the value of `PROP_LAST_STATUS` will be emitted
* instead with the value set to the generated status code for the error.
Expand Down
4 changes: 4 additions & 0 deletions src/ncp/ncp_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1366,6 +1366,10 @@ otError NcpBase::CommandHandler_RESET(uint8_t aHeader)

SuccessOrAssert(
error = WriteLastStatusFrame(SPINEL_HEADER_FLAG | SPINEL_HEADER_IID_0, SPINEL_STATUS_RESET_POWER_ON));
}
else if (reset_type == SPINEL_RESET_BOOTLOADER)
{

}
else
#endif
Expand Down

0 comments on commit 36e6d15

Please sign in to comment.