diff options
author | Andrew-Fahmy <andrewj.fahmy@gmail.com> | 2021-12-06 22:58:02 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-06 20:58:02 -0800 |
commit | 23554726c8d6495e8153c994ed4a58112a79be49 (patch) | |
tree | d62bb67617635c9e2161d0c28048055652958db7 /keyboards | |
parent | c0dcfcedf92c5950d3ce7d8eb19e27f2f057c596 (diff) |
[Keyboard] Update K type (#15405)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards')
-rw-r--r-- | keyboards/k_type/config.h | 79 | ||||
-rw-r--r-- | keyboards/k_type/i2c_master.c | 16 | ||||
-rw-r--r-- | keyboards/k_type/i2c_master.h | 10 | ||||
-rw-r--r-- | keyboards/k_type/is31fl3733-dual.c | 10 | ||||
-rw-r--r-- | keyboards/k_type/is31fl3733-dual.h | 1 | ||||
-rw-r--r-- | keyboards/k_type/k_type-rgbdriver.c | 4 | ||||
-rw-r--r-- | keyboards/k_type/k_type.c | 55 | ||||
-rw-r--r-- | keyboards/k_type/keymaps/default/keymap.c | 11 | ||||
-rw-r--r-- | keyboards/k_type/keymaps/default/rules.mk (renamed from keyboards/k_type/keymaps/rgb/rules.mk) | 0 | ||||
-rw-r--r-- | keyboards/k_type/keymaps/rgb/config.h | 32 | ||||
-rw-r--r-- | keyboards/k_type/keymaps/rgb/keymap.c | 30 | ||||
-rw-r--r-- | keyboards/k_type/keymaps/rgb/readme.md | 7 | ||||
-rw-r--r-- | keyboards/k_type/mcuconf.h | 2 | ||||
-rw-r--r-- | keyboards/k_type/rules.mk | 12 |
14 files changed, 160 insertions, 109 deletions
diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index 82f641c533..de73e06a98 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -105,3 +105,82 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Bootmagic Lite key configuration */ //#define BOOTMAGIC_LITE_ROW 0 //#define BOOTMAGIC_LITE_COLUMN 0 + + +#ifdef RGB_MATRIX_ENABLE +//#include "gpio.h" +// RGB Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_rgb_matrix?id=rgb-matrix-effects +# define ENABLE_RGB_MATRIX_ALPHAS_MODS +# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN +# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_BREATHING +# define ENABLE_RGB_MATRIX_BAND_SAT +# define ENABLE_RGB_MATRIX_BAND_VAL +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_SAT +# define ENABLE_RGB_MATRIX_BAND_PINWHEEL_VAL +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_SAT +# define ENABLE_RGB_MATRIX_BAND_SPIRAL_VAL +# define ENABLE_RGB_MATRIX_CYCLE_ALL +# define ENABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT +# define ENABLE_RGB_MATRIX_CYCLE_UP_DOWN +# define ENABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN +# define ENABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL +# define ENABLE_RGB_MATRIX_CYCLE_PINWHEEL +# define ENABLE_RGB_MATRIX_CYCLE_SPIRAL +# define ENABLE_RGB_MATRIX_DUAL_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_BEACON +# define ENABLE_RGB_MATRIX_RAINBOW_PINWHEELS +# define ENABLE_RGB_MATRIX_RAINDROPS +# define ENABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS +# define ENABLE_RGB_MATRIX_HUE_BREATHING +# define ENABLE_RGB_MATRIX_HUE_PENDULUM +# define ENABLE_RGB_MATRIX_HUE_WAVE +# define ENABLE_RGB_MATRIX_PIXEL_RAIN +# define ENABLE_RGB_MATRIX_PIXEL_FLOW +# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL +// enabled only if RGB_MATRIX_FRAMEBUFFER_EFFECTS is defined +# define ENABLE_RGB_MATRIX_TYPING_HEATMAP +# define ENABLE_RGB_MATRIX_DIGITAL_RAIN +// enabled only if RGB_MATRIX_KEYPRESSES or RGB_MATRIX_KEYRELEASES is defined +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_RGB_MATRIX_SPLASH +# define ENABLE_RGB_MATRIX_MULTISPLASH +# define ENABLE_RGB_MATRIX_SOLID_SPLASH +# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH + +# define RGB_MATRIX_KEYPRESSES +# define RGB_MATRIX_FRAMEBUFFER_EFFECTS + + +// i2c_master defines +# define I2C_COUNT 2 +# define I2C1_CLOCK_SPEED 400000 + +# define I2C1_SCL_PIN B0 // A2 on pinout = B0 +# define I2C1_SDA_PIN B1 // A2 on pinout = B1 +# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 + +# define USE_I2C2 +# define I2C2_SCL_PIN C10 // A2 on pinout = C10 +# define I2C2_SDA_PIN C11 // A2 on pinout = C11 +# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 + +# define DRIVER_ADDR_1 0b1010000 +# define DRIVER_ADDR_2 0b1010000 +# define DRIVER_COUNT 2 +# define DRIVER_1_LED_TOTAL 64 +# define DRIVER_2_LED_TOTAL 55 +# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) +#endif diff --git a/keyboards/k_type/i2c_master.c b/keyboards/k_type/i2c_master.c index 62d732c2d0..af34d55ef6 100644 --- a/keyboards/k_type/i2c_master.c +++ b/keyboards/k_type/i2c_master.c @@ -63,22 +63,22 @@ static i2c_status_t chibios_to_qmk(const msg_t* status) { } } -__attribute__((weak)) void i2c_init(I2CDriver *driver, ioportid_t scl_port, ioportid_t sda_port, iopadid_t scl_pad, iopadid_t sda_pad) { +__attribute__((weak)) void i2c_init(I2CDriver *driver, ioline_t scl_pin, ioline_t sda_pin) { static uint8_t index = 0; if (index < I2C_COUNT) { - + // Try releasing special pins for a short time - palSetPadMode(scl_port, scl_pad, PAL_MODE_INPUT); - palSetPadMode(sda_port, sda_pad, PAL_MODE_INPUT); + palSetLineMode(scl_pin, PAL_MODE_INPUT); + palSetLineMode(sda_pin, PAL_MODE_INPUT); chThdSleepMilliseconds(10); #if defined(USE_GPIOV1) - palSetPadMode(scl_port, scl_pad, I2C1_SCL_PAL_MODE); - palSetPadMode(sda_port, sda_pad, I2C1_SDA_PAL_MODE); + palSetLineMode(scl_pin, I2C1_SCL_PAL_MODE); + palSetLineMode(sda_pin, I2C1_SDA_PAL_MODE); #else - palSetPadMode(scl_port, scl_pad, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); - palSetPadMode(sda_port, sda_pad, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_STM32_OTYPE_OPENDRAIN); + palSetLineMode(scl_pin, PAL_MODE_ALTERNATE(I2C1_SCL_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); + palSetLineMode(sda_pin, PAL_MODE_ALTERNATE(I2C1_SDA_PAL_MODE) | PAL_OUTPUT_TYPE_OPENDRAIN); #endif drivers[index++] = driver; diff --git a/keyboards/k_type/i2c_master.h b/keyboards/k_type/i2c_master.h index 5a7893fae8..d4e9d6878f 100644 --- a/keyboards/k_type/i2c_master.h +++ b/keyboards/k_type/i2c_master.h @@ -58,11 +58,11 @@ # endif #endif -#ifndef I2C1_SCL -# define I2C1_SCL 6 +#ifndef I2C1_SCL_PIN +# define I2C1_SCL_PIN 6 #endif -#ifndef I2C1_SDA -# define I2C1_SDA 7 +#ifndef I2C1_SDA_PIN +# define I2C1_SDA_PIN 7 #endif #ifdef USE_I2CV1 @@ -118,7 +118,7 @@ typedef int16_t i2c_status_t; #define I2C_STATUS_ERROR (-1) #define I2C_STATUS_TIMEOUT (-2) -void i2c_init(I2CDriver *driver, ioportid_t scl_port, ioportid_t sda_port, iopadid_t scl_pad, iopadid_t sda_pad); +void i2c_init(I2CDriver *driver, ioline_t scl_pin, ioline_t sda_pin); i2c_status_t i2c_start(uint8_t index, uint8_t address); i2c_status_t i2c_transmit(uint8_t index, uint8_t address, const uint8_t* data, uint16_t length, uint16_t timeout); i2c_status_t i2c_receive(uint8_t index, uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout); diff --git a/keyboards/k_type/is31fl3733-dual.c b/keyboards/k_type/is31fl3733-dual.c index 8f39e73c69..e76479b01a 100644 --- a/keyboards/k_type/is31fl3733-dual.c +++ b/keyboards/k_type/is31fl3733-dual.c @@ -51,7 +51,7 @@ #define ISSI_REG_CSPULLUP 0x10 // PG3 #ifndef ISSI_TIMEOUT -# define ISSI_TIMEOUT 100 +# define ISSI_TIMEOUT 5000 #endif #ifndef ISSI_PERSISTENCE @@ -80,12 +80,12 @@ bool IS31FL3733_write_register(uint8_t index, uint8_t addr, uint8_t reg, uint8_t #if ISSI_PERSISTENCE > 0 for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) { + if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, TIME_US2I(ISSI_TIMEOUT)) != 0) { return false; } } #else - if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, ISSI_TIMEOUT) != 0) { + if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 2, TIME_US2I(ISSI_TIMEOUT)) != 0) { return false; } #endif @@ -110,12 +110,12 @@ bool IS31FL3733_write_pwm_buffer(uint8_t index, uint8_t addr, uint8_t *pwm_buffe #if ISSI_PERSISTENCE > 0 for (uint8_t i = 0; i < ISSI_PERSISTENCE; i++) { - if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) { + if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, TIME_US2I(ISSI_TIMEOUT)) != 0) { return false; } } #else - if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, ISSI_TIMEOUT) != 0) { + if (i2c_transmit(index, addr << 1, g_twi_transfer_buffer, 17, TIME_US2I(ISSI_TIMEOUT)) != 0) { return false; } #endif diff --git a/keyboards/k_type/is31fl3733-dual.h b/keyboards/k_type/is31fl3733-dual.h index ea45a70867..d4af1848fb 100644 --- a/keyboards/k_type/is31fl3733-dual.h +++ b/keyboards/k_type/is31fl3733-dual.h @@ -20,6 +20,7 @@ #include <stdint.h> #include <stdbool.h> +#include "progmem.h" typedef struct is31_led { uint8_t driver : 2; diff --git a/keyboards/k_type/k_type-rgbdriver.c b/keyboards/k_type/k_type-rgbdriver.c index 8369aa909e..5ae132d63a 100644 --- a/keyboards/k_type/k_type-rgbdriver.c +++ b/keyboards/k_type/k_type-rgbdriver.c @@ -23,10 +23,10 @@ static void init(void) { - i2c_init(&I2CD1, I2C1_SCL_BANK, I2C1_SDA_BANK, I2C1_SCL, I2C1_SDA); + i2c_init(&I2CD1, I2C1_SCL_PIN, I2C1_SDA_PIN); IS31FL3733_init(0, DRIVER_ADDR_1, 0); # ifdef USE_I2C2 - i2c_init(&I2CD2, I2C2_SCL_BANK, I2C2_SDA_BANK, I2C2_SCL, I2C2_SDA); + i2c_init(&I2CD2, I2C2_SCL_PIN, I2C2_SDA_PIN); IS31FL3733_init(1, DRIVER_ADDR_2, 0); # endif for (int index = 0; index < DRIVER_LED_TOTAL; index++) { diff --git a/keyboards/k_type/k_type.c b/keyboards/k_type/k_type.c index 29e7fa57b2..0e10710cb1 100644 --- a/keyboards/k_type/k_type.c +++ b/keyboards/k_type/k_type.c @@ -67,11 +67,11 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, H_7, G_7, I_7 }, { 0, H_8, G_8, I_8 }, { 0, H_9, G_9, I_9 }, - { 0, H_10, G_10, I_10 }, - { 0, H_11, G_11, I_11 }, - { 0, H_12, G_12, I_12 }, - { 0, H_13, G_13, I_13 }, - { 0, H_14, G_14, I_14 }, + { 0, H_10, G_10, I_10 }, + { 0, H_11, G_11, I_11 }, + { 0, H_12, G_12, I_12 }, + { 0, H_13, G_13, I_13 }, + { 0, H_14, G_14, I_14 }, { 0, H_15, G_15, I_15 }, { 0, H_16, G_16, I_16 }, @@ -84,15 +84,15 @@ const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { { 0, K_7, J_7, L_7 }, { 0, K_8, J_8, L_8 }, { 0, K_9, J_9, L_9 }, - { 0, K_10, J_10, L_10 }, - { 0, K_11, J_11, L_11 }, - { 0, K_12, J_12, L_12 }, - { 0, K_13, J_13, L_13 }, - { 0, K_14, J_14, L_14 }, + { 0, K_10, J_10, L_10 }, + { 0, K_11, J_11, L_11 }, + { 0, K_12, J_12, L_12 }, + { 0, K_13, J_13, L_13 }, + { 0, K_14, J_14, L_14 }, { 0, K_15, J_15, L_15 }, { 0, K_16, J_16, L_16 }, - // Driver 2 is on I2C2 - currently not usable with i2c_master + // Driver 2 is on I2C2 { 1, B_1, A_1, C_1 }, { 1, B_2, A_2, C_2 }, { 1, B_3, A_3, C_3 }, @@ -176,7 +176,7 @@ led_config_t g_led_config = { { 0, 42.67 }, { 13.18, 42.67 }, { 26.35, 42.67 }, { 39.53, 42.67 }, { 52.71, 42.67 }, { 65.88, 42.67 }, { 79.06, 42.67 }, { 92.24, 42.67 }, { 105.41, 42.67 }, { 118.59, 42.67 }, { 131.77, 42.67 }, { 144.94, 42.67 }, { 171.29, 42.67 }, { 0, 53.33 }, { 26.35, 53.33 }, { 39.53, 53.33 }, { 52.71, 53.33 }, { 65.88, 53.33 }, { 79.06, 53.33 }, { 92.24, 53.33 }, { 105.41, 53.33 }, { 118.59, 53.33 }, { 131.77, 53.33 }, { 144.94, 53.33 }, { 171.29, 53.33 }, { 210.82, 53.33 }, { 0, 64 }, { 13.18, 64 }, { 26.35, 64 }, { 79.06, 64 }, { 131.77, 64 }, { 144.94, 64 }, { 158.12, 64 }, { 171.29, 64 }, { 197.65, 64 }, { 210.82, 64 }, { 224, 64 }, - + // Underglow LED { 224, 64 }, { 206.77, 64 }, { 189.54, 64 }, { 172.31, 64 }, { 155.08, 64 }, { 137.85, 64 }, { 120.61, 64 }, { 103.38, 64 }, { 86.15, 64 }, { 68.92, 64 }, { 51.69, 64 }, { 34.46, 64 }, { 17.23, 64 }, { 0, 64 }, { 0, 42.67 }, { 0, 21.33 }, @@ -197,10 +197,39 @@ led_config_t g_led_config = { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - + 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, } }; #endif + + +void keyboard_pre_init_kb(void) { +#ifdef RGB_MATRIX_ENABLE + // Turn on LED controller + setPinOutput(B16); + writePinHigh(B16); +#endif + keyboard_pre_init_user(); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + +#ifdef RGB_MATRIX_ENABLE + /* + * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), + * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. + */ +# if !defined(RGB_MATRIX_STARTUP_SPD) +# define RGB_MATRIX_STARTUP_SPD UINT8_MAX / 2 +# endif + rgb_matrix_set_speed(RGB_MATRIX_STARTUP_SPD), + rgb_matrix_set_flags(LED_FLAG_ALL); +#endif + + matrix_init_user(); +} diff --git a/keyboards/k_type/keymaps/default/keymap.c b/keyboards/k_type/keymaps/default/keymap.c index b8df4df5ee..ef069af650 100644 --- a/keyboards/k_type/keymaps/default/keymap.c +++ b/keyboards/k_type/keymaps/default/keymap.c @@ -8,6 +8,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_tkl_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, + + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_HUI, RGB_SAI, RGB_VAI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/k_type/keymaps/rgb/rules.mk b/keyboards/k_type/keymaps/default/rules.mk index aad92997d0..aad92997d0 100644 --- a/keyboards/k_type/keymaps/rgb/rules.mk +++ b/keyboards/k_type/keymaps/default/rules.mk diff --git a/keyboards/k_type/keymaps/rgb/config.h b/keyboards/k_type/keymaps/rgb/config.h deleted file mode 100644 index 4c5d234545..0000000000 --- a/keyboards/k_type/keymaps/rgb/config.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#ifdef RGB_MATRIX_ENABLE -# define RGB_MATRIX_KEYPRESSES -# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_SOLID_COLOR - -# define RGB_MATRIX_LED_FLUSH_LIMIT 100 - - -// i2c_master defines -# define I2C_COUNT 2 - -# define I2C1_BANK GPIOB -# define I2C1_SCL 0 // A2 on pinout = B0 -# define I2C1_SDA 1 // A2 on pinout = B1 -# define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 -# define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 - -# define USE_I2C2 -# define I2C2_BANK GPIOC -# define I2C2_SCL 10 // A2 on pinout = C10 -# define I2C2_SDA 11 // A2 on pinout = C11 -# define I2C2_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 -# define I2C2_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 - -# define DRIVER_ADDR_1 0b1010000 -# define DRIVER_ADDR_2 0b1010000 -# define DRIVER_COUNT 2 -# define DRIVER_1_LED_TOTAL 64 -# define DRIVER_2_LED_TOTAL 55 -# define DRIVER_LED_TOTAL (DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL) -#endif diff --git a/keyboards/k_type/keymaps/rgb/keymap.c b/keyboards/k_type/keymaps/rgb/keymap.c deleted file mode 100644 index 88f5eaa37b..0000000000 --- a/keyboards/k_type/keymaps/rgb/keymap.c +++ /dev/null @@ -1,30 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_tkl_ansi( - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, - - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, - KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT - ), - [1] = LAYOUT_tkl_ansi( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_MOD, _______, - - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SPD, RGB_SPI, _______, RGB_HUI, RGB_SAI, RGB_VAI, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ - ) -}; - -#ifdef RGB_MATRIX_ENABLE -// Turn off SDB -void keyboard_pre_init_user() { - palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(GPIOB, 16); -} -#endif diff --git a/keyboards/k_type/keymaps/rgb/readme.md b/keyboards/k_type/keymaps/rgb/readme.md deleted file mode 100644 index 330321976c..0000000000 --- a/keyboards/k_type/keymaps/rgb/readme.md +++ /dev/null @@ -1,7 +0,0 @@ -# K-Type RGB Matrix Keymap - -This is an experimental keymap adding support for RGB Matrix on the K-Type. - -The keyboard should now support full RGB lightings. The lighting animations are running at 10 fps for performance reasons. -You can configure this by changing the `RGB_MATRIX_LED_FLUSH_LIMIT` inside the `config.h` file to a lower value. -For example `RGB_MATRIX_LED_FLUSH_LIMIT 16` would mean that the animations run every 16 ms or at 60 fps. diff --git a/keyboards/k_type/mcuconf.h b/keyboards/k_type/mcuconf.h index 1d9ecf6104..b898d25e88 100644 --- a/keyboards/k_type/mcuconf.h +++ b/keyboards/k_type/mcuconf.h @@ -52,6 +52,6 @@ #define KINETIS_I2C_I2C0_PRIORITY 4 #define KINETIS_I2C_USE_I2C1 TRUE -#define KINETIS_I2C_I2C0_PRIORITY 4 +#define KINETIS_I2C_I2C1_PRIORITY 4 #endif /* _MCUCONF_H_ */ diff --git a/keyboards/k_type/rules.mk b/keyboards/k_type/rules.mk index 102c787bc6..71e638569c 100644 --- a/keyboards/k_type/rules.mk +++ b/keyboards/k_type/rules.mk @@ -15,20 +15,22 @@ BOARD = IC_TEENSY_3_1 # change yes to no to disable # BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration +MOUSEKEY_ENABLE = no # Mouse keys +EXTRAKEY_ENABLE = no # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow AUDIO_ENABLE = no # Audio output + +# RGB options RGB_MATRIX_ENABLE = no RGB_MATRIX_DRIVER = custom +# Additional files for RGB lighting SRC += k_type-rgbdriver.c - QUANTUM_LIB_SRC += i2c_master.c is31fl3733-dual.c LAYOUTS = tkl_ansi |