From ffaa7447d3b0c0d9effbc83400031144bf9745f3 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Fri, 10 Apr 2009 01:16:22 +0200 Subject: * digital/avr/modules/usb: - do it more the AVR modules way. --- digital/avr/modules/usb/test/descriptors.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'digital/avr/modules/usb/test/descriptors.c') diff --git a/digital/avr/modules/usb/test/descriptors.c b/digital/avr/modules/usb/test/descriptors.c index 4ccc7b49..a3b46ee0 100644 --- a/digital/avr/modules/usb/test/descriptors.c +++ b/digital/avr/modules/usb/test/descriptors.c @@ -22,8 +22,26 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * }}} */ +#include "common.h" + +#include "modules/usb/usb.h" + +#include + #include "descriptors.h" +/* Configuration structure. */ +typedef struct +{ + USB_Descriptor_Configuration_Header_t Config; + USB_Descriptor_Interface_t TS1_Interface; + USB_Descriptor_Endpoint_t TS1_DataOutEndpoint; + USB_Descriptor_Endpoint_t TS1_DataInEndpoint; + USB_Descriptor_Interface_t TS2_Interface; + USB_Descriptor_Endpoint_t TS2_DataOutEndpoint; + USB_Descriptor_Endpoint_t TS2_DataInEndpoint; +} USB_Descriptor_Configuration_t; + USB_Descriptor_Device_t PROGMEM DeviceDescriptor = { Header: { Size: sizeof (USB_Descriptor_Device_t), Type: DTYPE_Device }, @@ -144,7 +162,7 @@ USB_Descriptor_String_t PROGMEM ProductString = uint16_t USB_GetDescriptor (const uint16_t wValue, const uint8_t wIndex, - void** const DescriptorAddress) + void ** const DescriptorAddress) { const uint8_t DescriptorType = wValue >> 8; const uint8_t DescriptorNumber = wValue & 0xFF; -- cgit v1.2.3