diff options
| author | hathach <[email protected]> | 2025-12-10 18:51:44 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2025-12-10 18:51:44 +0700 |
| commit | 0a1bf62a2dbcec88232643e99898529407b5c6a5 (patch) | |
| tree | 1dfdd0e5001aed67cdcee431b822af8bad6e2182 /src/common | |
| parent | 8d0fda879b68e0d5f905590ec1ae5124e4054e48 (diff) | |
| parent | 098dd07ecd204c47c6fa72b078b085d16413f48c (diff) | |
Merge branch 'master' into more-size-reduce-edpt-stream
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/tusb_private.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/common/tusb_private.h b/src/common/tusb_private.h index cc5c7d46a..69e82cda1 100644 --- a/src/common/tusb_private.h +++ b/src/common/tusb_private.h @@ -65,15 +65,13 @@ typedef struct TU_ATTR_PACKED { } tu_edpt_state_t; typedef struct { - struct TU_ATTR_PACKED { - bool is_host : 1; // 1: host, 0: device - bool is_mps512 : 1; // 1: 512, 0: 64 since stream is used for Bulk only - }; + bool is_host; // 1: host, 0: device uint8_t ep_addr; uint16_t ep_bufsize; uint8_t *ep_buf; // set to NULL to use xfer_fifo when CFG_TUD_EDPT_DEDICATED_HWFIFO = 1 tu_fifo_t ff; + uint16_t mps; // mutex: read if rx, otherwise write OSAL_MUTEX_DEF(ff_mutexdef); @@ -133,7 +131,7 @@ 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, tusb_desc_endpoint_t const *desc_ep) { s->ep_addr = desc_ep->bEndpointAddress; - s->is_mps512 = tu_edpt_packet_size(desc_ep) == 512; + s->mps = tu_edpt_packet_size(desc_ep); } TU_ATTR_ALWAYS_INLINE static inline bool tu_edpt_stream_is_opened(const tu_edpt_stream_t *s) { |
