usb: SERIAL_USB_BUFFERS_SIZE can be smaller than BLOCKING_FACTOR

Write to serial usb will just block caller untill enought space is
freed in internal buffer.
This commit is contained in:
Andrey Gusakov 2024-05-19 20:21:42 +03:00 committed by rusefillc
parent 209ea941ae
commit 93afc8125a
1 changed files with 5 additions and 4 deletions

View File

@ -6,10 +6,11 @@
#include "thread_controller.h" #include "thread_controller.h"
#include "tunerstudio.h" #include "tunerstudio.h"
// Assert that the USB tx/rx buffers are large enough to fit one full packet
// TODO: remove someday // Lets don't care about underlaying driver. If driver has no enought free
// Assert that the USB TX buffers are large enough to fit one full packet // space in buffers it will block chnWriteTimeout() until buffers available
static_assert(SERIAL_USB_BUFFERS_TX_SIZE >= BLOCKING_FACTOR + 10); // or timeout happens.
//static_assert(SERIAL_USB_BUFFERS_TX_SIZE >= BLOCKING_FACTOR + 10);
extern SerialUSBDriver EFI_CONSOLE_USB_DEVICE; extern SerialUSBDriver EFI_CONSOLE_USB_DEVICE;