Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikolay Minaylov <nm29719@gmail.com>2021-11-11 19:17:50 +0300
committerGitHub <noreply@github.com>2021-11-11 19:17:50 +0300
commitb564e8eb3851d976f5e690aaaa13db7c653c7455 (patch)
treef4c1ba26a3e8dbee5d0c96fdc961ab9e7cd574bc /applications/gpio
parentac8b1457f27412ddd0aac065a7babc7818d5bb78 (diff)
[FL-2010] furi-hal-vcp rework (#812)
* [FL-2010] furi-hal-vcp rework * Fix connect state change on vcp enable * New thread naming scheme and stack size adjustment. * Applications: rename worker threads to match new naming scheme. Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
Diffstat (limited to 'applications/gpio')
-rw-r--r--applications/gpio/usb_uart_bridge.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/applications/gpio/usb_uart_bridge.c b/applications/gpio/usb_uart_bridge.c
index ff787ea7..9b43f643 100644
--- a/applications/gpio/usb_uart_bridge.c
+++ b/applications/gpio/usb_uart_bridge.c
@@ -8,11 +8,12 @@
#define USB_UART_RX_BUF_SIZE (USB_CDC_PKT_LEN * 5)
typedef enum {
- WorkerEvtStop = (1 << 0),
- WorkerEvtRxDone = (1 << 1),
+ WorkerEvtReserved = (1 << 0), // Reserved for StreamBuffer internal event
+ WorkerEvtStop = (1 << 1),
+ WorkerEvtRxDone = (1 << 2),
- WorkerEvtTxStop = (1 << 2),
- WorkerEvtCdcRx = (1 << 3),
+ WorkerEvtTxStop = (1 << 3),
+ WorkerEvtCdcRx = (1 << 4),
} WorkerEvtFlags;
#define WORKER_ALL_RX_EVENTS (WorkerEvtStop | WorkerEvtRxDone)
@@ -75,7 +76,7 @@ static int32_t usb_uart_worker(void* context) {
usb_uart->usb_mutex = osMutexNew(NULL);
usb_uart->tx_thread = furi_thread_alloc();
- furi_thread_set_name(usb_uart->tx_thread, "usb_uart_tx");
+ furi_thread_set_name(usb_uart->tx_thread, "UsbUartTxWorker");
furi_thread_set_stack_size(usb_uart->tx_thread, 512);
furi_thread_set_context(usb_uart->tx_thread, NULL);
furi_thread_set_callback(usb_uart->tx_thread, usb_uart_tx_thread);
@@ -191,7 +192,7 @@ void usb_uart_enable(UsbUartConfig* cfg) {
usb_uart = furi_alloc(sizeof(UsbUartParams));
usb_uart->thread = furi_thread_alloc();
- furi_thread_set_name(usb_uart->thread, "usb_uart");
+ furi_thread_set_name(usb_uart->thread, "UsbUartWorker");
furi_thread_set_stack_size(usb_uart->thread, 1024);
furi_thread_set_context(usb_uart->thread, cfg);
furi_thread_set_callback(usb_uart->thread, usb_uart_worker);