From 090b1ff845a84a0fcc2a915a7a1a8bb557d959cd Mon Sep 17 00:00:00 2001 From: David Cermak Date: Wed, 20 Nov 2024 10:25:20 +0100 Subject: [PATCH] fix(modem): Fix typo GENETIC -> GENERIC in mode types Closes https://github.com/espressif/esp-protocols/issues/667 --- components/esp_modem/include/esp_modem_c_api_types.h | 6 +++++- components/esp_modem/include/esp_private/c_api_wrapper.hpp | 2 +- components/esp_modem/src/esp_modem_c_api.cpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/components/esp_modem/include/esp_modem_c_api_types.h b/components/esp_modem/include/esp_modem_c_api_types.h index c8086b8af1..d061045e9a 100644 --- a/components/esp_modem/include/esp_modem_c_api_types.h +++ b/components/esp_modem/include/esp_modem_c_api_types.h @@ -13,6 +13,10 @@ extern "C" { #endif +/* Compatibility macro to be removed in v2.0 + */ +#define ESP_MODEM_DCE_GENETIC ESP_MODEM_DCE_GENERIC + typedef struct esp_modem_dce_wrap esp_modem_dce_t; typedef struct esp_modem_PdpContext_t { @@ -47,7 +51,7 @@ typedef enum esp_modem_dce_mode { * @brief DCE devices: Enum list of supported devices */ typedef enum esp_modem_dce_device { - ESP_MODEM_DCE_GENETIC, /**< The most generic device */ + ESP_MODEM_DCE_GENERIC, /**< The most generic device */ ESP_MODEM_DCE_SIM7600, ESP_MODEM_DCE_SIM7070, ESP_MODEM_DCE_SIM7000, diff --git a/components/esp_modem/include/esp_private/c_api_wrapper.hpp b/components/esp_modem/include/esp_private/c_api_wrapper.hpp index 75cbede18e..7a60304e9d 100644 --- a/components/esp_modem/include/esp_private/c_api_wrapper.hpp +++ b/components/esp_modem/include/esp_private/c_api_wrapper.hpp @@ -44,7 +44,7 @@ inline dce_factory::ModemType convert_modem_enum(esp_modem_dce_device_t module) case ESP_MODEM_DCE_SIM800: return esp_modem::dce_factory::ModemType::SIM800; default: - case ESP_MODEM_DCE_GENETIC: + case ESP_MODEM_DCE_GENERIC: return esp_modem::dce_factory::ModemType::GenericModule; } } diff --git a/components/esp_modem/src/esp_modem_c_api.cpp b/components/esp_modem/src/esp_modem_c_api.cpp index 9b64e83c0a..4d1fa62919 100644 --- a/components/esp_modem/src/esp_modem_c_api.cpp +++ b/components/esp_modem/src/esp_modem_c_api.cpp @@ -60,7 +60,7 @@ extern "C" esp_modem_dce_t *esp_modem_new_dev(esp_modem_dce_device_t module, con extern "C" esp_modem_dce_t *esp_modem_new(const esp_modem_dte_config_t *dte_config, const esp_modem_dce_config_t *dce_config, esp_netif_t *netif) { - return esp_modem_new_dev(ESP_MODEM_DCE_GENETIC, dte_config, dce_config, netif); + return esp_modem_new_dev(ESP_MODEM_DCE_GENERIC, dte_config, dce_config, netif); } extern "C" void esp_modem_destroy(esp_modem_dce_t *dce_wrap)