Skip to content

Commit

Permalink
Update USBCDC.cpp to fulfill A style
Browse files Browse the repository at this point in the history
  • Loading branch information
cyliangtw authored Dec 1, 2023
1 parent 1cccc7e commit e2aed18
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/source/USBCDC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit e2aed18

Please sign in to comment.