--- USBAPI.h Sat May 18 05:26:04 2013 +++ USBAPI.h.new Thu Oct 10 00:19:38 2013 @@ -46,6 +46,43 @@ //================================================================================ //================================================================================ +// Joystick +// Implemented in HID.cpp +// The list of parameters here needs to match the implementation in HID.cpp + + +typedef struct JoyState // Pretty self explanitory. Simple state to store all the joystick parameters +{ + uint8_t xAxis; + uint8_t yAxis; + uint8_t zAxis; + + uint8_t xRotAxis; + uint8_t yRotAxis; + uint8_t zRotAxis; + + uint8_t throttle; + uint8_t rudder; + + uint8_t hatSw1; + uint8_t hatSw2; + + uint32_t buttons; // 32 general buttons + +} JoyState_t; + +class Joystick_ +{ +public: + Joystick_(); + + void setState(JoyState_t *joySt); + +}; +extern Joystick_ Joystick; + +//================================================================================ +//================================================================================ // Mouse #define MOUSE_LEFT 1