@@ -70,7 +70,7 @@ static struct hw_endpoint *hw_endpoint_get_by_addr(uint8_t ep_addr)
7070static void _hw_endpoint_alloc (struct hw_endpoint * ep , uint8_t transfer_type )
7171{
7272 // size must be multiple of 64
73- uint16_t size = tu_div_ceil (ep -> wMaxPacketSize , 64 ) * 64u ;
73+ uint size = tu_div_ceil (ep -> wMaxPacketSize , 64 ) * 64u ;
7474
7575 // double buffered Bulk endpoint
7676 if ( transfer_type == TUSB_XFER_BULK )
@@ -88,7 +88,7 @@ static void _hw_endpoint_alloc(struct hw_endpoint *ep, uint8_t transfer_type)
8888 pico_info (" Alloced %d bytes at offset 0x%x (0x%p)\r\n" , size , dpram_offset , ep -> hw_data_buf );
8989
9090 // Fill in endpoint control register with buffer offset
91- uint32_t const reg = EP_CTRL_ENABLE_BITS | (transfer_type << EP_CTRL_BUFFER_TYPE_LSB ) | dpram_offset ;
91+ uint32_t const reg = EP_CTRL_ENABLE_BITS | (( uint ) transfer_type << EP_CTRL_BUFFER_TYPE_LSB ) | dpram_offset ;
9292
9393 * ep -> endpoint_control = reg ;
9494}
@@ -177,7 +177,7 @@ static void hw_handle_buff_status(void)
177177 uint32_t remaining_buffers = usb_hw -> buf_status ;
178178 pico_trace ("buf_status = 0x%08x\n" , remaining_buffers );
179179 uint bit = 1u ;
180- for (uint i = 0 ; remaining_buffers && i < USB_MAX_ENDPOINTS * 2 ; i ++ )
180+ for (uint8_t i = 0 ; remaining_buffers && i < USB_MAX_ENDPOINTS * 2 ; i ++ )
181181 {
182182 if (remaining_buffers & bit )
183183 {
@@ -365,19 +365,19 @@ void dcd_init (uint8_t rhport)
365365 dcd_connect (rhport );
366366}
367367
368- void dcd_int_enable (uint8_t rhport )
368+ void dcd_int_enable (__unused uint8_t rhport )
369369{
370370 assert (rhport == 0 );
371371 irq_set_enabled (USBCTRL_IRQ , true);
372372}
373373
374- void dcd_int_disable (uint8_t rhport )
374+ void dcd_int_disable (__unused uint8_t rhport )
375375{
376376 assert (rhport == 0 );
377377 irq_set_enabled (USBCTRL_IRQ , false);
378378}
379379
380- void dcd_set_address (uint8_t rhport , uint8_t dev_addr )
380+ void dcd_set_address (__unused uint8_t rhport , __unused uint8_t dev_addr )
381381{
382382 assert (rhport == 0 );
383383
@@ -386,22 +386,22 @@ void dcd_set_address (uint8_t rhport, uint8_t dev_addr)
386386 hw_endpoint_xfer (0x80 , NULL , 0 );
387387}
388388
389- void dcd_remote_wakeup (uint8_t rhport )
389+ void dcd_remote_wakeup (__unused uint8_t rhport )
390390{
391391 pico_info ("dcd_remote_wakeup %d\n" , rhport );
392392 assert (rhport == 0 );
393393 usb_hw_set -> sie_ctrl = USB_SIE_CTRL_RESUME_BITS ;
394394}
395395
396396// disconnect by disabling internal pull-up resistor on D+/D-
397- void dcd_disconnect (uint8_t rhport )
397+ void dcd_disconnect (__unused uint8_t rhport )
398398{
399399 (void ) rhport ;
400400 usb_hw_clear -> sie_ctrl = USB_SIE_CTRL_PULLUP_EN_BITS ;
401401}
402402
403403// connect by enabling internal pull-up resistor on D+/D-
404- void dcd_connect (uint8_t rhport )
404+ void dcd_connect (__unused uint8_t rhport )
405405{
406406 (void ) rhport ;
407407 usb_hw_set -> sie_ctrl = USB_SIE_CTRL_PULLUP_EN_BITS ;
@@ -423,7 +423,7 @@ void dcd_edpt0_status_complete(uint8_t rhport, tusb_control_request_t const * re
423423 }
424424}
425425
426- bool dcd_edpt_open (uint8_t rhport , tusb_desc_endpoint_t const * desc_edpt )
426+ bool dcd_edpt_open (__unused uint8_t rhport , tusb_desc_endpoint_t const * desc_edpt )
427427{
428428 assert (rhport == 0 );
429429 hw_endpoint_init (desc_edpt -> bEndpointAddress , desc_edpt -> wMaxPacketSize .size , desc_edpt -> bmAttributes .xfer );
@@ -438,7 +438,7 @@ void dcd_edpt_close_all (uint8_t rhport)
438438 reset_non_control_endpoints ();
439439}
440440
441- bool dcd_edpt_xfer (uint8_t rhport , uint8_t ep_addr , uint8_t * buffer , uint16_t total_bytes )
441+ bool dcd_edpt_xfer (__unused uint8_t rhport , uint8_t ep_addr , uint8_t * buffer , uint16_t total_bytes )
442442{
443443 assert (rhport == 0 );
444444 hw_endpoint_xfer (ep_addr , buffer , total_bytes );
0 commit comments