123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128 |
- #ifndef _DESCRIPTORS_H_
- #define _DESCRIPTORS_H_
-
- #include <avr/pgmspace.h>
- #include <LUFA/Drivers/USB/USB.h>
- #include "Config/AppConfig.h"
-
-
- #define MASS_STORAGE_IN_EPADDR (ENDPOINT_DIR_IN | 3)
-
- #define MASS_STORAGE_OUT_EPADDR (ENDPOINT_DIR_OUT | 4)
-
- #define MASS_STORAGE_IO_EPSIZE 64
-
- #define CDC_NOTIFICATION_EPADDR (ENDPOINT_DIR_IN | 5)
-
- #define CDC_TX_EPADDR (ENDPOINT_DIR_IN | 1)
-
- #define CDC_RX_EPADDR (ENDPOINT_DIR_OUT | 2)
-
- #define CDC_NOTIFICATION_EPSIZE 8
-
- #define CDC_TXRX_EPSIZE 64
-
-
- typedef struct
- {
- USB_Descriptor_Configuration_Header_t Config;
-
- 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;
-
- USB_Descriptor_Interface_t CDC_DCI_Interface;
- USB_Descriptor_Endpoint_t RNDIS_DataOutEndpoint;
- USB_Descriptor_Endpoint_t RNDIS_DataInEndpoint;
-
- USB_Descriptor_Interface_t MS_Interface;
- USB_Descriptor_Endpoint_t MS_DataInEndpoint;
- USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
- } USB_Descriptor_Configuration_t;
-
- enum InterfaceDescriptors_t
- {
- INTERFACE_ID_CDC_CCI = 0,
- INTERFACE_ID_CDC_DCI = 1,
- INTERFACE_ID_MassStorage = 2,
- };
-
- enum StringDescriptors_t
- {
- STRING_ID_Language = 0,
- STRING_ID_Manufacturer = 1,
- STRING_ID_Product = 2,
- };
-
- uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
- const uint16_t wIndex,
- const void** const DescriptorAddress)
- ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
- #endif
|