summaryrefslogtreecommitdiff
path: root/src/portable/chipidea
diff options
context:
space:
mode:
authorhathach <[email protected]>2025-11-26 15:26:42 +0700
committerhathach <[email protected]>2025-11-26 15:26:42 +0700
commitc925277e24e6743b311199d87461befe8b590187 (patch)
tree9b8970f281f42767aa359416eadb074e08758592 /src/portable/chipidea
parent1a51a7e159a0db42279b971b5e460a270fa26750 (diff)
change tu_fifo_buffer_info_t layout
Diffstat (limited to 'src/portable/chipidea')
-rw-r--r--src/portable/chipidea/ci_hs/dcd_ci_hs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/portable/chipidea/ci_hs/dcd_ci_hs.c b/src/portable/chipidea/ci_hs/dcd_ci_hs.c
index c6d405e98..4a5e5c91f 100644
--- a/src/portable/chipidea/ci_hs/dcd_ci_hs.c
+++ b/src/portable/chipidea/ci_hs/dcd_ci_hs.c
@@ -545,19 +545,19 @@ bool dcd_edpt_xfer_fifo(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_
tu_fifo_get_write_info(ff, &fifo_info);
}
- if ( fifo_info.len_lin >= total_bytes )
+ if ( fifo_info.linear.len >= total_bytes )
{
// Linear length is enough for this transfer
- qtd_init(p_qtd, fifo_info.ptr_lin, total_bytes);
+ qtd_init(p_qtd, fifo_info.linear.ptr, total_bytes);
}
else
{
// linear part is not enough
// prepare TD up to linear length
- qtd_init(p_qtd, fifo_info.ptr_lin, fifo_info.len_lin);
+ qtd_init(p_qtd, fifo_info.linear.ptr, fifo_info.linear.len);
- if ( !tu_offset4k((uint32_t) fifo_info.ptr_wrap) && !tu_offset4k(tu_fifo_depth(ff)) )
+ if ( !tu_offset4k((uint32_t) fifo_info.wrapped.ptr) && !tu_offset4k(tu_fifo_depth(ff)) )
{
// If buffer is aligned to 4K & buffer size is multiple of 4K
// We can make use of buffer page array to also combine the linear + wrapped length
@@ -568,7 +568,7 @@ bool dcd_edpt_xfer_fifo(uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_
// pick up buffer array where linear ends
if (p_qtd->buffer[i] == 0)
{
- p_qtd->buffer[i] = (uint32_t) fifo_info.ptr_wrap + 4096 * page;
+ p_qtd->buffer[i] = (uint32_t) fifo_info.wrapped.ptr + 4096 * page;
page++;
}
}