diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-11-27 20:20:10 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-11-27 20:20:10 -0600 |
commit | 741a5425921dbf4b004183ac0b23cafbb588daa4 (patch) | |
tree | 79333a6da74b41249b45ac8dd456584e2a50e733 /nuttx/include | |
parent | 5386d27543fd080e19dab75a2022a4aaaa158239 (diff) | |
download | nuttx-741a5425921dbf4b004183ac0b23cafbb588daa4.tar.gz nuttx-741a5425921dbf4b004183ac0b23cafbb588daa4.tar.bz2 nuttx-741a5425921dbf4b004183ac0b23cafbb588daa4.zip |
Some additional, minor improvements to djoystick interrupt controls
Diffstat (limited to 'nuttx/include')
-rw-r--r-- | nuttx/include/nuttx/input/djoystick.h | 9 |
1 files changed, 8 insertions, 1 deletions
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); }; |