mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
Add HW external coexist api.
Simplify the external coex flow. And replace gpio of driver interface with hal one.
This commit is contained in:
@@ -489,7 +489,7 @@ static esp_err_t esp_read_mac_wrapper(uint8_t* mac, uint32_t type)
|
||||
|
||||
static int coex_init_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_init();
|
||||
#else
|
||||
return 0;
|
||||
@@ -498,14 +498,14 @@ static int coex_init_wrapper(void)
|
||||
|
||||
static void coex_deinit_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_deinit();
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_enable_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_enable();
|
||||
#else
|
||||
return 0;
|
||||
@@ -514,14 +514,14 @@ static int coex_enable_wrapper(void)
|
||||
|
||||
static void coex_disable_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_disable();
|
||||
#endif
|
||||
}
|
||||
|
||||
static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_status_get();
|
||||
#else
|
||||
return 0;
|
||||
@@ -530,14 +530,14 @@ static IRAM_ATTR uint32_t coex_status_get_wrapper(void)
|
||||
|
||||
static void coex_condition_set_wrapper(uint32_t type, bool dissatisfy)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_condition_set(type, dissatisfy);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int coex_wifi_request_wrapper(uint32_t event, uint32_t latency, uint32_t duration)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_wifi_request(event, latency, duration);
|
||||
#else
|
||||
return 0;
|
||||
@@ -546,7 +546,7 @@ static int coex_wifi_request_wrapper(uint32_t event, uint32_t latency, uint32_t
|
||||
|
||||
static IRAM_ATTR int coex_wifi_release_wrapper(uint32_t event)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_wifi_release(event);
|
||||
#else
|
||||
return 0;
|
||||
@@ -555,7 +555,7 @@ static IRAM_ATTR int coex_wifi_release_wrapper(uint32_t event)
|
||||
|
||||
static int coex_wifi_channel_set_wrapper(uint8_t primary, uint8_t secondary)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_wifi_channel_set(primary, secondary);
|
||||
#else
|
||||
return 0;
|
||||
@@ -564,7 +564,7 @@ static int coex_wifi_channel_set_wrapper(uint8_t primary, uint8_t secondary)
|
||||
|
||||
static IRAM_ATTR int coex_event_duration_get_wrapper(uint32_t event, uint32_t *duration)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_event_duration_get(event, duration);
|
||||
#else
|
||||
return 0;
|
||||
@@ -573,7 +573,7 @@ static IRAM_ATTR int coex_event_duration_get_wrapper(uint32_t event, uint32_t *d
|
||||
|
||||
static int coex_pti_get_wrapper(uint32_t event, uint8_t *pti)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_pti_get(event, pti);
|
||||
#else
|
||||
return 0;
|
||||
@@ -582,21 +582,21 @@ static int coex_pti_get_wrapper(uint32_t event, uint8_t *pti)
|
||||
|
||||
static void coex_schm_status_bit_clear_wrapper(uint32_t type, uint32_t status)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_schm_status_bit_clear(type, status);
|
||||
#endif
|
||||
}
|
||||
|
||||
static void coex_schm_status_bit_set_wrapper(uint32_t type, uint32_t status)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
coex_schm_status_bit_set(type, status);
|
||||
#endif
|
||||
}
|
||||
|
||||
static IRAM_ATTR int coex_schm_interval_set_wrapper(uint32_t interval)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_interval_set(interval);
|
||||
#else
|
||||
return 0;
|
||||
@@ -605,7 +605,7 @@ static IRAM_ATTR int coex_schm_interval_set_wrapper(uint32_t interval)
|
||||
|
||||
static uint32_t coex_schm_interval_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_interval_get();
|
||||
#else
|
||||
return 0;
|
||||
@@ -614,7 +614,7 @@ static uint32_t coex_schm_interval_get_wrapper(void)
|
||||
|
||||
static uint8_t coex_schm_curr_period_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_curr_period_get();
|
||||
#else
|
||||
return 0;
|
||||
@@ -623,7 +623,7 @@ static uint8_t coex_schm_curr_period_get_wrapper(void)
|
||||
|
||||
static void * coex_schm_curr_phase_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_curr_phase_get();
|
||||
#else
|
||||
return NULL;
|
||||
@@ -632,7 +632,7 @@ static void * coex_schm_curr_phase_get_wrapper(void)
|
||||
|
||||
static int coex_schm_curr_phase_idx_set_wrapper(int idx)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_curr_phase_idx_set(idx);
|
||||
#else
|
||||
return 0;
|
||||
@@ -641,7 +641,7 @@ static int coex_schm_curr_phase_idx_set_wrapper(int idx)
|
||||
|
||||
static int coex_schm_curr_phase_idx_get_wrapper(void)
|
||||
{
|
||||
#if CONFIG_SW_COEXIST_ENABLE
|
||||
#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
|
||||
return coex_schm_curr_phase_idx_get();
|
||||
#else
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user