summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2026-02-11 22:04:44 +0100
committerHiFiPhile <[email protected]>2026-02-11 22:04:44 +0100
commit135a130ba51d2e41b30f13fbd998f1db32a47470 (patch)
treefdbd0911fff794c89c014ee7a3a252e92162f8d1 /src/common
parentf5424c569ddc673a9c23b78febceed8f7f098509 (diff)
fix rx transfer length when high speed capable device/host working at full speed
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/common')
-rw-r--r--src/common/tusb_private.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/common/tusb_private.h b/src/common/tusb_private.h
index 43ce7a1df..7795d7122 100644
--- a/src/common/tusb_private.h
+++ b/src/common/tusb_private.h
@@ -62,7 +62,7 @@ typedef struct {
uint8_t ep_addr;
uint16_t mps;
- uint16_t ep_bufsize;
+ uint16_t xfer_len;
uint8_t *ep_buf; // set to NULL to use xfer_fifo when CFG_TUD_EDPT_DEDICATED_HWFIFO = 1
tu_fifo_t ff;
@@ -101,7 +101,7 @@ bool tu_edpt_release(tu_edpt_state_t* ep_state, osal_mutex_t mutex);
// Init an endpoint stream
bool tu_edpt_stream_init(tu_edpt_stream_t *s, bool is_host, bool is_tx, bool overwritable, void *ff_buf,
- uint16_t ff_bufsize, uint8_t *ep_buf, uint16_t ep_bufsize);
+ uint16_t ff_bufsize, uint8_t *ep_buf);
// Deinit an endpoint stream
TU_ATTR_ALWAYS_INLINE static inline void tu_edpt_stream_deinit(tu_edpt_stream_t *s) {
@@ -118,10 +118,11 @@ TU_ATTR_ALWAYS_INLINE static inline void tu_edpt_stream_deinit(tu_edpt_stream_t
// Open an endpoint stream
TU_ATTR_ALWAYS_INLINE static inline void tu_edpt_stream_open(tu_edpt_stream_t *s, uint8_t hwid,
- const tusb_desc_endpoint_t *desc_ep) {
+ const tusb_desc_endpoint_t *desc_ep, uint16_t xfer_len) {
s->hwid = hwid;
s->ep_addr = desc_ep->bEndpointAddress;
s->mps = tu_edpt_packet_size(desc_ep);
+ s->xfer_len = xfer_len;
}
TU_ATTR_ALWAYS_INLINE static inline bool tu_edpt_stream_is_opened(const tu_edpt_stream_t *s) {