Merge branch 'bugfix/fix_ieee802154_test_issue' into 'master'

fix(ieee802154): fix ieee802154_test

See merge request espressif/esp-idf!24886
pull/12177/head
Shu Chen 2023-08-29 15:11:05 +08:00
commit 11b9d983c5
4 zmienionych plików z 12 dodań i 6 usunięć

Wyświetl plik

@ -66,6 +66,7 @@ static char *ieee802154_get_event_string(ieee802154_ll_event_t events)
static char *ieee802154_state_string[] = {
"DISABLE",
"IDLE",
"SLEEP",
"RX",
"TX_ACK",
"TX_ENH_ACK",

Wyświetl plik

@ -55,12 +55,14 @@ static IRAM_ATTR void event_end_process(void)
ieee802154_timer0_stop();
}
#if !CONFIG_IEEE802154_TEST
static IRAM_ATTR void receive_ack_timeout_timer_start(uint32_t duration)
{
ieee802154_ll_enable_events(IEEE802154_EVENT_TIMER0_OVERFLOW);
ieee802154_timer0_set_threshold(duration);
ieee802154_timer0_start();
}
#endif
static void ieee802154_rx_frame_info_update(void)
{
@ -266,11 +268,12 @@ static IRAM_ATTR void next_operation(void)
static void isr_handle_timer0_done(void)
{
#if !CONFIG_IEEE802154_TEST
if (s_ieee802154_state == IEEE802154_STATE_RX_ACK) {
esp_ieee802154_transmit_failed(s_tx_frame, ESP_IEEE802154_TX_ERR_NO_ACK);
next_operation();
}
#if CONFIG_IEEE802154_TEST
#else
esp_ieee802154_timer0_done();
#endif
}
@ -296,7 +299,9 @@ static IRAM_ATTR void isr_handle_tx_done(void)
} else if (s_ieee802154_state == IEEE802154_STATE_TX || s_ieee802154_state == IEEE802154_STATE_TX_CCA) {
if (ieee802154_frame_is_ack_required(s_tx_frame) && ieee802154_ll_get_rx_auto_ack()) {
ieee802154_set_state(IEEE802154_STATE_RX_ACK);
#if !CONFIG_IEEE802154_TEST
receive_ack_timeout_timer_start(200000); // 200ms for receive ack timeout
#endif
} else {
esp_ieee802154_transmit_done(s_tx_frame, NULL, NULL);
next_operation();
@ -618,7 +623,7 @@ esp_err_t ieee802154_mac_init(void)
ieee802154_ll_enable_rx_abort_events(BIT(IEEE802154_RX_ABORT_BY_TX_ACK_TIMEOUT - 1) | BIT(IEEE802154_RX_ABORT_BY_TX_ACK_COEX_BREAK - 1));
ieee802154_ll_set_ed_sample_mode(IEEE802154_ED_SAMPLE_AVG);
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && !CONFIG_IEEE802154_TEST
esp_coex_ieee802154_ack_pti_set(IEEE802154_MIDDLE);
IEEE802154_SET_TXRX_PTI(IEEE802154_SCENE_IDLE);
#else

Wyświetl plik

@ -21,7 +21,7 @@ uint8_t ieee802154_channel_to_freq(uint8_t channel)
return (channel - 11) * 5 + 3;
}
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && !CONFIG_IEEE802154_TEST
void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene)
{
@ -45,7 +45,7 @@ void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene)
}
#endif // CONFIG_ESP_COEX_SW_COEXIST_ENABLE
#endif // CONFIG_ESP_COEX_SW_COEXIST_ENABLE && !CONFIG_IEEE802154_TEST
// TZ-97: implement these two functions using ETM common interface
void ieee802154_etm_channel_clear(uint32_t channel)

Wyświetl plik

@ -190,7 +190,7 @@ typedef enum {
IEEE802154_SCENE_RX_AT, /*!< IEEE802154 radio coexistence scene RX AT */
} ieee802154_txrx_scene_t;
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE
#if CONFIG_ESP_COEX_SW_COEXIST_ENABLE && !CONFIG_IEEE802154_TEST
/**
* @brief Set the IEEE802154 radio coexistence scene during transmitting or receiving.
@ -206,7 +206,7 @@ void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene);
#define IEEE802154_SET_TXRX_PTI(txrx_scene)
#endif // CONFIG_ESP_COEX_SW_COEXIST_ENABLE
#endif // CONFIG_ESP_COEX_SW_COEXIST_ENABLE && !CONFIG_IEEE802154_TEST
/**
* @brief Convert the frequence to the index of channel.