Remove all remainings with peek_at
This commit is contained in:
@@ -146,9 +146,9 @@ uint32_t tud_cdc_n_read(uint8_t itf, void* buffer, uint32_t bufsize)
|
||||
return num_read;
|
||||
}
|
||||
|
||||
bool tud_cdc_n_peek(uint8_t itf, int pos, uint8_t* chr)
|
||||
bool tud_cdc_n_peek(uint8_t itf, uint8_t* chr)
|
||||
{
|
||||
return tu_fifo_peek_at(&_cdcd_itf[itf].rx_ff, pos, chr);
|
||||
return tu_fifo_peek(&_cdcd_itf[itf].rx_ff, chr);
|
||||
}
|
||||
|
||||
void tud_cdc_n_read_flush (uint8_t itf)
|
||||
|
||||
@@ -83,7 +83,7 @@ int32_t tud_cdc_n_read_char (uint8_t itf);
|
||||
void tud_cdc_n_read_flush (uint8_t itf);
|
||||
|
||||
// Get a byte from FIFO at the specified position without removing it
|
||||
bool tud_cdc_n_peek (uint8_t itf, int pos, uint8_t* u8);
|
||||
bool tud_cdc_n_peek (uint8_t itf, uint8_t* u8);
|
||||
|
||||
// Write bytes to TX FIFO, data may remain in the FIFO for a while
|
||||
uint32_t tud_cdc_n_write (uint8_t itf, void const* buffer, uint32_t bufsize);
|
||||
|
||||
4
src/class/vendor/vendor_device.c
vendored
4
src/class/vendor/vendor_device.c
vendored
@@ -72,9 +72,9 @@ uint32_t tud_vendor_n_available (uint8_t itf)
|
||||
return tu_fifo_count(&_vendord_itf[itf].rx_ff);
|
||||
}
|
||||
|
||||
bool tud_vendor_n_peek(uint8_t itf, int pos, uint8_t* u8)
|
||||
bool tud_vendor_n_peek(uint8_t itf, uint8_t* u8)
|
||||
{
|
||||
return tu_fifo_peek_at(&_vendord_itf[itf].rx_ff, pos, u8);
|
||||
return tu_fifo_peek(&_vendord_itf[itf].rx_ff, u8);
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
|
||||
2
src/class/vendor/vendor_device.h
vendored
2
src/class/vendor/vendor_device.h
vendored
@@ -45,7 +45,7 @@ bool tud_vendor_n_mounted (uint8_t itf);
|
||||
|
||||
uint32_t tud_vendor_n_available (uint8_t itf);
|
||||
uint32_t tud_vendor_n_read (uint8_t itf, void* buffer, uint32_t bufsize);
|
||||
bool tud_vendor_n_peek (uint8_t itf, int pos, uint8_t* u8);
|
||||
bool tud_vendor_n_peek (uint8_t itf, uint8_t* u8);
|
||||
|
||||
uint32_t tud_vendor_n_write (uint8_t itf, void const* buffer, uint32_t bufsize);
|
||||
uint32_t tud_vendor_n_write_available (uint8_t itf);
|
||||
|
||||
Reference in New Issue
Block a user