aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libmaple/include/libmaple/usb_cdcacm.h8
-rw-r--r--libmaple/usb/stm32f1/usb_cdcacm.c14
2 files changed, 11 insertions, 11 deletions
diff --git a/libmaple/include/libmaple/usb_cdcacm.h b/libmaple/include/libmaple/usb_cdcacm.h
index 1e2ed59..2cb3ad4 100644
--- a/libmaple/include/libmaple/usb_cdcacm.h
+++ b/libmaple/include/libmaple/usb_cdcacm.h
@@ -55,10 +55,10 @@ extern "C" {
#define USB_CDCACM_TX_ADDR 0xC0
#define USB_CDCACM_TX_EPSIZE 0x40
-#define USB_CDCACM_NOTIFICATION_ENDP 2
-#define USB_CDCACM_NOTIFICATION_EPNUM 0x02
-#define USB_CDCACM_NOTIFICATION_ADDR 0x100
-#define USB_CDCACM_NOTIFICATION_EPSIZE 0x40
+#define USB_CDCACM_MANAGEMENT_ENDP 2
+#define USB_CDCACM_MANAGEMENT_EPNUM 0x02
+#define USB_CDCACM_MANAGEMENT_ADDR 0x100
+#define USB_CDCACM_MANAGEMENT_EPSIZE 0x40
#define USB_CDCACM_RX_ENDP 3
#define USB_CDCACM_RX_EPNUM 0x03
diff --git a/libmaple/usb/stm32f1/usb_cdcacm.c b/libmaple/usb/stm32f1/usb_cdcacm.c
index b3160a4..58ac850 100644
--- a/libmaple/usb/stm32f1/usb_cdcacm.c
+++ b/libmaple/usb/stm32f1/usb_cdcacm.c
@@ -178,9 +178,9 @@ const USB_Descriptor_Config usbVcomDescriptor_Config = {
.bLength = sizeof(USB_Descriptor_Endpoint),
.bDescriptorType = USB_DESCRIPTOR_TYPE_ENDPOINT,
.bEndpointAddress = (USB_DESCRIPTOR_ENDPOINT_IN |
- USB_CDCACM_NOTIFICATION_EPNUM),
+ USB_CDCACM_MANAGEMENT_EPNUM),
.bmAttributes = EP_TYPE_INTERRUPT,
- .wMaxPacketSize = USB_CDCACM_NOTIFICATION_EPSIZE,
+ .wMaxPacketSize = USB_CDCACM_MANAGEMENT_EPSIZE,
.bInterval = 0xFF,
},
@@ -557,11 +557,11 @@ static void usbReset(void) {
usb_set_ep_rx_stat(USB_EP0, USB_EP_STAT_RX_VALID);
/* setup management endpoint 1 */
- usb_set_ep_type(USB_CDCACM_NOTIFICATION_ENDP, USB_EP_EP_TYPE_INTERRUPT);
- usb_set_ep_tx_addr(USB_CDCACM_NOTIFICATION_ENDP,
- USB_CDCACM_NOTIFICATION_ADDR);
- usb_set_ep_tx_stat(USB_CDCACM_NOTIFICATION_ENDP, USB_EP_STAT_TX_NAK);
- usb_set_ep_rx_stat(USB_CDCACM_NOTIFICATION_ENDP, USB_EP_STAT_RX_DISABLED);
+ usb_set_ep_type(USB_CDCACM_MANAGEMENT_ENDP, USB_EP_EP_TYPE_INTERRUPT);
+ usb_set_ep_tx_addr(USB_CDCACM_MANAGEMENT_ENDP,
+ USB_CDCACM_MANAGEMENT_ADDR);
+ usb_set_ep_tx_stat(USB_CDCACM_MANAGEMENT_ENDP, USB_EP_STAT_TX_NAK);
+ usb_set_ep_rx_stat(USB_CDCACM_MANAGEMENT_ENDP, USB_EP_STAT_RX_DISABLED);
/* TODO figure out differences in style between RX/TX EP setup */