Просмотр исходного кода

Merge magspoof from https://github.com/xMasterX/all-the-plugins

Willy-JL 1 год назад
Родитель
Сommit
ad18564009
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      magspoof/scenes/mag_scene_read.c

+ 4 - 0
magspoof/scenes/mag_scene_read.c

@@ -175,6 +175,10 @@ void mag_scene_read_on_exit(void* context) {
 
     // Stop UART worker
     FURI_LOG_D(TAG, "Stopping UART worker");
+    furi_hal_serial_async_rx_stop(mag->serial_handle);
+    furi_hal_serial_deinit(mag->serial_handle);
+    furi_hal_serial_control_release(mag->serial_handle);
+
     furi_thread_flags_set(furi_thread_get_id(mag->uart_rx_thread), WorkerEvtStop);
     furi_thread_join(mag->uart_rx_thread);
     furi_thread_free(mag->uart_rx_thread);