diff options
| author | Ha Thach <[email protected]> | 2021-05-02 15:29:38 +0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2021-05-02 15:29:38 +0700 |
| commit | 42a1d2f3b9d40b57a7ef8364c138d8274f1a0a8d (patch) | |
| tree | a7ad018e09c53335a69dbffa7666a13837a84102 /src/class/cdc | |
| parent | 30b7988efa7b2468a51e8f5619f1108cef3a1421 (diff) | |
| parent | 1e1bcda00338194275eee4aae5280b7b5203f8d0 (diff) | |
Merge pull request #804 from hathach/audio_make_dma_ready
Implement functions to allow for DMA usage in audio driver.
Diffstat (limited to 'src/class/cdc')
| -rw-r--r-- | src/class/cdc/cdc_device.c | 4 | ||||
| -rw-r--r-- | src/class/cdc/cdc_device.h | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c index 0a7691916..f5853fddb 100644 --- a/src/class/cdc/cdc_device.c +++ b/src/class/cdc/cdc_device.c @@ -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) diff --git a/src/class/cdc/cdc_device.h b/src/class/cdc/cdc_device.h index 0885922c6..986585c5b 100644 --- a/src/class/cdc/cdc_device.h +++ b/src/class/cdc/cdc_device.h @@ -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); @@ -117,7 +117,7 @@ static inline uint32_t tud_cdc_available (void); static inline int32_t tud_cdc_read_char (void); static inline uint32_t tud_cdc_read (void* buffer, uint32_t bufsize); static inline void tud_cdc_read_flush (void); -static inline bool tud_cdc_peek (int pos, uint8_t* u8); +static inline bool tud_cdc_peek (uint8_t* u8); static inline uint32_t tud_cdc_write_char (char ch); static inline uint32_t tud_cdc_write (void const* buffer, uint32_t bufsize); @@ -207,9 +207,9 @@ static inline void tud_cdc_read_flush (void) tud_cdc_n_read_flush(0); } -static inline bool tud_cdc_peek (int pos, uint8_t* u8) +static inline bool tud_cdc_peek (uint8_t* u8) { - return tud_cdc_n_peek(0, pos, u8); + return tud_cdc_n_peek(0, u8); } static inline uint32_t tud_cdc_write_char (char ch) |
