Fix Olimex SAM7EX256 button definitions

ugfx_release_2.6
Andrew Hannam 2013-03-08 00:50:39 +10:00
parent 40534cbc79
commit 4e67b54e4d
1 changed files with 57 additions and 57 deletions

View File

@ -1,57 +1,57 @@
/* /*
ChibiOS/GFX - Copyright (C) 2012, 2013 ChibiOS/GFX - Copyright (C) 2012, 2013
Joel Bodenmann aka Tectu <joel@unormal.org> Joel Bodenmann aka Tectu <joel@unormal.org>
This file is part of ChibiOS/GFX. This file is part of ChibiOS/GFX.
ChibiOS/GFX is free software; you can redistribute it and/or modify ChibiOS/GFX is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or the Free Software Foundation; either version 3 of the License, or
(at your option) any later version. (at your option) any later version.
ChibiOS/GFX is distributed in the hope that it will be useful, ChibiOS/GFX is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details. GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. along with this program. If not, see <http://www.gnu.org/licenses/>.
*/ */
/** /**
* @file drivers/ginput/toggle/Pal/ginput_lld_toggle_board_olimexsam7ex256.h * @file drivers/ginput/toggle/Pal/ginput_lld_toggle_board_olimexsam7ex256.h
* @brief GINPUT Toggle low level driver source for the ChibiOS PAL hardware on the Olimex SAM7EX256 board. * @brief GINPUT Toggle low level driver source for the ChibiOS PAL hardware on the Olimex SAM7EX256 board.
* *
* @defgroup Toggle Toggle * @defgroup Toggle Toggle
* @ingroup GINPUT * @ingroup GINPUT
* @{ * @{
*/ */
#ifndef _GDISP_LLD_TOGGLE_BOARD_H #ifndef _GDISP_LLD_TOGGLE_BOARD_H
#define _GDISP_LLD_TOGGLE_BOARD_H #define _GDISP_LLD_TOGGLE_BOARD_H
#define GINPUT_TOGGLE_NUM_PORTS 7 // The total number of toggle inputs #define GINPUT_TOGGLE_NUM_PORTS 7 // The total number of toggle inputs
#define GINPUT_TOGGLE_CONFIG_ENTRIES 2 // The total number of GToggleConfig entries #define GINPUT_TOGGLE_CONFIG_ENTRIES 2 // The total number of GToggleConfig entries
#define GINPUT_TOGGLE_SW1 0 // Switch 1 #define GINPUT_TOGGLE_SW1 0 // Switch 1
#define GINPUT_TOGGLE_SW2 1 // Switch 2 #define GINPUT_TOGGLE_SW2 1 // Switch 2
#define GINPUT_TOGGLE_UP 2 // Joystick Up #define GINPUT_TOGGLE_LEFT 2 // Joystick Left
#define GINPUT_TOGGLE_DOWN 3 // Joystick Down #define GINPUT_TOGGLE_DOWN 3 // Joystick Down
#define GINPUT_TOGGLE_LEFT 4 // Joystick Left #define GINPUT_TOGGLE_UP 4 // Joystick Up
#define GINPUT_TOGGLE_RIGHT 5 // Joystick Right #define GINPUT_TOGGLE_RIGHT 5 // Joystick Right
#define GINPUT_TOGGLE_CENTER 6 // Joystick Center #define GINPUT_TOGGLE_CENTER 6 // Joystick Center
#define GINPUT_TOGGLE_DECLARE_STRUCTURE() \ #define GINPUT_TOGGLE_DECLARE_STRUCTURE() \
const GToggleConfig GInputToggleConfigTable[GINPUT_TOGGLE_CONFIG_ENTRIES] = { \ const GToggleConfig GInputToggleConfigTable[GINPUT_TOGGLE_CONFIG_ENTRIES] = { \
{AT91C_BASE_PIOB, /* Switch 1 and Switch 2 */ \ {AT91C_BASE_PIOB, /* Switch 1 and Switch 2 */ \
PIOB_SW1_MASK|PIOB_SW2_MASK, \ PIOB_SW1_MASK|PIOB_SW2_MASK, \
PIOB_SW1_MASK|PIOB_SW2_MASK, \ PIOB_SW1_MASK|PIOB_SW2_MASK, \
PAL_MODE_INPUT}, \ PAL_MODE_INPUT}, \
{AT91C_BASE_PIOA, /* B1..4 Joystick */ \ {AT91C_BASE_PIOA, /* B1..4 Joystick */ \
PIOA_B1_MASK|PIOA_B2_MASK|PIOA_B3_MASK|PIOA_B4_MASK|PIOA_B5_MASK, \ PIOA_B1_MASK|PIOA_B2_MASK|PIOA_B3_MASK|PIOA_B4_MASK|PIOA_B5_MASK, \
PIOA_B1_MASK|PIOA_B2_MASK|PIOA_B3_MASK|PIOA_B4_MASK|PIOA_B5_MASK, \ PIOA_B1_MASK|PIOA_B2_MASK|PIOA_B3_MASK|PIOA_B4_MASK|PIOA_B5_MASK, \
PAL_MODE_INPUT}, \ PAL_MODE_INPUT}, \
} }
#endif /* _GDISP_LLD_TOGGLE_BOARD_H */ #endif /* _GDISP_LLD_TOGGLE_BOARD_H */
/** @} */ /** @} */