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