mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-31 19:24:43 +02:00
Merge pull request #568 from david-cermak/bump/wifi_remote_with_eppp
[wifi-remote]: Updated eppp dependency and more WiFi functions
This commit is contained in:
@@ -3,6 +3,6 @@ commitizen:
|
|||||||
bump_message: 'bump(wifi_remote): $current_version -> $new_version'
|
bump_message: 'bump(wifi_remote): $current_version -> $new_version'
|
||||||
pre_bump_hooks: python ../../ci/changelog.py esp_wifi_remote
|
pre_bump_hooks: python ../../ci/changelog.py esp_wifi_remote
|
||||||
tag_format: wifi_remote-v$version
|
tag_format: wifi_remote-v$version
|
||||||
version: 0.2.0
|
version: 0.2.1
|
||||||
version_files:
|
version_files:
|
||||||
- idf_component.yml
|
- idf_component.yml
|
||||||
|
@@ -1,5 +1,12 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [0.2.1](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.1)
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
- Added misc wifi API in eppp impl ([93256d1](https://github.com/espressif/esp-protocols/commit/93256d1))
|
||||||
|
- Updated eppp dependency not to use fixed version ([3a48c06](https://github.com/espressif/esp-protocols/commit/3a48c06))
|
||||||
|
|
||||||
## [0.2.0](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.0)
|
## [0.2.0](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.2.0)
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
@@ -295,3 +295,24 @@ extern "C" esp_err_t esp_wifi_remote_set_mode(wifi_mode_t mode)
|
|||||||
ESP_RETURN_ON_ERROR(instance.send(api_id::SET_MODE, &mode), TAG, "Failed to send request");
|
ESP_RETURN_ON_ERROR(instance.send(api_id::SET_MODE, &mode), TAG, "Failed to send request");
|
||||||
return instance.get_resp<esp_err_t>(api_id::SET_MODE);
|
return instance.get_resp<esp_err_t>(api_id::SET_MODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern "C" esp_err_t esp_wifi_remote_deinit(void)
|
||||||
|
{
|
||||||
|
std::lock_guard<Sync> lock(instance.sync);
|
||||||
|
ESP_RETURN_ON_ERROR(instance.send(api_id::DEINIT), TAG, "Failed to send request");
|
||||||
|
return instance.get_resp<esp_err_t>(api_id::DEINIT);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" esp_err_t esp_wifi_remote_disconnect(void)
|
||||||
|
{
|
||||||
|
std::lock_guard<Sync> lock(instance.sync);
|
||||||
|
ESP_RETURN_ON_ERROR(instance.send(api_id::DISCONNECT), TAG, "Failed to send request");
|
||||||
|
return instance.get_resp<esp_err_t>(api_id::DISCONNECT);
|
||||||
|
}
|
||||||
|
|
||||||
|
extern "C" esp_err_t esp_wifi_remote_set_storage(wifi_storage_t storage)
|
||||||
|
{
|
||||||
|
std::lock_guard<Sync> lock(instance.sync);
|
||||||
|
ESP_RETURN_ON_ERROR(instance.send(api_id::SET_STORAGE, &storage), TAG, "Failed to send request");
|
||||||
|
return instance.get_resp<esp_err_t>(api_id::SET_STORAGE);
|
||||||
|
}
|
||||||
|
@@ -18,12 +18,15 @@ enum class api_id : uint32_t {
|
|||||||
ERROR,
|
ERROR,
|
||||||
UNDEF,
|
UNDEF,
|
||||||
INIT,
|
INIT,
|
||||||
|
DEINIT,
|
||||||
SET_MODE,
|
SET_MODE,
|
||||||
SET_CONFIG,
|
SET_CONFIG,
|
||||||
START,
|
START,
|
||||||
STOP,
|
STOP,
|
||||||
CONNECT,
|
CONNECT,
|
||||||
|
DISCONNECT,
|
||||||
GET_MAC,
|
GET_MAC,
|
||||||
|
SET_STORAGE,
|
||||||
WIFI_EVENT,
|
WIFI_EVENT,
|
||||||
IP_EVENT,
|
IP_EVENT,
|
||||||
};
|
};
|
||||||
|
@@ -164,6 +164,36 @@ private:
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case api_id::DISCONNECT: {
|
||||||
|
if (header.size != 0) {
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto ret = esp_wifi_disconnect();
|
||||||
|
if (rpc.send(api_id::DISCONNECT, &ret) != ESP_OK) {
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case api_id::DEINIT: {
|
||||||
|
if (header.size != 0) {
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
|
||||||
|
auto ret = esp_wifi_deinit();
|
||||||
|
if (rpc.send(api_id::DEINIT, &ret) != ESP_OK) {
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case api_id::SET_STORAGE: {
|
||||||
|
auto req = rpc.get_payload<wifi_storage_t>(api_id::SET_STORAGE, header);
|
||||||
|
auto ret = esp_wifi_set_storage(req);
|
||||||
|
if (rpc.send(api_id::SET_STORAGE, &ret) != ESP_OK) {
|
||||||
|
return ESP_FAIL;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
case api_id::GET_MAC: {
|
case api_id::GET_MAC: {
|
||||||
auto req = rpc.get_payload<wifi_interface_t>(api_id::GET_MAC, header);
|
auto req = rpc.get_payload<wifi_interface_t>(api_id::GET_MAC, header);
|
||||||
esp_wifi_remote_mac_t resp = {};
|
esp_wifi_remote_mac_t resp = {};
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
espressif/eppp_link: "^0.0.1"
|
|
||||||
esp_wifi_remote:
|
esp_wifi_remote:
|
||||||
version: "*"
|
version: "*"
|
||||||
override_path: ../../..
|
override_path: ../../..
|
||||||
|
@@ -1,5 +1,4 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
espressif/eppp_link: "^0.0.1"
|
|
||||||
esp_wifi_remote:
|
esp_wifi_remote:
|
||||||
version: "*"
|
version: "*"
|
||||||
override_path: ../../..
|
override_path: ../../..
|
||||||
|
@@ -1,9 +1,9 @@
|
|||||||
version: 0.2.0
|
version: 0.2.1
|
||||||
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_wifi_remote
|
url: https://github.com/espressif/esp-protocols/tree/master/components/esp_wifi_remote
|
||||||
description: Utility wrapper for esp_wifi functionality on remote targets
|
description: Utility wrapper for esp_wifi functionality on remote targets
|
||||||
dependencies:
|
dependencies:
|
||||||
espressif/eppp_link:
|
espressif/eppp_link:
|
||||||
version: '0.0.1'
|
version: '>=0.1'
|
||||||
idf:
|
idf:
|
||||||
version: '>=5.3'
|
version: '>=5.3'
|
||||||
# espressif/esp_hosted:
|
# espressif/esp_hosted:
|
||||||
|
Reference in New Issue
Block a user