3      Copyright (C) Dean Camera, 2009. 
   5   dean [at] fourwalledcubicle [dot] com 
   6       www.fourwalledcubicle.com 
  10   Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, and distribute this software 
  13   and its documentation for any purpose and without fee is hereby 
  14   granted, provided that the above copyright notice appear in all 
  15   copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaim all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  33  *  This file is the master dispatch header file for the board-specific Joystick driver, for boards containing a 
  36  *  User code should include this file, which will in turn include the correct joystick driver header file for the 
  37  *  currently selected board. 
  39  *  If the BOARD value is set to BOARD_USER, this will include the /Board/Joystick.h file in the user project 
  43 /** \ingroup Group_BoardDrivers 
  44  *  @defgroup Group_Joystick Joystick Driver - LUFA/Drivers/Board/Joystick.h 
  46  *  \section Sec_Dependencies Module Source Dependencies 
  47  *  The following files must be built with any user project that uses this module: 
  50  *  \section Module Description 
  51  *  Functions, macros, variables, enums and types related to the control of board joystick. 
  53  *  If the BOARD value is set to BOARD_USER, this will include the /Board/Dataflash.h file in the user project 
  54  *  directory. Otherwise, it will include the appropriate built in board driver header file. 
  59 #ifndef __JOYSTICK_H__ 
  60 #define __JOYSTICK_H__ 
  63         #if !defined(__DOXYGEN__) 
  64                 #define INCLUDE_FROM_JOYSTICK_H 
  65                 #define INCLUDE_FROM_BOARD_DRIVER 
  69         #include "../../Common/Common.h" 
  72                 #error BOARD must be set in makefile to a value specified in BoardTypes.h. 
  73         #elif (BOARD == BOARD_USBKEY) 
  74                 #include "USBKEY/Joystick.h" 
  75         #elif (BOARD == BOARD_STK525) 
  76                 #include "STK525/Joystick.h" 
  77         #elif (BOARD == BOARD_STK526) 
  78                 #include "STK526/Joystick.h" 
  79         #elif (BOARD == BOARD_USER) 
  80                 #include "Board/Joystick.h"              
  82                 #error The selected board does not contain a joystick. 
  85         /* Pseudo-Functions for Doxygen: */ 
  86         #if defined(__DOXYGEN__) 
  87                 /** Initializes the joystick driver so that the joystick position can be read. This sets the appropriate 
  88                  *  I/O pins to inputs with their pull-ups enabled. 
  90                 static inline void Joystick_Init(void); 
  92                 /** Returns the current status of the joystick, as a mask indicating the direction the joystick is 
  93                  *  currently facing in (multiple bits can be set). 
  95                  *  \return Mask indicating the joystick direction - see corresponding board specific Joystick.h file 
  98                 static inline uint8_t Joystick_GetStatus(void) ATTR_WARN_UNUSED_RESULT
;