Update USBCDC.cpp to fulfill A style

pull/15473/head
Chris Liang 2023-12-01 20:43:12 +08:00 committed by GitHub
parent 1cccc7e14d
commit e2aed1824c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -388,7 +388,7 @@ void USBCDC::send_nb(uint8_t *buffer, uint32_t size, uint32_t *actual, bool now)
}
_tx_size += write_size;
*actual = write_size;
if((CDC_MAX_PACKET_SIZE == size) && (CDC_MAX_PACKET_SIZE == write_size)) {
if ((CDC_MAX_PACKET_SIZE == size) && (CDC_MAX_PACKET_SIZE == write_size)) {
_trans_zlp = true;
}
if (now) {
@ -407,7 +407,7 @@ void USBCDC::_send_isr_start()
if (USBDevice::write_start(_bulk_in, _tx_buffer, _tx_size)) {
_tx_in_progress = true;
}
} else if(!_tx_in_progress && _trans_zlp) {
} else if (!_tx_in_progress && _trans_zlp) {
if (USBDevice::write_start(_bulk_in, _tx_buffer, 0)) {
_tx_in_progress = true;
_trans_zlp = false;