File tree 1 file changed +2
-2
lines changed
Filter options
1 file changed +2
-2
lines changed
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ uint32_t tud_cdc_n_available(uint8_t itf)
150
150
uint32_t tud_cdc_n_read (uint8_t itf , void * buffer , uint32_t bufsize )
151
151
{
152
152
cdcd_interface_t * p_cdc = & _cdcd_itf [itf ];
153
- uint32_t num_read = tu_fifo_read_n (& p_cdc -> rx_ff , buffer , (uint16_t ) TU_MIN (bufsize , 65535 ));
153
+ uint32_t num_read = tu_fifo_read_n (& p_cdc -> rx_ff , buffer , (uint16_t ) TU_MIN (bufsize , UINT16_MAX ));
154
154
_prep_out_transaction (p_cdc );
155
155
return num_read ;
156
156
}
@@ -173,7 +173,7 @@ void tud_cdc_n_read_flush (uint8_t itf)
173
173
uint32_t tud_cdc_n_write (uint8_t itf , void const * buffer , uint32_t bufsize )
174
174
{
175
175
cdcd_interface_t * p_cdc = & _cdcd_itf [itf ];
176
- uint16_t ret = tu_fifo_write_n (& p_cdc -> tx_ff , buffer , (uint16_t ) TU_MIN (bufsize , 65535 ));
176
+ uint16_t ret = tu_fifo_write_n (& p_cdc -> tx_ff , buffer , (uint16_t ) TU_MIN (bufsize , UINT16_MAX ));
177
177
178
178
// flush if queue more than packet size
179
179
// may need to suppress -Wunreachable-code since most of the time CFG_TUD_CDC_TX_BUFSIZE < BULK_PACKET_SIZE
You can’t perform that action at this time.
0 commit comments