aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--converter/m0110_usb/Makefile7
-rw-r--r--converter/m0110_usb/Makefile.hasu57
-rw-r--r--converter/m0110_usb/README.md81
-rw-r--r--converter/m0110_usb/config.h5
-rw-r--r--converter/m0110_usb/keymap.c183
-rw-r--r--converter/m0110_usb/keymap_hasu.c202
-rw-r--r--converter/m0110_usb/matrix.c7
-rw-r--r--protocol/m0110.c2
8 files changed, 390 insertions, 154 deletions
diff --git a/converter/m0110_usb/Makefile b/converter/m0110_usb/Makefile
index 1fee258a6..bf0f083f6 100644
--- a/converter/m0110_usb/Makefile
+++ b/converter/m0110_usb/Makefile
@@ -35,9 +35,9 @@ F_CPU = 16000000
35# Build Options 35# Build Options
36# *Comment out* to disable the options. 36# *Comment out* to disable the options.
37# 37#
38MOUSEKEY_ENABLE = yes # Mouse keys 38#MOUSEKEY_ENABLE = yes # Mouse keys
39#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support 39#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
40EXTRAKEY_ENABLE = yes # Audio control and System control 40#EXTRAKEY_ENABLE = yes # Audio control and System control
41#NKRO_ENABLE = yes # USB Nkey Rollover 41#NKRO_ENABLE = yes # USB Nkey Rollover
42 42
43 43
@@ -55,6 +55,3 @@ include $(TOP_DIR)/protocol/pjrc.mk
55include $(TOP_DIR)/protocol.mk 55include $(TOP_DIR)/protocol.mk
56include $(TOP_DIR)/common.mk 56include $(TOP_DIR)/common.mk
57include $(TOP_DIR)/rules.mk 57include $(TOP_DIR)/rules.mk
58
59hasu: EXTRAFLAGS += -DHASU
60hasu: all
diff --git a/converter/m0110_usb/Makefile.hasu b/converter/m0110_usb/Makefile.hasu
new file mode 100644
index 000000000..b35b3cce5
--- /dev/null
+++ b/converter/m0110_usb/Makefile.hasu
@@ -0,0 +1,57 @@
1# Target file name (without extension).
2TARGET = m0110
3
4# Directory common source filess exist
5TOP_DIR = ../..
6
7# Directory keyboard dependent files exist
8TARGET_DIR = .
9
10# keyboard dependent files
11SRC = keymap_hasu.c \
12 matrix.c \
13 led.c \
14 m0110.c
15
16CONFIG_H = config.h
17
18
19# MCU name, you MUST set this to match the board you are using
20# type "make clean" after changing this, so all files will be rebuilt
21#MCU = at90usb162 # Teensy 1.0
22MCU = atmega32u4 # Teensy 2.0
23#MCU = at90usb646 # Teensy++ 1.0
24#MCU = at90usb1286 # Teensy++ 2.0
25
26
27# Processor frequency.
28# Normally the first thing your program should do is set the clock prescaler,
29# so your program will run at the correct speed. You should also set this
30# variable to same clock speed. The _delay_ms() macro uses this, and many
31# examples use this variable to calculate timings. Do not add a "UL" here.
32F_CPU = 16000000
33
34
35# Build Options
36# *Comment out* to disable the options.
37#
38MOUSEKEY_ENABLE = yes # Mouse keys
39#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support
40EXTRAKEY_ENABLE = yes # Audio control and System control
41#NKRO_ENABLE = yes # USB Nkey Rollover
42
43
44
45#---------------- Programming Options --------------------------
46PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
47
48
49# Search Path
50VPATH += $(TARGET_DIR)
51VPATH += $(TOP_DIR)
52
53
54include $(TOP_DIR)/protocol/pjrc.mk
55include $(TOP_DIR)/protocol.mk
56include $(TOP_DIR)/common.mk
57include $(TOP_DIR)/rules.mk
diff --git a/converter/m0110_usb/README.md b/converter/m0110_usb/README.md
index 0ad3631f7..206f43425 100644
--- a/converter/m0110_usb/README.md
+++ b/converter/m0110_usb/README.md
@@ -4,9 +4,10 @@ This firmware converts the protocol of Apple Macintosh keyboard M0110/M0110A int
4Target board of this project is [PJRC Teensy](http://www.pjrc.com/teensy/), though, 4Target board of this project is [PJRC Teensy](http://www.pjrc.com/teensy/), though,
5you can use other board with USB AVR like `ATmega32U4` and `AT90USB`. 5you can use other board with USB AVR like `ATmega32U4` and `AT90USB`.
6 6
7![M0110](https://github.com/tmk/tmk_keyboard/raw/master/m0110_usb/doc/m0110.jpg) 7![M0110](https://raw.github.com/tmk/tmk_keyboard/master/converter/m0110_usb/doc/m0110.jpg)
8 8
9M0110A support was contributed by [skagon@github](https://github.com/skagon). 9- M0110A support was contributed by [skagon@github](https://github.com/skagon).
10- M0120 also is supported. keys(+ * / and ,) on M0120 are recognized as cursor keys.
10 11
11 12
12 13
@@ -19,7 +20,7 @@ you can change pin configuration with editing *config.h*.
19You can find 4P4C plugs on telephone handset cable. Note that it is *crossover* connection 20You can find 4P4C plugs on telephone handset cable. Note that it is *crossover* connection
20while Macintosh keyboard cable is *straight*. 21while Macintosh keyboard cable is *straight*.
21 22
22[![Conection](http://i.imgur.com/vJoVOm.jpg)](http://i.imgur.com/vJoVO.jpg) 23[![Conection](https://raw.github.com/tmk/tmk_keyboard/master/converter/m0110_usb/doc/teensy.jpg)]
23 24
24In this pic: 25In this pic:
25 26
@@ -28,7 +29,7 @@ In this pic:
283. `DATA`(Green) 293. `DATA`(Green)
294. `+5V`(Yellow) 304. `+5V`(Yellow)
30 31
31Not that wire colors may vary in your cable. 32Note that wire colors may vary in your cable.
32 33
33 34
34### Pinout 35### Pinout
@@ -62,56 +63,56 @@ Keymap
62------ 63------
63You can change keymaps by editing *keymap.c*. 64You can change keymaps by editing *keymap.c*.
64 65
65### M0110 66### M0110 & M0120
66#### *Default* 67#### *Default*
67 ,---------------------------------------------------------. 68 ,---------------------------------------------------------. ,---------------.
68 | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| 69 | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| -|Lft|Rgt|
69 |---------------------------------------------------------| 70 |---------------------------------------------------------| |---------------|
70 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| 71 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| Up|
71 |---------------------------------------------------------| 72 |---------------------------------------------------------| |---------------|
72 |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| 73 |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| Dn|
73 |---------------------------------------------------------| 74 |---------------------------------------------------------| |---------------|
74 |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | 75 |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| |
75 `---------------------------------------------------------' 76 `---------------------------------------------------------' |-----------|Ent|
76 |Ctr|Alt | Space |Gui |Ctr| 77 |Alt|Gui | Space |Ctl |Alt| | 0| .| |
77 `-----------------------------------------------' 78 `-----------------------------------------------' `---------------'
78#### *HHKB/WASD Layer* 79#### *HHKB/WASD Layer(WASD/IJKL)*
79 ,---------------------------------------------------------. 80 ,---------------------------------------------------------. ,---------------.
80 |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| 81 |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| -|Lft|Rgt|
81 |---------------------------------------------------------| 82 |---------------------------------------------------------| |---------------|
82 |Caps |Hom| Up|PgU| | | | |Psc|Slk|Pau|Up | |Ins| 83 |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau|Ins| | 7| 8| 9| Up|
83 |---------------------------------------------------------| 84 |---------------------------------------------------------| |---------------|
84 |Fn0 |Lef|Dow|Rig| | | | |Hom|PgU|Lef|Rig|Return| 85 |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| Dn|
85 |---------------------------------------------------------| 86 |---------------------------------------------------------| |---------------|
86 |Shift |End| |PgD| |VoD|VoU|Mut|End|PgD|Dow|Shift | 87 |Shift |End| |PgD| | | |PgD| |End| |Shift | | 1| 2| 3| |
87 `---------------------------------------------------------' 88 `---------------------------------------------------------' |-----------|Ent|
88 |Ctr|Alt | Space |Gui |Ctr| 89 |Alt|Gui | Space |Ctl |Alt| | 0| .| |
89 `-----------------------------------------------' 90 `-----------------------------------------------' `---------------'
90 91
91### M0110A 92### M0110A
92#### *Default* 93#### *Default*
93 ,---------------------------------------------------------. ,---------------. 94 ,---------------------------------------------------------. ,---------------.
94 | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Gui| =| /| *| 95 | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| =| /| *|
95 |---------------------------------------------------------| |---------------| 96 |---------------------------------------------------------| |---------------|
96 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| 97 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
97 |-----------------------------------------------------' | |---------------| 98 |-----------------------------------------------------' | |---------------|
98 |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +| 99 |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
99 |---------------------------------------------------------| |---------------| 100 |---------------------------------------------------------| |---------------|
100 |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | 101 |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft| Up| | 1| 2| 3| |
101 |---------------------------------------------------------| |-----------|Ent| 102 |---------------------------------------------------------| |-----------|Ent|
102 |Ctrl |Alt | Space | \|Lft|Rgt|Dn | | 0| .| | 103 |Alt |Gui | Space | \|Lft|Rgt| Dn| | 0| .| |
103 `---------------------------------------------------------' `---------------' 104 `---------------------------------------------------------' `---------------'
104#### *HHKB/WASD/mousekey Layer* 105#### *Cursor Layer(WASD/IJKL)*
105 ,---------------------------------------------------------. ,---------------. 106 ,---------------------------------------------------------. ,---------------.
106 |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|Mb1|Mb3|Mb2| 107 |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| =| /| *|
107 |---------------------------------------------------------| |---------------| 108 |---------------------------------------------------------| |---------------|
108 |Caps |Hom| Up|PgU| | | | |Psc|Slk|Pau|Up | | | |MwD|McU|MwU|MwU| 109 |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau| | | 7| 8| 9| -|
109 |-----------------------------------------------------' | |---------------| 110 |-----------------------------------------------------' | |---------------|
110 |Fn0 |Lef|Dow|Rig| | | | |Hom|PgU|Lef|Rig|Return| |McL|McD|McR|MwD| 111 |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| +|
111 |---------------------------------------------------------| |---------------| 112 |---------------------------------------------------------| |---------------|
112 |Shift |End| |PgD| |VoD|VoU|Mut|End|PgD|Dow|Shif|Up | |MwL|McD|MwR| | 113 |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| |
113 |---------------------------------------------------------| |-----------|Mb2| 114 |---------------------------------------------------------| |-----------|Ent|
114 |Ctrl |Alt | Space |Ins|Lft|Rgt|Dn | | Mb1|Mb3| | 115 |Alt |Gui | Space |Ins|Hom|End|PgD| | 0| .| |
115 `---------------------------------------------------------' `---------------' 116 `---------------------------------------------------------' `---------------'
116 117
117 118
@@ -120,5 +121,7 @@ Debug
120----- 121-----
121You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output. 122You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output.
122 123
123The converter has some functions for debug, press `Alt+Gui+H` simultaneously to get help. 124The converter has some functions for debug, press `<magickey>+H` simultaneously to get help.
124These function is totally undocumented, tentative, inconsistent and buggy. 125These function is totally undocumented, tentative, inconsistent and buggy.
126
127magickey: Shift+Option+Command(Shift+Alt+Gui or Shift+Alt+Control)
diff --git a/converter/m0110_usb/config.h b/converter/m0110_usb/config.h
index d2e904077..be00259e6 100644
--- a/converter/m0110_usb/config.h
+++ b/converter/m0110_usb/config.h
@@ -36,9 +36,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
36/* Locking Caps Lock support */ 36/* Locking Caps Lock support */
37//#define MATRIX_HAS_LOCKING_CAPS 37//#define MATRIX_HAS_LOCKING_CAPS
38 38
39/* key combination for command */ 39/* magic key */
40#define IS_COMMAND() ( \ 40#define IS_COMMAND() ( \
41 keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) \ 41 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \
42 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \
42) 43)
43 44
44 45
diff --git a/converter/m0110_usb/keymap.c b/converter/m0110_usb/keymap.c
index 4dd419d1b..191bf3a15 100644
--- a/converter/m0110_usb/keymap.c
+++ b/converter/m0110_usb/keymap.c
@@ -27,8 +27,65 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
27#include "keymap.h" 27#include "keymap.h"
28 28
29 29
30#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)])) 30/*
31 * The keymap works with both M0110 and M0110A keyboards. As you can see, the M0110A is a superset
32 * of the M0110 keyboard, with only one exception: 'Enter' in M0110 does not exist
33 * on the M0110A, but since it generates a unique scan code which is not used for some other key in
34 * the M0110A, they are totally interchangeable. In fact, the M0110A is functionally (almost)
35 * identical to the combination of the M0110 along with the M0120 keypad. The only difference
36 * (which is causing some problems as you will read below) is that the M0110+M0120 don't have
37 * dedicated arrow keys, while the M0110A does. However, the M0120 did have arrow keys, which
38 * doubled as the [comma], [/], [*] and [+] keys, when used with the [Shift] key. The M0110A has
39 * substituted the [comma] key with the [=] key, however its scancode is the same.
40 *
41 * Physical layout:
42 * M0110A
43 * ,---------------------------------------------------------. ,---------------.
44 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Bcksp| |Clr| =| /| *|
45 * |---------------------------------------------------------| |---------------|
46 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
47 * |-----------------------------------------------------' | |---------------|
48 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
49 * |---------------------------------------------------------| |---------------|
50 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| |
51 * |---------------------------------------------------------' |-----------|Ent|
52 * |Opt |Mac | Space | \|Lft|Rgt|Dn | | 0| .| |
53 * `---------------------------------------------------------' `---------------'
54 *
55 * M0110 M0120
56 * ,---------------------------------------------------------. ,---------------.
57 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| -| +| *|
58 * |---------------------------------------------------------| |---------------|
59 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| /|
60 * |---------------------------------------------------------| |---------------|
61 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| ,|
62 * |---------------------------------------------------------| |---------------|
63 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| |
64 * `---------------------------------------------------------' |-----------|Ent|
65 * |Opt|Mac | Space |Ent |Opt| | 0| .| |
66 * `-----------------------------------------------' `---------------'
67 * With Shift keys on M0120 work as curosor.(-:Left *:Right /:Up ,:Down)
68 *
69 * NOTE: \ is located differently.
70 * NOTE: Enter on M0110 is different from Enter on keypad(M0120 and M0110A).
71 * NOTE: Left Shift and right Shift are logically same key.
72 * NOTE: Left Option and right Option are logically same key.
73 */
31 74
75/* Keymap definition Macro
76 * ,---------------------------------------------------------. ,---------------.
77 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| =| /| *|
78 * |---------------------------------------------------------| |---------------|
79 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
80 * |-----------------------------------------------------' | |---------------|
81 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
82 * |---------------------------------------------------------| |---------------|
83 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| |
84 * |---------------------------------------------------------| |-----------|Ent|
85 * |Opt |Mac | Space |Ent| \|Lft|Rgt|Dn | | 0| .| |
86 * `---------------------------------------------------------' `---------------'
87 * NOTE: Ent between Space and \ means Enter on M0110.
88 */
32#define KEYMAP( \ 89#define KEYMAP( \
33 K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \ 90 K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \
34 K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K4E, \ 91 K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K4E, \
@@ -52,10 +109,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
52 { KC_##K68, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K6D, KC_NO, KC_NO }, \ 109 { KC_##K68, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K6D, KC_NO, KC_NO }, \
53} 110}
54 111
112#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))
113
55 114
56// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed. 115// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
57static const uint8_t PROGMEM fn_layer[] = { 116static const uint8_t PROGMEM fn_layer[] = {
58#ifndef HASU
59 1, // Fn0 117 1, // Fn0
60 0, // Fn1 118 0, // Fn1
61 0, // Fn2 119 0, // Fn2
@@ -64,22 +122,11 @@ static const uint8_t PROGMEM fn_layer[] = {
64 0, // Fn5 122 0, // Fn5
65 0, // Fn6 123 0, // Fn6
66 0 // Fn7 124 0 // Fn7
67#else
68 1, // Fn0
69 2, // Fn1
70 3, // Fn2
71 1, // Fn3
72 2, // Fn4
73 0, // Fn5
74 0, // Fn6
75 0 // Fn7
76#endif
77}; 125};
78 126
79// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. 127// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
80// See layer.c for details. 128// See layer.c for details.
81static const uint8_t PROGMEM fn_keycode[] = { 129static const uint8_t PROGMEM fn_keycode[] = {
82#ifndef HASU
83 KC_NO, // Fn0 130 KC_NO, // Fn0
84 KC_NO, // Fn1 131 KC_NO, // Fn1
85 KC_NO, // Fn2 132 KC_NO, // Fn2
@@ -88,33 +135,12 @@ static const uint8_t PROGMEM fn_keycode[] = {
88 KC_NO, // Fn5 135 KC_NO, // Fn5
89 KC_NO, // Fn6 136 KC_NO, // Fn6
90 KC_NO // Fn7 137 KC_NO // Fn7
91#else
92 KC_ENTER, // Fn0
93 KC_SCOLON, // Fn1
94 KC_SLASH, // Fn2
95 KC_UP, // Fn3
96 KC_NO, // Fn4
97 KC_NO, // Fn5
98 KC_NO, // Fn6
99 KC_NO // Fn7
100#endif
101}; 138};
102 139
103static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 140static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
104 /* 141 /* Default:
105 * The keymap works with both M0110 and M0110A keyboards. As you can see, the M0110A is a superset
106 * of the M0110 keyboard, with only one exception: 'Enter' in M0110 does not exist
107 * on the M0110A, but since it generates a unique scan code which is not used for some other key in
108 * the M0110A, they are totally interchangeable. In fact, the M0110A is functionally (almost)
109 * identical to the combination of the M0110 along with the M0120 keypad. The only difference
110 * (which is causing some problems as you will read below) is that the M0110+M0120 don't have
111 * dedicated arrow keys, while the M0110A does. However, the M0120 did have arrow keys, which
112 * doubled as the [comma], [/], [*] and [+] keys, when used with the [Shift] key. The M0110A has
113 * substituted the [comma] key with the [=] key, however its scancode is the same.
114 *
115 * Default:
116 * ,---------------------------------------------------------. ,---------------. 142 * ,---------------------------------------------------------. ,---------------.
117 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Gui| =| /| *| 143 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Ctl| =| /| *|
118 * |---------------------------------------------------------| |---------------| 144 * |---------------------------------------------------------| |---------------|
119 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -| 145 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
120 * |-----------------------------------------------------' | |---------------| 146 * |-----------------------------------------------------' | |---------------|
@@ -122,79 +148,36 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
122 * |---------------------------------------------------------| |---------------| 148 * |---------------------------------------------------------| |---------------|
123 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| | 149 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| |
124 * |---------------------------------------------------------| |-----------|Ent| 150 * |---------------------------------------------------------| |-----------|Ent|
125 * |Ctrl |Alt | Space |Gui| \|Lft|Rgt|Dn | | 0| .| | 151 * |Alt |Gui | Space |Ctl| \|Lft|Rgt|Dn | | 0| .| |
126 * `---------------------------------------------------------' `---------------'
127 *
128 * HHKB/WASD/Mouse Layer(Fn0):
129 * ,---------------------------------------------------------. ,---------------.
130 * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|Mb1|Mb3|Mb2|
131 * |---------------------------------------------------------| |---------------|
132 * |Caps |Hom| Up|PgU| | | | |Psc|Slk|Pau|Up |Ins| | |MwD|McU|MwU|MwU|
133 * |-----------------------------------------------------' | |---------------|
134 * |Fn0 |Lef|Dow|Rig| | | | |Hom|PgU|Lef|Rig|Return| |McL|McD|McR|MwD|
135 * |---------------------------------------------------------| |---------------|
136 * |Shift |End| |PgD| |VoD|VoU|Mut|End|PgD|Dow|Shif|Up | |MwL|McD|MwR| |
137 * |---------------------------------------------------------| |-----------|Mb2|
138 * |Ctrl |Alt | Space |Gui | \|Lft|Rgt|Dn | | Mb1|Mb3| |
139 * `---------------------------------------------------------' `---------------' 152 * `---------------------------------------------------------' `---------------'
140 * Mb: Mouse Button / Mc: Mouse Cursor / Mw: Mouse Wheel
141 *
142 * NOTE: M0110 has no arrow and keypad keys.
143 * NOTE: \ is located next to ] on M0110.
144 * NOTE: Gui between Space and \ is Enter on M0110 not exists on M0110A.
145 * NOTE: LShift and RShift are logically same key. (M0110, M0110A)
146 * NOTE: LOption and ROption are logically same key. (M0110)
147 */ 153 */
148#ifndef HASU
149 KEYMAP( 154 KEYMAP(
150 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, LGUI,EQL, PSLS,PAST, 155 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, LCTL,EQL, PSLS,PAST,
151 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS, 156 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS,
152 FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS, 157 FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, PPLS,
153 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, UP, P1, P2, P3, PENT, 158 LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH, UP, P1, P2, P3, PENT,
154 LCTL,LALT, SPC, LGUI,BSLS,LEFT,RGHT,DOWN, P0, PDOT 159 LALT,LGUI, SPC, LCTL,BSLS,LEFT,RGHT,DOWN, P0, PDOT
155 ), 160 ),
156 // HHKB & WASD 161 /* Cursor Layer(WASD, IJKL)
157 KEYMAP( 162 * ,---------------------------------------------------------. ,---------------.
158 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,BTN1,BTN3,BTN2, 163 * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk| =| /| *|
159 CAPS,HOME,UP, PGUP,NO, NO, NO, NO, PSCR,SLCK,PAUS,UP, NO, WH_D,MS_U,WH_U,WH_U, 164 * |---------------------------------------------------------| |---------------|
160 FN0, LEFT,DOWN,RGHT,NO, NO, NO, NO, HOME,PGUP,LEFT,RGHT, ENT, MS_L,MS_D,MS_R,WH_D, 165 * |Caps |Hom| Up|PgU| | | |PgU| Up|Hom|Psc|Slk|Pau| | | 7| 8| 9| -|
161 LSFT,END, NO, PGDN,NO, VOLD,VOLU,MUTE,END, PGDN,DOWN, UP, WH_L,MS_D,WH_R,BTN2, 166 * |-----------------------------------------------------' | |---------------|
162 LCTL,LALT, SPC, LGUI,INS, LEFT,RGHT,DOWN, BTN1, BTN3 167 * |Fn0 |Lef|Dow|Rig| | | |Lef|Dow|Rig| | |Return| | 4| 5| 6| +|
163 ), 168 * |---------------------------------------------------------| |---------------|
164#else 169 * |Shift |End| |PgD| | | |PgD| |End| |Shif|PgU| | 1| 2| 3| |
165 // hasu's keymap(To enable this use 'make hasu' to add option flag: EXTRAFLAGS=-DHASU) 170 * |---------------------------------------------------------| |-----------|Ent|
166 KEYMAP( 171 * |Alt |Gui | Space |Gui |Ins|Hom|End|PgD| | 0| .| |
167 ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, LGUI,EQL, PSLS,PAST, 172 * `---------------------------------------------------------' `---------------'
168 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS, 173 */
169 LCTL,A, S, D, F, G, H, J, K, L, FN1, QUOT, FN0, P4, P5, P6, PPLS,
170 LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN2, FN3, P1, P2, P3, PENT,
171 FN4, LALT, SPC, LGUI,BSLS,LEFT,RGHT,DOWN, LGUI, PDOT
172 ),
173 // HHKB & WASD
174 KEYMAP(
175 GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST,
176 CAPS,HOME,UP, PGUP,NO, NO, NO, NO, PSCR,SLCK,PAUS,UP, NO, P7, P8, P9, PMNS,
177 LCTL,LEFT,DOWN,RGHT,NO, NO, NO, NO, HOME,PGUP,LEFT,RGHT, FN0, P4, P5, P6, PPLS,
178 LSFT,END, NO, PGDN,NO, VOLD,VOLU,MUTE,END, PGDN,DOWN, FN3, P1, P2, P3, PENT,
179 LCTL,LALT, SPC, LGUI,INS, LEFT,RGHT,DOWN, P0, PDOT
180 ),
181 // vi mousekeys
182 KEYMAP(
183 GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST,
184 CAPS,NO, NO, NO, NO, NO, WH_L,WH_D,WH_U,WH_R,NO, NO, NO, P7, P8, P9, PMNS,
185 NO, VOLD,VOLU,MUTE,NO, NO, MS_L,MS_D,MS_U,MS_R,FN1, NO, ENT, P4, P5, P6, PPLS,
186 LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,NO, NO, NO, UP, P1, P2, P3, PENT,
187 FN4, LALT, BTN1, LGUI,NO, LEFT,RGHT,DOWN, P0, PDOT
188 ),
189 // vi cusorkeys
190 KEYMAP( 174 KEYMAP(
191 GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST, 175 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST,
192 CAPS,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, PSCR,SLCK,PAUS, P7, P8, P9, PMNS, 176 CAPS,HOME,UP, PGUP,NO, NO, NO, PGUP,UP, HOME,PSCR,SLCK,PAUS, P7, P8, P9, PMNS,
193 NO, NO, NO, NO, NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, ENT, P4, P5, P6, PPLS, 177 FN0, LEFT,DOWN,RGHT,NO, NO, NO, LEFT,DOWN,RGHT,NO, NO, ENT, P4, P5, P6, PPLS,
194 LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, UP, P1, P2, P3, PENT, 178 LSFT,END, NO, PGDN,NO, NO, NO, PGDN,NO, END, NO, PGUP, P1, P2, P3, PENT,
195 LCTL,LALT, SPC, LGUI,INS, LEFT,RGHT,DOWN, P0, PDOT 179 LALT,LGUI, SPC, LCTL,INS, HOME,END, PGDN, P0, PDOT
196 ), 180 ),
197#endif
198}; 181};
199 182
200 183
diff --git a/converter/m0110_usb/keymap_hasu.c b/converter/m0110_usb/keymap_hasu.c
new file mode 100644
index 000000000..e3bdb5eed
--- /dev/null
+++ b/converter/m0110_usb/keymap_hasu.c
@@ -0,0 +1,202 @@
1/*
2Copyright 2011,2012 Jun Wako <wakojun@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17/* M0110A Support was contributed by skagon@github */
18
19#include <stdint.h>
20#include <stdbool.h>
21#include <avr/pgmspace.h>
22#include "usb_keyboard.h"
23#include "keycode.h"
24#include "print.h"
25#include "debug.h"
26#include "util.h"
27#include "keymap.h"
28
29
30/*
31 * The keymap works with both M0110 and M0110A keyboards. As you can see, the M0110A is a superset
32 * of the M0110 keyboard, with only one exception: 'Enter' in M0110 does not exist
33 * on the M0110A, but since it generates a unique scan code which is not used for some other key in
34 * the M0110A, they are totally interchangeable. In fact, the M0110A is functionally (almost)
35 * identical to the combination of the M0110 along with the M0120 keypad. The only difference
36 * (which is causing some problems as you will read below) is that the M0110+M0120 don't have
37 * dedicated arrow keys, while the M0110A does. However, the M0120 did have arrow keys, which
38 * doubled as the [comma], [/], [*] and [+] keys, when used with the [Shift] key. The M0110A has
39 * substituted the [comma] key with the [=] key, however its scancode is the same.
40 *
41 * Physical layout:
42 * M0110A
43 * ,---------------------------------------------------------. ,---------------.
44 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Bcksp| |Clr| =| /| *|
45 * |---------------------------------------------------------| |---------------|
46 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
47 * |-----------------------------------------------------' | |---------------|
48 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
49 * |---------------------------------------------------------| |---------------|
50 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| |
51 * |---------------------------------------------------------' |-----------|Ent|
52 * |Opt |Mac | Space | \|Lft|Rgt|Dn | | 0| .| |
53 * `---------------------------------------------------------' `---------------'
54 *
55 * M0110 M0120
56 * ,---------------------------------------------------------. ,---------------.
57 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| -| +| *|
58 * |---------------------------------------------------------| |---------------|
59 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| /|
60 * |---------------------------------------------------------| |---------------|
61 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| ,|
62 * |---------------------------------------------------------| |---------------|
63 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shift | | 1| 2| 3| |
64 * `---------------------------------------------------------' |-----------|Ent|
65 * |Opt|Mac | Space |Ent |Opt| | 0| .| |
66 * `-----------------------------------------------' `---------------'
67 * With Shift keys on M0120 work as curosor.(-:Left *:Right /:Up ,:Down)
68 *
69 * NOTE: \ is located differently.
70 * NOTE: Enter on M0110 is different from Enter on keypad(M0120 and M0110A).
71 * NOTE: Left Shift and right Shift are logically same key.
72 * NOTE: Left Option and right Option are logically same key.
73 */
74
75/* Keymap definition Macro
76 * ,---------------------------------------------------------. ,---------------.
77 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Clr| =| /| *|
78 * |---------------------------------------------------------| |---------------|
79 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7| 8| 9| -|
80 * |-----------------------------------------------------' | |---------------|
81 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return| | 4| 5| 6| +|
82 * |---------------------------------------------------------| |---------------|
83 * |Shift | Z| X| C| V| B| N| M| ,| ,| /|Shft|Up | | 1| 2| 3| |
84 * |---------------------------------------------------------| |-----------|Ent|
85 * |Opt |Mac | Space |Ent| \|Lft|Rgt|Dn | | 0| .| |
86 * `---------------------------------------------------------' `---------------'
87 * NOTE: Ent between Space and \ means Enter on M0110.
88 */
89#define KEYMAP( \
90 K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K68,K6D,K62, \
91 K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E, K59,K5B,K5C,K4E, \
92 K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27, K24, K56,K57,K58,K66, \
93 K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C, K4D, K53,K54,K55,K4C, \
94 K3A,K37, K31, K34,K2A,K46,K42,K48, K52, K41 \
95) { \
96 { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
97 { KC_##K08, KC_##K09, KC_NO, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
98 { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
99 { KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
100 { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
101 { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
102 { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO, KC_NO, KC_##K37 }, \
103 { KC_##K38, KC_##K39, KC_##K3A, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \
104 { KC_NO, KC_##K41, KC_##K42, KC_NO, KC_NO, KC_NO, KC_##K46, KC_##K47 }, \
105 { KC_##K48, KC_NO, KC_NO, KC_NO, KC_##K4C, KC_##K4D, KC_##K4E, KC_NO }, \
106 { KC_NO, KC_NO, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
107 { KC_##K58, KC_##K59, KC_NO, KC_##K5B, KC_##K5C, KC_NO, KC_NO, KC_NO }, \
108 { KC_NO, KC_NO, KC_##K62, KC_NO, KC_NO, KC_NO, KC_##K66, KC_NO }, \
109 { KC_##K68, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K6D, KC_NO, KC_NO }, \
110}
111
112#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))
113
114
115// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
116static const uint8_t PROGMEM fn_layer[] = {
117 1, // Fn0
118 2, // Fn1
119 3, // Fn2
120 1, // Fn3
121 2, // Fn4
122 0, // Fn5
123 0, // Fn6
124 0 // Fn7
125};
126
127// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
128// See layer.c for details.
129static const uint8_t PROGMEM fn_keycode[] = {
130 KC_ENTER, // Fn0
131 KC_SCOLON, // Fn1
132 KC_SLASH, // Fn2
133 KC_UP, // Fn3
134 KC_NO, // Fn4
135 KC_NO, // Fn5
136 KC_NO, // Fn6
137 KC_NO // Fn7
138};
139
140static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
141 /* Default:
142 * M0110 M0120
143 * ,---------------------------------------------------------. ,---------------.
144 * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backs| |Gui| -| +| *|
145 * |---------------------------------------------------------| |---------------|
146 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| | 7| 8| 9| /|
147 * |---------------------------------------------------------| |---------------|
148 * |Ctrl | A| S| D| F| G| H| J| K| L| Fn| '|Return| | 4| 5| 6| ,|
149 * |---------------------------------------------------------| |---------------|
150 * |Shift | Z| X| C| V| B| N| M| ,| ,| Fn|Shift | | 1| 2| 3| |
151 * `---------------------------------------------------------' |-----------|Ent|
152 * |Fn |alt | Space |Gui |Fn | | 0| .| |
153 * `-----------------------------------------------' `---------------'
154 */
155 KEYMAP(
156 GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, NLCK,EQL, PSLS,PAST,
157 TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, P7, P8, P9, PMNS,
158 LCTL,A, S, D, F, G, H, J, K, L, FN1, QUOT, FN0, P4, P5, P6, PPLS,
159 LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN2, FN3, P1, P2, P3, PENT,
160 FN4, LALT, SPC, LGUI,BSLS,LGUI,RCTL,RCTL, LGUI, PDOT
161 ),
162 // HHKB & WASD
163 KEYMAP(
164 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST,
165 CAPS,NO, NO, NO, NO, NO, NO, NO, PSCR,SLCK,PAUS,UP, NO, P7, P8, P9, PMNS,
166 LCTL,VOLD,VOLU,MUTE,NO, NO, NO, NO, HOME,PGUP,LEFT,RGHT, FN0, P4, P5, P6, PPLS,
167 LSFT,NO, NO, NO, NO, NO, NO, NO, END, PGDN,DOWN, FN3, P1, P2, P3, PENT,
168 LCTL,LALT, SPC, LGUI,INS, LGUI,RCTL,RCTL, P0, PDOT
169 ),
170 // vi mousekeys
171 KEYMAP(
172 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST,
173 CAPS,NO, NO, NO, NO, NO, WH_L,WH_D,WH_U,WH_R,PSCR,SLCK,PAUS, P7, P8, P9, PMNS,
174 LCTL,VOLD,VOLU,MUTE,NO, NO, MS_L,MS_D,MS_U,MS_R,FN1, NO, ENT, P4, P5, P6, PPLS,
175 LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,NO, NO, NO, NO, P1, P2, P3, PENT,
176 FN4, LALT, BTN1, LGUI,NO, LGUI,RCTL,RCTL, P0, PDOT
177 ),
178 // vi cusorkeys
179 KEYMAP(
180 ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, NLCK,EQL, PSLS,PAST,
181 CAPS,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, PSCR,SLCK,PAUS, P7, P8, P9, PMNS,
182 LCTL,NO, NO, NO, NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, ENT, P4, P5, P6, PPLS,
183 LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, NO, P1, P2, P3, PENT,
184 LCTL,LALT, SPC, LGUI,INS, LGUI,RCTL,RCTL, P0, PDOT
185 ),
186};
187
188
189uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
190{
191 return KEYCODE(layer, row, col);
192}
193
194uint8_t keymap_fn_layer(uint8_t index)
195{
196 return pgm_read_byte(&fn_layer[index]);
197}
198
199uint8_t keymap_fn_keycode(uint8_t index)
200{
201 return pgm_read_byte(&fn_keycode[index]);
202}
diff --git a/converter/m0110_usb/matrix.c b/converter/m0110_usb/matrix.c
index 1ca6894c4..c71a4874c 100644
--- a/converter/m0110_usb/matrix.c
+++ b/converter/m0110_usb/matrix.c
@@ -60,13 +60,6 @@ uint8_t matrix_cols(void)
60 60
61void matrix_init(void) 61void matrix_init(void)
62{ 62{
63 print_enable = true;
64 debug_enable = true;
65 debug_matrix = false;
66 debug_keyboard = false;
67 debug_mouse = false;
68 print("debug enabled.\n");
69
70 m0110_init(); 63 m0110_init();
71 // initialize matrix state: all keys off 64 // initialize matrix state: all keys off
72 for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; 65 for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00;
diff --git a/protocol/m0110.c b/protocol/m0110.c
index a669c85a4..8bf7cfe4f 100644
--- a/protocol/m0110.c
+++ b/protocol/m0110.c
@@ -321,7 +321,7 @@ static inline uint8_t instant(void)
321 m0110_send(M0110_INSTANT); 321 m0110_send(M0110_INSTANT);
322 uint8_t data = m0110_recv(); 322 uint8_t data = m0110_recv();
323 if (data != M0110_NULL) { 323 if (data != M0110_NULL) {
324 phex(data); print(" "); 324 debug_hex(data); debug(" ");
325 } 325 }
326 return data; 326 return data;
327} 327}