Skip to content

Commit e7f8565

Browse files
committed
added common file to include structure that that are not required to be set by the user
1 parent 8f19721 commit e7f8565

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/ModbusT1SCommon.h

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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+
#define UDP_READ_COIL_PORT 1
7+
#define UDP_WRITE_COIL_PORT 2
8+
#define UDP_READ_DI_PORT 3
9+
#define UDP_READ_IR_PORT 4
10+
#define UDP_READ_HR_PORT 5
11+
#define UDP_WRITE_HR_PORT 6
12+
13+
auto const tc6_io = new TC6::TC6_Io
14+
( SPI
15+
, CS_PIN
16+
, RESET_PIN
17+
, IRQ_PIN);
18+
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
19+
#endif
20+
#endif

0 commit comments

Comments
 (0)