diff options
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/crkbd/keymaps/drashna/keymap.c | 24 | ||||
-rw-r--r-- | keyboards/iris/keymaps/drashna/keymap.c | 10 | ||||
-rw-r--r-- | keyboards/orthodox/keymaps/drashna/keymap.c | 10 | ||||
-rw-r--r-- | keyboards/viterbi/keymaps/drashna/keymap.c | 11 |
4 files changed, 32 insertions, 23 deletions
diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 282ee2572..678fd33b5 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -88,16 +88,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_keymap(void) { - //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h - #ifdef SSD1306OLED - iota_gfx_init(!has_usb()); // turns on the display - #endif - - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); - - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + iota_gfx_init(!has_usb()); // turns on the display + #endif + + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); + + setPinOutput(B0); + writePinHigh(B0); + #endif } //SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h @@ -126,10 +128,10 @@ const char code_to_name[60] = { void set_keylog(uint16_t keycode, keyrecord_t *record) { char name = ' '; + if ((keycode >= QK_MOD_TAP && keycode <= QK_MOD_TAP_MAX) || (keycode >= QK_LAYER_TAP && keycode <= QK_LAYER_TAP_MAX)) { keycode = keycode & 0xFF; } if (keycode < 60) { name = code_to_name[keycode]; } - // update keylog snprintf(keylog_str, sizeof(keylog_str), "%dx%d, k%2d : %c", record->event.key.row, record->event.key.col, diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index ba6f18edd..d89656b7e 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -89,9 +89,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 346ca4f12..9373d851d 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -97,9 +97,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/viterbi/keymaps/drashna/keymap.c index a34320519..9ca14961b 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/viterbi/keymaps/drashna/keymap.c @@ -87,10 +87,13 @@ bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + void matrix_init_keymap(void) { - DDRD &= ~(1<<5); - PORTD &= ~(1<<5); + #ifndef CONVERT_TO_PROTON_C + setPinOutput(D5); + writePinHigh(D5); - DDRB &= ~(1<<0); - PORTB &= ~(1<<0); + setPinOutput(B0); + writePinHigh(B0); + #endif } |