File tree 1 file changed +7
-2
lines changed
1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 1
1
#ifndef _ARDUINO_RS485_DEFS_H_INCLUDED
2
2
#define _ARDUINO_RS485_DEFS_H_INCLUDED
3
3
4
+ #ifndef RS485_DEFAULT_TX_PIN
4
5
#ifdef PIN_SERIAL1_TX
5
6
#define RS485_DEFAULT_TX_PIN PIN_SERIAL1_TX
6
7
#else
7
- #define RS485_DEFAULT_TX_PIN 1
8
+ #define RS485_DEFAULT_TX_PIN 1
9
+ #endif
8
10
#endif
9
11
10
12
#ifdef __AVR__
11
13
#define RS485_DEFAULT_DE_PIN 2
12
14
#define RS485_DEFAULT_RE_PIN -1
13
15
#elif defined(ESP32 ) || defined(ESP8266 )
16
+ #ifndef RS485_DEFAULT_DE_PIN
14
17
#define RS485_DEFAULT_DE_PIN 0
18
+ #endif
19
+ #ifndef RS485_DEFAULT_RE_PIN
15
20
#define RS485_DEFAULT_RE_PIN 0
21
+ #endif
16
22
#else
17
23
#define RS485_DEFAULT_DE_PIN A6
18
24
#define RS485_DEFAULT_RE_PIN A5
26
32
#define RS485_SER_CONF_TYPE uint16_t
27
33
#endif
28
34
29
-
30
35
#define RS485_DEFAULT_PRE_DELAY 50
31
36
#define RS485_DEFAULT_POST_DELAY 50
32
37
You can’t perform that action at this time.
0 commit comments