From 741a5425921dbf4b004183ac0b23cafbb588daa4 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Thu, 27 Nov 2014 20:20:10 -0600 Subject: Some additional, minor improvements to djoystick interrupt controls --- nuttx/include/nuttx/input/djoystick.h | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'nuttx/include') diff --git a/nuttx/include/nuttx/input/djoystick.h b/nuttx/include/nuttx/input/djoystick.h index c973936b7..ca1273dc2 100644 --- a/nuttx/include/nuttx/input/djoystick.h +++ b/nuttx/include/nuttx/input/djoystick.h @@ -82,6 +82,13 @@ #define DJOY_BUTTON_3 (1 << 7) /* Bit 7: True = Button 4 pressed */ #define DJOY_BUTTONS_ALL 0xff /* The set of all buttons */ +/* Typical usage */ + +#define DJOY_BUTTON_SELECT DJOY_BUTTON_1 +#define DJOY_BUTTON_FIRE DJOY_BUTTON_2 +#define DJOY_BUTTON_JUMP DJOY_BUTTON_3 +#define DJOY_BUTTON_RUN DJOY_BUTTON_4 + /* IOCTL commands * * Discrete joystick drivers do not support the character driver write() or @@ -185,7 +192,7 @@ struct djoy_lowerhalf_s */ CODE void (*dl_enable)(FAR const struct djoy_lowerhalf_s *lower, - djoy_buttonset_t buttons, + djoy_buttonset_t press, djoy_buttonset_t release, djoy_interrupt_t handler, FAR void *arg); }; -- cgit v1.2.3