00001 /*This file is prepared for Doxygen automatic documentation generation.*/ 00017 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00018 * 00019 * Redistribution and use in source and binary forms, with or without 00020 * modification, are permitted provided that the following conditions are met: 00021 * 00022 * 1. Redistributions of source code must retain the above copyright notice, this 00023 * list of conditions and the following disclaimer. 00024 * 00025 * 2. Redistributions in binary form must reproduce the above copyright notice, 00026 * this list of conditions and the following disclaimer in the documentation 00027 * and/or other materials provided with the distribution. 00028 * 00029 * 3. The name of Atmel may not be used to endorse or promote products derived 00030 * from this software without specific prior written permission. 00031 * 00032 * 4. This software may only be redistributed and used in connection with an Atmel 00033 * AVR product. 00034 * 00035 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00036 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00037 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00038 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00039 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00040 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00041 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00042 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00043 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00044 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00045 * 00046 */ 00047 00048 #ifndef _HOST_HID_H_ 00049 #define _HOST_HID_H_ 00050 00051 00052 //_____ I N C L U D E S ________________________________________________________ 00053 00054 #include "compiler.h" 00055 #include "hid.h" 00056 00057 00058 //_____ M A C R O S ____________________________________________________________ 00059 00060 00061 //_____ D E F I N I T I O N S __________________________________________________ 00062 00064 typedef struct 00065 { 00066 U8 type; 00067 U8 tag; 00068 Bool long_format; 00069 union 00070 { 00071 hid_short_item_data_t short_data; 00072 struct 00073 { 00074 U8 size; 00075 const void *data; 00076 } long_data; 00077 }; 00078 } host_hid_item_t; 00079 00080 00081 //_____ D E C L A R A T I O N S ________________________________________________ 00082 00085 00086 00096 extern Status_t host_hid_get_descriptor(U8 descriptor_type, U8 descriptor_index, U8 s_interface); 00097 00108 extern Status_t host_hid_set_descriptor(U8 descriptor_type, U8 descriptor_index, U8 s_interface, U16 length); 00109 00111 00114 00115 00124 extern Status_t host_hid_get_report(U8 report_type, U8 report_id, U8 s_interface); 00125 00135 extern Status_t host_hid_set_report(U8 report_type, U8 report_id, U8 s_interface, U16 length); 00136 00146 extern U8 host_hid_get_idle(U8 report_id, U8 s_interface); 00147 00160 extern Status_t host_hid_set_idle(U8 duration_4_ms, U8 report_id, U8 s_interface); 00161 00172 extern U8 host_hid_get_protocol(U8 s_interface); 00173 00189 extern Status_t host_hid_set_protocol(U8 protocol, U8 s_interface); 00190 00192 00195 00196 00206 extern Status_bool_t host_hid_get_item(host_hid_item_t *item); 00207 00209 00210 00211 #endif // _HOST_HID_H_