Fix missing early exit for empty flush
This commit is contained in:
parent
09316e0e6f
commit
bc75971fc8
@ -74,6 +74,9 @@ class VirtualComPort {
|
||||
|
||||
[[gnu::always_inline]] static void flushTx()
|
||||
{
|
||||
if(m_txBuffer.size == 0)
|
||||
return;
|
||||
|
||||
constexpr auto usbReady = []() {
|
||||
USBD_CDC_HandleTypeDef* hcdc = static_cast<USBD_CDC_HandleTypeDef*>(hUsbDeviceFS.pClassData);
|
||||
return hcdc->TxState != 0;
|
||||
|
Loading…
Reference in New Issue
Block a user