Skip to content

Commit

Permalink
added common file to include structure that that are not required to …
Browse files Browse the repository at this point in the history
…be set by the user
  • Loading branch information
Rocketct committed Oct 31, 2024
1 parent 8f19721 commit e7f8565
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/ModbusT1SCommon.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#ifndef _MODBUS_T1S_COMMON_H_INCLUDED
#define _MODBUS_T1S_COMMON_H_INCLUDED
#if (defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_UNOR4_MINIMA))
#include <Arduino_10BASE_T1S.h>

#define UDP_READ_COIL_PORT 1
#define UDP_WRITE_COIL_PORT 2
#define UDP_READ_DI_PORT 3
#define UDP_READ_IR_PORT 4
#define UDP_READ_HR_PORT 5
#define UDP_WRITE_HR_PORT 6

auto const tc6_io = new TC6::TC6_Io
( SPI
, CS_PIN
, RESET_PIN
, IRQ_PIN);
auto const tc6_inst = new TC6::TC6_Arduino_10BASE_T1S(tc6_io);
#endif
#endif

0 comments on commit e7f8565

Please sign in to comment.