]>
git.gir.st - tmk_keyboard.git/blob - tmk_core/protocol/usb_hid/USB_Host_Shield_2.0/examples/HID/le3dp/le3dp_rptparser.h
1 #if !defined(__HIDJOYSTICKRPTPARSER_H__)
2 #define __HIDJOYSTICKRPTPARSER_H__
6 struct GamePadEventData
8 union { //axes and hut switch
25 virtual void OnGamePadChanged(const GamePadEventData
*evt
);
28 #define RPT_GAMEPAD_LEN sizeof(GamePadEventData)/sizeof(uint8_t)
30 class JoystickReportParser
: public HIDReportParser
32 JoystickEvents
*joyEvents
;
34 uint8_t oldPad
[RPT_GAMEPAD_LEN
];
37 JoystickReportParser(JoystickEvents
*evt
);
39 virtual void Parse(HID
*hid
, bool is_rpt_id
, uint8_t len
, uint8_t *buf
);
42 #endif // __HIDJOYSTICKRPTPARSER_H__