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 HWB driver, for boards containing a 
  34  *  physical pushbutton connected to the AVR's HWB IO pin. 
  36  *  User code should include this file, which will in turn include the correct HWB driver header file for the 
  37  *  currently selected board. 
  39  *  If the BOARD value is set to BOARD_USER, this will include the /Board/HWB.h file in the user project 
  47         #if !defined(__DOXYGEN__) 
  48                 #define INCLUDE_FROM_HWB_H 
  49                 #define INCLUDE_FROM_BOARD_DRIVER 
  53         #include "../../Common/Common.h" 
  56                 #error BOARD must be set in makefile to a value specified in BoardTypes.h. 
  57         #elif (BOARD == BOARD_USBKEY) 
  58                 #include "USBKEY/HWB.h" 
  59         #elif (BOARD == BOARD_STK525) 
  60                 #include "STK525/HWB.h" 
  61         #elif (BOARD == BOARD_STK526) 
  62                 #include "STK526/HWB.h" 
  63         #elif (BOARD == BOARD_ATAVRUSBRF01) 
  64                 #include "ATAVRUSBRF01/HWB.h" 
  65         #elif (BOARD == BOARD_USER) 
  66                 #include "Board/HWB.h"           
  68                 #error The selected board does not contain a HWB. 
  71         /* Psudo-Functions for Doxygen: */ 
  72         #if defined(__DOXYGEN__) 
  73                 /** Initializes the HWB driver, so that the current button position can be read. This sets the appropriate 
  74                  *  I/O pin to an input with pull-up enabled. 
  76                  *  This must be called before any HWB functions are used. 
  78                 static inline void HWB_Init(void); 
  80                 /** Returns the current position of the HWB button on the board. 
  82                  *  \return Boolean true if the button is currently pressed, false otherwise 
  84                 static inline bool HWB_GetStatus(void) ATTR_WARN_UNUSED_RESULT
;