File tree 1 file changed +11
-0
lines changed
1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -116,7 +116,18 @@ void WifiConfig(uint8_t type)
116
116
}
117
117
}
118
118
119
+ #ifdef CONFIG_IDF_TARGET_ESP32C3
120
+ // https://github.com/espressif/arduino-esp32/issues/6264#issuecomment-1040147331
121
+ // There's an include for this but it doesn't define the function if it doesn't think it needs it, so manually declare the function
122
+ extern " C" void phy_bbpll_en_usb (bool en);
123
+ #endif // CONFIG_IDF_TARGET_ESP32C3
124
+
119
125
void WifiSetMode (WiFiMode_t wifi_mode) {
126
+ #ifdef CONFIG_IDF_TARGET_ESP32C3
127
+ // https://github.com/espressif/arduino-esp32/issues/6264#issuecomment-1094376906
128
+ // This brings the USB serial-jtag back to life. Suggest doing this immediately after wifi startup.
129
+ phy_bbpll_en_usb (true );
130
+ #endif // CONFIG_IDF_TARGET_ESP32C3
120
131
if (WiFi.getMode () == wifi_mode) { return ; }
121
132
122
133
if (wifi_mode != WIFI_OFF) {
You can’t perform that action at this time.
0 commit comments