projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove path from toolchain when creating presets (use the system one).
[bertos.git]
/
bertos
/
cpu
/
cortex-m3
/
drv
/
usb_stm32.c
diff --git
a/bertos/cpu/cortex-m3/drv/usb_stm32.c
b/bertos/cpu/cortex-m3/drv/usb_stm32.c
index 879b2d6f0a828bd5724fe8dd6839e9c6fbc2cf35..794aa8916f2e050461d5858b2972ca36964170e0 100644
(file)
--- a/
bertos/cpu/cortex-m3/drv/usb_stm32.c
+++ b/
bertos/cpu/cortex-m3/drv/usb_stm32.c
@@
-117,7
+117,7
@@
static const UsbEndpointDesc USB_CtrlEpDescr1 =
static UsbCtrlRequest setup_packet;
/* USB device controller: max supported interfaces */
static UsbCtrlRequest setup_packet;
/* USB device controller: max supported interfaces */
-#define USB_MAX_INTERFACE
1
+#define USB_MAX_INTERFACE
CONFIG_USB_INTERFACE_MAX
/* USB device controller features */
#define STM32_UDC_FEATURE_SELFPOWERED BV(0)
/* USB device controller features */
#define STM32_UDC_FEATURE_SELFPOWERED BV(0)
@@
-814,22
+814,27
@@
static int usb_ep_configure(const UsbEndpointDesc *epd, bool enable)
switch (ep_hw->type)
{
case USB_ENDPOINT_XFER_CONTROL:
switch (ep_hw->type)
{
case USB_ENDPOINT_XFER_CONTROL:
- LOG_INFO("EP%d: CONTROL IN\n", EP >> 1);
+ LOG_INFO("EP%d: CONTROL %s\n", EP >> 1,
+ EP & 1 ? "IN" : "OUT");
ep_ctrl_set_ep_type(hw, EP_CTRL);
ep_ctrl_set_ep_kind(hw, 0);
break;
case USB_ENDPOINT_XFER_INT:
ep_ctrl_set_ep_type(hw, EP_CTRL);
ep_ctrl_set_ep_kind(hw, 0);
break;
case USB_ENDPOINT_XFER_INT:
- LOG_INFO("EP%d: INTERRUPT IN\n", EP >> 1);
+ LOG_INFO("EP%d: INTERRUPT %s\n", EP >> 1,
+ EP & 1 ? "IN" : "OUT");
ep_ctrl_set_ep_type(hw, EP_INTERRUPT);
ep_ctrl_set_ep_kind(hw, 0);
break;
case USB_ENDPOINT_XFER_BULK:
ep_ctrl_set_ep_type(hw, EP_INTERRUPT);
ep_ctrl_set_ep_kind(hw, 0);
break;
case USB_ENDPOINT_XFER_BULK:
- LOG_INFO("EP%d: BULK IN\n", EP >> 1);
+ LOG_INFO("EP%d: BULK %s\n", EP >> 1,
+ EP & 1 ? "IN" : "OUT");
ep_ctrl_set_ep_type(hw, EP_BULK);
ep_ctrl_set_ep_kind(hw, 0);
break;
case USB_ENDPOINT_XFER_ISOC:
ep_ctrl_set_ep_type(hw, EP_BULK);
ep_ctrl_set_ep_kind(hw, 0);
break;
case USB_ENDPOINT_XFER_ISOC:
- LOG_ERR("EP%d: ISOCHRONOUS IN: not supported\n", EP >> 1);
+ LOG_ERR("EP%d: ISOCHRONOUS %s: not supported\n",
+ EP >> 1,
+ EP & 1 ? "IN" : "OUT");
/* Fallback to default */
default:
ASSERT(0);
/* Fallback to default */
default:
ASSERT(0);
@@
-1490,11
+1495,8
@@
static void usb_get_descriptor_handler(void)
if ((setup_packet.mRequestType & USB_RECIP_MASK) ==
USB_RECIP_DEVICE)
usb_get_descriptor();
if ((setup_packet.mRequestType & USB_RECIP_MASK) ==
USB_RECIP_DEVICE)
usb_get_descriptor();
- /* Getting descriptor for a device is a standard request */
- else if ((setup_packet.mRequestType & USB_DIR_MASK) == USB_DIR_IN)
- usb_event_handler(usb_dev);
else
else
-
ep_cnfg[CTRL_ENP_OUT].status = STALLED
;
+
usb_event_handler(usb_dev)
;
}
/* USB setup packet: SET_ADDRESS handler */
}
/* USB setup packet: SET_ADDRESS handler */