X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/89e4d73289b6156aebf4e3e492033d6b017c7813..fc31973daffea3506051ce51a5f79383ce0867d6:/LUFA/Drivers/USB/Class/Device/CDC.h diff --git a/LUFA/Drivers/USB/Class/Device/CDC.h b/LUFA/Drivers/USB/Class/Device/CDC.h index d248868cd..2c5c30afd 100644 --- a/LUFA/Drivers/USB/Class/Device/CDC.h +++ b/LUFA/Drivers/USB/Class/Device/CDC.h @@ -28,6 +28,15 @@ this software. */ +/** \file + * \brief Device mode driver for the library USB CDC Class driver. + * + * Device mode driver for the library USB CDC Class driver. + * + * \note This file should not be included directly. It is automatically included as needed by the class driver + * dispatch header located in LUFA/Drivers/USB/Class/CDC.h. + */ + /** \ingroup Group_USBClassCDC * @defgroup Group_USBClassCDCDevice CDC Class Device Mode Driver * @@ -73,9 +82,16 @@ extern "C" { #endif + /* Preprocessor Checks: */ + #if !defined(__INCLUDE_FROM_CDC_DRIVER) + #error Do not include this file directly. Include LUFA/Drivers/Class/CDC.h instead. + #endif + /* Public Interface - May be used in end-application: */ /* Type Defines: */ - /** Class state structure. An instance of this structure should be made for each CDC interface + /** \brief CDC Class Device Mode Configuration and State Structure. + * + * Class state structure. An instance of this structure should be made for each CDC interface * within the user application, and passed to each of the CDC class driver functions as the * CDCInterfaceInfo parameter. This stores each CDC interface's configuration and state information. */ @@ -104,12 +120,13 @@ struct { uint8_t HostToDevice; /**< Control line states from the host to device, as a set of CDC_CONTROL_LINE_OUT_* - * masks. + * masks. This value is updated each time \ref CDC_Device_USBTask() is called. */ uint8_t DeviceToHost; /**< Control line states from the device to host, as a set of CDC_CONTROL_LINE_IN_* - * masks. + * masks - to notify the host of changes to these values, call the + * \ref CDC_Device_SendControlLineStateChange() function. */ - } ControlLineStates; + } ControlLineStates; /**< Current states of the virtual serial port's control lines between the device and host. */ struct { @@ -121,7 +138,9 @@ * CDCDevice_LineCodingParity_t enum */ uint8_t DataBits; /**< Bits of data per character of the virtual serial port */ - } LineEncoding; + } LineEncoding; /** Line encoding used in the virtual serial port, for the device's information. This is generally + * only used if the virtual serial port data is to be reconstructed on a physical UART. + */ } State; /**< State data for the USB class interface within the device. All elements in this section * are reset to their defaults when the interface is enumerated. */ @@ -278,7 +297,7 @@ /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) /* Function Prototypes: */ - #if defined(INCLUDE_FROM_CDC_CLASS_DEVICE_C) + #if defined(__INCLUDE_FROM_CDC_CLASS_DEVICE_C) static int CDC_Device_putchar(char c, FILE* Stream); static int CDC_Device_getchar(FILE* Stream); static int CDC_Device_getchar_Blocking(FILE* Stream);