File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11#ifndef _ARDUINO_RS485_DEFS_H_INCLUDED
22#define _ARDUINO_RS485_DEFS_H_INCLUDED
33
4+ #ifndef RS485_DEFAULT_TX_PIN
45#ifdef PIN_SERIAL1_TX
56#define RS485_DEFAULT_TX_PIN PIN_SERIAL1_TX
67#else
7- #define RS485_DEFAULT_TX_PIN 1
8+ #define RS485_DEFAULT_TX_PIN 1
9+ #endif
810#endif
911
1012#ifdef __AVR__
1113#define RS485_DEFAULT_DE_PIN 2
1214#define RS485_DEFAULT_RE_PIN -1
1315#elif defined(ESP32 ) || defined(ESP8266 )
16+ #ifndef RS485_DEFAULT_DE_PIN
1417#define RS485_DEFAULT_DE_PIN 0
18+ #endif
19+ #ifndef RS485_DEFAULT_RE_PIN
1520#define RS485_DEFAULT_RE_PIN 0
21+ #endif
1622#else
1723#define RS485_DEFAULT_DE_PIN A6
1824#define RS485_DEFAULT_RE_PIN A5
2632#define RS485_SER_CONF_TYPE uint16_t
2733#endif
2834
29-
3035#define RS485_DEFAULT_PRE_DELAY 50
3136#define RS485_DEFAULT_POST_DELAY 50
3237
You can’t perform that action at this time.
0 commit comments