aiie/teensy/teensy-usb.h

25 lines
389 B
C
Raw Normal View History

2020-07-07 10:25:04 +00:00
#ifndef __TEENSY_USB
#define __TEENSY_USB
#include <Arduino.h>
#include <USBHost_t36.h>
typedef void (*keyboardCallback)(uint8_t keycode);
2020-07-07 10:25:04 +00:00
class TeensyUSB {
public:
TeensyUSB();
~TeensyUSB();
void init();
void attachKeypress(keyboardCallback cb);
void attachKeyrelease(keyboardCallback cb);
uint8_t getModifiers();
uint8_t getOemKey();
2020-07-07 10:25:04 +00:00
void maintain();
};
#endif