Contiki 2.6

usb_specific_request.h

Go to the documentation of this file.
00001 /* This file has been prepared for Doxygen automatic documentation generation.*/
00002 /*! \file *********************************************************************
00003  *
00004  * \brief
00005  *      This file contains the user callback functions corresponding to the
00006  *      application.
00007  *
00008  * \addtogroup usbtask
00009  *
00010  * \author
00011  *      Atmel Corporation: http://www.atmel.com \n
00012  *      Support email: avr@atmel.com
00013  *
00014  ******************************************************************************/
00015 /* Copyright (c) 2008  ATMEL Corporation
00016    All rights reserved.
00017 
00018    Redistribution and use in source and binary forms, with or without
00019    modification, are permitted provided that the following conditions are met:
00020 
00021    * Redistributions of source code must retain the above copyright
00022      notice, this list of conditions and the following disclaimer.
00023    * Redistributions in binary form must reproduce the above copyright
00024      notice, this list of conditions and the following disclaimer in
00025      the documentation and/or other materials provided with the
00026      distribution.
00027    * Neither the name of the copyright holders nor the names of
00028      contributors may be used to endorse or promote products derived
00029      from this software without specific prior written permission.
00030 
00031   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00032   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00033   IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00034   ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00035   LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00036   CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00037   SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00038   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00039   CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00040   ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00041   POSSIBILITY OF SUCH DAMAGE.
00042 */
00043 
00044 #ifndef _USB_SPECIFIC_REQUEST_H_
00045 #define _USB_SPECIFIC_REQUEST_H_
00046 
00047 /*_____ I N C L U D E S ____________________________________________________*/
00048 
00049 #include "config.h"
00050 
00051 /*_____ M A C R O S ________________________________________________________*/
00052 
00053 
00054 #define SEND_ENCAPSULATED_COMMAND 0x00
00055 #define GET_ENCAPSULATED_COMMAND  0x01
00056 #define GET_LINE_CODING           0x21
00057 #define SET_LINE_CODING           0x20
00058 #define SET_CONTROL_LINE_STATE    0x22
00059 #define SEND_BREAK                0x23
00060 #define MASS_STORAGE_RESET        0xFF
00061 #define GET_MAX_LUN               0xFE
00062 
00063 extern  FLASH S_usb_device_descriptor usb_dev_desc_composite;
00064 extern  FLASH S_usb_device_descriptor usb_dev_desc_network;
00065 extern  FLASH S_usb_user_configuration_descriptor_composite usb_conf_desc_composite;
00066 extern  FLASH S_usb_user_configuration_descriptor_network usb_conf_desc_network;
00067 extern  FLASH S_usb_device_qualifier_descriptor usb_qual_desc;
00068 extern  FLASH S_usb_language_id usb_user_language_id;
00069 
00070 
00071 
00072 /*_____ D E F I N I T I O N ________________________________________________*/
00073 Bool  usb_user_read_request(U8, U8);
00074 Bool  usb_user_get_descriptor(U8 , U8);
00075 void  usb_user_endpoint_init(U8);
00076 Bool  usb_user_set_alt_interface(U8 interface, U8 alt_setting);
00077 
00078 PGM_P usb_user_get_string(U8 string_type);
00079 const char* usb_user_get_string_sram(U8 string_type);
00080 
00081 void  cdc_get_line_coding();
00082 void  cdc_set_line_coding();
00083 void    cdc_set_control_line_state (void);
00084 
00085 extern usb_mode_t usb_mode;
00086 
00087 // ____ T Y P E  D E F I N I T I O N _______________________________________
00088 
00089 #endif // _USB_SPECIFIC_REQUEST_H_
00090