Skip to content

Commit 555322a

Browse files
committed
Merge branch 'fix/build_release/v5.3' into 'feature/esp_as_mcu_host'
fix the build for release/v5.3 See merge request app-frameworks/esp_hosted!511
2 parents 0d54404 + c3fd09f commit 555322a

File tree

3 files changed

+41
-22
lines changed

3 files changed

+41
-22
lines changed

idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "0.0.14"
1+
version: "0.0.15"
22
description: ESP-Hosted provides driver such that any host can re-use ESP chipset as Wi-Fi or Bluetooth co-processor.
33
url: https://github.com/espressif/esp-hosted/tree/feature/esp_as_mcu_host
44
examples:

slave/main/slave_control.c

Lines changed: 32 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1603,6 +1603,7 @@ static esp_err_t req_wifi_sta_get_aid(Rpc *req, Rpc *resp, void *priv_data)
16031603

16041604
static esp_err_t req_wifi_set_protocols(Rpc *req, Rpc *resp, void *priv_data)
16051605
{
1606+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16061607
RPC_TEMPLATE(RpcRespWifiSetProtocols, resp_wifi_set_protocols,
16071608
RpcReqWifiSetProtocols, req_wifi_set_protocols,
16081609
rpc__resp__wifi_set_protocols__init);
@@ -1613,24 +1614,23 @@ static esp_err_t req_wifi_set_protocols(Rpc *req, Rpc *resp, void *priv_data)
16131614
ifx = req_payload->ifx;
16141615
resp_payload->ifx = ifx;
16151616

1616-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16171617
wifi_protocols_t protocols;
16181618
protocols.ghz_2g = req_payload->protocols->ghz_2g;
16191619
protocols.ghz_5g = req_payload->protocols->ghz_5g;
16201620

16211621
ESP_LOGI(TAG, "set protocols: ghz_2g %d, ghz_5g %d", protocols.ghz_2g, protocols.ghz_5g);
16221622

16231623
RPC_RET_FAIL_IF(esp_wifi_set_protocols(ifx, &protocols));
1624-
#else
1625-
// not implemented
1626-
resp_payload->resp = ESP_FAIL;
1627-
#endif
16281624

16291625
return ESP_OK;
1626+
#else
1627+
return ESP_FAIL;
1628+
#endif
16301629
}
16311630

16321631
static esp_err_t req_wifi_get_protocols(Rpc *req, Rpc *resp, void *priv_data)
16331632
{
1633+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16341634
RPC_TEMPLATE(RpcRespWifiGetProtocols, resp_wifi_get_protocols,
16351635
RpcReqWifiGetProtocols, req_wifi_get_protocols,
16361636
rpc__resp__wifi_get_protocols__init);
@@ -1639,7 +1639,6 @@ static esp_err_t req_wifi_get_protocols(Rpc *req, Rpc *resp, void *priv_data)
16391639
ifx = req_payload->ifx;
16401640
resp_payload->ifx = ifx;
16411641

1642-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16431642
wifi_protocols_t protocols;
16441643

16451644
RPC_RET_FAIL_IF(esp_wifi_get_protocols(ifx, &protocols));
@@ -1649,17 +1648,17 @@ static esp_err_t req_wifi_get_protocols(Rpc *req, Rpc *resp, void *priv_data)
16491648
resp_payload->protocols->ghz_5g = protocols.ghz_5g;
16501649

16511650
ESP_LOGI(TAG, "get protocols: ghz_2g %d, ghz_5g %d", protocols.ghz_2g, protocols.ghz_5g);
1651+
err:
1652+
return ESP_OK;
16521653
#else
1653-
// not implemented
1654-
resp_payload->resp = ESP_FAIL;
1654+
return ESP_FAIL;
16551655
#endif
16561656

1657-
err:
1658-
return ESP_OK;
16591657
}
16601658

16611659
static esp_err_t req_wifi_set_bandwidths(Rpc *req, Rpc *resp, void *priv_data)
16621660
{
1661+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16631662
RPC_TEMPLATE(RpcRespWifiSetBandwidths, resp_wifi_set_bandwidths,
16641663
RpcReqWifiSetBandwidths, req_wifi_set_bandwidths,
16651664
rpc__resp__wifi_set_bandwidths__init);
@@ -1670,7 +1669,6 @@ static esp_err_t req_wifi_set_bandwidths(Rpc *req, Rpc *resp, void *priv_data)
16701669
ifx = req_payload->ifx;
16711670
resp_payload->ifx = ifx;
16721671

1673-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16741672
wifi_bandwidths_t bw;
16751673

16761674
bw.ghz_2g = req_payload->bandwidths->ghz_2g;
@@ -1679,16 +1677,16 @@ static esp_err_t req_wifi_set_bandwidths(Rpc *req, Rpc *resp, void *priv_data)
16791677
ESP_LOGI(TAG, "set bandwidths: ghz_2g %d, ghz_5g %d", bw.ghz_2g, bw.ghz_5g);
16801678

16811679
RPC_RET_FAIL_IF(esp_wifi_set_bandwidths(ifx, &bw));
1682-
#else
1683-
// not implemented
1684-
resp_payload->resp = ESP_FAIL;
1685-
#endif
16861680

16871681
return ESP_OK;
1682+
#else
1683+
return ESP_FAIL;
1684+
#endif
16881685
}
16891686

