Skip to content

Commit

Permalink
drivers: usb_dc_sam: tweak logging for enable, disable, configure
Browse files Browse the repository at this point in the history
Tweak logging for enable, disable, configure.

Signed-off-by: Johann Fischer <j.fischer@phytec.de>
  • Loading branch information
jfischer-no authored and hakehuang committed Jun 20, 2020
1 parent 00a93b7 commit 32b9f84
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions drivers/usb/device/usb_dc_sam.c
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ int usb_dc_ep_configure(const struct usb_dc_ep_cfg_data *const cfg)
return -EBUSY;
}

LOG_DBG("ep %x, mps %d, type %d", cfg->ep_addr, cfg->ep_mps,
LOG_INF("Configure ep %x, mps %d, type %d", cfg->ep_addr, cfg->ep_mps,
cfg->ep_type);

/* Reset the endpoint */
Expand Down Expand Up @@ -531,6 +531,7 @@ int usb_dc_ep_configure(const struct usb_dc_ep_cfg_data *const cfg)
ep_enabled[i] = usb_dc_ep_is_enabled(i);

if (ep_enabled[i]) {
LOG_INF("Temporary disable ep idx %x", i);
usb_dc_ep_disable(i);
}
if (ep_configured[i]) {
Expand Down Expand Up @@ -640,7 +641,8 @@ int usb_dc_ep_enable(u8_t ep)
/* Enable SETUP, IN or OUT endpoint interrupts */
usb_dc_ep_enable_interrupts(ep_idx);

LOG_DBG("ep 0x%x", ep);
LOG_INF("Enable ep 0x%x", ep);

return 0;
}

Expand All @@ -660,7 +662,8 @@ int usb_dc_ep_disable(u8_t ep)
/* Disable endpoint and SETUP, IN or OUT interrupts */
USBHS->USBHS_DEVEPT &= ~BIT(USBHS_DEVEPT_EPEN0_Pos + ep_idx);

LOG_DBG("ep 0x%x", ep);
LOG_INF("Disable ep 0x%x", ep);

return 0;
}

Expand Down

0 comments on commit 32b9f84

Please sign in to comment.