summaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/keymaps/jarred
diff options
context:
space:
mode:
authorDrashna Jaelre <drashna@live.com>2021-05-24 23:23:20 -0700
committerGitHub <noreply@github.com>2021-05-24 23:23:20 -0700
commit57158cc3bcd169bc76785099fe2ded359d94eaa2 (patch)
tree8b29410902050e40f99f225e5282c0ee31bfd4e5 /keyboards/crkbd/keymaps/jarred
parent8e22da67c1ddafa45b2e4d0ec4449dc79b509b89 (diff)
[Keyboard] Corne - Remove legacy revision support (#12226)
Diffstat (limited to 'keyboards/crkbd/keymaps/jarred')
-rw-r--r--keyboards/crkbd/keymaps/jarred/config.h1
-rw-r--r--keyboards/crkbd/keymaps/jarred/keymap.c33
-rw-r--r--keyboards/crkbd/keymaps/jarred/rules.mk5
3 files changed, 22 insertions, 17 deletions
diff --git a/keyboards/crkbd/keymaps/jarred/config.h b/keyboards/crkbd/keymaps/jarred/config.h
index ac4c1cc88f..012356241d 100644
--- a/keyboards/crkbd/keymaps/jarred/config.h
+++ b/keyboards/crkbd/keymaps/jarred/config.h
@@ -29,6 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define EE_HANDS
#define SSD1306OLED
+#define USE_SSD_I2C
#define USE_SERIAL_PD2
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());
}
diff --git a/keyboards/crkbd/keymaps/jarred/rules.mk b/keyboards/crkbd/keymaps/jarred/rules.mk
index ab6329f0eb..5806ce0930 100644
--- a/keyboards/crkbd/keymaps/jarred/rules.mk
+++ b/keyboards/crkbd/keymaps/jarred/rules.mk
@@ -14,7 +14,7 @@ MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
-RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
SWAP_HANDS_ENABLE = no # Enable one-hand typing
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
@@ -29,3 +29,6 @@ SRC += ./lib/glcdfont.c \
# ./lib/mode_icon_reader.c \
# ./lib/host_led_state_reader.c \
# ./lib/timelogger.c \
+
+VPATH += keyboards/crkbd/lib
+LIB_SRC += ssd1306.c i2c.c