Add USB HID Gamepad hosting support to mbed board (depends on USBHost library)
Dependents: mbed_gamepad_example
USBHostGamepad Class Reference
A class to communicate a USB Gamepad. More...
#include <USBHostGamepad.h>
Public Member Functions | |
| USBHostGamepad () | |
| Constructor. | |
| bool | connect () |
| Try to connect a Gamepad device. | |
| bool | connected () |
| Check if a Gamepad is connected. | |
| void | attachEvent (void(*ptr)(uint8_t x, uint8_t y, uint8_t z, uint8_t rz, uint16_t buttons)) |
| Attach a callback called when a Gamepad event is received. | |
Detailed Description
A class to communicate a USB Gamepad.
Definition at line 31 of file USBHostGamepad.h.
Constructor & Destructor Documentation
| USBHostGamepad | ( | ) |
Constructor.
Definition at line 21 of file USBHostGamepad.cpp.
Member Function Documentation
| void attachEvent | ( | void(*)(uint8_t x, uint8_t y, uint8_t z, uint8_t rz, uint16_t buttons) | ptr ) |
Attach a callback called when a Gamepad event is received.
- Parameters:
-
ptr function pointer
Definition at line 59 of file USBHostGamepad.h.
| bool connect | ( | ) |
Try to connect a Gamepad device.
- Returns:
- true if connection was successful
Definition at line 42 of file USBHostGamepad.cpp.
| bool connected | ( | ) |
Check if a Gamepad is connected.
- Returns:
- true if a Gamepad is connected
Definition at line 38 of file USBHostGamepad.cpp.
Generated on Tue Jul 12 2022 20:44:17 by
1.7.2
Abdelhak Bougouffa