aboutsummaryrefslogtreecommitdiffstats
path: root/LUFA/Drivers/USB/Class/Host/CDC.h
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-06-18 10:31:55 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-06-18 10:31:55 +0000
commitf896c00c48f04fb9273555ab8d9b1af99f865d25 (patch)
treeb76827a0467c77ddeb30e11748c02a4f53779a14 /LUFA/Drivers/USB/Class/Host/CDC.h
parente338cb6f329d6bf948abad88637f81436ee90daf (diff)
downloadlufa-f896c00c48f04fb9273555ab8d9b1af99f865d25.tar.gz
lufa-f896c00c48f04fb9273555ab8d9b1af99f865d25.tar.bz2
lufa-f896c00c48f04fb9273555ab8d9b1af99f865d25.zip
Break device mode class driver interfaces into seperate config and state structs which are then combined, for clarity. Move device mode class driver interfaces back into the device mode class driver headers from the common class headers to make room for host class interfaces.
Diffstat (limited to 'LUFA/Drivers/USB/Class/Host/CDC.h')
-rw-r--r--LUFA/Drivers/USB/Class/Host/CDC.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h
index 3bc814daf..e39333ee8 100644
--- a/LUFA/Drivers/USB/Class/Host/CDC.h
+++ b/LUFA/Drivers/USB/Class/Host/CDC.h
@@ -53,8 +53,6 @@
/* Type Defines: */
typedef struct
{
- bool IsActive; /**< Indicates if this class driver is currently attached to the device */
-
uint8_t ControlInterfaceNumber; /**< Interface number of the CDC control interface within the device */
uint8_t DataINPipeNumber; /**< Pipe number of the CDC interface's IN data pipe */
@@ -63,8 +61,8 @@
uint8_t DataOUTPipeNumber; /**< Pipe number of the CDC interface's OUT data pipe */
uint16_t DataOUTPipeSize; /**< Size in bytes of the CDC interface's OUT data pipe */
- uint8_t NotificationEndpointNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used */
- uint16_t NotificationEndpointSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */
+ uint8_t NotificationPipeNumber; /**< Pipe number of the CDC interface's IN notification endpoint, if used */
+ uint16_t NotificationPipeSize; /**< Size in bytes of the CDC interface's IN notification endpoint, if used */
uint8_t ControlLineState; /**< Current control line states */
@@ -80,9 +78,20 @@
uint8_t DataBits; /**< Bits of data per character of the virtual serial port */
} LineEncoding;
} USB_ClassInfo_CDC_Host_t;
+
+ /* Enums: */
+ typedef enum
+ {
+ CDC_ENUMERROR_NoError = 0, /**< Configuration Descriptor was processed successfully */
+ CDC_ENUMERROR_ControlError = 1, /**< A control request to the device failed to complete successfully */
+ CDC_ENUMERROR_DescriptorTooLarge = 2, /**< The device's Configuration Descriptor is too large to process */
+ CDC_ENUMERROR_InvalidConfigDataReturned = 3, /**< The device returned an invalid Configuration Descriptor */
+ CDC_ENUMERROR_NoCDCInterfaceFound = 4, /**< A compatible CDC interface was not found in the device's Configuration Descriptor */
+ CDC_ENUMERROR_NoEndpointFound = 5, /**< Compatible CDC endpoints were not found in the device's CDC interface */
+ } CDCHost_EnumerationFailure_ErrorCodes_t;
/* Function Prototypes: */
- void CDC_Host_Task(void);
+ void CDC_Host_USBTask(USB_ClassInfo_CDC_Host_t* CDCInterfaceInfo);
/* Private Interface - For use in library only: */
#if !defined(__DOXYGEN__)