From 9b2ddd9cc6401b80350179d26e842557f9b60aaf Mon Sep 17 00:00:00 2001 From: Reinhard Panhuber Date: Sat, 3 Apr 2021 09:49:27 +0200 Subject: Generalize audio driver for 3 audio functions plus a lot more. - Audio format and parameters are parsed from descriptors thus user no longer needs to give them explicitely - Tested for 4 channel software type I PCM encoding with 16 bit with 1 channel per FIFO and 2 channels per FIFO (this is I2S specific) --- src/common/tusb_fifo.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/tusb_fifo.c b/src/common/tusb_fifo.c index d05549e3e..1b7f64447 100644 --- a/src/common/tusb_fifo.c +++ b/src/common/tusb_fifo.c @@ -138,9 +138,7 @@ static void _tu_fifo_read_from_const_src_ptr_in_full_words(void * dst, const voi } } -// Intended to be used to write to hardware USB FIFO in e.g. STM32 where all data is written to a constant address -// Code adapted from dcd_synopsis.c -// TODO generalize with configurable 1 byte or 4 byte each write +// Intended to be used to write to hardware USB FIFO in e.g. STM32 where all data is written to a constant address in full word copies static void _tu_fifo_write_to_const_dst_ptr_in_full_words(void * dst, const void * src, uint16_t len) { volatile uint32_t * tx_fifo = (volatile uint32_t *) dst; -- cgit v1.3.1