mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-01 10:40:47 +03:00
feat(openthread): align spinel radio caps with RCP CSMA backoff and TX retry support
This commit is contained in:
@@ -35,15 +35,17 @@ static bool append_escaped_ot_arg(char *buffer, size_t buffer_size, const char *
|
||||
ESP_RETURN_ON_FALSE(rem_size > 0, false, OT_PLAT_LOG_TAG, "CLI command buffer is full");
|
||||
|
||||
while (*arg) {
|
||||
if ((*arg == ' ') || (*arg == '\t') || (*arg == '\r') || (*arg == '\n') || (*arg == '\\')) {
|
||||
ESP_RETURN_ON_FALSE(rem_size > 1, false, OT_PLAT_LOG_TAG, "CLI command is too long");
|
||||
bool need_escape = (*arg == ' ') || (*arg == '\t') || (*arg == '\r') || (*arg == '\n') || (*arg == '\\');
|
||||
size_t need = need_escape ? 2 : 1;
|
||||
|
||||
ESP_RETURN_ON_FALSE(rem_size >= need, false, OT_PLAT_LOG_TAG, "CLI command is too long");
|
||||
|
||||
if (need_escape) {
|
||||
buffer[len++] = '\\';
|
||||
rem_size--;
|
||||
}
|
||||
|
||||
ESP_RETURN_ON_FALSE(rem_size > 1, false, OT_PLAT_LOG_TAG, "CLI command is too long");
|
||||
buffer[len++] = *arg++;
|
||||
rem_size--;
|
||||
rem_size -= need;
|
||||
}
|
||||
|
||||
buffer[len] = '\0';
|
||||
|
||||
@@ -53,7 +53,9 @@ static otRadioCaps s_radio_caps = (OT_RADIO_CAPS_ENERGY_SCAN |
|
||||
OT_RADIO_CAPS_RECEIVE_TIMING |
|
||||
OT_RADIO_CAPS_TRANSMIT_TIMING |
|
||||
OT_RADIO_CAPS_ACK_TIMEOUT |
|
||||
OT_RADIO_CAPS_SLEEP_TO_TX);
|
||||
OT_RADIO_CAPS_SLEEP_TO_TX |
|
||||
OT_RADIO_CAPS_CSMA_BACKOFF |
|
||||
OT_RADIO_CAPS_TRANSMIT_RETRIES);
|
||||
|
||||
static const char *radiospinel_workflow = "radio_spinel";
|
||||
static const esp_openthread_radio_config_t *s_esp_openthread_radio_config = NULL;
|
||||
|
||||
@@ -40,7 +40,9 @@ static otRadioCaps s_radio_caps = (OT_RADIO_CAPS_ENERGY_SCAN |
|
||||
OT_RADIO_CAPS_RECEIVE_TIMING |
|
||||
OT_RADIO_CAPS_TRANSMIT_TIMING |
|
||||
OT_RADIO_CAPS_ACK_TIMEOUT |
|
||||
OT_RADIO_CAPS_SLEEP_TO_TX);
|
||||
OT_RADIO_CAPS_SLEEP_TO_TX |
|
||||
OT_RADIO_CAPS_CSMA_BACKOFF |
|
||||
OT_RADIO_CAPS_TRANSMIT_RETRIES);
|
||||
|
||||
static esp_radio_spinel_compatibility_error_callback s_radio_spinel_compatibility_error_callback = NULL;
|
||||
static esp_radio_spinel_coprocessor_reset_failure_callback s_radio_spinel_coprocessor_reset_failure_callback = NULL;
|
||||
|
||||
Reference in New Issue
Block a user