Skip to content

Commit 71f942b

Browse files
committed
Merge branch 'feat/esp_version_check' into 'feature/esp_as_mcu_host'
feat/esp_version_check Added Wifi Config Header for ESP Version checking See merge request app-frameworks/esp_hosted!493
2 parents f071123 + e9322de commit 71f942b

File tree

12 files changed

+42
-12
lines changed

12 files changed

+42
-12
lines changed

host/api/esp_hosted_api.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ extern "C" {
1919

2020
/** Includes **/
2121
#include "esp_wifi_remote.h"
22+
#include "esp_hosted_wifi_config.h"
2223
#include "esp_hosted_api.h"
2324
#include "esp_check.h"
2425
#include "transport_drv.h"
@@ -379,7 +380,7 @@ esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid)
379380
return rpc_wifi_sta_get_aid(aid);
380381
}
381382

382-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
383+
#if H_WIFI_DUALBAND_SUPPORT
383384
esp_err_t esp_wifi_remote_set_band(wifi_band_t band)
384385
{
385386
return rpc_wifi_set_band(band);

host/api/esp_hosted_api.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ extern "C" {
2626
#include "esp_wifi.h"
2727
#include "transport_drv.h"
2828
#include "esp_wifi_remote.h"
29-
29+
#include "esp_hosted_wifi_config.h"
3030

3131
/** Exported variables **/
3232
#define ESP_HOSTED_CHANNEL_CONFIG_DEFAULT() { \
@@ -96,7 +96,7 @@ esp_err_t esp_wifi_remote_get_max_tx_power(int8_t *power);
9696
esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid);
9797
esp_err_t esp_hosted_ota(const char* image_url);
9898

99-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
99+
#if H_WIFI_DUALBAND_SUPPORT
100100
esp_err_t esp_wifi_remote_set_band(wifi_band_t band);
101101
esp_err_t esp_wifi_remote_get_band(wifi_band_t *band);
102102
esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode);

host/api/esp_wifi_weak.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "esp_hosted_api.h"
23+
#include "esp_hosted_wifi_config.h"
2324

2425
#define WEAK __attribute__((weak))
2526

@@ -223,7 +224,7 @@ WEAK esp_err_t esp_wifi_sta_get_rssi(int *rssi)
223224
return esp_wifi_remote_sta_get_rssi(rssi);
224225
}
225226

226-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
227+
#if H_WIFI_DUALBAND_SUPPORT
227228
WEAK esp_err_t esp_wifi_set_band(wifi_band_t band)
228229
{
229230
return esp_wifi_remote_set_band(band);

host/drivers/bt/vhci_drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ void hci_drv_show_configuration(void)
121121
* - HCI_H4_xxx type should be set in esp_payload_header.hci_pkt_type
122122
*/
123123

124-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 3, 0)
124+
#if H_BT_ENABLE_LL_INIT
125125
void ble_transport_ll_init(void)
126126
{
127127
}

host/drivers/rpc/core/rpc_req.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "rpc_common.h"
77
#include "adapter.h"
88
#include "esp_log.h"
9+
#include "esp_hosted_wifi_config.h"
910

1011
DEFINE_LOG_TAG(rpc_req);
1112

