diff options
author | Diego Roversi <diegor@tiscali.it> | 2018-03-11 11:36:20 +0100 |
---|---|---|
committer | Diego Roversi <diegor@tiscali.it> | 2018-03-11 11:36:20 +0100 |
commit | d7b39eed5194f0bfe7f5c8713abb6f99607f5081 (patch) | |
tree | 54084741c95217da8e984073eafa24b3d398cf7a /TERES-HID/Descriptors.h | |
parent | 91bc0cd5909007bb3608cb37880af8447c7ac877 (diff) |
add serial ACM handling
Diffstat (limited to 'TERES-HID/Descriptors.h')
-rw-r--r-- | TERES-HID/Descriptors.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/TERES-HID/Descriptors.h b/TERES-HID/Descriptors.h index 045c5ac..4dd4a3e 100644 --- a/TERES-HID/Descriptors.h +++ b/TERES-HID/Descriptors.h @@ -116,8 +116,23 @@ HID_RI_END_COLLECTION(0) + /* Macros: */ + /** Endpoint address of the CDC device-to-host notification IN endpoint. */ + #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 2) - /* Type Defines: */ + /** Endpoint address of the CDC device-to-host data IN endpoint. */ + #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 3) + + /** Endpoint address of the CDC host-to-device data OUT endpoint. */ + #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 4) + + /** Size in bytes of the CDC device-to-host notification IN endpoint. */ + #define CDC_NOTIFICATION_EPSIZE 8 + + /** Size in bytes of the CDC data IN and OUT endpoints. */ + #define CDC_TXRX_EPSIZE 16 + + /* Type Defines: */ /** Type define for the device configuration descriptor structure. This must be defined in the * application code, as the configuration descriptor contains several sub-descriptors which * vary between devices, and which describe the device's usage to the host. @@ -125,6 +140,20 @@ typedef struct { USB_Descriptor_Configuration_Header_t Config; + + // CDC Control Interface + USB_Descriptor_Interface_Association_t CDC_IAD; + USB_Descriptor_Interface_t CDC_CCI_Interface; + USB_CDC_Descriptor_FunctionalHeader_t CDC_Functional_Header; + USB_CDC_Descriptor_FunctionalACM_t CDC_Functional_ACM; + USB_CDC_Descriptor_FunctionalUnion_t CDC_Functional_Union; + USB_Descriptor_Endpoint_t CDC_NotificationEndpoint; + + // CDC Data Interface + USB_Descriptor_Interface_t CDC_DCI_Interface; + USB_Descriptor_Endpoint_t CDC_DataOutEndpoint; + USB_Descriptor_Endpoint_t CDC_DataInEndpoint; + // Keyboard HID Interface USB_Descriptor_Interface_t HID1_KeyboardInterface; @@ -146,6 +175,8 @@ INTERFACE_ID_Keyboard = 0, /**< Keyboard interface descriptor ID */ INTERFACE_ID_Mouse = 1, /**< Mouse interface descriptor ID */ + INTERFACE_ID_CDC_CCI = 2, /**< CDC CCI interface descriptor ID */ + INTERFACE_ID_CDC_DCI = 3, /**< CDC DCI interface descriptor ID */ |