fix unused warnings

Signed-off-by: sakumisu <1203593632@qq.com>
This commit is contained in:
sakumisu
2025-04-30 21:37:50 +08:00
parent c27458d71a
commit 577ebd0999
3 changed files with 5 additions and 3 deletions

View File

@@ -152,6 +152,7 @@ static int _usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t f
return usbh_control_transfer(hub->parent, setup, NULL); return usbh_control_transfer(hub->parent, setup, NULL);
} }
#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static int _usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth) static int _usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
{ {
struct usb_setup_packet *setup; struct usb_setup_packet *setup;
@@ -167,7 +168,6 @@ static int _usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
return usbh_control_transfer(hub->parent, setup, NULL); return usbh_control_transfer(hub->parent, setup, NULL);
} }
#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static int parse_hub_descriptor(struct usb_hub_descriptor *desc, uint16_t length) static int parse_hub_descriptor(struct usb_hub_descriptor *desc, uint16_t length)
{ {
(void)length; (void)length;
@@ -270,6 +270,7 @@ int usbh_hub_clear_feature(struct usbh_hub *hub, uint8_t port, uint8_t feature)
} }
} }
#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static int usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth) static int usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
{ {
struct usb_setup_packet roothub_setup; struct usb_setup_packet roothub_setup;
@@ -288,7 +289,6 @@ static int usbh_hub_set_depth(struct usbh_hub *hub, uint16_t depth)
} }
} }
#if CONFIG_USBHOST_MAX_EXTHUBS > 0
static void hub_int_complete_callback(void *arg, int nbytes) static void hub_int_complete_callback(void *arg, int nbytes)
{ {
struct usbh_hub *hub = (struct usbh_hub *)arg; struct usbh_hub *hub = (struct usbh_hub *)arg;

View File

@@ -330,6 +330,8 @@ static void usbh_print_hubport_info(struct usbh_hubport *hport)
static void usbh_print_setup(struct usb_setup_packet *setup) static void usbh_print_setup(struct usb_setup_packet *setup)
{ {
(void)setup;
USB_LOG_DBG("Setup: " USB_LOG_DBG("Setup: "
"bmRequestType 0x%02x, bRequest 0x%02x, wValue 0x%04x, wIndex 0x%04x, wLength 0x%04x\r\n", "bmRequestType 0x%02x, bRequest 0x%02x, wValue 0x%04x, wIndex 0x%04x, wLength 0x%04x\r\n",
setup->bmRequestType, setup->bmRequestType,

View File

@@ -1023,7 +1023,7 @@ int usbd_ep_start_read(uint8_t busid, const uint8_t ep, uint8_t *data, uint32_t
void USBD_IRQHandler(uint8_t busid) void USBD_IRQHandler(uint8_t busid)
{ {
uint32_t gint_status, temp, ep_idx, ep_intr, epint, read_count, daintmask; uint32_t gint_status, temp, ep_idx, ep_intr, epint, read_count;
gint_status = dwc2_get_glb_intstatus(busid); gint_status = dwc2_get_glb_intstatus(busid);
if ((USB_OTG_GLB->GINTSTS & 0x1U) == USB_OTG_MODE_DEVICE) { if ((USB_OTG_GLB->GINTSTS & 0x1U) == USB_OTG_MODE_DEVICE) {