File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ bool Serial_::setup(USBSetup& setup)
155
155
// auto-reset into the bootloader is triggered when the port, already
156
156
// open at 1200 bps, is closed. We check DTR state to determine if host
157
157
// port is open (bit 0 of lineState).
158
- if (_usbLineInfo.dwDTERate == 1200 && (_usbLineInfo.lineState & 0x01 ) == 0 )
158
+ if (_usbLineInfo.dwDTERate == 1200 && (_usbLineInfo.lineState & CDC_LINESTATE_DTR ) == 0 )
159
159
{
160
160
initiateReset (250 );
161
161
}
@@ -331,11 +331,11 @@ uint8_t Serial_::numbits() {
331
331
}
332
332
333
333
bool Serial_::dtr () {
334
- return _usbLineInfo.lineState & 0x1 ;
334
+ return (( _usbLineInfo.lineState & CDC_LINESTATE_DTR) == CDC_LINESTATE_DTR) ;
335
335
}
336
336
337
337
bool Serial_::rts () {
338
- return _usbLineInfo.lineState & 0x2 ;
338
+ return (( _usbLineInfo.lineState & CDC_LINESTATE_RTS) == CDC_LINESTATE_RTS) ;
339
339
}
340
340
341
341
Serial_ SerialUSB (USBDevice);
You can’t perform that action at this time.
0 commit comments