diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-12 15:47:47 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-03-12 15:47:47 +0000 |
commit | b645b5c1455b966355309ec2ef1e707b9df13a98 (patch) | |
tree | 8400159fc729e724a6f08e6001bbd87d1013ab73 /nuttx/configs/sure-pic32mx/src/up_buttons.c | |
parent | 0ea4808dbfc045d2187c0d896da46a6c58b26032 (diff) | |
download | px4-nuttx-b645b5c1455b966355309ec2ef1e707b9df13a98.tar.gz px4-nuttx-b645b5c1455b966355309ec2ef1e707b9df13a98.tar.bz2 px4-nuttx-b645b5c1455b966355309ec2ef1e707b9df13a98.zip |
Add support for the Sure DB-DP11212 PIC32 board
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4476 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/sure-pic32mx/src/up_buttons.c')
-rw-r--r-- | nuttx/configs/sure-pic32mx/src/up_buttons.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/nuttx/configs/sure-pic32mx/src/up_buttons.c b/nuttx/configs/sure-pic32mx/src/up_buttons.c index 9fccedfc1..80fb35fdb 100644 --- a/nuttx/configs/sure-pic32mx/src/up_buttons.c +++ b/nuttx/configs/sure-pic32mx/src/up_buttons.c @@ -58,20 +58,33 @@ /**************************************************************************** * Definitions ****************************************************************************/ -/* The Sure PIC32MX board has three buttons. +/* The Sure DB_DP11215 PIC32 Storage Demo Board has three buttons. * * SW1 (SW_UP, left arrow) RB3 Pulled high, Grounded/low when depressed * SW2 (SW_DOWN, down/right arrow) RB2 Pulled high, Grounded/low when depressed * SW3 (SW_OK, right arrow) RB4 Pulled high, Grounded/low when depressed * + * The Sure DB-DP11212 PIC32 General Purpose Demo Board also has three buttons, + * but these are connected differently: + * + * SW2-1 RF0 Pulled high, Grounded/low when depressed + * SW3-1 RF1 Pulled high, Grounded/low when depressed + * SW5-1 RD6 Pulled high, Grounded/low when depressed + * * Internal pull-ups are not required since the LEDs are pull-up externally. * Change notification interrupts are not *automatically* enabled. Change * notification will be enabled when pic32mx_gpioattach() is called. */ -#define GPIO_SW1 (GPIO_INPUT|GPIO_INT|GPIO_PORTB|GPIO_PIN3) -#define GPIO_SW2 (GPIO_INPUT|GPIO_INT|GPIO_PORTB|GPIO_PIN2) -#define GPIO_SW3 (GPIO_INPUT|GPIO_INT|GPIO_PORTB|GPIO_PIN4) +#ifdef CONFIG_ARCH_DBDP11215 +# define GPIO_SW1 (GPIO_INPUT|GPIO_INT|GPIO_PORTB|GPIO_PIN3) +# define GPIO_SW2 (GPIO_INPUT|GPIO_INT|GPIO_PORTB|GPIO_PIN2) +# define GPIO_SW3 (GPIO_INPUT|GPIO_INT|GPIO_PORTB|GPIO_PIN4) +#else /* CONFIG_ARCH_DBDP11212 */ +# define GPIO_SW1 (GPIO_INPUT|GPIO_INT|GPIO_PORTF|GPIO_PIN0) +# define GPIO_SW2 (GPIO_INPUT|GPIO_INT|GPIO_PORTF|GPIO_PIN1) +# define GPIO_SW3 (GPIO_INPUT|GPIO_INT|GPIO_PORTD|GPIO_PIN6) +#endif /* Change notification numbers: * RB3 -> CN5 |