Skip to content

Commit 6959a41

Browse files
authored
fix: HWCDC pin number
Fixes HW Serial pin setup. The pins were set up to the wrong value and it could not be correctly configured and used.
1 parent 2479efb commit 6959a41

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cores/esp32/HWCDC.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ void HWCDC::begin(unsigned long baud)
246246
return;
247247
}
248248
// Setting USB D+ D- pins
249-
uint8_t pin = ESP32_BUS_TYPE_USB_DM;
249+
uint8_t pin = USB_DM_GPIO_NUM;
250250
if(perimanGetPinBusType(pin) != ESP32_BUS_TYPE_INIT){
251251
if(!perimanClearPinBus(pin)){
252252
goto err;
@@ -255,7 +255,7 @@ void HWCDC::begin(unsigned long baud)
255255
if(!perimanSetPinBus(pin, ESP32_BUS_TYPE_USB_DM, (void *) this, -1, -1)){
256256
goto err;
257257
}
258-
pin = ESP32_BUS_TYPE_USB_DP;
258+
pin = USB_DP_GPIO_NUM;
259259
if(perimanGetPinBusType(pin) != ESP32_BUS_TYPE_INIT){
260260
if(!perimanClearPinBus(pin)){
261261
goto err;

0 commit comments

Comments
 (0)