uwick. W
/
MameController
Mamecontroller/joystick device wrapper library
Embed:
(wiki syntax)
Show/hide line numbers
signals.h
00001 #include "mbed.h" 00002 #include "USBKeyboard.h" 00003 00004 /* 00005 * Supported Event Types 00006 */ 00007 enum events{ 00008 MOVE_UP, //up arrow event 00009 MOVE_DOWN, //down arrow event 00010 MOVE_LEFT, //left arrow event 00011 MOVE_RIGHT, //right arrow event 00012 FIRE1, //CTRL key event 00013 FIRE2, 00014 JUMP, //ALT key event 00015 COIN1, //5 key event 00016 START, //1 key event 00017 BACK, //ESC key event 00018 USER, //ESC key event 00019 PASS, //ESC key event 00020 RUN 00021 00022 }; 00023 00024 /* 00025 * USB/device wrapper for Keyboard 00026 * handles signals from josytick and route them to correspoding 00027 * device USB master/host. 00028 * 00029 */ 00030 class SignalRouter 00031 { 00032 private: 00033 USBKeyboard* kdev; 00034 public: 00035 SignalRouter(USBKeyboard& dev); 00036 00037 /* 00038 *routes specific keboard event 00039 */ 00040 void sendEvent(int event); 00041 00042 };
Generated on Wed Jul 13 2022 17:27:58 by 1.7.2