Merge branch 'fix/fix_save_line_in_debug_for_154_v5.5' into 'release/v5.5'

fix(802.15.4): fix line save in 154 debug (v5.5)

See merge request espressif/esp-idf!43222
This commit is contained in:
Jiang Jiang Jian
2025-11-11 19:44:52 +08:00
2 changed files with 8 additions and 8 deletions
@@ -210,8 +210,8 @@ void ieee802154_record_print(void)
#if CONFIG_IEEE802154_RECORD_STATE
ESP_EARLY_LOGW(IEEE802154_TAG, "Print the record state, current state index: %d", g_ieee802154_probe.state_index);
for (uint8_t i = 0; i < IEEE802154_ASSERT_RECORD_STATE_SIZE; i++) {
ESP_EARLY_LOGW(IEEE802154_TAG, "index %2d: line:%5s, state:%10s, timestamp: %lld",
i, g_ieee802154_probe.state[i].line_str,
ESP_EARLY_LOGW(IEEE802154_TAG, "index %2d: line:%5lu, state:%10s, timestamp: %lld",
i, g_ieee802154_probe.state[i].line,
ieee802154_state_string[g_ieee802154_probe.state[i].state],
g_ieee802154_probe.state[i].timestamp);
}
@@ -221,8 +221,8 @@ void ieee802154_record_print(void)
#if CONFIG_IEEE802154_RECORD_CMD
ESP_EARLY_LOGW(IEEE802154_TAG, "Print the record cmd, current cmd index: %d", g_ieee802154_probe.cmd_index);
for (uint8_t i = 0; i < IEEE802154_ASSERT_RECORD_CMD_SIZE; i++) {
ESP_EARLY_LOGW(IEEE802154_TAG, "index %2d: line:%5s, cmd:%10s, timestamp: %lld",
i, g_ieee802154_probe.cmd[i].line_str,
ESP_EARLY_LOGW(IEEE802154_TAG, "index %2d: line:%5lu, cmd:%10s, timestamp: %lld",
i, g_ieee802154_probe.cmd[i].line,
ieee802154_get_cmd_string(g_ieee802154_probe.cmd[i].cmd),
g_ieee802154_probe.cmd[i].timestamp);
}
@@ -78,7 +78,7 @@ typedef struct {
#if CONFIG_IEEE802154_RECORD_STATE
#define IEEE802154_ASSERT_RECORD_STATE_SIZE CONFIG_IEEE802154_RECORD_STATE_SIZE
#define ieee802154_set_state(a) do { s_ieee802154_state = a; \
sprintf(g_ieee802154_probe.state[g_ieee802154_probe.state_index].line_str, "%d", __LINE__); \
g_ieee802154_probe.state[g_ieee802154_probe.state_index].line = __LINE__; \
g_ieee802154_probe.state[g_ieee802154_probe.state_index].timestamp = esp_timer_get_time(); \
g_ieee802154_probe.state[g_ieee802154_probe.state_index++].state = a; \
g_ieee802154_probe.state_index = \
@@ -89,7 +89,7 @@ typedef struct {
* @brief The table of recording IEEE802154 state command.
*/
typedef struct {
char line_str[5]; /*!< record which line in esp_ieee802154_dev.c changes the state */
uint32_t line; /*!< record which line in esp_ieee802154_dev.c changes the state */
ieee802154_state_t state; /*!< record current radio state */
uint64_t timestamp; /*!< record timestamp */
} ieee802154_state_info_t;
@@ -100,7 +100,7 @@ typedef struct {
#if CONFIG_IEEE802154_RECORD_CMD
#define IEEE802154_ASSERT_RECORD_CMD_SIZE CONFIG_IEEE802154_RECORD_CMD_SIZE
#define ieee802154_set_cmd(a) do { ieee802154_ll_set_cmd(a); \
sprintf(g_ieee802154_probe.cmd[g_ieee802154_probe.cmd_index].line_str, "%d", __LINE__); \
g_ieee802154_probe.cmd[g_ieee802154_probe.cmd_index].line = __LINE__; \
g_ieee802154_probe.cmd[g_ieee802154_probe.cmd_index].timestamp = esp_timer_get_time(); \
g_ieee802154_probe.cmd[g_ieee802154_probe.cmd_index++].cmd = a; \
g_ieee802154_probe.cmd_index = \
@@ -111,7 +111,7 @@ typedef struct {
* @brief The table of recording IEEE802154 radio command.
*/
typedef struct {
char line_str[5]; /*!< record which line in esp_ieee802154_dev.c set the command */
uint32_t line; /*!< record which line in esp_ieee802154_dev.c set the command */
ieee802154_ll_cmd_t cmd; /*!< record current command */
uint64_t timestamp; /*!< record timestamp */
} ieee802154_cmd_info_t;