Skip to content

Commit ab27879

Browse files
committed
added common file to include structure that that are not required to be set by the user
1 parent 7adc945 commit ab27879

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

src/ModbusT1SCommon.h

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#ifndef _MODBUS_T1S_COMMON_H_INCLUDED
2+
#define _MODBUS_T1S_COMMON_H_INCLUDED
3+
#if (defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_UNOR4_MINIMA))
4+
#include <Arduino_10BASE_T1S.h>
5+
6+
enum ModbusT1SFunctionCode {
7+
UDP_READ_COIL_PORT = 1,
8+
UDP_WRITE_COIL_PORT,
9+
UDP_READ_DI_PORT,
10+
UDP_READ_IR_PORT,
11+
UDP_READ_HR_PORT,
12+
UDP_WRITE_HR_PORT
13+
};
14+
15+
auto const tc6_io = new TC6::TC6_Io
16+
( SPI
17+
, CS_PIN
18+
, RESET_PIN
19+
, IRQ_PIN);
20+
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
21+
#endif
22+
#endif

0 commit comments

Comments
 (0)