[FL-3113] BadUSB: disable CDC mode, USB mode switch fix (#2394)

This commit is contained in:
Nikolay Minaylov
2023-02-13 18:43:29 +03:00
committed by GitHub
parent d0c6c3402c
commit bc06d407f3
4 changed files with 12 additions and 5 deletions

View File

@@ -490,8 +490,6 @@ static int32_t bad_usb_worker(void* context) {
BadUsbWorkerState worker_state = BadUsbStateInit;
int32_t delay_val = 0;
FuriHalUsbInterface* usb_mode_prev = furi_hal_usb_get_config();
FURI_LOG_I(WORKER_TAG, "Init");
File* script_file = storage_file_alloc(furi_record_open(RECORD_STORAGE));
bad_usb->line = furi_string_alloc();
@@ -642,8 +640,6 @@ static int32_t bad_usb_worker(void* context) {
furi_hal_hid_set_state_callback(NULL, NULL);
furi_hal_usb_set_config(usb_mode_prev, NULL);
storage_file_close(script_file);
storage_file_free(script_file);
furi_string_free(bad_usb->line);