00001 /*This file is prepared for Doxygen automatic documentation generation.*/ 00023 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00024 * 00025 * Redistribution and use in source and binary forms, with or without 00026 * modification, are permitted provided that the following conditions are met: 00027 * 00028 * 1. Redistributions of source code must retain the above copyright notice, this 00029 * list of conditions and the following disclaimer. 00030 * 00031 * 2. Redistributions in binary form must reproduce the above copyright notice, 00032 * this list of conditions and the following disclaimer in the documentation 00033 * and/or other materials provided with the distribution. 00034 * 00035 * 3. The name of Atmel may not be used to endorse or promote products derived 00036 * from this software without specific prior written permission. 00037 * 00038 * 4. This software may only be redistributed and used in connection with an Atmel 00039 * AVR product. 00040 * 00041 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00042 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00043 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00044 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00045 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00046 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00047 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00048 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00049 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00050 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00051 * 00052 */ 00053 00054 #ifndef _USB_STANDARD_REQUEST_H_ 00055 #define _USB_STANDARD_REQUEST_H_ 00056 00057 00058 //_____ I N C L U D E S ____________________________________________________ 00059 00060 #include "conf_usb.h" 00061 00062 #if USB_DEVICE_FEATURE == DISABLED 00063 #error usb_standard_request.h is #included although USB_DEVICE_FEATURE is disabled 00064 #endif 00065 00066 00067 #include "usb_task.h" 00068 #include "usb_descriptors.h" 00069 00070 00073 00074 00075 //_____ M A C R O S ________________________________________________________ 00076 00077 00078 //_____ S T A N D A R D D E F I N I T I O N S ___________________________ 00079 00080 // Device State 00081 #define ATTACHED 0 00082 #define POWERED 1 00083 #define DEFAULT 2 00084 #define ADDRESSED 3 00085 #define CONFIGURED 4 00086 #define SUSPENDED 5 00087 00088 #define USB_CONFIG_ATTRIBUTES_RESERVED 0x80 00089 #define USB_CONFIG_BUSPOWERED (USB_CONFIG_ATTRIBUTES_RESERVED | 0x00) 00090 #define USB_CONFIG_SELFPOWERED (USB_CONFIG_ATTRIBUTES_RESERVED | 0x40) 00091 #define USB_CONFIG_REMOTEWAKEUP (USB_CONFIG_ATTRIBUTES_RESERVED | 0x20) 00092 00093 00094 //_____ D E C L A R A T I O N S ____________________________________________ 00095 00098 #define Is_device_enumerated() (usb_configuration_nb != 0) 00099 00116 extern void usb_process_request(void); 00117 00118 extern volatile U8 usb_configuration_nb; 00119 00120 00122 00123 00124 #endif // _USB_STANDARD_REQUEST_H_