From bc2c08ad94e8dd1db50dbce07561e84eab1e41fb Mon Sep 17 00:00:00 2001 From: aleks Date: Mon, 18 Sep 2023 12:56:42 +0200 Subject: [PATCH] modbus expose port headers --- CMakeLists.txt | 2 +- Kconfig | 6 +++--- freemodbus/modbus/include/mbport.h | 2 -- freemodbus/port/port.h | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e97758e..98bfc7c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,7 +43,7 @@ set(srcs "common/esp_modbus_master_serial.c" "common/esp_modbus_slave_serial.c") -set(include_dirs common/include port modbus/include) +set(include_dirs common/include modbus/include port) # Add the modbus/include to public include path set(priv_include_dirs common modbus modbus/ascii modbus/functions modbus/rtu modbus/tcp) diff --git a/Kconfig b/Kconfig index 8edf820..4b5d020 100644 --- a/Kconfig +++ b/Kconfig @@ -213,11 +213,11 @@ menu "Modbus configuration" handler into IRAM to prevent delays related to processing of UART events. config FMB_FUNC_HANDLERS_MAX - int "Number " + int "The maximum number of modbus function handlers" range 0 100 default 16 help - Modbus stack event queue timeout in milliseconds. This may help to optimize - Modbus stack event processing time. + Maximum namber of Modbus function handlers in function handler list. + It allows to register additional custom function handlers for master and slave accordingly. endmenu diff --git a/freemodbus/modbus/include/mbport.h b/freemodbus/modbus/include/mbport.h index a5408f1..c5e9ff2 100644 --- a/freemodbus/modbus/include/mbport.h +++ b/freemodbus/modbus/include/mbport.h @@ -149,8 +149,6 @@ void vMBPortClose( void ); void xMBPortSerialClose( void ); -//eMBErrorCode eMBRegisterCB( UCHAR ucFunctionCode, pxMBFunctionHandler pxHandler ); - void vMBPortSerialEnable( BOOL xRxEnable, BOOL xTxEnable ); BOOL xMBPortSerialGetByte( CHAR * pucByte ); diff --git a/freemodbus/port/port.h b/freemodbus/port/port.h index 061b098..0f8cc02 100644 --- a/freemodbus/port/port.h +++ b/freemodbus/port/port.h @@ -50,8 +50,8 @@ #include "driver/timer.h" #endif -//#include "mbconfig.h" -#include "sdkconfig.h" +#include "mbconfig.h" +//#include "sdkconfig.h" #define INLINE inline #define PR_BEGIN_EXTERN_C extern "C" {