diff options
| author | Reinhard Panhuber <[email protected]> | 2021-01-31 19:08:23 +0100 |
|---|---|---|
| committer | Reinhard Panhuber <[email protected]> | 2021-01-31 19:08:23 +0100 |
| commit | 84406f1654ca757ecd7294f4b98b56146583be49 (patch) | |
| tree | ccfdc6719a7d48781fe59e0b9284f4e64af0060f /src/portable | |
| parent | f1551d7a5fe5faccad9c1ef3f5d374869a1874e6 (diff) | |
Rework audio driver
Diffstat (limited to 'src/portable')
| -rw-r--r-- | src/portable/st/synopsys/dcd_synopsys.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c index 90fcd51e7..4cb6028cc 100644 --- a/src/portable/st/synopsys/dcd_synopsys.c +++ b/src/portable/st/synopsys/dcd_synopsys.c @@ -670,13 +670,15 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t return true; } -bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff) +// The number of bytes has to be given explicitly to allow more flexible control of how many +// bytes should be written and second to keep the return value free to give back a boolean +// success message. If total_bytes is too big, the FIFO will copy only what is available +// into the USB buffer! +bool dcd_edpt_iso_xfer (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) { // USB buffers always work in bytes so to avoid unnecessary divisions we demand item_size = 1 TU_ASSERT(ff->item_size == 1); - uint16_t total_bytes = tu_fifo_count(ff); - uint8_t const epnum = tu_edpt_number(ep_addr); uint8_t const dir = tu_edpt_dir(ep_addr); |
