Skip to content

Commit 05a35cd

Browse files
authored
Update cores/esp32/HWCDC.cpp
1 parent 631b7b7 commit 05a35cd

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

cores/esp32/HWCDC.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,11 @@ void HWCDC::begin(unsigned long baud)
254254
}
255255
if(!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DM, (void *) this, -1, -1)) goto err;
256256
pin = ESP32_BUS_TYPE_USB_DP;
257-
if(perimanGetPinBusType(pin) != ESP32_BUS_TYPE_INIT)
258-
if(!perimanClearPinBus(pin)) goto err;
257+
if(perimanGetPinBusType(pin) != ESP32_BUS_TYPE_INIT){
258+
if(!perimanClearPinBus(pin)){
259+
goto err;
260+
}
261+
}
259262
if(!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DP, (void *) this, -1, -1)) goto err;
260263
return;
261264

0 commit comments

Comments
 (0)