Linux port: VFS to init termux, W-no-format for linux only

This commit is contained in:
David Cermak
2021-05-19 07:28:40 +02:00
parent ac475f2560
commit 61f264f97a
2 changed files with 9 additions and 2 deletions

View File

@ -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()

View File

@ -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",