uwick. W
/
MameController
Mamecontroller/joystick device wrapper library
Diff: signals.h
- Revision:
- 0:4babde63a16e
- Child:
- 1:89c1c7f9245a
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/signals.h Wed Nov 26 23:24:53 2014 +0000 @@ -0,0 +1,39 @@ +#include "mbed.h" +#include "USBKeyboard.h" + +/* +* Supported Event Types +*/ +enum events{ + MOVE_UP, //up arrow event + MOVE_DOWN, //down arrow event + MOVE_LEFT, //left arrow event + MOVE_RIGHT, //right arrow event + FIRE1, //CTRL key event + FIRE2, + JUMP, //ALT key event + COIN1, //5 key event + START, //1 key event + BACK, //ESC key event + +}; + +/* +* USB/device wrapper for Keyboard +* handles signals from josytick and route them to correspoding +* device USB master/host. +* +*/ +class SignalRouter +{ +private: + USBKeyboard* kdev; +public: + SignalRouter(USBKeyboard& dev); + + /* + *routes specific keboard event + */ + void sendEvent(int event); + +}; \ No newline at end of file