keyboard->mbed->PC (mbed->SDcard)
Fork of USBHost by
Diff: USBHostHID/USBHostMouse.h
- Revision:
- 37:f1e388e7b752
- Parent:
- 24:868cbfe611a7
--- a/USBHostHID/USBHostMouse.h Sun Apr 30 04:17:16 2017 +0000 +++ b/USBHostHID/USBHostMouse.h Thu Jul 20 10:13:56 2017 +0100 @@ -26,7 +26,8 @@ /** * A class to communicate a USB mouse */ -class USBHostMouse : public IUSBEnumerator { +class USBHostMouse : public IUSBEnumerator +{ public: /** @@ -53,7 +54,8 @@ * * @param ptr function pointer */ - inline void attachEvent(void (*ptr)(uint8_t buttons, int8_t x, int8_t y, int8_t z)) { + inline void attachEvent(void (*ptr)(uint8_t buttons, int8_t x, int8_t y, int8_t z)) + { if (ptr != NULL) { onUpdate = ptr; } @@ -64,7 +66,8 @@ * * @param ptr function pointer */ - inline void attachButtonEvent(void (*ptr)(uint8_t buttons)) { + inline void attachButtonEvent(void (*ptr)(uint8_t buttons)) + { if (ptr != NULL) { onButtonUpdate = ptr; } @@ -75,7 +78,8 @@ * * @param ptr function pointer */ - inline void attachXEvent(void (*ptr)(int8_t x)) { + inline void attachXEvent(void (*ptr)(int8_t x)) + { if (ptr != NULL) { onXUpdate = ptr; } @@ -86,7 +90,8 @@ * * @param ptr function pointer */ - inline void attachYEvent(void (*ptr)(int8_t y)) { + inline void attachYEvent(void (*ptr)(int8_t y)) + { if (ptr != NULL) { onYUpdate = ptr; } @@ -97,7 +102,8 @@ * * @param ptr function pointer */ - inline void attachZEvent(void (*ptr)(int8_t z)) { + inline void attachZEvent(void (*ptr)(int8_t z)) + { if (ptr != NULL) { onZUpdate = ptr; } @@ -113,8 +119,7 @@ USBHost * host; USBDeviceConnected * dev; USBEndpoint * int_in; - uint8_t report[4]; - + uint8_t report[64]; bool dev_connected; bool mouse_device_found; int mouse_intf;