From c06c6e85cefb041715d7e037f8e26a4625e30bdc Mon Sep 17 00:00:00 2001 From: Marti Bolivar Date: Tue, 31 Jul 2012 16:40:06 -0400 Subject: Move CDC ACM config. descriptor into usb_cdcacm.c. Signed-off-by: Marti Bolivar --- libmaple/usb/stm32f1/usb_cdcacm.c | 17 +++++++++++++++-- libmaple/usb/stm32f1/usb_descriptors.h | 13 ------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/libmaple/usb/stm32f1/usb_cdcacm.c b/libmaple/usb/stm32f1/usb_cdcacm.c index 7a7d656..b3160a4 100644 --- a/libmaple/usb/stm32f1/usb_cdcacm.c +++ b/libmaple/usb/stm32f1/usb_cdcacm.c @@ -107,6 +107,19 @@ const USB_Descriptor_Device usbVcomDescriptor_Device = { .bNumConfigurations = 0x01, }; +typedef struct { + USB_Descriptor_Config_Header Config_Header; + USB_Descriptor_Interface CCI_Interface; + CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader; + CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement; + CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_ACM; + CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; + USB_Descriptor_Endpoint ManagementEndpoint; + USB_Descriptor_Interface DCI_Interface; + USB_Descriptor_Endpoint DataOutEndpoint; + USB_Descriptor_Endpoint DataInEndpoint; +} __packed USB_Descriptor_Config; + #define MAX_POWER (100 >> 1) const USB_Descriptor_Config usbVcomDescriptor_Config = { .Config_Header = { @@ -268,8 +281,8 @@ typedef struct { uint8 datatype; } USB_Line_Coding; -uint8 last_request = 0; -USB_Line_Coding line_coding = { +static uint8 last_request = 0; +static USB_Line_Coding line_coding = { .bitrate = 115200, .format = 0x00, /* stop bits-1 */ .paritytype = 0x00, diff --git a/libmaple/usb/stm32f1/usb_descriptors.h b/libmaple/usb/stm32f1/usb_descriptors.h index 9bcb2b6..0732e73 100644 --- a/libmaple/usb/stm32f1/usb_descriptors.h +++ b/libmaple/usb/stm32f1/usb_descriptors.h @@ -122,19 +122,6 @@ typedef struct { uint8 bInterval; } __packed USB_Descriptor_Endpoint; -typedef struct { - USB_Descriptor_Config_Header Config_Header; - USB_Descriptor_Interface CCI_Interface; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_IntHeader; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_CallManagement; - CDC_FUNCTIONAL_DESCRIPTOR(1) CDC_Functional_ACM; - CDC_FUNCTIONAL_DESCRIPTOR(2) CDC_Functional_Union; - USB_Descriptor_Endpoint ManagementEndpoint; - USB_Descriptor_Interface DCI_Interface; - USB_Descriptor_Endpoint DataOutEndpoint; - USB_Descriptor_Endpoint DataInEndpoint; -} __packed USB_Descriptor_Config; - typedef struct { uint8 bLength; uint8 bDescriptorType; -- cgit v1.2.3