Commit 5fab4db 1 parent d7812bc commit 5fab4db Copy full SHA for 5fab4db
File tree 1 file changed +14
-3
lines changed
1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -142,11 +142,22 @@ unsigned long _timingReceiveEnd; // when the last incoming byte was received
142
142
#endif
143
143
144
144
145
- // formats for serial transmission, already defined in "Arduino.h"->"HardwareSerial.h"
146
- #define SERIAL_8N1 ((0 <<USBSn) | (0 <<UPMn0) | (3 <<UCSZn0))
145
+ // The formats for serial transmission, already defined in `Arduino.h` -> `HardwareSerial.h`
146
+ // We do not include `HardwareSerial.h` but home it's still there in future version.
147
+ // If not, here are the required values:
148
+
149
+ #ifndef SERIAL_8N2
147
150
#define SERIAL_8N2 ((1 <<USBSn) | (0 <<UPMn0) | (3 <<UCSZn0))
151
+ #endif
152
+
153
+ #ifndef SERIAL_8E1
148
154
#define SERIAL_8E1 ((0 <<USBSn) | (2 <<UPMn0) | (3 <<UCSZn0))
149
- #define SERIAL_8E2 ((1 <<USBSn) | (2 <<UPMn0) | (3 <<UCSZn0))
155
+ #endif
156
+
157
+ // not needed by DMXSerial2:
158
+ // #define SERIAL_8N1 ((0<<USBSn) | (0<<UPMn0) | (3<<UCSZn0))
159
+ // #define SERIAL_8E2 ((1<<USBSn) | (2<<UPMn0) | (3<<UCSZn0))
160
+
150
161
151
162
// the break timing is 10 bits (start + 8 data + parity) of this speed
152
163
// the mark-after-break is 1 bit of this speed plus approx 6 usec
You can’t perform that action at this time.
0 commit comments