SAMV71 Xplained Ultra Software Package 1.5

host_mouse_hid_task.h

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