Skip to content

Commit

Permalink
[spinel] add SPINEL_CAP_RCP_LOG_CRASH_DUMP and `SPINEL_PROP_RCP_LOG…
Browse files Browse the repository at this point in the history
…_CRASH_DUMP`
  • Loading branch information
lmnotran committed Apr 23, 2024
1 parent 3ff25ad commit 2e1de19
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib/spinel/radio_spinel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ bool RadioSpinel::sSupportsLogStream =

bool RadioSpinel::sSupportsResetToBootloader = false; ///< RCP supports resetting into bootloader mode.

bool RadioSpinel::sSupportsLogCrashDump = false; ///< RCP supports logging a crash dump.

otRadioCaps RadioSpinel::sRadioCaps = OT_RADIO_CAPS_NONE;

RadioSpinel::RadioSpinel(void)
Expand Down
1 change: 1 addition & 0 deletions src/lib/spinel/radio_spinel.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1247,6 +1247,7 @@ class RadioSpinel : private Logger
static bool sIsReady; ///< NCP ready.
static bool sSupportsLogStream; ///< RCP supports `LOG_STREAM` property with OpenThread log meta-data format.
static bool sSupportsResetToBootloader; ///< RCP supports resetting into bootloader mode.
static bool sSupportsLogCrashDump; ///< RCP supports logging a crash dump.

#if OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT > 0

Expand Down
2 changes: 2 additions & 0 deletions src/lib/spinel/spinel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1427,6 +1427,7 @@ const char *spinel_prop_key_to_cstr(spinel_prop_key_t prop_key)
{SPINEL_PROP_SERVER_LEADER_SERVICES, "SERVER_LEADER_SERVICES"},
{SPINEL_PROP_RCP_API_VERSION, "RCP_API_VERSION"},
{SPINEL_PROP_RCP_MIN_HOST_API_VERSION, "RCP_MIN_HOST_API_VERSION"},
{SPINEL_PROP_RCP_LOG_CRASH_DUMP, "RCP_LOG_CRASH_DUMP"},
{SPINEL_PROP_UART_BITRATE, "UART_BITRATE"},
{SPINEL_PROP_UART_XON_XOFF, "UART_XON_XOFF"},
{SPINEL_PROP_15_4_PIB_PHY_CHANNELS_SUPPORTED, "15_4_PIB_PHY_CHANNELS_SUPPORTED"},
Expand Down Expand Up @@ -1608,6 +1609,7 @@ const char *spinel_capability_to_cstr(spinel_capability_t capability)
{SPINEL_CAP_RCP_API_VERSION, "RCP_API_VERSION"},
{SPINEL_CAP_RCP_MIN_HOST_API_VERSION, "RCP_MIN_HOST_API_VERSION"},
{SPINEL_CAP_RCP_RESET_TO_BOOTLOADER, "RCP_RESET_TO_BOOTLOADER"},
{SPINEL_CAP_RCP_LOG_CRASH_DUMP, "RCP_LOG_CRASH_DUMP"},
{SPINEL_CAP_MAC_ALLOWLIST, "MAC_ALLOWLIST"},
{SPINEL_CAP_MAC_RAW, "MAC_RAW"},
{SPINEL_CAP_OOB_STEERING_DATA, "OOB_STEERING_DATA"},
Expand Down
13 changes: 13 additions & 0 deletions src/lib/spinel/spinel.h
Original file line number Diff line number Diff line change
Expand Up @@ -1296,6 +1296,7 @@ enum
SPINEL_CAP_RCP_API_VERSION = (SPINEL_CAP_RCP__BEGIN + 0),
SPINEL_CAP_RCP_MIN_HOST_API_VERSION = (SPINEL_CAP_RCP__BEGIN + 1),
SPINEL_CAP_RCP_RESET_TO_BOOTLOADER = (SPINEL_CAP_RCP__BEGIN + 2),
SPINEL_CAP_RCP_LOG_CRASH_DUMP = (SPINEL_CAP_RCP__BEGIN + 3),
SPINEL_CAP_RCP__END = 80,

SPINEL_CAP_OPENTHREAD__BEGIN = 512,
Expand Down Expand Up @@ -4399,6 +4400,18 @@ enum
*/
SPINEL_PROP_RCP_MIN_HOST_API_VERSION = SPINEL_PROP_RCP__BEGIN + 1,

/// Crash Dump
/** Format: `U` (read-only)
*
* Required capability: SPINEL_CAP_RADIO and SPINEL_CAP_RCP_LOG_CRASH_DUMP.
*
* This property gives the crash dump from the RCP.
*
* Please see "Spinel definition compatibility guideline" section.
*
*/
SPINEL_PROP_RCP_LOG_CRASH_DUMP = SPINEL_PROP_RCP__BEGIN + 2,

SPINEL_PROP_RCP__END = 0xFF,

SPINEL_PROP_INTERFACE__BEGIN = 0x100,
Expand Down

0 comments on commit 2e1de19

Please sign in to comment.