ST/USBHOST forked to add another HID handler for raw keyboard data to get more detail not available with current handlers (all pressed keys, all releases, and periodic updates)
Dependents: C64-stm429_discovery
USBHostKeyboard Class Reference
A class to communicate a USB keyboard. More...
#include <USBHostKeyboard.h>
Inherits IUSBEnumerator.
Public Member Functions | |
USBHostKeyboard () | |
Constructor. | |
bool | connect () |
Try to connect a keyboard device. | |
bool | connected () |
Check if a keyboard is connected. | |
void | attach (void(*ptr)(uint8_t key)) |
Attach a callback called when a keyboard event is received. | |
void | attach (void(*ptr)(uint8_t keyCode, uint8_t modifier)) |
Attach a callback called when a keyboard event is received. | |
void | attach (void(*ptr)(uint8_t size, uint8_t *data)) |
Attach a callback called when data received from keyboard. |
Detailed Description
A class to communicate a USB keyboard.
Definition at line 29 of file USBHostKeyboard.h.
Constructor & Destructor Documentation
USBHostKeyboard | ( | ) |
Constructor.
Definition at line 80 of file USBHostKeyboard.cpp.
Member Function Documentation
void attach | ( | void(*)(uint8_t key) | ptr ) |
Attach a callback called when a keyboard event is received.
- Parameters:
-
ptr function pointer
Definition at line 56 of file USBHostKeyboard.h.
void attach | ( | void(*)(uint8_t keyCode, uint8_t modifier) | ptr ) |
Attach a callback called when a keyboard event is received.
- Parameters:
-
ptr function pointer
Definition at line 67 of file USBHostKeyboard.h.
void attach | ( | void(*)(uint8_t size, uint8_t *data) | ptr ) |
Attach a callback called when data received from keyboard.
- Parameters:
-
ptr function pointer
Definition at line 78 of file USBHostKeyboard.h.
bool connect | ( | ) |
Try to connect a keyboard device.
- Returns:
- true if connection was successful
Definition at line 102 of file USBHostKeyboard.cpp.
bool connected | ( | ) |
Check if a keyboard is connected.
- Returns:
- true if a keyboard is connected
Definition at line 97 of file USBHostKeyboard.cpp.
Generated on Sat Jul 16 2022 02:45:31 by 1.7.2