From 2bb467f0fa91f650d2637418e5bf73f0833d4e6a Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 29 Nov 2014 13:26:26 -0600 Subject: Re-arrange the AJOYSTICK data structure so that it matches the mouse structure --- nuttx/include/nuttx/input/ajoystick.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'nuttx/include') diff --git a/nuttx/include/nuttx/input/ajoystick.h b/nuttx/include/nuttx/input/ajoystick.h index 12f8ae406..af56b90e8 100644 --- a/nuttx/include/nuttx/input/ajoystick.h +++ b/nuttx/include/nuttx/input/ajoystick.h @@ -190,13 +190,17 @@ struct ajoy_notify_s /* This structure is returned by read() and provides the sample state of the * analog joystick. + * + * NOTE: that this structure is equivalent to the struct mouse_report_s + * structure (with no wheel) defined in include/nuttx/input/mouse.h and can + * be used interchangeably in certain contexts. */ struct ajoy_sample_s { + ajoy_buttonset_t as_buttons; /* State of all buttons */ int16_t as_x; /* X/horizontal position */ int16_t as_y; /* Y/vertical position */ - ajoy_buttonset_t as_buttons; /* State of all buttons */ }; /* This is the type of the analog joystick interrupt handler used with -- cgit v1.2.3