re-layout ehci_data_t to get better memory consumption

This commit is contained in:
hathach
2013-03-07 16:06:28 +07:00
parent ef08654e73
commit 66586ffb08
4 changed files with 84 additions and 52 deletions

View File

@@ -440,17 +440,13 @@ typedef struct {
ehci_qhd_t period_head[CONTROLLER_HOST_NUMBER];
//------------- Data for Address 0 -------------//
struct {
// qhd: addr0 use async head (dummy) as Queue Head
ehci_qtd_t qtd[3];
tusb_std_request_t request;
} addr0;
// qhd: addr0 use async head (dummy) as Queue Head
ehci_qtd_t addr0_qtd[3];
struct {
struct {
ehci_qhd_t qhd;
ehci_qtd_t qtd[3];
tusb_std_request_t request;
}control;
ehci_qhd_t qhd[EHCI_MAX_QHD] ; ///< Queue Head Pool
@@ -459,6 +455,7 @@ typedef struct {
// ehci_sitd_t sitd[EHCI_MAX_SITD] ; ///< Split (FS) Isochronous Transfer Pool
}device[TUSB_CFG_HOST_DEVICE_MAX];
tusb_std_request_t control_request[TUSB_CFG_HOST_DEVICE_MAX+1]; // including address zero, 32-byte alignment breaker
}ehci_data_t;
#ifdef __cplusplus