diff options
| author | hathach <[email protected]> | 2025-11-12 10:41:58 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-11-12 17:46:38 +0700 |
| commit | fc661abc18beefb57f5d1352219ed72678b59e0b (patch) | |
| tree | 6c850325fc08f87f6af116b01dbca5013f5ed39c /src/tusb.c | |
| parent | 8a094e807b34bcc018c971d59acb660b1a9ddf9f (diff) | |
migrate midi_device to use edpt stream API
also add tud_midi_n_packet_write/read_n()
Diffstat (limited to 'src/tusb.c')
| -rw-r--r-- | src/tusb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tusb.c b/src/tusb.c index 7411f19df..b308e2915 100644 --- a/src/tusb.c +++ b/src/tusb.c @@ -424,7 +424,7 @@ uint32_t tu_edpt_stream_write_xfer(uint8_t hwid, tu_edpt_stream_t* s) { TU_VERIFY(stream_claim(hwid, s), 0); // Pull data from FIFO -> EP buf - uint16_t const count = tu_fifo_read_n(&s->ff, s->ep_buf, s->ep_bufsize); + const uint16_t count = tu_fifo_read_n(&s->ff, s->ep_buf, s->ep_bufsize); if (count > 0) { TU_ASSERT(stream_xfer(hwid, s, count), 0); @@ -437,7 +437,7 @@ uint32_t tu_edpt_stream_write_xfer(uint8_t hwid, tu_edpt_stream_t* s) { } } -uint32_t tu_edpt_stream_write(uint8_t hwid, tu_edpt_stream_t* s, void const* buffer, uint32_t bufsize) { +uint32_t tu_edpt_stream_write(uint8_t hwid, tu_edpt_stream_t *s, const void *buffer, uint32_t bufsize) { TU_VERIFY(bufsize > 0); // TODO support ZLP if (0 == tu_fifo_depth(&s->ff)) { |
