Skip to content

Commit

Permalink
fix: real/virt transport initialization for esp32s3
Browse files Browse the repository at this point in the history
  • Loading branch information
nullptr committed Apr 1, 2024
1 parent ee2a130 commit 48988e5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions core/el_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ typedef enum {
EL_TRANSPORT_UART,
EL_TRANSPORT_SPI,
EL_TRANSPORT_I2C,
EL_TRANSPORT_MQTT
} el_transport_type_t;

#ifdef __cplusplus
Expand Down
1 change: 1 addition & 0 deletions porting/espressif/el_device_esp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ void DeviceEsp::init() {
static SerialEsp serial{
usb_serial_jtag_driver_config_t{.tx_buffer_size = 8192, .rx_buffer_size = 8192}
};
serial.type = EL_TRANSPORT_UART;
this->_transports.emplace_front(&serial);

static NetworkEsp network{};
Expand Down
2 changes: 1 addition & 1 deletion sscma/callback/wifi.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ static int32_t wifi_status = 0;
static in4_info_t in4_info{};
static in6_info_t in6_info{};
} // namespace shared_variables
#endif

void set_wifi_ver(const std::vector<std::string>& argv, void* caller) {
shared_variables::wifi_ver = argv[1];
Expand All @@ -41,6 +40,7 @@ void get_wifi_ver(const std::string& cmd, void* caller) {
"\"}}\n")};
static_cast<Transport*>(caller)->send_bytes(ss.c_str(), ss.size());
}
#endif

void set_wifi_network(const std::vector<std::string>& argv, void* caller, bool called_by_event = false) {
auto ret = EL_OK;
Expand Down
2 changes: 2 additions & 0 deletions sscma/static_resource.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ class StaticResource final {

static auto v_mqtt{MQTT(wifi)};
mqtt = &v_mqtt;
mqtt->type = EL_TRANSPORT_MQTT;
#endif

static auto v_instance{Server()};
Expand Down Expand Up @@ -159,6 +160,7 @@ class StaticResource final {
case EL_TRANSPORT_I2C:
reinterpret_cast<Wire*>(transport)->init();
break;
case EL_TRANSPORT_MQTT:
default:
break;
}
Expand Down

0 comments on commit 48988e5

Please sign in to comment.