Перенос заглушек в modbus_compat и заготовки для TCP
This commit is contained in:
16
Inc/modbus.h
16
Inc/modbus.h
@@ -28,7 +28,7 @@
|
||||
#include "modbus.h"
|
||||
|
||||
MODBUS_FirstInit(&hmodbus1, &huart1, &htim3);
|
||||
MODBUS_Config(&hmodbus1, 1, 1000, MODBUS_MODE_SLAVE);
|
||||
MODBUS_Config(&hmodbus1, MODBUS_DEVICE_ID, MODBUS_TIMEOUT, MODBUS_MODE_SLAVE);
|
||||
MODBUS_SlaveStart(&hmodbus1, NULL);
|
||||
@endverbatim
|
||||
@verbatim
|
||||
@@ -84,13 +84,27 @@
|
||||
#define __MODBUS_H_
|
||||
|
||||
#include "rs_message.h"
|
||||
#ifdef MODBUS_ENABLE_MASTER
|
||||
#include "modbus_master.h"
|
||||
#endif
|
||||
#ifdef MODBUS_ENABLE_SLAVE
|
||||
#include "modbus_slave.h"
|
||||
#endif
|
||||
#ifdef MODBUS_ENABLE_COILS
|
||||
#include "modbus_coils.h"
|
||||
#endif
|
||||
#ifdef MODBUS_ENABLE_HOLDINGS
|
||||
#include "modbus_holdregs.h"
|
||||
#endif
|
||||
#ifdef MODBUS_ENABLE_INPUTS
|
||||
#include "modbus_inputregs.h"
|
||||
#endif
|
||||
#ifdef MODBUS_ENABLE_DEVICE_IDENTIFICATIONS
|
||||
#include "modbus_devid.h"
|
||||
#endif
|
||||
#ifdef MODBUS_ENABLE_DIAGNOSTICS
|
||||
#include "modbus_diag.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef MODBUS_ENABLE_MASTER
|
||||
|
||||
Reference in New Issue
Block a user