2010-05-08 05:12:14 +02:00
|
|
|
/*
|
|
|
|
LUFA Library
|
2011-01-01 14:00:56 +01:00
|
|
|
Copyright (C) Dean Camera, 2011.
|
2010-10-13 16:05:35 +02:00
|
|
|
|
2010-05-08 05:12:14 +02:00
|
|
|
dean [at] fourwalledcubicle [dot] com
|
2010-10-28 08:08:58 +02:00
|
|
|
www.lufa-lib.org
|
2010-05-08 05:12:14 +02:00
|
|
|
*/
|
2010-10-13 16:05:35 +02:00
|
|
|
|
2010-05-08 05:12:14 +02:00
|
|
|
#ifndef _DESCRIPTORS_H_
|
|
|
|
#define _DESCRIPTORS_H_
|
|
|
|
|
|
|
|
/* Includes: */
|
|
|
|
#include <avr/pgmspace.h>
|
|
|
|
|
|
|
|
#include <LUFA/Drivers/USB/USB.h>
|
2010-10-13 16:05:35 +02:00
|
|
|
|
2010-05-08 05:12:14 +02:00
|
|
|
#include "TempDataLogger.h"
|
|
|
|
|
|
|
|
/* Macros: */
|
|
|
|
/** Endpoint number of the Mass Storage device-to-host data IN endpoint. */
|
2010-10-13 16:05:35 +02:00
|
|
|
#define MASS_STORAGE_IN_EPNUM 3
|
2010-05-08 05:12:14 +02:00
|
|
|
|
|
|
|
/** Endpoint number of the Mass Storage host-to-device data OUT endpoint. */
|
2010-10-13 16:05:35 +02:00
|
|
|
#define MASS_STORAGE_OUT_EPNUM 4
|
2010-05-08 05:12:14 +02:00
|
|
|
|
|
|
|
/** Size in bytes of the Mass Storage data endpoints. */
|
|
|
|
#define MASS_STORAGE_IO_EPSIZE 64
|
|
|
|
|
|
|
|
/** Endpoint number of the Generic HID reporting IN endpoint. */
|
|
|
|
#define GENERIC_IN_EPNUM 1
|
|
|
|
|
|
|
|
/** Size in bytes of the Generic HID reporting endpoint. */
|
|
|
|
#define GENERIC_EPSIZE 16
|
2010-10-13 16:05:35 +02:00
|
|
|
|
2010-05-08 05:12:14 +02:00
|
|
|
/** Size in bytes of the Generic HID reports (including report ID byte). */
|
|
|
|
#define GENERIC_REPORT_SIZE sizeof(Device_Report_t)
|
2010-10-13 16:05:35 +02:00
|
|
|
|
|
|
|
/* Type Defines: */
|
2010-05-08 05:12:14 +02:00
|
|
|
/** 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.
|
|
|
|
*/
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
USB_Descriptor_Configuration_Header_t Config;
|
2011-07-01 07:26:25 +02:00
|
|
|
|
|
|
|
// Mass Storage Interface
|
2010-05-08 05:12:14 +02:00
|
|
|
USB_Descriptor_Interface_t MS_Interface;
|
|
|
|
USB_Descriptor_Endpoint_t MS_DataInEndpoint;
|
|
|
|
USB_Descriptor_Endpoint_t MS_DataOutEndpoint;
|
2011-07-01 07:26:25 +02:00
|
|
|
|
|
|
|
// Settings Management Generic HID Interface
|
2010-05-08 05:12:14 +02:00
|
|
|
USB_Descriptor_Interface_t HID_Interface;
|
2010-09-09 15:05:57 +02:00
|
|
|
USB_HID_Descriptor_HID_t HID_GenericHID;
|
2010-05-08 05:12:14 +02:00
|
|
|
USB_Descriptor_Endpoint_t HID_ReportINEndpoint;
|
|
|
|
} USB_Descriptor_Configuration_t;
|
2010-10-13 16:05:35 +02:00
|
|
|
|
2010-05-08 05:12:14 +02:00
|
|
|
/* Function Prototypes: */
|
2010-07-21 18:19:32 +02:00
|
|
|
uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
|
|
|
|
const uint8_t wIndex,
|
2010-08-24 15:02:38 +02:00
|
|
|
const void** const DescriptorAddress)
|
|
|
|
ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
|
2010-05-08 05:12:14 +02:00
|
|
|
|
|
|
|
#endif
|
2010-10-13 16:05:35 +02:00
|
|
|
|