Skip to content

Commit

Permalink
Merge branch 'idf_ci_fix' into 'feature/esp_as_mcu_host'
Browse files Browse the repository at this point in the history
fix(idf): fix ci pipeline for 5.3

See merge request app-frameworks/esp_hosted!492
  • Loading branch information
mantriyogesh committed Aug 30, 2024
2 parents b4e3536 + 771eb3e commit f071123
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion host/api/esp_hosted_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid)
return rpc_wifi_sta_get_aid(aid);
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t esp_wifi_remote_set_band(wifi_band_t band)
{
return rpc_wifi_set_band(band);
Expand All @@ -399,7 +400,6 @@ esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode)
return rpc_wifi_get_band_mode(band_mode);
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
{
return rpc_wifi_set_protocols(ifx, protocols);
Expand Down
8 changes: 4 additions & 4 deletions host/api/esp_hosted_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,6 @@ esp_err_t esp_wifi_remote_get_country(wifi_country_t *country);
esp_err_t esp_wifi_remote_ap_get_sta_list(wifi_sta_list_t *sta);
esp_err_t esp_wifi_remote_ap_get_sta_aid(const uint8_t mac[6], uint16_t *aid);
esp_err_t esp_wifi_remote_sta_get_rssi(int *rssi);
esp_err_t esp_wifi_remote_set_band(wifi_band_t band);
esp_err_t esp_wifi_remote_get_band(wifi_band_t *band);
esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode);
esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode);
esp_err_t esp_wifi_remote_set_protocol(wifi_interface_t ifx, uint8_t protocol_bitmap);
esp_err_t esp_wifi_remote_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap);
esp_err_t esp_wifi_remote_set_max_tx_power(int8_t power);
Expand All @@ -101,6 +97,10 @@ esp_err_t esp_wifi_remote_sta_get_aid(uint16_t *aid);
esp_err_t esp_hosted_ota(const char* image_url);

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t esp_wifi_remote_set_band(wifi_band_t band);
esp_err_t esp_wifi_remote_get_band(wifi_band_t *band);
esp_err_t esp_wifi_remote_set_band_mode(wifi_band_mode_t band_mode);
esp_err_t esp_wifi_remote_get_band_mode(wifi_band_mode_t *band_mode);
esp_err_t esp_wifi_remote_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
esp_err_t esp_wifi_remote_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
esp_err_t esp_wifi_remote_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw);
Expand Down
2 changes: 1 addition & 1 deletion host/api/esp_wifi_weak.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ WEAK esp_err_t esp_wifi_sta_get_rssi(int *rssi)
return esp_wifi_remote_sta_get_rssi(rssi);
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
WEAK esp_err_t esp_wifi_set_band(wifi_band_t band)
{
return esp_wifi_remote_set_band(band);
Expand All @@ -243,7 +244,6 @@ WEAK esp_err_t esp_wifi_get_band_mode(wifi_band_mode_t *band_mode)
return esp_wifi_remote_get_band_mode(band_mode);
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
WEAK esp_err_t esp_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
{
return esp_wifi_remote_set_protocols(ifx, protocols);
Expand Down
2 changes: 2 additions & 0 deletions host/drivers/rpc/core/rpc_req.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,7 @@ int compose_rpc_req(Rpc *req, ctrl_cmd_t *app_req, int32_t *failure_status)
rpc__req__wifi_get_protocol__init);
req_payload->ifx = app_req->u.wifi_protocol.ifx;
break;
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
} case RPC_ID__Req_WifiSetProtocols: {
RPC_ALLOC_ASSIGN(RpcReqWifiSetProtocols, req_wifi_set_protocols,
rpc__req__wifi_set_protocols__init);
Expand Down Expand Up @@ -453,6 +454,7 @@ int compose_rpc_req(Rpc *req, ctrl_cmd_t *app_req, int32_t *failure_status)
rpc__req__wifi_set_band_mode__init);
req_payload->bandmode = app_req->u.wifi_band_mode;
break;
#endif
} default: {
*failure_status = RPC_ERR_UNSUPPORTED_MSG;
ESP_LOGE(TAG, "Unsupported RPC Req[%u]",req->msg_id);
Expand Down
2 changes: 2 additions & 0 deletions host/drivers/rpc/core/rpc_rsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -522,6 +522,7 @@ int rpc_parse_rsp(Rpc *rpc_msg, ctrl_cmd_t *app_resp)
app_resp->u.wifi_sta_get_aid.aid =
rpc_msg->resp_wifi_sta_get_aid->aid;
break;
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
} case RPC_ID__Resp_WifiSetProtocols: {
RPC_FAIL_ON_NULL(resp_wifi_set_protocols);
RPC_ERR_IN_RESP(resp_wifi_set_protocols);
Expand Down Expand Up @@ -574,6 +575,7 @@ int rpc_parse_rsp(Rpc *rpc_msg, ctrl_cmd_t *app_resp)
app_resp->u.wifi_band_mode =
rpc_msg->resp_wifi_get_bandmode->bandmode;
break;
#endif
} default: {
ESP_LOGE(TAG, "Unsupported rpc Resp[%u]", rpc_msg->msg_id);
goto fail_parse_rpc_msg;
Expand Down
2 changes: 2 additions & 0 deletions host/drivers/rpc/slaveif/rpc_slave_if.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ ctrl_cmd_t * wifi_set_protocols(ctrl_cmd_t *req)
RPC_DECODE_RSP_IF_NOT_ASYNC();
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
ctrl_cmd_t * wifi_get_protocols(ctrl_cmd_t *req)
{
RPC_SEND_REQ(RPC_ID__Req_WifiGetProtocols);
Expand Down Expand Up @@ -405,3 +406,4 @@ ctrl_cmd_t * wifi_get_band_mode(ctrl_cmd_t *req)
RPC_SEND_REQ(RPC_ID__Req_WifiGetBandMode);
RPC_DECODE_RSP_IF_NOT_ASYNC();
}
#endif
2 changes: 2 additions & 0 deletions host/drivers/rpc/slaveif/rpc_slave_if.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,15 @@ typedef struct Ctrl_cmd_t {

rpc_wifi_sta_get_aid_t wifi_sta_get_aid;

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
rpc_wifi_protocols_t wifi_protocols;

rpc_wifi_bandwidths_t wifi_bandwidths;

wifi_band_t wifi_band;

wifi_band_mode_t wifi_band_mode;
#endif

event_heartbeat_t e_heartbeat;

Expand Down
2 changes: 1 addition & 1 deletion host/drivers/rpc/wrap/rpc_wrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,6 +1094,7 @@ esp_err_t rpc_wifi_sta_get_aid(uint16_t *aid)
return rpc_rsp_callback(resp);
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t rpc_wifi_set_band(wifi_band_t band)
{
/* implemented synchronous */
Expand Down Expand Up @@ -1144,7 +1145,6 @@ esp_err_t rpc_wifi_get_band_mode(wifi_band_mode_t *band_mode)
return rpc_rsp_callback(resp);
}

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t rpc_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols)
{
/* implemented synchronous */
Expand Down
6 changes: 3 additions & 3 deletions host/drivers/rpc/wrap/rpc_wrap.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ esp_err_t rpc_wifi_get_protocol(wifi_interface_t ifx, uint8_t *protocol_bitmap);
esp_err_t rpc_wifi_set_max_tx_power(int8_t power);
esp_err_t rpc_wifi_get_max_tx_power(int8_t *power);
esp_err_t rpc_wifi_sta_get_aid(uint16_t *aid);
esp_err_t rpc_ota(const char* image_url);

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t rpc_wifi_set_band(wifi_band_t band);
esp_err_t rpc_wifi_get_band(wifi_band_t *band);
esp_err_t rpc_wifi_set_band_mode(wifi_band_mode_t band_mode);
esp_err_t rpc_wifi_get_band_mode(wifi_band_mode_t *band_mode);
esp_err_t rpc_ota(const char* image_url);

#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 4, 0)
esp_err_t rpc_wifi_set_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
esp_err_t rpc_wifi_get_protocols(wifi_interface_t ifx, wifi_protocols_t *protocols);
esp_err_t rpc_wifi_set_bandwidths(wifi_interface_t ifx, wifi_bandwidths_t *bw);
Expand Down
2 changes: 1 addition & 1 deletion idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "0.0.10"
version: "0.0.11"
description: ESP-Hosted provides driver such that any host can re-use ESP chipset as Wi-Fi or Bluetooth co-processor.
url: https://github.com/espressif/esp-hosted/tree/feature/esp_as_mcu_host
examples:
Expand Down

0 comments on commit f071123

Please sign in to comment.