diff options
Diffstat (limited to 'keyboards/crkbd/keymaps/jarred/keymap.c')
-rw-r--r-- | keyboards/crkbd/keymaps/jarred/keymap.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/keyboards/crkbd/keymaps/jarred/keymap.c b/keyboards/crkbd/keymaps/jarred/keymap.c index f00a735bfc..b938636c2a 100644 --- a/keyboards/crkbd/keymaps/jarred/keymap.c +++ b/keyboards/crkbd/keymaps/jarred/keymap.c @@ -9,8 +9,6 @@ #include "ssd1306.h" #endif -extern keymap_config_t keymap_config; -extern uint8_t is_master; #ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings @@ -24,7 +22,7 @@ extern rgblight_config_t rgblight_config; K31, K32, K33, K34, K35, K36 \ ) -#define LAYOUT_crkbd_wrapper(...) LAYOUT(__VA_ARGS__) +#define LAYOUT_crkbd_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__) #define QWERTY_4_CRKBD KC_LCTL, MO(_LW), KC_SPC, KC_ENT, MO(_LW), KC_RALT @@ -37,28 +35,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { QWERTY_3_12, QWERTY_4_DOX ), - + [_LW] = LAYOUT_crkbd_wrapper( LOWER_1_12, LOWER_2_12, LOWER_3_12, LOWER_4_DOX ), - + [_NV] = LAYOUT_crkbd_wrapper( NAV_1_12, NAV_2_12, NAV_3_12, NAV_4_DOX ), - + [_NP] = LAYOUT_crkbd_wrapper( NUMPAD_1_12, NUMPAD_2_12, NUMPAD_3_12, NUMPAD_4_DOX ), - + [_MS] = LAYOUT_crkbd_wrapper( MOUSE_1_12, MOUSE_2_12, @@ -70,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_user(void) { //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display + iota_gfx_init(); // turns on the display #endif } @@ -87,9 +85,9 @@ char matrix_line_str[24]; const char *read_layer_state(void) { uint8_t layer = biton32(layer_state); - + strcpy(matrix_line_str, "Layer: "); - + switch (layer) { case _QW: @@ -115,9 +113,9 @@ const char *read_layer_state(void) { } const char *read_usb_state(void) { - + strcpy(matrix_line_str, "USB : "); - + switch (USB_DeviceState) { case DEVICE_STATE_Unattached: strcat(matrix_line_str, "Unattached"); @@ -149,10 +147,13 @@ void matrix_scan_user(void) { } void matrix_render_user(struct CharacterMatrix *matrix) { - if (is_master) { - matrix_write_ln(matrix, read_layer_state()); - matrix_write_ln(matrix, read_usb_state()); - matrix_write_ln(matrix, read_keylogs()); + if (is_keyboard_master()) { + matrix_write(matrix, read_layer_state()); + matrix_write(matrix, "\n"); + matrix_write(matrix, read_usb_state()); + matrix_write(matrix, "\n"); + matrix_write(matrix, read_keylogs()); + matrix_write(matrix, "\n"); } else { matrix_write(matrix, read_logo()); } |