From 8cdb4a91501fab114ae55def050d06c7b9569f30 Mon Sep 17 00:00:00 2001 From: Harley Laue Date: Fri, 18 May 2018 13:58:23 -0700 Subject: Add Contra layout & cleanup a few things (#2998) * Have Del become backspace on the bottom layer for grid layouts * Fix modtap for ESC * Add sleep to Adjust layer --- keyboards/levinson/keymaps/losinggeneration/README.md | 2 +- keyboards/levinson/keymaps/losinggeneration/keymap.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards/levinson') diff --git a/keyboards/levinson/keymaps/losinggeneration/README.md b/keyboards/levinson/keymaps/losinggeneration/README.md index b406d50008..44c904508a 100644 --- a/keyboards/levinson/keymaps/losinggeneration/README.md +++ b/keyboards/levinson/keymaps/losinggeneration/README.md @@ -17,7 +17,7 @@ See description of the layout in the common folder ``` ,-----------------------------------------..-----------------------------------------. - | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | | + | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | |Sleep | |------+------+------+------+------+------||------+------+------+------+------+------| | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| | |------+------+------+------+------+------||------+------+------+------+------+------| diff --git a/keyboards/levinson/keymaps/losinggeneration/keymap.c b/keyboards/levinson/keymaps/losinggeneration/keymap.c index 3512f59f1c..aea6aed78c 100644 --- a/keyboards/levinson/keymaps/losinggeneration/keymap.c +++ b/keyboards/levinson/keymaps/losinggeneration/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------..-----------------------------------------. - * | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | | + * | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | |Sleep | * |------+------+------+------+------+------||------+------+------+------+------+------| * | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| | * |------+------+------+------+------+------||------+------+------+------+------+------| @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------''-----------------------------------------' */ [_ADJUST] = CATMAP( \ - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, _______, \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , BL_TOGG, AU_ON , QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , BL_ON , AU_OFF , _______, _______, _______, KC_UP , _______, \ _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ -- cgit v1.2.1 From 7658f10fba71974bdd6dfc33fbd53deff76b1f83 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 22 May 2018 15:40:43 -0400 Subject: Fix led enabled slave (#3022) * Account for backlight enabled flag when passing backlight level to slave * Add BL_TOGG to keymap for testing * Apply backlight fix to Iris * Port I2C LED backlight control from Iris to Levinson --- keyboards/levinson/matrix.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'keyboards/levinson') diff --git a/keyboards/levinson/matrix.c b/keyboards/levinson/matrix.c index ed913f34b4..7195fb0ead 100644 --- a/keyboards/levinson/matrix.c +++ b/keyboards/levinson/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2012 Jun Wako +Copyright 2017 Danny Nguyen This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -30,7 +30,11 @@ along with this program. If not, see . #include "pro_micro.h" #include "config.h" #include "timer.h" -#include "backlight.h" + +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif #ifdef USE_I2C # include "i2c.h" @@ -199,6 +203,15 @@ int i2c_transaction(void) { err = i2c_master_write(0x00); if (err) goto i2c_error; +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0); +#else + // Write zero, so our byte index is the same + err = i2c_master_write(0x00); +#endif + if (err) goto i2c_error; + // Start read err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); if (err) goto i2c_error; @@ -234,7 +247,7 @@ int serial_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); + serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; #endif return 0; } @@ -276,8 +289,12 @@ void matrix_slave_scan(void) { int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(i2c_slave_buffer[0]); +#endif for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; + i2c_slave_buffer[i+1] = matrix[offset+i]; } #else // USE_SERIAL for (int i = 0; i < ROWS_PER_HAND; ++i) { -- cgit v1.2.1 From 2b677ddac9aaba14f75787ab4b6d81054ad6ffd4 Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 28 May 2018 18:02:41 -0400 Subject: Fix nyquist (and other splits using D2 in debouncing) (#3067) * Update default Nyquist revision * LED slave fix * Sync changes from lets_split * Add needed check for debouncing * Remove line that was setting PD2 pin and interfering with use of that pin * Add backlight key to keymap --- keyboards/levinson/matrix.c | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/levinson') diff --git a/keyboards/levinson/matrix.c b/keyboards/levinson/matrix.c index 7195fb0ead..217264f263 100644 --- a/keyboards/levinson/matrix.c +++ b/keyboards/levinson/matrix.c @@ -153,7 +153,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else -- cgit v1.2.1