File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ bool CDC_Setup(USBSetup &setup)
119
119
// auto-reset into the bootloader is triggered when the port, already
120
120
// open at 1200 bps, is closed. We check DTR state to determine if host
121
121
// port is open (bit 0 of lineState).
122
- if (_usbLineInfo.dwDTERate == 1200 && (_usbLineInfo.lineState & 0x01 ) == 0 )
122
+ if (_usbLineInfo.dwDTERate == 1200 && (_usbLineInfo.lineState & CDC_LINESTATE_DTR ) == 0 )
123
123
{
124
124
initiateReset (250 );
125
125
}
@@ -278,12 +278,12 @@ uint8_t Serial_::numbits()
278
278
279
279
bool Serial_::dtr ()
280
280
{
281
- return _usbLineInfo.lineState & 0x1 ;
281
+ return _usbLineInfo.lineState & CDC_LINESTATE_DTR ;
282
282
}
283
283
284
284
bool Serial_::rts ()
285
285
{
286
- return _usbLineInfo.lineState & 0x2 ;
286
+ return _usbLineInfo.lineState & CDC_LINESTATE_RTS ;
287
287
}
288
288
289
289
// This operator is a convenient way for a sketch to check whether the
You can’t perform that action at this time.
0 commit comments