aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-08-01 13:42:08 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-08-01 13:42:08 -0400
commit1db008ddc9bb16f10b22b14f4fce42ec44e00677 (patch)
tree0ba8075d26f7fac5790b795ec2ea4e475ffe9ba8 /libmaple
parentc06c6e85cefb041715d7e037f8e26a4625e30bdc (diff)
downloadlibrambutan-1db008ddc9bb16f10b22b14f4fce42ec44e00677.tar.gz
librambutan-1db008ddc9bb16f10b22b14f4fce42ec44e00677.zip
usb_cdcacm: Rename "notification" -> "management".
This keeps things in line with the specification, helping readability. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple')
-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 */