Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/console/Commands/NetworkCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static void on_ping_end(esp_ping_handle_t hdl, void *args)
} else {
printf("\n--- %s ping statistics ---", inet6_ntoa(*ip_2_ip6(&target_addr)));
}
printf("%"PRIu32" packets transmitted, %"PRIu32" received, %"PRIu32"%% packet loss, time %"PRIu32"ms",
printf("%" PRIu32 " packets transmitted, %" PRIu32 " received, %" PRIu32 "%% packet loss, time %" PRIu32 "ms",
transmitted, received, loss, total_time_ms);
// delete the ping sessions, so that we clean up all resources and can create a new ping session
// we don't have to call delete function in the callback, instead we can call delete function from other tasks
Expand Down
8 changes: 4 additions & 4 deletions lib/console/Commands/XFERCommands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ std::string read_until(char delimiter)
while (byte != delimiter)
{
size_t size = 0;
uart_get_buffered_data_len(CONSOLE_UART, &size);
uart_get_buffered_data_len((uart_port_t)CONSOLE_UART, &size);
if (size > 0)
{
int result = uart_read_bytes(CONSOLE_UART, &byte, 1, MAX_READ_WAIT_TICKS);
int result = uart_read_bytes((uart_port_t)CONSOLE_UART, &byte, 1, MAX_READ_WAIT_TICKS);
if (result < 1)
{
fprintf(stdout, "3 Error: Response Timeout\r\n");
Expand Down Expand Up @@ -75,10 +75,10 @@ int rx(int argc, char **argv)
while (count < size)
{
size_t size = 0;
uart_get_buffered_data_len(CONSOLE_UART, &size);
uart_get_buffered_data_len((uart_port_t)CONSOLE_UART, &size);
if (size > 0)
{
int result = uart_read_bytes(CONSOLE_UART, &byte, 1, MAX_READ_WAIT_TICKS);
int result = uart_read_bytes((uart_port_t)CONSOLE_UART, &byte, 1, MAX_READ_WAIT_TICKS);
if (result < 1)
break;

Expand Down
14 changes: 7 additions & 7 deletions lib/console/Console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ namespace ESP32Console
this->uart_channel_ = channel;

//Reinit the UART driver if the channel was already in use
if (uart_is_driver_installed(channel)) {
uart_driver_delete(channel);
if (uart_is_driver_installed((uart_port_t)channel)) {
uart_driver_delete((uart_port_t)channel);
}

/* Drain stdout before reconfiguring it */
Expand Down Expand Up @@ -157,21 +157,21 @@ namespace ESP32Console
};


ESP_ERROR_CHECK(uart_param_config(channel, &uart_config));
ESP_ERROR_CHECK(uart_param_config((uart_port_t)channel, &uart_config));

// Set the correct pins for the UART of needed
if (rxPin > 0 || txPin > 0) {
if (rxPin < 0 || txPin < 0) {
Debug_printv("Both rxPin and txPin has to be passed!");
}
uart_set_pin(channel, txPin, rxPin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
uart_set_pin((uart_port_t)channel, txPin, rxPin, UART_PIN_NO_CHANGE, UART_PIN_NO_CHANGE);
}

/* Install UART driver for interrupt-driven reads and writes */
ESP_ERROR_CHECK(uart_driver_install(channel, 256, 0, 0, NULL, 0));
ESP_ERROR_CHECK(uart_driver_install((uart_port_t)channel, 256, 0, 0, NULL, 0));

/* Tell VFS to use UART driver */
esp_vfs_dev_uart_use_driver(channel);
esp_vfs_dev_uart_use_driver((uart_port_t)channel);

esp_console_config_t console_config = {
.max_cmdline_length = max_cmdline_len_,
Expand Down Expand Up @@ -272,7 +272,7 @@ namespace ESP32Console
//Debug_printv("Interpolated line: [%s]\n", interpolated_line.c_str());

// Flush trailing CR
uart_flush(CONSOLE_UART);
uart_flush((uart_port_t)CONSOLE_UART);

/* Try to run the command */
int ret;
Expand Down
2 changes: 1 addition & 1 deletion lib/console/ute/ute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#define _DEFAULT_SOURCE
#define _BSD_SOURCE
#define _GNU_SOURCE
//#define _GNU_SOURCE

#include "ute.h"

Expand Down
2 changes: 1 addition & 1 deletion platformio-ini-files/platformio.common.ini
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ extra_scripts =
pre:build_version.py
pre:build_webui.py
; post:build_firmwarezip.py ; Optional, build firmware ZIP file for flash tool
lib_ldf_mode = deep+
lib_ldf_mode = off ; off chain deep chain+ deep+
board_build.filesystem = littlefs

; COM1, /dev/ttyUSB0, /dev/tty.SLAB_USBtoUART etc.
Expand Down
2 changes: 1 addition & 1 deletion platformio-sample.ini
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ extra_scripts =
pre:build_version.py
pre:build_webui.py
; post:build_firmwarezip.py ; Optional, build firmware ZIP file for flash tool
lib_ldf_mode = deep+
lib_ldf_mode = off ; off chain deep chain+ deep+
upload_speed = 460800 ;921600
;upload_port = COM1 ; Windows
upload_port = /dev/ttyUSB0 ; Linux/WSL
Expand Down
176 changes: 172 additions & 4 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,174 @@
# This file was automatically generated for projects
# without default 'CMakeLists.txt' file.
cmake_minimum_required(VERSION 3.16.0)

FILE(GLOB_RECURSE app_sources ${CMAKE_SOURCE_DIR}/src/*.*)
set(INCLUDES
${CMAKE_SOURCE_DIR}/include
${CMAKE_SOURCE_DIR}/include/pinmap

idf_component_register(SRCS ${app_sources})
${CMAKE_SOURCE_DIR}/lib/bus
${CMAKE_SOURCE_DIR}/lib/bus/adamnet
${CMAKE_SOURCE_DIR}/lib/bus/comlynx
${CMAKE_SOURCE_DIR}/lib/bus/cx16_i2c
${CMAKE_SOURCE_DIR}/lib/bus/drivewire
${CMAKE_SOURCE_DIR}/lib/bus/h89
${CMAKE_SOURCE_DIR}/lib/bus/iec
${CMAKE_SOURCE_DIR}/lib/bus/iwm
${CMAKE_SOURCE_DIR}/lib/bus/mac
${CMAKE_SOURCE_DIR}/lib/bus/rc2014bus
${CMAKE_SOURCE_DIR}/lib/bus/rc2014sio
${CMAKE_SOURCE_DIR}/lib/bus/rs232
${CMAKE_SOURCE_DIR}/lib/bus/s100spi
${CMAKE_SOURCE_DIR}/lib/bus/sio

${CMAKE_SOURCE_DIR}/lib/clock
${CMAKE_SOURCE_DIR}/lib/compat
${CMAKE_SOURCE_DIR}/lib/config

${CMAKE_SOURCE_DIR}/lib/console
${CMAKE_SOURCE_DIR}/lib/console/Commands
${CMAKE_SOURCE_DIR}/lib/console/cxxopts
${CMAKE_SOURCE_DIR}/lib/console/Helpers
${CMAKE_SOURCE_DIR}/lib/console/improv
${CMAKE_SOURCE_DIR}/lib/console/ute

${CMAKE_SOURCE_DIR}/lib/device
${CMAKE_SOURCE_DIR}/lib/device/adamnet
${CMAKE_SOURCE_DIR}/lib/device/comlynx
${CMAKE_SOURCE_DIR}/lib/device/cx16_i2c
${CMAKE_SOURCE_DIR}/lib/device/drivewire
${CMAKE_SOURCE_DIR}/lib/device/h89
${CMAKE_SOURCE_DIR}/lib/device/iec
${CMAKE_SOURCE_DIR}/lib/device/iwm
${CMAKE_SOURCE_DIR}/lib/device/mac
${CMAKE_SOURCE_DIR}/lib/device/rc2014
${CMAKE_SOURCE_DIR}/lib/device/rs232
${CMAKE_SOURCE_DIR}/lib/device/s100spi
${CMAKE_SOURCE_DIR}/lib/device/sio

${CMAKE_SOURCE_DIR}/lib/devrelay
${CMAKE_SOURCE_DIR}/lib/devrelay/commands
${CMAKE_SOURCE_DIR}/lib/devrelay/service
${CMAKE_SOURCE_DIR}/lib/devrelay/slip
${CMAKE_SOURCE_DIR}/lib/devrelay/types

${CMAKE_SOURCE_DIR}/lib/display
${CMAKE_SOURCE_DIR}/lib/encoding
${CMAKE_SOURCE_DIR}/lib/encrypt
${CMAKE_SOURCE_DIR}/lib/FileSystem
${CMAKE_SOURCE_DIR}/lib/fn_esp_http_client
${CMAKE_SOURCE_DIR}/lib/fnjson
${CMAKE_SOURCE_DIR}/lib/ftp
${CMAKE_SOURCE_DIR}/lib/fuji
${CMAKE_SOURCE_DIR}/lib/hardware
${CMAKE_SOURCE_DIR}/lib/http
${CMAKE_SOURCE_DIR}/lib/meatloaf
${CMAKE_SOURCE_DIR}/lib/media
${CMAKE_SOURCE_DIR}/lib/modem-sniffer
${CMAKE_SOURCE_DIR}/lib/network-protocol
${CMAKE_SOURCE_DIR}/lib/printer-emulator
${CMAKE_SOURCE_DIR}/lib/qrcode
${CMAKE_SOURCE_DIR}/lib/runcpm
${CMAKE_SOURCE_DIR}/lib/sam
${CMAKE_SOURCE_DIR}/lib/task
${CMAKE_SOURCE_DIR}/lib/tcpip
${CMAKE_SOURCE_DIR}/lib/telnet
${CMAKE_SOURCE_DIR}/lib/tinyxml2
${CMAKE_SOURCE_DIR}/lib/TNFSlib
${CMAKE_SOURCE_DIR}/lib/utils
${CMAKE_SOURCE_DIR}/lib/webdav
)

FILE(GLOB_RECURSE SOURCES
${CMAKE_SOURCE_DIR}/src/*.cpp

${CMAKE_SOURCE_DIR}/lib/bus/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/adamnet/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/comlynx/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/cx16_i2c/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/drivewire/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/h89/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/iec/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/iwm/*.c
${CMAKE_SOURCE_DIR}/lib/bus/iwm/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/mac/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/rc2014bus/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/rc2014sio/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/rs232/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/s100spi/*.cpp
${CMAKE_SOURCE_DIR}/lib/bus/sio/*.cpp

${CMAKE_SOURCE_DIR}/lib/clock/*.cpp
${CMAKE_SOURCE_DIR}/lib/compat/*.c
${CMAKE_SOURCE_DIR}/lib/config/*.cpp

${CMAKE_SOURCE_DIR}/lib/console/*.cpp
${CMAKE_SOURCE_DIR}/lib/console/Commands/*.cpp
${CMAKE_SOURCE_DIR}/lib/console/ute/*.cpp
${CMAKE_SOURCE_DIR}/lib/console/improv/*.cpp
${CMAKE_SOURCE_DIR}/lib/console/Helpers/*.cpp

${CMAKE_SOURCE_DIR}/lib/device/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/adamnet/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/comlynx/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/cx16_i2c/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/drivewire/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/h89/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/iec/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/iwm/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/mac/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/rc2014/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/rs232/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/s100spi/*.cpp
${CMAKE_SOURCE_DIR}/lib/device/sio/*.cpp

${CMAKE_SOURCE_DIR}/lib/devrelay/*.cpp
${CMAKE_SOURCE_DIR}/lib/devrelay/commands/*.cpp
${CMAKE_SOURCE_DIR}/lib/devrelay/service/*.cpp
${CMAKE_SOURCE_DIR}/lib/devrelay/slip/*.cpp
${CMAKE_SOURCE_DIR}/lib/devrelay/types/*.cpp

${CMAKE_SOURCE_DIR}/lib/display/*.cpp
${CMAKE_SOURCE_DIR}/lib/encoding/*.cpp
${CMAKE_SOURCE_DIR}/lib/encrypt/*.cpp
${CMAKE_SOURCE_DIR}/lib/FileSystem/*.cpp
${CMAKE_SOURCE_DIR}/lib/fn_esp_http_client/*.cpp
${CMAKE_SOURCE_DIR}/lib/fnjson/*.cpp
${CMAKE_SOURCE_DIR}/lib/ftp/*.cpp
${CMAKE_SOURCE_DIR}/lib/fuji/*.cpp
${CMAKE_SOURCE_DIR}/lib/gpiox/*.cpp
${CMAKE_SOURCE_DIR}/lib/hardware/*.cpp
${CMAKE_SOURCE_DIR}/lib/http/*.cpp
${CMAKE_SOURCE_DIR}/lib/meatloaf/*.cpp
${CMAKE_SOURCE_DIR}/lib/media/*.cpp
${CMAKE_SOURCE_DIR}/lib/media/**/*.cpp
${CMAKE_SOURCE_DIR}/lib/modem-sniffer/*.cpp
${CMAKE_SOURCE_DIR}/lib/network-protocol/*.cpp
${CMAKE_SOURCE_DIR}/lib/printer-emulator/*.cpp
${CMAKE_SOURCE_DIR}/lib/qrcode/*.c
${CMAKE_SOURCE_DIR}/lib/qrcode/*.cpp
${CMAKE_SOURCE_DIR}/lib/sam/*.c
${CMAKE_SOURCE_DIR}/lib/sam/*.cpp
${CMAKE_SOURCE_DIR}/lib/task/*.cpp
${CMAKE_SOURCE_DIR}/lib/tcpip/*.cpp
${CMAKE_SOURCE_DIR}/lib/telnet/*.c
${CMAKE_SOURCE_DIR}/lib/tinyxml2/*.cpp
${CMAKE_SOURCE_DIR}/lib/TNFSlib/*.cpp
${CMAKE_SOURCE_DIR}/lib/utils/*.cpp
${CMAKE_SOURCE_DIR}/lib/webdav/*.cpp
)

idf_component_register(
INCLUDE_DIRS ${INCLUDES}
SRCS ${SOURCES}
PRIV_REQUIRES esp_driver_uart esp_netif esp_driver_gpio fatfs vfs json esp_wifi mbedtls console app_update spi_flash mlff esp_driver_ledc expat http_parser esp-tls tcp_transport esp_driver_gptimer esp_driver_tsens esp_http_client libssh
)

target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-value)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-variable)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-but-set-variable)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-function)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-parameter)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-const-variable)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-return-type)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-format-extra-args)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-implicit-fallthrough)
target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-missing-field-initializers)
Loading