@@ -76,7 +76,7 @@ typedef struct
76
76
ehci_qtd_t qtd ;
77
77
}control [CFG_TUH_DEVICE_MAX + CFG_TUH_HUB + 1 ];
78
78
79
- ehci_qhd_t qhd_pool [CFG_TUH_ENDPOINT_MAX ];
79
+ ehci_qhd_t qhd_pool [QHD_MAX ];
80
80
ehci_qtd_t qtd_pool [QTD_MAX ] TU_ATTR_ALIGNED (32 );
81
81
82
82
ehci_registers_t * regs ;
@@ -481,7 +481,7 @@ static void async_advance_isr(uint8_t rhport)
481
481
(void ) rhport ;
482
482
483
483
ehci_qhd_t * qhd_pool = ehci_data .qhd_pool ;
484
- for (uint32_t i = 0 ; i < CFG_TUH_ENDPOINT_MAX ; i ++ )
484
+ for (uint32_t i = 0 ; i < QHD_MAX ; i ++ )
485
485
{
486
486
if ( qhd_pool [i ].removing )
487
487
{
@@ -549,7 +549,7 @@ static void period_list_xfer_complete_isr(uint8_t hostid, uint32_t interval_ms)
549
549
// TODO abstract max loop guard for period
550
550
while ( !next_item .terminate &&
551
551
!(interval_ms > 1 && period_1ms_addr == tu_align32 (next_item .address )) &&
552
- max_loop < (CFG_TUH_ENDPOINT_MAX + EHCI_MAX_ITD + EHCI_MAX_SITD )* CFG_TUH_DEVICE_MAX )
552
+ max_loop < (QHD_MAX + EHCI_MAX_ITD + EHCI_MAX_SITD )* CFG_TUH_DEVICE_MAX )
553
553
{
554
554
switch ( next_item .type )
555
555
{
@@ -721,7 +721,7 @@ void hcd_int_handler(uint8_t rhport)
721
721
//------------- queue head helper -------------//
722
722
static inline ehci_qhd_t * qhd_find_free (void )
723
723
{
724
- for (uint32_t i = 0 ; i < CFG_TUH_ENDPOINT_MAX ; i ++ )
724
+ for (uint32_t i = 0 ; i < QHD_MAX ; i ++ )
725
725
{
726
726
if ( !ehci_data .qhd_pool [i ].used ) return & ehci_data .qhd_pool [i ];
727
727
}
@@ -738,7 +738,7 @@ static inline ehci_qhd_t* qhd_get_from_addr(uint8_t dev_addr, uint8_t ep_addr)
738
738
{
739
739
ehci_qhd_t * qhd_pool = ehci_data .qhd_pool ;
740
740
741
- for (uint32_t i = 0 ; i < CFG_TUH_ENDPOINT_MAX ; i ++ )
741
+ for (uint32_t i = 0 ; i < QHD_MAX ; i ++ )
742
742
{
743
743
if ( (qhd_pool [i ].dev_addr == dev_addr ) &&
744
744
ep_addr == tu_edpt_addr (qhd_pool [i ].ep_number , qhd_pool [i ].pid ) )
0 commit comments