00001 /* This header file is part of the AVR Software Framework 2.0.0 release */ 00002 00003 /*This file is prepared for Doxygen automatic documentation generation.*/ 00004 /*! \file ****************************************************************** 00005 * 00006 * \brief Management of the USB host mouse HID task. 00007 * 00008 * This file manages the USB host mouse HID task. 00009 * 00010 * - Compiler: IAR EWAVR32 and GNU GCC for AVR32 00011 * - Supported devices: All AVR32 devices with a USB module can be used. 00012 * - AppNote: 00013 * 00014 * \author Atmel Corporation: http://www.atmel.com \n 00015 * Support and FAQ: http://support.atmel.no/ 00016 * 00017 ***************************************************************************/ 00018 00019 /* Copyright (c) 2009 Atmel Corporation. All rights reserved. 00020 * 00021 * Redistribution and use in source and binary forms, with or without 00022 * modification, are permitted provided that the following conditions are met: 00023 * 00024 * 1. Redistributions of source code must retain the above copyright notice, this 00025 * list of conditions and the following disclaimer. 00026 * 00027 * 2. Redistributions in binary form must reproduce the above copyright notice, 00028 * this list of conditions and the following disclaimer in the documentation 00029 * and/or other materials provided with the distribution. 00030 * 00031 * 3. The name of Atmel may not be used to endorse or promote products derived 00032 * from this software without specific prior written permission. 00033 * 00034 * 4. This software may only be redistributed and used in connection with an Atmel 00035 * AVR product. 00036 * 00037 * THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR IMPLIED 00038 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 00039 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE 00040 * EXPRESSLY AND SPECIFICALLY DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR 00041 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 00042 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 00043 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 00044 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 00045 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00046 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE 00047 * 00048 */ 00049 00050 #ifndef _HOST_MOUSE_HID_TASK_H_ 00051 #define _HOST_MOUSE_HID_TASK_H_ 00052 00053 00054 //_____ I N C L U D E S ____________________________________________________ 00055 00056 #include "conf_usb.h" 00057 00058 #if USB_HOST_FEATURE == DISABLED 00059 #error host_mouse_hid_task.h is #included although USB_HOST_FEATURE is disabled 00060 #endif 00061 00062 00063 #include "usb_host_task.h" 00064 00065 00066 //_____ M A C R O S ________________________________________________________ 00067 00068 #define Is_host_mouse_hid_configured() (mouse_hid_connected && !Is_host_suspended()) 00069 00070 00071 //_____ D E F I N I T I O N S ______________________________________________ 00072 00073 #define DEVICE_TO_HOST 0x01 00074 #define HOST_TO_DEVICE 0x02 00075 #define FULL_SYNC (DEVICE_TO_HOST | HOST_TO_DEVICE) 00076 00077 #define DIR_LOCAL_OUT_NAME "OUT" 00078 #define DIR_LOCAL_IN_NAME "IN" 00079 00080 #define DIR_USB_OUT_NAME "OUT" 00081 #define DIR_USB_IN_NAME "IN" 00082 00083 #define LED_HOST_MOUSE_B0 LED_GREEN // D4 00084 #define LED_HOST_MOUSE_B1 LED_AMBER // D3 00085 #define LED_HOST_MOUSE_B2 LED_BLUE // D2 00086 #define LED_HOST_MOUSE_B3 LED_RED // D5 00087 00088 00089 //_____ D E C L A R A T I O N S ____________________________________________ 00090 00091 extern volatile Bool ms_connected; 00092 00093 extern void host_mouse_hid_task_init(void); 00094 #ifdef FREERTOS_USED 00095 extern void host_mouse_hid_task(void *pvParameters); 00096 #else 00097 extern void host_mouse_hid_task(void); 00098 #endif 00099 extern void host_sof_action(void); 00100 00101 00102 #endif // _HOST_MOUSE_HID_TASK_H_