Descriptors.h

Go to the documentation of this file.
00001 /*
00002  * This implementation of a serial.c-like interface for the Teacup firmware
00003  * is based on LUFA/Demos/Device/LowLevel/VirtualSerial.
00004  *
00005  * Modifications by Ben Jackson <ben@ben.com> under GPLv2
00006  */
00007 
00008 /*
00009              LUFA Library
00010      Copyright (C) Dean Camera, 2010.
00011 
00012   dean [at] fourwalledcubicle [dot] com
00013            www.lufa-lib.org
00014 */
00015 
00016 /*
00017   Copyright 2010  Dean Camera (dean [at] fourwalledcubicle [dot] com)
00018 
00019   Permission to use, copy, modify, distribute, and sell this
00020   software and its documentation for any purpose is hereby granted
00021   without fee, provided that the above copyright notice appear in
00022   all copies and that both that the copyright notice and this
00023   permission notice and warranty disclaimer appear in supporting
00024   documentation, and that the name of the author not be used in
00025   advertising or publicity pertaining to distribution of the
00026   software without specific, written prior permission.
00027 
00028   The author disclaim all warranties with regard to this
00029   software, including all implied warranties of merchantability
00030   and fitness.  In no event shall the author be liable for any
00031   special, indirect or consequential damages or any damages
00032   whatsoever resulting from loss of use, data or profits, whether
00033   in an action of contract, negligence or other tortious action,
00034   arising out of or in connection with the use or performance of
00035   this software.
00036 */
00037 
00043 #ifndef _DESCRIPTORS_H_
00044 #define _DESCRIPTORS_H_
00045 
00046   /* Includes: */
00047     #include <LUFA/Drivers/USB/USB.h>
00048 
00049     #include <avr/pgmspace.h>
00050 
00051   /* Macros: */
00053     #define CDC_NOTIFICATION_EPNUM         2
00054 
00056     #define CDC_TX_EPNUM                   3
00057 
00059     #define CDC_RX_EPNUM                   4
00060 
00062     #define CDC_NOTIFICATION_EPSIZE        8
00063 
00065     #define CDC_TXRX_EPSIZE                16
00066 
00067   /* Type Defines: */
00072     typedef struct
00073     {
00074       USB_Descriptor_Configuration_Header_t    Config;
00075       USB_Descriptor_Interface_t               CDC_CCI_Interface;
00076       USB_CDC_Descriptor_FunctionalHeader_t    CDC_Functional_Header;
00077       USB_CDC_Descriptor_FunctionalACM_t       CDC_Functional_ACM;
00078       USB_CDC_Descriptor_FunctionalUnion_t     CDC_Functional_Union;
00079       USB_Descriptor_Endpoint_t                CDC_NotificationEndpoint;
00080       USB_Descriptor_Interface_t               CDC_DCI_Interface;
00081       USB_Descriptor_Endpoint_t                CDC_DataOutEndpoint;
00082       USB_Descriptor_Endpoint_t                CDC_DataInEndpoint;
00083     } USB_Descriptor_Configuration_t;
00084 
00085   /* Function Prototypes: */
00086     uint16_t CALLBACK_USB_GetDescriptor(const uint16_t wValue,
00087                                         const uint8_t wIndex,
00088                                         const void** const DescriptorAddress)
00089                                         ATTR_WARN_UNUSED_RESULT ATTR_NON_NULL_PTR_ARG(3);
00090 
00091 #endif
00092 
 All Data Structures Files Functions Variables Defines