Nucleo-f4x1re: Fix some joystick pin definitions

This commit is contained in:
Gregory Nutt 2014-12-04 12:04:21 -06:00
parent 6d7002cf62
commit 3cc6bee189
5 changed files with 21 additions and 8 deletions

View File

@ -576,6 +576,16 @@ Shields
CONFIG_EXAMPLES_AJOYSTICK_DEVNAME="/dev/ajoy0"
CONFIG_EXAMPLES_AJOYSTICK_SIGNO=13
STATUS:
2014-12-04:
- Without ADC DMA support, it is not possible to sample both X and Y
with a single ADC. Right now, only one axis is being converted.
- There is conflicts with some of the Arduino data pins and the
default USART1 configuration. I am currently running with USART1
but with CONFIG_NUCLEO_F401RE_AJOY_MINBUTTONS to eliminate the
conflict.
- Current showstopper: I am not getting joystick button interrupts.
Configurations
==============

View File

@ -205,15 +205,15 @@
#define ADC_YOUPUT 0 /* Y output is on ADC channel 0 */
#define GPIO_BUTTON_A \
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN3)
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTA | GPIO_PIN8)
#define GPIO_BUTTON_B \
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN5)
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN10)
#define GPIO_BUTTON_C \
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN4)
#define GPIO_BUTTON_D \
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN10)
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN5)
#define GPIO_BUTTON_E \
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTA | GPIO_PIN8)
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTB | GPIO_PIN3)
#define GPIO_BUTTON_F \
(GPIO_INPUT | GPIO_FLOAT |GPIO_EXTI | GPIO_PORTA | GPIO_PIN9)
#define GPIO_BUTTON_G \

View File

@ -474,7 +474,10 @@ int board_ajoy_initialize(void)
}
#endif
/* Configure the GPIO pins as interrupting inputs. */
/* Configure the GPIO pins as interrupting inputs. NOTE: This is
* unnecessary for interrupting pins since it will also be done by
* stm32_gpiosetevent().
*/
for (i = 0; i < AJOY_NGPIOS; i++)
{

View File

@ -284,8 +284,8 @@ int stm32_djoy_initialization(void)
{
int i;
/* Configure the GPIO pins as inputs. NOTE that EXTI interrupts are
* configured for some pins but NOT yet set up.
/* Configure the GPIO pins as inputs. NOTE: This is unnecessary for
* interrupting pins since it will also be done by stm32_gpiosetevent().
*/
for (i = 0; i < DJOY_NGPIOS; i++)

View File

@ -706,7 +706,7 @@ static int ajoy_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
opriv->ao_notify.an_press = notify->an_press;
opriv->ao_notify.an_release = notify->an_release;
opriv->ao_notify.an_signo = notify->an_signo;
opriv->ao_notify.an_signo = notify->an_signo;
opriv->ao_pid = getpid();
/* Enable/disable interrupt handling */