mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-29 18:27:31 +02:00
Linux port: VFS to init termux, W-no-format for linux only
This commit is contained in:
@ -33,4 +33,7 @@ idf_component_register(SRCS "${srcs}"
|
||||
|
||||
target_compile_features(${COMPONENT_LIB} PRIVATE cxx_std_17)
|
||||
|
||||
set_target_properties(${COMPONENT_LIB} PROPERTIES COMPILE_FLAGS -Wno-format)
|
||||
if(${target} STREQUAL "linux")
|
||||
# This is needed for ESP_LOGx() macros, as integer formats differ on ESP32(..) and x64
|
||||
set_target_properties(${COMPONENT_LIB} PROPERTIES COMPILE_FLAGS -Wno-format)
|
||||
endif()
|
||||
|
@ -8,11 +8,14 @@
|
||||
#include "esp_modem_config.h"
|
||||
#include "esp_netif.h"
|
||||
|
||||
|
||||
#define CONFIG_EXAMPLE_SIM_PIN "1234"
|
||||
|
||||
using namespace esp_modem;
|
||||
|
||||
[[maybe_unused]] static const char *TAG = "linux_modem_main";
|
||||
|
||||
#define CONFIG_EXAMPLE_SIM_PIN "1234"
|
||||
|
||||
int main()
|
||||
{
|
||||
|
||||
@ -25,6 +28,7 @@ int main()
|
||||
.vfs_config = { }
|
||||
};
|
||||
dte_config.vfs_config.dev_name = "/dev/ttyUSB0";
|
||||
dte_config.vfs_config.resource = ESP_MODEM_VFS_IS_UART; // This tells the VFS to init the UART (use termux to setup baudrate, etc.)
|
||||
|
||||
esp_netif_config_t netif_config = {
|
||||
.dev_name = "/dev/net/tun",
|
||||
|
Reference in New Issue
Block a user