3. `DATA`(Green) | 3. `DATA`(Green) | ||||
4. `+5V`(Yellow) | 4. `+5V`(Yellow) | ||||
Not that wire colors may vary in your cable. | |||||
Note that wire colors may vary in your cable. | |||||
### Pinout | ### Pinout |
/* Locking Caps Lock support */ | /* Locking Caps Lock support */ | ||||
//#define MATRIX_HAS_LOCKING_CAPS | //#define MATRIX_HAS_LOCKING_CAPS | ||||
/* key combination for command */ | |||||
/* Backspace for command key */ | |||||
#define BACKSPACE_CODE 0x33 | |||||
#define IS_COMMAND() ( \ | #define IS_COMMAND() ( \ | ||||
keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) \ | |||||
matrix_is_on((BACKSPACE_CODE>>3)&0x0F, BACKSPACE_CODE&0x07) \ | |||||
) | ) | ||||
void matrix_init(void) | void matrix_init(void) | ||||
{ | { | ||||
print_enable = true; | |||||
debug_enable = true; | |||||
debug_matrix = false; | |||||
debug_keyboard = false; | |||||
debug_mouse = false; | |||||
print("debug enabled.\n"); | |||||
m0110_init(); | m0110_init(); | ||||
// initialize matrix state: all keys off | // initialize matrix state: all keys off | ||||
for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; | for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; |
m0110_send(M0110_INSTANT); | m0110_send(M0110_INSTANT); | ||||
uint8_t data = m0110_recv(); | uint8_t data = m0110_recv(); | ||||
if (data != M0110_NULL) { | if (data != M0110_NULL) { | ||||
phex(data); print(" "); | |||||
debug_hex(data); debug(" "); | |||||
} | } | ||||
return data; | return data; | ||||
} | } |