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