diff options
author | tmk <nobody@nowhere> | 2012-10-21 15:36:44 +0200 |
---|---|---|
committer | tmk <nobody@nowhere> | 2012-10-21 15:36:44 +0200 |
commit | f291c2279eb9f656ed2a2e3152bab155470c4ef9 (patch) | |
tree | e6e99419ce37e0922ebf7e419e93cfd13d93e25f /converter/sun_usb | |
parent | edce1d19a6af040df994243e7b6b1851e3eccebc (diff) | |
download | qmk_firmware-f291c2279eb9f656ed2a2e3152bab155470c4ef9.tar.gz qmk_firmware-f291c2279eb9f656ed2a2e3152bab155470c4ef9.tar.xz |
Add extra commands Bell/Click to Sun converter
Diffstat (limited to 'converter/sun_usb')
-rw-r--r-- | converter/sun_usb/Makefile | 1 | ||||
-rw-r--r-- | converter/sun_usb/command_extra.c | 43 |
2 files changed, 44 insertions, 0 deletions
diff --git a/converter/sun_usb/Makefile b/converter/sun_usb/Makefile index 4c79a8d27..c6e8390cc 100644 --- a/converter/sun_usb/Makefile +++ b/converter/sun_usb/Makefile @@ -11,6 +11,7 @@ TARGET_DIR = . SRC = keymap.c \ matrix.c \ led.c \ + command_extra.c \ protocol/serial_soft.c CONFIG_H = config.h diff --git a/converter/sun_usb/command_extra.c b/converter/sun_usb/command_extra.c new file mode 100644 index 000000000..50389467e --- /dev/null +++ b/converter/sun_usb/command_extra.c @@ -0,0 +1,43 @@ +#include "stdbool.h" +#include "stdint.h" +#include "keycode.h" +#include "serial.h" +#include "print.h" +#include "command.h" + +bool command_extra(uint8_t code) +{ + switch (code) { + case KC_H: + case KC_SLASH: /* ? */ + print("\n\n----- Sun converter Help -----\n"); + print("UP: Bell On\n"); + print("DOWN: Bell Off\n"); + print("LEFT: Click On\n"); + print("RIGHT: Click Off\n"); + return false; + case KC_UP: + print("Bell On\n"); + serial_send(0x02); + break; + case KC_DOWN: + print("Bell Off\n"); + serial_send(0x03); + break; + case KC_LEFT: + print("Click On\n"); + serial_send(0x0A); + break; + case KC_RIGHT: + print("Click Off\n"); + serial_send(0x0B); + break; + case KC_NUMLOCK: + print("layout\n"); + serial_send(0x0F); + break; + default: + return false; + } + return true; +} |