diff options
author | Marti Bolivar <mbolivar@leaflabs.com> | 2012-07-31 16:40:06 -0400 |
---|---|---|
committer | Marti Bolivar <mbolivar@leaflabs.com> | 2012-07-31 18:02:29 -0400 |
commit | c06c6e85cefb041715d7e037f8e26a4625e30bdc (patch) | |
tree | bba7fbfbc4b919ad5ca07e6cd0fe1c62fc3bd425 /libmaple/usb/stm32f1 | |
parent | ee40d089a0dd41197535f8b1d46fb7a8a0ea24ee (diff) | |
download | librambutan-c06c6e85cefb041715d7e037f8e26a4625e30bdc.tar.gz librambutan-c06c6e85cefb041715d7e037f8e26a4625e30bdc.zip |
Move CDC ACM config. descriptor into usb_cdcacm.c.
Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Diffstat (limited to 'libmaple/usb/stm32f1')
-rw-r--r-- | libmaple/usb/stm32f1/usb_cdcacm.c | 17 | ||||
-rw-r--r-- | 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 @@ -123,19 +123,6 @@ typedef struct { } __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; uint16 bString[]; |