Skip to content

Commit

Permalink
Merge branch 'bugfix/handle_usb_disconnect' into 'master'
Browse files Browse the repository at this point in the history
fix: Callback when USB port is disconnected, USB port not experimental anymore

Closes ESF-174

See merge request espressif/esp-serial-flasher!126
  • Loading branch information
DNedic committed Nov 4, 2024
2 parents b49d250 + 53fb930 commit 8ece286
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ menu "ESP serial flasher"
bool "SPI (Only supports downloading to RAM)"

config SERIAL_FLASHER_INTERFACE_USB
bool "USB (Experimental)"
bool "USB"

endchoice

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Supported **target** microcontrollers:
Supported hardware interfaces:
- UART
- SPI (only for RAM download)
- USB CDC ACM (experimental)
- USB CDC ACM

For example usage check the [examples](/examples) directory.

Expand Down
4 changes: 2 additions & 2 deletions port/esp32_usb_cdc_acm_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ static void handle_usb_event(const cdc_acm_host_dev_event_data_t *event, void *u

case CDC_ACM_HOST_DEVICE_DISCONNECTED:
ESP_LOGI(TAG, "Device disconnected");
esp_loader_error_t deinit_status = loader_port_esp32_usb_cdc_acm_deinit();
assert(deinit_status == ESP_LOADER_SUCCESS);
if (s_device_disconnected_callback != NULL) {
s_device_disconnected_callback();
}
esp_loader_error_t deinit_status = loader_port_esp32_usb_cdc_acm_deinit();
assert(deinit_status == ESP_LOADER_SUCCESS);
break;

case CDC_ACM_HOST_SERIAL_STATE:
Expand Down

0 comments on commit 8ece286

Please sign in to comment.