File tree 1 file changed +11
-8
lines changed
1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change 30
30
#endif
31
31
#endif
32
32
33
+ #ifdef CUSTOM_RS485_DEFAULT_DE_PIN
34
+ #define RS485_DEFAULT_DE_PIN CUSTOM_RS485_DEFAULT_DE_PIN
35
+ #endif
36
+
37
+ #ifdef CUSTOM_RS485_DEFAULT_RE_PIN
38
+ #define RS485_DEFAULT_RE_PIN CUSTOM_RS485_DEFAULT_RE_PIN
39
+ #endif
40
+
41
+ #if !defined(RS485_DEFAULT_DE_PIN) && !defined(RS485_DEFAULT_RE_PIN)
33
42
#ifdef __AVR__
34
43
#define RS485_DEFAULT_DE_PIN 2
35
44
#define RS485_DEFAULT_RE_PIN -1
40
49
#define RS485_DEFAULT_DE_PIN A4
41
50
#define RS485_DEFAULT_RE_PIN A5
42
51
#elif defined(ARDUINO_UNOR4_WIFI) || defined(ARDUINO_UNOR4_MINIMA)
43
- #define SERIAL_PORT_HARDWARE Serial1
44
52
#define RS485_DEFAULT_DE_PIN 8
45
53
#define RS485_DEFAULT_RE_PIN 7
46
54
#else
47
- #ifndef RS485_DEFAULT_DE_PIN
48
55
#define RS485_DEFAULT_DE_PIN A6
49
56
#define RS485_DEFAULT_RE_PIN A5
50
57
#endif
51
58
#endif
52
59
53
- #ifdef CUSTOM_RS485_DEFAULT_DE_PIN
54
- # define RS485_DEFAULT_DE_PIN CUSTOM_RS485_DEFAULT_DE_PIN
55
- #endif
56
-
57
- #ifdef CUSTOM_RS485_DEFAULT_RE_PIN
58
- # define RS485_DEFAULT_RE_PIN CUSTOM_RS485_DEFAULT_RE_PIN
60
+ #if !defined(ARDUINO_UNOR4_WIFI) || !defined(ARDUINO_UNOR4_MINIMA)
61
+ #define SERIAL_PORT_HARDWARE Serial1
59
62
#endif
60
63
61
64
#define RS485_DEFAULT_PRE_DELAY 50
You can’t perform that action at this time.
0 commit comments