2018.07.26
Dependencies: FATFileSystem3 mbed-rtos
Fork of USBHost by
Diff: USBHostHID/USBHostGamepad.h
- Revision:
- 34:cac1e8336448
- Parent:
- 33:86c22c0c8aae
--- a/USBHostHID/USBHostGamepad.h Thu Jun 18 08:05:23 2015 +0000 +++ b/USBHostHID/USBHostGamepad.h Wed Jun 24 06:57:55 2015 +0000 @@ -68,7 +68,7 @@ * @param ptr function pointer */ // inline void attachEvent(void (*ptr)(uint8_t btnX, uint8_t btnY, uint8_t btnABCD, uint8_t btnSpecial)) { - inline void attachEvent(void (*ptr)(uint8_t btn00, uint8_t btn01, uint8_t btn02, uint8_t btn03, uint8_t btn04, uint8_t btn05, uint8_t btn06, uint8_t btn07, uint8_t btn08, uint8_t btn09, uint8_t btn10, uint8_t btn11, uint8_t btn12, uint8_t btn13, uint8_t btn14, uint8_t btn15)) { + inline void attachEvent(void (*ptr)(uint8_t btn00, uint8_t btn01, uint8_t btn02, uint8_t btn03, uint8_t btn04, uint8_t btn05, uint8_t btn06, uint8_t btn07, uint8_t btn08, uint8_t btn09, uint8_t btn10, uint8_t btn11, uint8_t btn12, uint8_t btn13, uint8_t btn14, uint8_t btn15, uint16_t gamePadVID, uint16_t gamePadPID)) { if (ptr != NULL) { onUpdate = ptr; } @@ -96,6 +96,9 @@ USBEndpoint * int_in; // uint8_t report[8]; uint8_t report[16]; + + uint16_t gamePad_VID; + uint16_t gamePad_PID; bool dev_connected; bool gamepad_device_found; @@ -126,7 +129,7 @@ void rxHandler(); // void (*onUpdate)(uint8_t btnX, uint8_t btnY, uint8_t btnABCD, uint8_t btnSpecial); - void (*onUpdate)(uint8_t btn00, uint8_t btn01, uint8_t btn02, uint8_t btn03, uint8_t btn04, uint8_t btn05, uint8_t btn06, uint8_t btn07, uint8_t btn08, uint8_t btn09, uint8_t btn10, uint8_t btn11, uint8_t btn12, uint8_t btn13,uint8_t btn14,uint8_t btn15 ); + void (*onUpdate)(uint8_t btn00, uint8_t btn01, uint8_t btn02, uint8_t btn03, uint8_t btn04, uint8_t btn05, uint8_t btn06, uint8_t btn07, uint8_t btn08, uint8_t btn09, uint8_t btn10, uint8_t btn11, uint8_t btn12, uint8_t btn13,uint8_t btn14,uint8_t btn15, uint16_t gamePadVID, uint16_t gamePadPID ); int report_id; void init();