@@ -415,7 +416,7 @@ int compose_rpc_req(Rpc *req, ctrl_cmd_t *app_req, int32_t *failure_status)
415416
rpc__req__wifi_get_protocol__init);
416417
req_payload->ifx = app_req->u.wifi_protocol.ifx;
417418
break;
418-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
419+
#if H_WIFI_DUALBAND_SUPPORT
419420
} case RPC_ID__Req_WifiSetProtocols: {
420421
RPC_ALLOC_ASSIGN(RpcReqWifiSetProtocols, req_wifi_set_protocols,
421422
rpc__req__wifi_set_protocols__init);

host/drivers/rpc/core/rpc_rsp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "rpc_slave_if.h"
66
#include "adapter.h"
77
#include "esp_log.h"
8+
#include "esp_hosted_wifi_config.h"
89

910
DEFINE_LOG_TAG(rpc_rsp);
1011

@@ -522,7 +523,7 @@ int rpc_parse_rsp(Rpc *rpc_msg, ctrl_cmd_t *app_resp)
522523
app_resp->u.wifi_sta_get_aid.aid =
523524
rpc_msg->resp_wifi_sta_get_aid->aid;
524525
break;
525-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
526+
#if H_WIFI_DUALBAND_SUPPORT
526527
} case RPC_ID__Resp_WifiSetProtocols: {
527528
RPC_FAIL_ON_NULL(resp_wifi_set_protocols);
528529
RPC_ERR_IN_RESP(resp_wifi_set_protocols);

host/drivers/rpc/slaveif/rpc_slave_if.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
#include "rpc_slave_if.h"
88
#include "rpc_core.h"
9-
9+
#include "esp_hosted_wifi_config.h"
1010
#include "esp_log.h"
1111

1212
DEFINE_LOG_TAG(rpc_api);
@@ -364,7 +364,7 @@ ctrl_cmd_t * wifi_set_protocols(ctrl_cmd_t *req)
364364
RPC_DECODE_RSP_IF_NOT_ASYNC();
365365
}
366366

367-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
367+
#if H_WIFI_DUALBAND_SUPPORT
368368
ctrl_cmd_t * wifi_get_protocols(ctrl_cmd_t *req)
369369
{
370370
RPC_SEND_REQ(RPC_ID__Req_WifiGetProtocols);

host/drivers/rpc/slaveif/rpc_slave_if.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "esp_hosted_rpc.pb-c.h"
1414
#include "esp_wifi.h"
1515
#include "esp_wifi_types.h"
16+
#include "esp_hosted_wifi_config.h"
1617

1718
#ifdef __cplusplus
1819
extern "C" {
@@ -223,7 +224,7 @@ typedef struct Ctrl_cmd_t {
223224

224225
rpc_wifi_sta_get_aid_t wifi_sta_get_aid;
225226

226-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
227+
#if H_WIFI_DUALBAND_SUPPORT
227228
rpc_wifi_protocols_t wifi_protocols;
228229

229230
rpc_wifi_bandwidths_t wifi_bandwidths;

host/drivers/rpc/wrap/rpc_wrap.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#include "rpc_common.h"
3131
#include "esp_log.h"
3232
#include "esp_http_client.h"
33+
#include "esp_hosted_wifi_config.h"
3334

3435
DEFINE_LOG_TAG(rpc_wrap);
3536
static char* OTA_TAG = "h_ota";
@@ -1094,7 +1095,7 @@ esp_err_t rpc_wifi_sta_get_aid(uint16_t *aid)
10941095
return rpc_rsp_callback(resp);
10951096
}
10961097

1097-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
1098+
#if H_WIFI_DUALBAND_SUPPORT
10981099
esp_err_t rpc_wifi_set_band(wifi_band_t band)
10991100
{
11001101
/* implemented synchronous */

host/drivers/rpc/wrap/rpc_wrap.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ extern "C" {
2424
/** Includes **/
2525
#include "common.h"
2626
#include "esp_wifi.h"
27+
#include "esp_hosted_wifi_config.h"
2728

2829
/** Exported variables **/
2930

@@ -78,7 +79,7 @@ esp_err_t rpc_wifi_get_max_tx_power(int8_t *power);
7879
esp_err_t rpc_wifi_sta_get_aid(uint16_t *aid);
7980
esp_err_t rpc_ota(const char* image_url);
8081

81-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
82+
#if H_WIFI_DUALBAND_SUPPORT
8283
esp_err_t rpc_wifi_set_band(wifi_band_t band);
8384
esp_err_t rpc_wifi_get_band(wifi_band_t *band);
8485
esp_err_t rpc_wifi_set_band_mode(wifi_band_mode_t band_mode);

0 commit comments

Comments
 (0)