mirror of
https://github.com/DarkFlippers/unleashed-firmware.git
synced 2025-12-12 04:34:43 +04:00
Furi, USB, BLE, Debug: various bug fixes and improvements (#4114)
* Furi, USB, BLE: extra stack space for some threads, small code cleanup. * Furi: thread watermark check on exit, explicitly crash if built with LIB_DEBUG=1 * Debug: color logging in apps/furi gdb helper, check and show crash message in gdb console.
This commit is contained in:
@@ -183,7 +183,7 @@ static int32_t usb_uart_worker(void* context) {
|
||||
usb_uart->usb_mutex = furi_mutex_alloc(FuriMutexTypeNormal);
|
||||
|
||||
usb_uart->tx_thread =
|
||||
furi_thread_alloc_ex("UsbUartTxWorker", 512, usb_uart_tx_thread, usb_uart);
|
||||
furi_thread_alloc_ex("UsbUartTxWorker", 768, usb_uart_tx_thread, usb_uart);
|
||||
|
||||
usb_uart_vcp_init(usb_uart, usb_uart->cfg.vcp_ch);
|
||||
usb_uart_serial_init(usb_uart, usb_uart->cfg.uart_ch);
|
||||
@@ -288,8 +288,6 @@ static int32_t usb_uart_worker(void* context) {
|
||||
usb_uart_update_ctrl_lines(usb_uart);
|
||||
}
|
||||
}
|
||||
usb_uart_vcp_deinit(usb_uart, usb_uart->cfg.vcp_ch);
|
||||
usb_uart_serial_deinit(usb_uart);
|
||||
|
||||
furi_hal_gpio_init(USB_USART_DE_RE_PIN, GpioModeAnalog, GpioPullNo, GpioSpeedLow);
|
||||
|
||||
@@ -302,6 +300,9 @@ static int32_t usb_uart_worker(void* context) {
|
||||
furi_thread_join(usb_uart->tx_thread);
|
||||
furi_thread_free(usb_uart->tx_thread);
|
||||
|
||||
usb_uart_vcp_deinit(usb_uart, usb_uart->cfg.vcp_ch);
|
||||
usb_uart_serial_deinit(usb_uart);
|
||||
|
||||
furi_stream_buffer_free(usb_uart->rx_stream);
|
||||
furi_mutex_free(usb_uart->usb_mutex);
|
||||
furi_semaphore_free(usb_uart->tx_sem);
|
||||
|
||||
Reference in New Issue
Block a user