ATMEL: usb_standard_request.h Source File

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

# usb_standard_request.h

Go to the documentation of this file.

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