Skip to content

Commit 56c2d4b

Browse files
committed
fix naming, and build
1 parent b9a6cd8 commit 56c2d4b

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

examples/host/bare_api/src/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,8 @@ int main(void)
6666

6767
void print_device_descriptor(uint8_t dev_addr)
6868
{
69+
(void) dev_addr;
6970
printf("Device Descriptor:\r\n");
70-
7171
}
7272

7373
// Invoked when device is mounted (configured)

src/host/usbh.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
// MACRO CONSTANT TYPEDEF
3939
//--------------------------------------------------------------------+
4040

41-
typedef bool (*tuh_complete_cb_t)(xfer_result_t result);
4241
typedef bool (*tuh_control_complete_cb_t)(uint8_t daddr, tusb_control_request_t const * request, xfer_result_t result);
4342

4443
//--------------------------------------------------------------------+

src/portable/ehci/ehci.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ typedef struct
7676
ehci_qtd_t qtd;
7777
}control[CFG_TUH_DEVICE_MAX+CFG_TUH_HUB+1];
7878

79-
ehci_qhd_t qhd_pool[CFG_TUH_ENDPOINT_MAX];
79+
ehci_qhd_t qhd_pool[QHD_MAX];
8080
ehci_qtd_t qtd_pool[QTD_MAX] TU_ATTR_ALIGNED(32);
8181

8282
ehci_registers_t* regs;
@@ -481,7 +481,7 @@ static void async_advance_isr(uint8_t rhport)
481481
(void) rhport;
482482

483483
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++)
485485
{
486486
if ( qhd_pool[i].removing )
487487
{
@@ -549,7 +549,7 @@ static void period_list_xfer_complete_isr(uint8_t hostid, uint32_t interval_ms)
549549
// TODO abstract max loop guard for period
550550
while( !next_item.terminate &&
551551
!(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)
553553
{
554554
switch ( next_item.type )
555555
{
@@ -721,7 +721,7 @@ void hcd_int_handler(uint8_t rhport)
721721
//------------- queue head helper -------------//
722722
static inline ehci_qhd_t* qhd_find_free (void)
723723
{
724-
for (uint32_t i=0; i<CFG_TUH_ENDPOINT_MAX; i++)
724+
for (uint32_t i=0; i<QHD_MAX; i++)
725725
{
726726
if ( !ehci_data.qhd_pool[i].used ) return &ehci_data.qhd_pool[i];
727727
}
@@ -738,7 +738,7 @@ static inline ehci_qhd_t* qhd_get_from_addr(uint8_t dev_addr, uint8_t ep_addr)
738738
{
739739
ehci_qhd_t* qhd_pool = ehci_data.qhd_pool;
740740

741-
for(uint32_t i=0; i<CFG_TUH_ENDPOINT_MAX; i++)
741+
for(uint32_t i=0; i<QHD_MAX; i++)
742742
{
743743
if ( (qhd_pool[i].dev_addr == dev_addr) &&
744744
ep_addr == tu_edpt_addr(qhd_pool[i].ep_number, qhd_pool[i].pid) )

src/portable/ohci/ohci.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ typedef struct TU_ATTR_ALIGNED(256)
165165
}control[CFG_TUH_DEVICE_MAX+CFG_TUH_HUB+1];
166166

167167
// ochi_itd_t itd[OHCI_MAX_ITD]; // itd requires alignment of 32
168-
ohci_ed_t ed_pool[CFG_TUH_ENDPOINT_MAX];
168+
ohci_ed_t ed_pool[ED_MAX];
169169
ohci_gtd_t gtd_pool[GTD_MAX];
170170

171171
volatile uint16_t frame_number_hi;

0 commit comments

Comments
 (0)