Skip to content

Commit 3f45f37

Browse files
committed
minor rename
1 parent 2c1ff26 commit 3f45f37

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/portable/nxp/lpc_ip3511/dcd_lpc_ip3511.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ typedef struct {
7878

7979
// Max nbytes for each control/bulk/interrupt transfer
8080
enum {
81-
NBYTES_CBI_FS_ISO_MAX = 1023, // FS ISO
81+
NBYTES_ISO_FS_MAX = 1023, // FS ISO
82+
NBYTES_ISO_HS_MAX = 1024, // HS ISO
8283
NBYTES_CBI_FS_MAX = 64, // FS control/bulk/interrupt
8384
NBYTES_CBI_HS_MAX = 32767 // can be up to all 15-bit, but only tested with 4096
8485
};
@@ -113,6 +114,8 @@ enum {
113114
typedef union TU_ATTR_PACKED
114115
{
115116
// Full and High speed has different bit layout for buffer_offset and nbytes
117+
// TODO FS/HS layout depends on the max speed of controller e.g
118+
// lpc55s69 PORT0 is only FS but actually has the same layout as HS on port1
116119

117120
// Buffer (aligned 64) = DATABUFSTART [31:22] | buffer_offset [21:6]
118121
volatile struct {
@@ -388,7 +391,7 @@ static void prepare_ep_xfer(uint8_t rhport, uint8_t ep_id, uint16_t buf_offset,
388391

389392
if (_dcd_controller[rhport].max_speed == TUSB_SPEED_FULL )
390393
{
391-
nbytes = tu_min16(total_bytes, _dcd.ep[ep_id][0].is_iso ? NBYTES_CBI_FS_ISO_MAX : NBYTES_CBI_FS_MAX);
394+
nbytes = tu_min16(total_bytes, _dcd.ep[ep_id][0].is_iso ? NBYTES_ISO_FS_MAX : NBYTES_CBI_FS_MAX);
392395
_dcd.ep[ep_id][0].buffer_fs.offset = buf_offset;
393396
_dcd.ep[ep_id][0].buffer_fs.nbytes = nbytes;
394397
}else

0 commit comments

Comments
 (0)