16901687
static esp_err_t req_wifi_get_bandwidths(Rpc *req, Rpc *resp, void *priv_data)
16911688
{
1689+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
16921690
RPC_TEMPLATE(RpcRespWifiGetBandwidths, resp_wifi_get_bandwidths,
16931691
RpcReqWifiGetBandwidths, req_wifi_get_bandwidths,
16941692
rpc__resp__wifi_get_bandwidths__init);
@@ -1697,7 +1695,6 @@ static esp_err_t req_wifi_get_bandwidths(Rpc *req, Rpc *resp, void *priv_data)
16971695
ifx = req_payload->ifx;
16981696
resp_payload->ifx = ifx;
16991697

1700-
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
17011698
wifi_bandwidths_t bw;
17021699

17031700
RPC_RET_FAIL_IF(esp_wifi_get_bandwidths(ifx, &bw));
@@ -1708,17 +1705,16 @@ static esp_err_t req_wifi_get_bandwidths(Rpc *req, Rpc *resp, void *priv_data)
17081705
resp_payload->bandwidths->ghz_5g = bw.ghz_5g;
17091706

17101707
ESP_LOGI(TAG, "get bandwidths: ghz_2g %d, ghz_5g %d", bw.ghz_2g, bw.ghz_5g);
1711-
#else
1712-
// not implemented
1713-
resp_payload->resp = ESP_FAIL;
1714-
#endif
1715-
17161708
err:
17171709
return ESP_OK;
1710+
#else
1711+
return ESP_FAIL;
1712+
#endif
17181713
}
17191714

17201715
static esp_err_t req_wifi_set_band(Rpc *req, Rpc *resp, void *priv_data)
17211716
{
1717+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
17221718
RPC_TEMPLATE(RpcRespWifiSetBand, resp_wifi_set_band,
17231719
RpcReqWifiSetBand, req_wifi_set_band,
17241720
rpc__resp__wifi_set_band__init);
@@ -1731,10 +1727,14 @@ static esp_err_t req_wifi_set_band(Rpc *req, Rpc *resp, void *priv_data)
17311727
RPC_RET_FAIL_IF(esp_wifi_set_band(band));
17321728

17331729
return ESP_OK;
1730+
#else
1731+
return ESP_FAIL;
1732+
#endif
17341733
}
17351734

17361735
static esp_err_t req_wifi_get_band(Rpc *req, Rpc *resp, void *priv_data)
17371736
{
1737+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
17381738
RPC_TEMPLATE_SIMPLE(RpcRespWifiGetBand, resp_wifi_get_band,
17391739
RpcReqWifiGetBand, req_wifi_get_band,
17401740
rpc__resp__wifi_get_band__init);
@@ -1747,10 +1747,14 @@ static esp_err_t req_wifi_get_band(Rpc *req, Rpc *resp, void *priv_data)
17471747
ESP_LOGW(TAG, "get band: %d", band);
17481748

17491749
return ESP_OK;
1750+
#else
1751+
return ESP_FAIL;
1752+
#endif
17501753
}
17511754

17521755
static esp_err_t req_wifi_set_band_mode(Rpc *req, Rpc *resp, void *priv_data)
17531756
{
1757+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
17541758
RPC_TEMPLATE(RpcRespWifiSetBandMode, resp_wifi_set_bandmode,
17551759
RpcReqWifiSetBandMode, req_wifi_set_bandmode,
17561760
rpc__resp__wifi_set_band_mode__init);
@@ -1763,10 +1767,14 @@ static esp_err_t req_wifi_set_band_mode(Rpc *req, Rpc *resp, void *priv_data)
17631767
RPC_RET_FAIL_IF(esp_wifi_set_band_mode(band_mode));
17641768

17651769
return ESP_OK;
1770+
#else
1771+
return ESP_FAIL;
1772+
#endif
17661773
}
17671774

17681775
static esp_err_t req_wifi_get_band_mode(Rpc *req, Rpc *resp, void *priv_data)
17691776
{
1777+
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
17701778
RPC_TEMPLATE_SIMPLE(RpcRespWifiGetBandMode, resp_wifi_get_bandmode,
17711779
RpcReqWifiGetBandMode, req_wifi_get_bandmode,
17721780
rpc__resp__wifi_get_band_mode__init);
@@ -1779,6 +1787,9 @@ static esp_err_t req_wifi_get_band_mode(Rpc *req, Rpc *resp, void *priv_data)
17791787
ESP_LOGW(TAG, "get band_mode: %d", band_mode);
17801788

17811789
return ESP_OK;
1790+
#else
1791+
return ESP_FAIL;
1792+
#endif
17821793
}
17831794

17841795
#if 0

slave/sdkconfig.defaults.esp32c5

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
1+
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
2+
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
3+
4+
# BT Configuration
5+
CONFIG_BT_ENABLED=y
6+
CONFIG_BT_CONTROLLER_ONLY=y
7+
CONFIG_BT_BLUEDROID_ENABLED=
8+
CONFIG_BT_LE_SLEEP_ENABLE=y
19
CONFIG_PARTITION_TABLE_CUSTOM=y
210
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.esp32c5.csv"

0 commit comments

Comments
 (0)