rp2040: shuffle hw_endpoint members
Ordering by element size prevents alignment holes, and as a consequence the host mode version of the struct is the same size as device, as pad bytes at the end are used instead.
This commit is contained in:
@@ -64,17 +64,19 @@ typedef struct hw_endpoint
|
|||||||
// Buffer pointer in usb dpram
|
// Buffer pointer in usb dpram
|
||||||
uint8_t *hw_data_buf;
|
uint8_t *hw_data_buf;
|
||||||
|
|
||||||
// Current transfer information
|
|
||||||
bool active;
|
|
||||||
uint16_t remaining_len;
|
|
||||||
uint16_t xferred_len;
|
|
||||||
|
|
||||||
// User buffer in main memory
|
// User buffer in main memory
|
||||||
uint8_t *user_buf;
|
uint8_t *user_buf;
|
||||||
|
|
||||||
|
// Current transfer information
|
||||||
|
uint16_t remaining_len;
|
||||||
|
uint16_t xferred_len;
|
||||||
|
|
||||||
// Data needed from EP descriptor
|
// Data needed from EP descriptor
|
||||||
uint16_t wMaxPacketSize;
|
uint16_t wMaxPacketSize;
|
||||||
|
|
||||||
|
// Endpoint is in use
|
||||||
|
bool active;
|
||||||
|
|
||||||
// Interrupt, bulk, etc
|
// Interrupt, bulk, etc
|
||||||
uint8_t transfer_type;
|
uint8_t transfer_type;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user