From 423f6c2918a9d2e8d53e2f6214274df921057a4a Mon Sep 17 00:00:00 2001 From: Razvalyaev Date: Mon, 3 Nov 2025 20:52:02 +0300 Subject: [PATCH] 0.1.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - исправлена интеграция с библиотекой MyLibs - добавлено обхъявление MODBUS_SlaveStart в заголовочный файл --- Inc/modbus.h | 3 ++- Inc/rs_message.h | 20 +++++++++++--------- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/Inc/modbus.h b/Inc/modbus.h index 568bf1d..e05c225 100644 --- a/Inc/modbus.h +++ b/Inc/modbus.h @@ -86,7 +86,8 @@ MODBUS_SlaveStart(&hmodbus1, NULL); void MODBUS_SetupHardware(RS_HandleTypeDef *hmodbus, UART_HandleTypeDef *huart, TIM_HandleTypeDef *htim); /* Программная конфигурация модбас. */ void MODBUS_Config(RS_HandleTypeDef *hmodbus, uint8_t ID, uint16_t Timeout, uint8_t master); - +/* Запуск слейв устройства */ +void MODBUS_SlaveStart(RS_HandleTypeDef *hmodbus, RS_MsgTypeDef *modbus_msg); /** MODBUS_INIT_FUNCTIONS * @} */ diff --git a/Inc/rs_message.h b/Inc/rs_message.h index 994d532..6afe650 100644 --- a/Inc/rs_message.h +++ b/Inc/rs_message.h @@ -87,7 +87,15 @@ #define RS_EnableTransmit() #endif -#ifndef __MYLIBS_INCLUDE_H_ +#ifndef printf_rs_err +#define printf_rs_err(...) +#endif + +#ifndef printf_rs +#define printf_rs(...) +#endif + +#ifndef __MYLIBS_CONFIG_H_ // дефайны из mylibs include static int dummy; #define TrackerTypeDef(num_user_vars) void * @@ -110,14 +118,8 @@ static int dummy; #define TrackerClear_Warn(_cntstruct_) #define TrackerClear_User(_cntstruct_) #define TrackerClear_UserAll(_cntstruct_) - -#ifndef printf_rs_err -#define printf_rs_err(...) -#endif - -#ifndef printf_rs -#define printf_rs(...) -#endif +#else +#include "mylibs_include.h" #endif #ifndef RS_USER_VARS_NUMB