rename HCD_MAX_XFER to CFG_TUH_ENDPOINT_MAX
minor clean up
This commit is contained in:
@@ -313,7 +313,7 @@ static ohci_ed_t * ed_from_addr(uint8_t dev_addr, uint8_t ep_addr)
|
||||
|
||||
ohci_ed_t* ed_pool = ohci_data.ed_pool;
|
||||
|
||||
for(uint32_t i=0; i<HCD_MAX_ENDPOINT; i++)
|
||||
for(uint32_t i=0; i<CFG_TUH_ENDPOINT_MAX; i++)
|
||||
{
|
||||
if ( (ed_pool[i].dev_addr == dev_addr) &&
|
||||
ep_addr == tu_edpt_addr(ed_pool[i].ep_number, ed_pool[i].pid == PID_IN) )
|
||||
@@ -329,7 +329,7 @@ static ohci_ed_t * ed_find_free(void)
|
||||
{
|
||||
ohci_ed_t* ed_pool = ohci_data.ed_pool;
|
||||
|
||||
for(uint8_t i = 0; i < HCD_MAX_ENDPOINT; i++)
|
||||
for(uint8_t i = 0; i < CFG_TUH_ENDPOINT_MAX; i++)
|
||||
{
|
||||
if ( !ed_pool[i].used ) return &ed_pool[i];
|
||||
}
|
||||
|
||||
@@ -42,6 +42,8 @@ enum {
|
||||
OHCI_MAX_ITD = 4
|
||||
};
|
||||
|
||||
#define HCD_MAX_XFER CFG_TUH_ENDPOINT_MAX
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// OHCI Data Structure
|
||||
//--------------------------------------------------------------------+
|
||||
@@ -162,7 +164,7 @@ typedef struct TU_ATTR_ALIGNED(256)
|
||||
}control[CFG_TUH_DEVICE_MAX+CFG_TUH_HUB+1];
|
||||
|
||||
// ochi_itd_t itd[OHCI_MAX_ITD]; // itd requires alignment of 32
|
||||
ohci_ed_t ed_pool[HCD_MAX_ENDPOINT];
|
||||
ohci_ed_t ed_pool[CFG_TUH_ENDPOINT_MAX];
|
||||
ohci_gtd_t gtd_pool[HCD_MAX_XFER];
|
||||
|
||||
volatile uint16_t frame_number_hi;
|
||||
|
||||
Reference in New Issue
Block a user