X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/b7049da11b6fe3c37b23d8f7dddfff08ba14f449..d475ea4394ba0e16f89300ebeb452cea7c2d9232:/LUFA/Drivers/USB/Class/Host/CDC.h?ds=sidebyside diff --git a/LUFA/Drivers/USB/Class/Host/CDC.h b/LUFA/Drivers/USB/Class/Host/CDC.h index 292411be4..e39333ee8 100644 --- a/LUFA/Drivers/USB/Class/Host/CDC.h +++ b/LUFA/Drivers/USB/Class/Host/CDC.h @@ -50,8 +50,48 @@ #endif /* Public Interface - May be used in end-application: */ + /* Type Defines: */ + typedef struct + { + 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 */ + uint16_t DataINPipeSize; /**< Size in bytes of the CDC interface's IN data pipe */ + + 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 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 */ + + struct + { + uint32_t BaudRateBPS; /**< Baud rate of the virtual serial port, in bits per second */ + uint8_t CharFormat; /**< Character format of the virtual serial port, a value from the + * CDCDevice_CDC_LineCodingFormats_t enum + */ + uint8_t ParityType; /**< Parity setting of the virtual serial port, a value from the + * CDCDevice_LineCodingParity_t enum + */ + 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__)