From ece0ccd21eb47d84359ea49a640227479244bd7c Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:45:42 -0700 Subject: [PATCH 01/43] Create readme.md --- keyboards/centromere/readme.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 keyboards/centromere/readme.md diff --git a/keyboards/centromere/readme.md b/keyboards/centromere/readme.md new file mode 100644 index 000000000000..547ea60ddb86 --- /dev/null +++ b/keyboards/centromere/readme.md @@ -0,0 +1 @@ +QMK Firmware for the Centromere keyboard. Centromere is a custom wireless ergonomic keyboard, with 6x3 columnar staggered keys and a 3 key thumb cluster. Centromere keyboards can utilize hot-swap Kailh sockets for MX switches, and either Choc or MX switches can be permanently soldered. There are two types of receiver that use two different MCU for the Centromere board, and you can define which one you are using by defining your rules.mk file appropriately, as shown in the default keymaps. From d3a98e3b22c95840df5c2e249d71a1779f381acf Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:46:51 -0700 Subject: [PATCH 02/43] Add files for Centromere --- keyboards/centromere/centromere.c | 40 ++++++++ keyboards/centromere/centromere.h | 49 ++++++++++ keyboards/centromere/config.h | 79 +++++++++++++++ keyboards/centromere/matrix.c | 153 ++++++++++++++++++++++++++++++ keyboards/centromere/rules.mk | 43 +++++++++ 5 files changed, 364 insertions(+) create mode 100644 keyboards/centromere/centromere.c create mode 100644 keyboards/centromere/centromere.h create mode 100644 keyboards/centromere/config.h create mode 100644 keyboards/centromere/matrix.c create mode 100644 keyboards/centromere/rules.mk diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c new file mode 100644 index 000000000000..a3e4cf1e7ce5 --- /dev/null +++ b/keyboards/centromere/centromere.c @@ -0,0 +1,40 @@ +#include "centromere.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void led_init(void) { +#if CPU_TYPE == ATMEGA32U2 + DDRD |= (1<<1); // Pin to green, set as output + PORTD |= (1<<1); // Turn it off + DDRC |= (1<<4) | (1<<5); // Pins to red and blue, set as output + PORTC |= (1<<4) | (1<<5); // Turn them off + +#else + DDRD |= (1<<1); // Pin to green, set as output + PORTD |= (1<<1); // Turn it off + DDRF |= (1<<4) | (1<<5); // Pins to red and blue, set as output + PORTF |= (1<<4) | (1<<5); // Turn them off +#endif + +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + uart_init(); + led_init(); +} + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { +{{9, 0}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}, {0, 0}}, +{{9, 1}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}, {0, 1}}, +{{9, 2}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}, {0, 2}}, +{{9, 3}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}, {0, 3}}, +{{9, 4}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}, {0, 4}}, +}; +#endif diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h new file mode 100644 index 000000000000..424e59524b44 --- /dev/null +++ b/keyboards/centromere/centromere.h @@ -0,0 +1,49 @@ +#ifndef CENTROMERE_H +#define CENTROMERE_H + +#include "quantum.h" + +#if CPU_TYPE == ATMEGA32U2 +#define red_led_off PORTC |= (1<<5) +#define red_led_on PORTC &= ~(1<<5) +#define blu_led_off PORTC |= (1<<4) +#define blu_led_on PORTC &= ~(1<<4) + +#else +#define red_led_off PORTF |= (1<<5) +#define red_led_on PORTF &= ~(1<<5) +#define blu_led_off PORTF |= (1<<4) +#define blu_led_on PORTF &= ~(1<<4) + +#endif + +#define grn_led_off PORTD |= (1<<1) +#define grn_led_on PORTD &= ~(1<<1) + +#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_red red_led_on; grn_led_off; blu_led_off +#define set_led_blue red_led_off; grn_led_off; blu_led_on +#define set_led_green red_led_off; grn_led_on; blu_led_off +#define set_led_yellow red_led_on; grn_led_on; blu_led_off +#define set_led_magenta red_led_on; grn_led_off; blu_led_on +#define set_led_cyan red_led_off; grn_led_on; blu_led_on +#define set_led_white red_led_on; grn_led_on; blu_led_on + + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k0a, k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0b, \ + k1a, k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b,\ + k2a, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2b,\ + k32, k33, k34, k35, k36, k37 \ +) \ + { \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09 }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19 }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29 }, \ + { KC_NO, KC_NO, k32, k33, k34, k35, k36, k37, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, k2a, k1a, k0a, k0b, k1b, k2b, KC_NO, KC_NO } \ + } +#endif diff --git a/keyboards/centromere/config.h b/keyboards/centromere/config.h new file mode 100644 index 000000000000..ecf7a34b6f29 --- /dev/null +++ b/keyboards/centromere/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2012 Jun Wako + +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 +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Southpaw Design +#define PRODUCT centromere +#define DESCRIPTION Q.M.K. keyboard firmware for Centromere + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +#define ONESHOT_TIMEOUT 500 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 500000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ + } while(0) + +#endif diff --git a/keyboards/centromere/matrix.c b/keyboards/centromere/matrix.c new file mode 100644 index 000000000000..c5fc8db6ce94 --- /dev/null +++ b/keyboards/centromere/matrix.c @@ -0,0 +1,153 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert + +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 +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; + + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + //the s character requests the RF remote slave to send the matrix information + SERIAL_UART_DATA = 's'; + + //trust the external keystates, erase the last set of data + uint8_t uart_data[11] = {0}; + + //there are 10 bytes corresponding to 1w columns, and an end byte + for (uint8_t i = 0; i < 11; i++) { + //wait for the serial data, timeout if it's been too long + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, the key state bytes use the LSBs, so 0xE0 + //will only show up here if the correct bytes were recieved + if (uart_data[10] == 0xE0) + { + //shifting and transferring the keystates to the QMK matrix variable + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = (uint16_t) uart_data[i*2] | (uint16_t) uart_data[i*2+1] << 5; + } + } + + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< Date: Sun, 24 Nov 2019 08:49:46 -0700 Subject: [PATCH 03/43] Add keymap files for Centromere --- keyboards/centromere/keymaps/default/empty.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 keyboards/centromere/keymaps/default/empty.md diff --git a/keyboards/centromere/keymaps/default/empty.md b/keyboards/centromere/keymaps/default/empty.md new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/centromere/keymaps/default/empty.md @@ -0,0 +1 @@ + From ed5f26c3e94e774c8b223c4d6681c4c619a41602 Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:52:57 -0700 Subject: [PATCH 04/43] Add default keymap for Centromere --- keyboards/centromere/keymaps/default/keymap.c | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 keyboards/centromere/keymaps/default/keymap.c diff --git a/keyboards/centromere/keymaps/default/keymap.c b/keyboards/centromere/keymaps/default/keymap.c new file mode 100644 index 000000000000..62b02c515df8 --- /dev/null +++ b/keyboards/centromere/keymaps/default/keymap.c @@ -0,0 +1,78 @@ +#include QMK_KEYBOARD_H + +enum centromere_layers +{ + _STD, + _NUM, + _FN +}; + + +//Mousekeys +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERNAL 50 +#define MOUSEKEY_MAX_SPEED 20 +#define MOUSEKEY_TIME_TO_MAX 30 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_STD] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_SPC,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + + ), + + + [_NUM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + 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_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + + [_FN] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + +}; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _STD: + set_led_off; + break; + case _FN: + set_led_blue; + break; + case _NUM: + set_led_red; + break; + default: + break; + } +}; + From 1e339298699fe6fc9f47901f42e7067176cbda4c Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:54:54 -0700 Subject: [PATCH 05/43] Create keymap directory --- keyboards/centromere/keymaps/default_u2/empty.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 keyboards/centromere/keymaps/default_u2/empty.md diff --git a/keyboards/centromere/keymaps/default_u2/empty.md b/keyboards/centromere/keymaps/default_u2/empty.md new file mode 100644 index 000000000000..8b137891791f --- /dev/null +++ b/keyboards/centromere/keymaps/default_u2/empty.md @@ -0,0 +1 @@ + From 867fe060cc5faeb49b5e5221619fe66f3ccf48cb Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:55:23 -0700 Subject: [PATCH 06/43] Add keymap files --- .../centromere/keymaps/default_u2/keymap.c | 78 +++++++++++++++++++ .../centromere/keymaps/default_u2/rules.mk | 3 + 2 files changed, 81 insertions(+) create mode 100644 keyboards/centromere/keymaps/default_u2/keymap.c create mode 100644 keyboards/centromere/keymaps/default_u2/rules.mk diff --git a/keyboards/centromere/keymaps/default_u2/keymap.c b/keyboards/centromere/keymaps/default_u2/keymap.c new file mode 100644 index 000000000000..62b02c515df8 --- /dev/null +++ b/keyboards/centromere/keymaps/default_u2/keymap.c @@ -0,0 +1,78 @@ +#include QMK_KEYBOARD_H + +enum centromere_layers +{ + _STD, + _NUM, + _FN +}; + + +//Mousekeys +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERNAL 50 +#define MOUSEKEY_MAX_SPEED 20 +#define MOUSEKEY_TIME_TO_MAX 30 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_STD] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_SPC,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + + ), + + + [_NUM] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + 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_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, KC_ENT,\ + //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + + [_FN] = LAYOUT( \ + //,-----------------------------------------------------. ,-----------------------------------------------------. + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LCTL, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV,\ + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LBRC, KC_RBRC, KC_BSLS, KC_TILD,\ + + KC_LGUI, MO(_FN), KC_SPC, KC_ENT,MO(_NUM), KC_RALT \ + //`--------------------------' `--------------------------' + ), + +}; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _STD: + set_led_off; + break; + case _FN: + set_led_blue; + break; + case _NUM: + set_led_red; + break; + default: + break; + } +}; + diff --git a/keyboards/centromere/keymaps/default_u2/rules.mk b/keyboards/centromere/keymaps/default_u2/rules.mk new file mode 100644 index 000000000000..654f5732f7de --- /dev/null +++ b/keyboards/centromere/keymaps/default_u2/rules.mk @@ -0,0 +1,3 @@ +MCU = atmega32u2 +BOOTLOADER = atmel-dfu +#define CPU_TYPE ATMEGA32U2 From 74ecbf98c463b1234438549e2105c2e0609d9df1 Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:56:44 -0700 Subject: [PATCH 07/43] keymap directory cleanup --- keyboards/centromere/keymaps/default/empty.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 keyboards/centromere/keymaps/default/empty.md diff --git a/keyboards/centromere/keymaps/default/empty.md b/keyboards/centromere/keymaps/default/empty.md deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/centromere/keymaps/default/empty.md +++ /dev/null @@ -1 +0,0 @@ - From c2d5b8955835cb4be21f52b5311e1791dc7db07b Mon Sep 17 00:00:00 2001 From: spe2 Date: Sun, 24 Nov 2019 08:57:07 -0700 Subject: [PATCH 08/43] Keyboard keymap directory cleanup --- keyboards/centromere/keymaps/default_u2/empty.md | 1 - 1 file changed, 1 deletion(-) delete mode 100644 keyboards/centromere/keymaps/default_u2/empty.md diff --git a/keyboards/centromere/keymaps/default_u2/empty.md b/keyboards/centromere/keymaps/default_u2/empty.md deleted file mode 100644 index 8b137891791f..000000000000 --- a/keyboards/centromere/keymaps/default_u2/empty.md +++ /dev/null @@ -1 +0,0 @@ - From fa289780f3639a2b970a390f0a40032d940544a6 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 16:15:13 -0700 Subject: [PATCH 09/43] Update keyboards/centromere/config.h Co-Authored-By: Drashna Jaelre --- keyboards/centromere/config.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/centromere/config.h b/keyboards/centromere/config.h index ecf7a34b6f29..664d5b74a590 100644 --- a/keyboards/centromere/config.h +++ b/keyboards/centromere/config.h @@ -16,7 +16,6 @@ along with this program. If not, see . */ #ifndef CONFIG_H -#define CONFIG_H #include "config_common.h" From fad21e49409d9abd81a77b7eab74319cc59009cd Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 16:15:19 -0700 Subject: [PATCH 10/43] Update keyboards/centromere/config.h Co-Authored-By: Drashna Jaelre --- keyboards/centromere/config.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/centromere/config.h b/keyboards/centromere/config.h index 664d5b74a590..f473ac01b6bc 100644 --- a/keyboards/centromere/config.h +++ b/keyboards/centromere/config.h @@ -74,5 +74,3 @@ along with this program. If not, see . /* 8-bit data */ \ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ } while(0) - -#endif From 4155263f39c4e7ea23f31cd4d14867bad2ed6a12 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 16:18:38 -0700 Subject: [PATCH 11/43] Update keyboards/centromere/config.h Co-Authored-By: Drashna Jaelre --- keyboards/centromere/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/config.h b/keyboards/centromere/config.h index f473ac01b6bc..c051843c5013 100644 --- a/keyboards/centromere/config.h +++ b/keyboards/centromere/config.h @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H +#pragma once #include "config_common.h" From 9fa98448324e262fc21ee4b614445cfe092a0660 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 16:22:20 -0700 Subject: [PATCH 12/43] Update keymap.c --- keyboards/centromere/keymaps/default_u2/keymap.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/keyboards/centromere/keymaps/default_u2/keymap.c b/keyboards/centromere/keymaps/default_u2/keymap.c index 62b02c515df8..e4d1eac3c486 100644 --- a/keyboards/centromere/keymaps/default_u2/keymap.c +++ b/keyboards/centromere/keymaps/default_u2/keymap.c @@ -7,15 +7,6 @@ enum centromere_layers _FN }; - -//Mousekeys -#define MOUSEKEY_DELAY 300 -#define MOUSEKEY_INTERNAL 50 -#define MOUSEKEY_MAX_SPEED 20 -#define MOUSEKEY_TIME_TO_MAX 30 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_STD] = LAYOUT( \ From 17f5f0db372b47247aeed8399855513829bd56df Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 16:23:04 -0700 Subject: [PATCH 13/43] Update keymap.c --- keyboards/centromere/keymaps/default/keymap.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/keyboards/centromere/keymaps/default/keymap.c b/keyboards/centromere/keymaps/default/keymap.c index 62b02c515df8..0d0d71ab6642 100644 --- a/keyboards/centromere/keymaps/default/keymap.c +++ b/keyboards/centromere/keymaps/default/keymap.c @@ -8,14 +8,6 @@ enum centromere_layers }; -//Mousekeys -#define MOUSEKEY_DELAY 300 -#define MOUSEKEY_INTERNAL 50 -#define MOUSEKEY_MAX_SPEED 20 -#define MOUSEKEY_TIME_TO_MAX 30 -#define MOUSEKEY_WHEEL_MAX_SPEED 8 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 40 - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_STD] = LAYOUT( \ From 78db695ef9eeb9805bb3ed6f9538350930c091fa Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 16:53:38 -0700 Subject: [PATCH 14/43] Update centromere.c Changed LED control to GPIO functions --- keyboards/centromere/centromere.c | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c index a3e4cf1e7ce5..ffdbd9648db1 100644 --- a/keyboards/centromere/centromere.c +++ b/keyboards/centromere/centromere.c @@ -6,16 +6,24 @@ void uart_init(void) { void led_init(void) { #if CPU_TYPE == ATMEGA32U2 - DDRD |= (1<<1); // Pin to green, set as output - PORTD |= (1<<1); // Turn it off - DDRC |= (1<<4) | (1<<5); // Pins to red and blue, set as output - PORTC |= (1<<4) | (1<<5); // Turn them off - + setPinOutput(C4); // Set red LED pin as output + setPinOutput(C5); // Set blue LED pin as output + setPinOutput(D1); // Set green LED pin as output + + writePinHigh(C4); // Turn off red LED pin + writePinHigh(C5); // Turn off blue LED pin + writePinHigh(D1); // Turn off green LED pin + #else - DDRD |= (1<<1); // Pin to green, set as output - PORTD |= (1<<1); // Turn it off - DDRF |= (1<<4) | (1<<5); // Pins to red and blue, set as output - PORTF |= (1<<4) | (1<<5); // Turn them off + + setPinOutput(F4); // Set red LED pin as output + setPinOutput(F5); // Set blue LED pin as output + setPinOutput(D1); // Set green LED pin as output + + writePinHigh(F4); // Turn off red LED pin + writePinHigh(F5); // Turn off blue LED pin + writePinHigh(D1); // Turn off green LED pin + #endif } From ce347beb910e3e56077e427aa86ada06457f68a1 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 25 Nov 2019 17:02:32 -0700 Subject: [PATCH 15/43] Update centromere.h --- keyboards/centromere/centromere.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 424e59524b44..6c6f9e199a55 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -4,23 +4,23 @@ #include "quantum.h" #if CPU_TYPE == ATMEGA32U2 -#define red_led_off PORTC |= (1<<5) -#define red_led_on PORTC &= ~(1<<5) -#define blu_led_off PORTC |= (1<<4) -#define blu_led_on PORTC &= ~(1<<4) +#define red_led_off writePinHigh(C5) +#define red_led_on writePinLow(C5) +#define blu_led_off writePinHigh(C4) +#define blu_led_on writePinLow(C4) #else -#define red_led_off PORTF |= (1<<5) -#define red_led_on PORTF &= ~(1<<5) -#define blu_led_off PORTF |= (1<<4) -#define blu_led_on PORTF &= ~(1<<4) +#define red_led_off writePinHigh(F5) +#define red_led_on writePinLow(F5) +#define blu_led_off writePinHigh(F4) +#define blu_led_on writePinLow(F4) #endif -#define grn_led_off PORTD |= (1<<1) -#define grn_led_on PORTD &= ~(1<<1) +#define grn_led_off writePinHigh(D1) +#define grn_led_on writePinLow(D1) -#define set_led_off red_led_off; grn_led_off; blu_led_off +#define set_led_off red_led_off; blu_led_off #define set_led_red red_led_on; grn_led_off; blu_led_off #define set_led_blue red_led_off; grn_led_off; blu_led_on #define set_led_green red_led_off; grn_led_on; blu_led_off From 9cc2dcbfdadf7c9dabe7c79ca46a2b35110f5423 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 18:43:25 -0700 Subject: [PATCH 16/43] Update rules.mk --- keyboards/centromere/rules.mk | 2 -- 1 file changed, 2 deletions(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 7dc5dc1b5c76..86d4e2b2a223 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -36,8 +36,6 @@ USB = /dev/ttyACM0 # $(CENTROMERE_UPLOAD_COMMAND) OPT_DEFS += -DCENTROMERE_PROMICRO -CENTROMERE_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) # # project specific files SRC = matrix.c From 12a3a4b124e0784d66fa261ceb9f0cac0579af82 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:26:04 -0700 Subject: [PATCH 17/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 86d4e2b2a223..cbbf9cfa7962 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -16,7 +16,7 @@ F_USB = $(F_CPU) # Build Options # comment out to disable the options. # -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) From d9a6957851f931b5337bbc9f047b488ba13d5b44 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:26:11 -0700 Subject: [PATCH 18/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index cbbf9cfa7962..238a6ad8fdc2 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -1,6 +1,9 @@ # MCU name MCU = atmega32u4 +# Processor frequency +F_CPU = 8000000 + # Bootloader selection # Teensy halfkay # Pro Micro caterina From 5b9940499db28ce249c9f638515940d739776edd Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:26:18 -0700 Subject: [PATCH 19/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 238a6ad8fdc2..fab3fc8e9924 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -14,7 +14,6 @@ F_CPU = 8000000 # ATmega328P USBasp BOOTLOADER = caterina F_CPU = 8000000 -F_USB = $(F_CPU) # Build Options # comment out to disable the options. From 618232f78993bdcdf8f1222460e9e7cb1d7fdc09 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:26:24 -0700 Subject: [PATCH 20/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index fab3fc8e9924..740ed78e5431 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -19,7 +19,7 @@ F_CPU = 8000000 # comment out to disable the options. # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration From 4350f43aeb041675304128f9e22fb837a4de2398 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:26:32 -0700 Subject: [PATCH 21/43] Update keyboards/centromere/keymaps/default_u2/keymap.c Co-Authored-By: fauxpark --- keyboards/centromere/keymaps/default_u2/keymap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/centromere/keymaps/default_u2/keymap.c b/keyboards/centromere/keymaps/default_u2/keymap.c index e4d1eac3c486..c704adc58cd6 100644 --- a/keyboards/centromere/keymaps/default_u2/keymap.c +++ b/keyboards/centromere/keymaps/default_u2/keymap.c @@ -50,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _STD: @@ -66,4 +66,3 @@ void matrix_scan_user(void) { break; } }; - From d3b0f9e8b16a05ed2e082e85ec402e619d67f69b Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:27:13 -0700 Subject: [PATCH 22/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 740ed78e5431..3b7fc3df327a 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -13,7 +13,6 @@ F_CPU = 8000000 # ATmega32A bootloadHID # ATmega328P USBasp BOOTLOADER = caterina -F_CPU = 8000000 # Build Options # comment out to disable the options. From 6467459629ee004a2fd0eefaecf446122b3a1c3b Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:27:20 -0700 Subject: [PATCH 23/43] Update keyboards/centromere/keymaps/default/keymap.c Co-Authored-By: fauxpark --- keyboards/centromere/keymaps/default/keymap.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/keyboards/centromere/keymaps/default/keymap.c b/keyboards/centromere/keymaps/default/keymap.c index 0d0d71ab6642..ca235f61f5a9 100644 --- a/keyboards/centromere/keymaps/default/keymap.c +++ b/keyboards/centromere/keymaps/default/keymap.c @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = get_highest_layer(layer_state); switch (layer) { case _STD: @@ -67,4 +67,3 @@ void matrix_scan_user(void) { break; } }; - From 005ebc76666104d069fe4d72fc1c33390239c507 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:27:29 -0700 Subject: [PATCH 24/43] Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark --- keyboards/centromere/centromere.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 6c6f9e199a55..06922db55452 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -1,5 +1,4 @@ #ifndef CENTROMERE_H -#define CENTROMERE_H #include "quantum.h" From e82147df4f955f756df7a55fe148a80d68fbd343 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:27:38 -0700 Subject: [PATCH 25/43] Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark --- keyboards/centromere/centromere.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 06922db55452..ae64cd231a26 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -1,4 +1,4 @@ -#ifndef CENTROMERE_H +#pragma once #include "quantum.h" From c23bb3f39cfff43f21a4ecd904f82f36f43ac9e1 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 19:27:49 -0700 Subject: [PATCH 26/43] Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark --- keyboards/centromere/centromere.h | 1 - 1 file changed, 1 deletion(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index ae64cd231a26..1f346495bc69 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -45,4 +45,3 @@ { KC_NO, KC_NO, k32, k33, k34, k35, k36, k37, KC_NO, KC_NO }, \ { KC_NO, KC_NO, k2a, k1a, k0a, k0b, k1b, k2b, KC_NO, KC_NO } \ } -#endif From 562848b585b72cd1466fe776bd5884d47c5f77f8 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 20:15:33 -0700 Subject: [PATCH 27/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 3b7fc3df327a..f424e799a11d 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -19,7 +19,7 @@ BOOTLOADER = caterina # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +EXTRAKEY_ENABLE = yes # Audio control and System control CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge From 371a8610b555dccf8746be71f55676eda0738a4f Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 20:34:25 -0700 Subject: [PATCH 28/43] Update keyboards/centromere/centromere.c Co-Authored-By: fauxpark --- keyboards/centromere/centromere.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/centromere.c b/keyboards/centromere/centromere.c index ffdbd9648db1..8800e2ce6adc 100644 --- a/keyboards/centromere/centromere.c +++ b/keyboards/centromere/centromere.c @@ -5,7 +5,7 @@ void uart_init(void) { } void led_init(void) { -#if CPU_TYPE == ATMEGA32U2 +#if MCU == atmega32u2 setPinOutput(C4); // Set red LED pin as output setPinOutput(C5); // Set blue LED pin as output setPinOutput(D1); // Set green LED pin as output From 9bf47735c00d98935a9b2a00ec422b1660dda99e Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 20:34:32 -0700 Subject: [PATCH 29/43] Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark --- keyboards/centromere/centromere.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 1f346495bc69..3e15b384a623 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -2,7 +2,7 @@ #include "quantum.h" -#if CPU_TYPE == ATMEGA32U2 +#if MCU = atmega32u2 #define red_led_off writePinHigh(C5) #define red_led_on writePinLow(C5) #define blu_led_off writePinHigh(C4) From 40f0380e0759260250464e8f08498919204aeb61 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 9 Dec 2019 20:44:44 -0700 Subject: [PATCH 30/43] Update keyboards/centromere/centromere.h Co-Authored-By: fauxpark --- keyboards/centromere/centromere.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/centromere.h b/keyboards/centromere/centromere.h index 3e15b384a623..826e8dde4481 100644 --- a/keyboards/centromere/centromere.h +++ b/keyboards/centromere/centromere.h @@ -2,7 +2,7 @@ #include "quantum.h" -#if MCU = atmega32u2 +#if MCU == atmega32u2 #define red_led_off writePinHigh(C5) #define red_led_on writePinLow(C5) #define blu_led_off writePinHigh(C4) From daab02dc53942b57dd502431a6de06dfe6e11489 Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 10 Dec 2019 19:20:46 -0700 Subject: [PATCH 31/43] Update keyboards/centromere/rules.mk Co-Authored-By: fauxpark --- keyboards/centromere/rules.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index f424e799a11d..5473919c648f 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -29,7 +29,7 @@ NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA # BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality # MIDI_ENABLE = yes # MIDI controls UNICODE_ENABLE = yes # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID USB = /dev/ttyACM0 From e46fb7c85e49f3dd187bc25811843e61c8da878b Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 10 Dec 2019 19:22:35 -0700 Subject: [PATCH 32/43] Apply suggestions from code review Co-Authored-By: fauxpark --- keyboards/centromere/keymaps/default_u2/rules.mk | 11 ++++++++++- keyboards/centromere/rules.mk | 10 +++++----- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/keyboards/centromere/keymaps/default_u2/rules.mk b/keyboards/centromere/keymaps/default_u2/rules.mk index 654f5732f7de..5fdb02af5ac1 100644 --- a/keyboards/centromere/keymaps/default_u2/rules.mk +++ b/keyboards/centromere/keymaps/default_u2/rules.mk @@ -1,3 +1,12 @@ +# MCU name MCU = atmega32u2 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# ATmega32A bootloadHID +# ATmega328P USBasp BOOTLOADER = atmel-dfu -#define CPU_TYPE ATMEGA32U2 diff --git a/keyboards/centromere/rules.mk b/keyboards/centromere/rules.mk index 5473919c648f..fee99d363059 100644 --- a/keyboards/centromere/rules.mk +++ b/keyboards/centromere/rules.mk @@ -20,14 +20,14 @@ BOOTLOADER = caterina BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration MOUSEKEY_ENABLE = yes # Mouse keys EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug COMMAND_ENABLE = yes # Commands for debug and configuration CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = yes # MIDI controls +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = yes # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID From 069c907ab88a831570c695fc8331450d02b918df Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 16 Mar 2020 21:20:35 -0600 Subject: [PATCH 33/43] Update readme.md --- keyboards/centromere/readme.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/keyboards/centromere/readme.md b/keyboards/centromere/readme.md index 547ea60ddb86..0667486e8472 100644 --- a/keyboards/centromere/readme.md +++ b/keyboards/centromere/readme.md @@ -1 +1,15 @@ -QMK Firmware for the Centromere keyboard. Centromere is a custom wireless ergonomic keyboard, with 6x3 columnar staggered keys and a 3 key thumb cluster. Centromere keyboards can utilize hot-swap Kailh sockets for MX switches, and either Choc or MX switches can be permanently soldered. There are two types of receiver that use two different MCU for the Centromere board, and you can define which one you are using by defining your rules.mk file appropriately, as shown in the default keymaps. +# Centromere + +![Centromere](https://i.redd.it/sg9unjs9y9041.jpg) + +Centromere is a custom wireless ergonomic keyboard, with 6x3 columnar staggered keys and a 3 key thumb cluster. Centromere keyboards can utilize hot-swap Kailh sockets for MX switches, and either Choc or MX switches can be permanently soldered. There are two types of receiver that use two different MCU for the Centromere board, and you can define which one you are using by defining your rules.mk file appropriately, as shown in the default keymaps. + +* Keyboard Maintainer: [spe2](https://github.com/spe2) +* Hardware Supported: Centromere PCBs +* Hardware Availability: [Southpaw Design](https://southpawdesign.net/products/centromere-group-buy) + +Make example for this keyboard (after setting up your build environment): + + make centromere:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). From c18d2966fa20fa0ce15bdf7013c18ae3b9d4432c Mon Sep 17 00:00:00 2001 From: spe2 Date: Fri, 27 Mar 2020 10:48:29 -0600 Subject: [PATCH 34/43] Create keymap.c Add a minimalist keymap for Centromere. --- keyboards/centromere/keymaps/mini/keymap.c | 161 +++++++++++++++++++++ 1 file changed, 161 insertions(+) create mode 100644 keyboards/centromere/keymaps/mini/keymap.c diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c new file mode 100644 index 000000000000..08899828aa08 --- /dev/null +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H + + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Defines for task manager +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * | Z | X | C | V | B | | N | M | , | . | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | Ctrl | LOWER| | | | RAISE| Shift| + * `-------------| Space| |BckSpc|------+------. + * | | | | + * `------' `------' + */ +[_QWERTY] = LAYOUT( \ + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, \ + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_NO, \ + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, \ + KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) \ +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | Tab | Left | Down | Up | Right| | | - | = | [ | ] | + * |------+------+------+------+------| |------+------+------+------+------| + * | Ctrl| ` | GUI | Alt | | | | | | \ | ' | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_RAISE] = LAYOUT( \ + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, \ + KC_NO, KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, \ + KC_NO, KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, KC_NO, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | Esc | | | | | | | _ | + | { | } | + * |------+------+------+------+------| |------+------+------+------+------| + * | Caps| ~ | | | | | | | | | | " | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| Del | + * `-------------| | | Enter|------+------. + * | | | | + * `------' `------' + */ +[_LOWER] = LAYOUT( \ + KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, \ + KC_NO, KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, \ + KC_NO, KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, KC_NO, \ + _______, _______, _______, KC_ENT, _______, KC_DEL \ +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | F12 | | | | | | | |Taskmg|caltde| + * |------+------+------+------+------| |------+------+------+------+------| + * | Reset| | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | LOWER| | | | RAISE| | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_ADJUST] = LAYOUT( \ + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, \ + KC_NO, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, KC_NO, \ + KC_NO, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, \ + _______, _______, _______, _______, _______, _______ \ +) +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_qwerty); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} From bb2387943f4f8dd0b268946e954ba84678f4b22e Mon Sep 17 00:00:00 2001 From: spe2 Date: Fri, 27 Mar 2020 12:29:22 -0600 Subject: [PATCH 35/43] Update keyboards/centromere/keymaps/mini/keymap.c Commit keymap suggestion change Co-Authored-By: ridingqwerty --- keyboards/centromere/keymaps/mini/keymap.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 08899828aa08..9b8c9d707c47 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -5,10 +5,13 @@ // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 +enum centromere_layers +{ + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; enum custom_keycodes { QWERTY = SAFE_RANGE, From 232d93f511141d3855e6bb1c031f5aa2ddbe1de2 Mon Sep 17 00:00:00 2001 From: spe2 Date: Mon, 30 Mar 2020 13:10:51 -0600 Subject: [PATCH 36/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: ridingqwerty --- keyboards/centromere/keymaps/mini/keymap.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 9b8c9d707c47..8ed77a1fc538 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -13,12 +13,9 @@ enum centromere_layers _ADJUST }; -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, -}; +// Defines for layer movement +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) // Defines for task manager #define CALTDEL LCTL(LALT(KC_DEL)) From 4e01e8c3f1782e490bb2145ea220216fc91fd458 Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 31 Mar 2020 15:44:09 -0600 Subject: [PATCH 37/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: Drashna Jaelre --- keyboards/centromere/keymaps/mini/keymap.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 8ed77a1fc538..8d8650bbcf5f 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -112,10 +112,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { From a4947e422f4df951e4559f851cc94a093adbcc5b Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 31 Mar 2020 16:14:43 -0600 Subject: [PATCH 38/43] Update keymap.c Remove QWERTY keymap tone, only QWERTY is used here so additional case unnecessary. --- keyboards/centromere/keymaps/mini/keymap.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 8d8650bbcf5f..37b614e764bd 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -115,15 +115,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_SONG(tone_qwerty); - #endif - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; case LOWER: if (record->event.pressed) { layer_on(_LOWER); From ad69ffa5fa9efbe6fdab104f3bc1683becf03329 Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 31 Mar 2020 21:19:33 -0600 Subject: [PATCH 39/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: Ryan --- keyboards/centromere/keymaps/mini/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 37b614e764bd..b7a0d4f01b03 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -82,11 +82,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_LOWER] = LAYOUT( \ - KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, \ - KC_NO, KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, \ - KC_NO, KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, KC_NO, \ - _______, _______, _______, KC_ENT, _______, KC_DEL \ +[_LOWER] = LAYOUT( + KC_NO, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_NO, + KC_NO, KC_ESC, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, + KC_NO, KC_CAPS, KC_TILD, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, KC_NO, + _______, _______, _______, KC_ENT, _______, KC_DEL ), /* Adjust (Lower + Raise) From 82b1f3864f63d5111aab8aa0d026790f8c843748 Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 31 Mar 2020 21:19:41 -0600 Subject: [PATCH 40/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: Ryan --- keyboards/centromere/keymaps/mini/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index b7a0d4f01b03..720d199b1d3a 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -104,11 +104,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_ADJUST] = LAYOUT( \ - KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, \ - KC_NO, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, KC_NO, \ - KC_NO, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, \ - _______, _______, _______, _______, _______, _______ \ +[_ADJUST] = LAYOUT( + KC_NO, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_NO, + KC_NO, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, TSKMGR, CALTDEL, KC_NO, + KC_NO, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_NO, + _______, _______, _______, _______, _______, _______ ) }; From ffcda61f737f76ff8068665690468f4bf3c7bf0b Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 31 Mar 2020 21:19:51 -0600 Subject: [PATCH 41/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: Ryan --- keyboards/centromere/keymaps/mini/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 720d199b1d3a..3bed9ded7832 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -60,11 +60,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_RAISE] = LAYOUT( \ - KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, \ - KC_NO, KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, \ - KC_NO, KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, KC_NO, \ - _______, _______, _______, _______, _______, _______ \ +[_RAISE] = LAYOUT( + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_NO, + KC_NO, KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, + KC_NO, KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, _______, _______, _______, _______, KC_BSLS, KC_QUOT, KC_NO, + _______, _______, _______, _______, _______, _______ ), /* Lower From 272b8ed612cc49d3e0ff5e0ef3a7bce40771bf32 Mon Sep 17 00:00:00 2001 From: spe2 Date: Tue, 31 Mar 2020 21:20:00 -0600 Subject: [PATCH 42/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: Ryan --- keyboards/centromere/keymaps/mini/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 3bed9ded7832..67bd924b225e 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -38,11 +38,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | * `------' `------' */ -[_QWERTY] = LAYOUT( \ - KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, \ - KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_NO, \ - KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, \ - KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) \ +[_QWERTY] = LAYOUT( + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO, + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_NO, + KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_NO, + KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, OSM(MOD_LSFT) ), /* Raise From 2158abad9432edf9f2b6392101e6c77f83ab9c90 Mon Sep 17 00:00:00 2001 From: spe2 Date: Wed, 1 Apr 2020 08:26:33 -0600 Subject: [PATCH 43/43] Update keyboards/centromere/keymaps/mini/keymap.c Co-Authored-By: ridingqwerty --- keyboards/centromere/keymaps/mini/keymap.c | 34 ++-------------------- 1 file changed, 2 insertions(+), 32 deletions(-) diff --git a/keyboards/centromere/keymaps/mini/keymap.c b/keyboards/centromere/keymaps/mini/keymap.c index 67bd924b225e..3d6de56f221d 100644 --- a/keyboards/centromere/keymaps/mini/keymap.c +++ b/keyboards/centromere/keymaps/mini/keymap.c @@ -113,36 +113,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); }