[Keyboard] Add fingerpunch rockon keyboard to handwired boards

This commit is contained in:
Drashna Jael're 2022-06-05 10:55:46 -07:00
parent a339c3eedb
commit 546951cad1
Signed by: drashna
GPG key ID: DBA1FD3A860D1B11
7 changed files with 513 additions and 0 deletions

View file

@ -0,0 +1,86 @@
/*
Copyright 2021 Sadek Baroudi <sadekbaroudi@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#pragma once
#define AUDIO_PIN A9
#define AUDIO_PWM_DRIVER PWMD1
#define AUDIO_PWM_CHANNEL 2
#define AUDIO_PWM_PAL_MODE 1
#define AUDIO_STATE_TIMER GPTD4
#define AUDIO_INIT_DELAY
#define WS2812_PWM_DRIVER PWMD5
#define WS2812_PWM_CHANNEL 2
#define WS2812_PWM_PAL_MODE 2
#define WS2812_EXTERNAL_PULLUP
#define WS2812_DMA_STREAM STM32_DMA1_STREAM6
#define WS2812_DMA_CHANNEL 6
#define WS2812_PWM_TARGET_PERIOD 800000
#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 of 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 OLED_DISPLAY_128X128
#define OLED_PRE_CHARGE_PERIOD 0x22
#define OLED_VCOM_DETECT 0x40
#define I2C1_CLOCK_SPEED 400000
#define I2C1_DUTY_CYCLE FAST_DUTY_CYCLE_16_9

View file

@ -0,0 +1,51 @@
/* Copyright 2021 Sadek Baroudi <sadekbaroudi@gmail.com>
*
* 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 <http://www.gnu.org/licenses/>.
*/
#include "quantum.h"
void matrix_init_kb(void) {
setPinInputHigh(A0);
matrix_init_user();
}
void matrix_scan_kb(void) {
if (!readPin(A0)) {
reset_keyboard();
}
matrix_scan_user();
}
void matrix_output_unselect_delay(uint8_t line, bool key_pressed) {
for (int32_t i = 0; i < 40; i++) {
__asm__ volatile("nop" ::: "memory");
}
}
#ifdef SWAP_HANDS_ENABLE
const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = {
{{3, 5}, {8, 0}, {7, 0}, {6, 0}, {5, 0}, {4, 0}, {3, 0}, {2, 0}, {1, 0}},
{{5, 5}, {8, 1}, {7, 1}, {6, 1}, {5, 1}, {4, 1}, {3, 1}, {2, 1}, {1, 1}},
{{6, 5}, {8, 2}, {7, 2}, {6, 2}, {5, 2}, {4, 2}, {3, 2}, {2, 2}, {1, 2}},
{{7, 5}, {8, 3}, {7, 3}, {6, 3}, {5, 3}, {4, 3}, {3, 3}, {2, 3}, {1, 3}},
{{8, 5}, {8, 4}, {7, 4}, {6, 4}, {5, 4}, {4, 4}, {3, 4}, {2, 4}, {1, 4}},
{{8, 6}, {2, 5}, {1, 5}, {0, 0}, {4, 5}, {0, 1}, {0, 2}, {0, 3}, {0, 4}},
{{8, 7}, {1, 6}, {5, 6}, {6, 6}, {4, 6}, {2, 6}, {3, 6}, {0, 7}, {0, 5}},
{{7, 6}, {7, 7}, {5, 7}, {6, 7}, {4, 7}, {2, 7}, {3, 7}, {1, 7}, {0, 6}},
};
# ifdef ENCODER_MAP_ENABLE
const uint8_t PROGMEM encoder_hand_swap_config[NUM_ENCODERS] = {1, 0};
# endif
#endif

View file

@ -0,0 +1,27 @@
/* Copyright 2020 QMK
*
* 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 <http://www.gnu.org/licenses/>.
*/
/*
* This file was auto-generated by:
* `qmk chibios-confupdate -i keyboards/tkw/grandiceps/halconf.h -r platforms/chibios/BLACKPILL_STM32_F411/configs/halconf.h`
*/
#pragma once
#define HAL_USE_PWM TRUE
#define HAL_USE_I2C TRUE
#include_next <halconf.h>

View file

@ -0,0 +1,209 @@
{
"manufacturer": "sadekbaroudi",
"keyboard_name": "rockon_bp",
"maintainer": "drashna",
"board": "BLACKPILL_STM32_F411",
"bootloader": "tinyuf2",
"bootmagic": {
"enabled": true
},
"build": {
"debounce_type": "asym_eager_defer_pk"
},
"diode_direction": "COL2ROW",
"encoder": {
"enabled": false,
"rotary": [
{"pin_a": "B15", "pin_b": "A8"},
{"pin_a": "B13", "pin_b": "B14"}
]
},
"features": {
"audio": true,
"backlight": false,
"bootmagic": true,
"command": false,
"console": false,
"encoder": false,
"extrakey": true,
"mousekey": true,
"nkro": true,
"oled": true,
"rgb_matrix": true,
"rgblight": false
},
"matrix_pins": {
"cols": ["A10", "C15", "C14", "A15", "B3", "B0", "A7", "A6", "A5"],
"rows": ["A2", "B1", "B5", "B4", "A3", "A4", "B8", "B9"]
},
"processor": "STM32F411",
"rgb_matrix": {
"driver": "ws2812",
"layout": [
{"matrix": [5, 0], "x": 7, "y": 1, "flags": 1},
{"matrix": [0, 0], "x": 21, "y": 1, "flags": 4},
{"matrix": [0, 1], "x": 36, "y": 2, "flags": 4},
{"matrix": [0, 2], "x": 51, "y": 1, "flags": 4},
{"matrix": [0, 3], "x": 65, "y": 5, "flags": 4},
{"matrix": [0, 4], "x": 79, "y": 10, "flags": 4},
{"matrix": [6, 2], "x": 93, "y": 14, "flags": 1},
{"matrix": [7, 2], "x": 90, "y": 21, "flags": 1},
{"matrix": [1, 4], "x": 76, "y": 20, "flags": 4},
{"matrix": [1, 3], "x": 62, "y": 16, "flags": 4},
{"matrix": [1, 2], "x": 48, "y": 12, "flags": 4},
{"matrix": [1, 1], "x": 33, "y": 12, "flags": 4},
{"matrix": [1, 0], "x": 19, "y": 12, "flags": 4},
{"matrix": [6, 0], "x": 4, "y": 10, "flags": 1},
{"matrix": [7, 0], "x": 2, "y": 20, "flags": 1},
{"matrix": [2, 0], "x": 16, "y": 22, "flags": 4},
{"matrix": [2, 1], "x": 31, "y": 23, "flags": 4},
{"matrix": [2, 2], "x": 46, "y": 23, "flags": 4},
{"matrix": [2, 3], "x": 60, "y": 27, "flags": 4},
{"matrix": [2, 4], "x": 74, "y": 31, "flags": 4},
{"matrix": [6, 3], "x": 88, "y": 35, "flags": 1},
{"matrix": [5, 1], "x": 87, "y": 50, "flags": 1},
{"matrix": [3, 4], "x": 71, "y": 42, "flags": 4},
{"matrix": [3, 3], "x": 57, "y": 38, "flags": 4},
{"matrix": [3, 2], "x": 43, "y": 33, "flags": 4},
{"matrix": [3, 1], "x": 28, "y": 34, "flags": 4},
{"matrix": [3, 0], "x": 14, "y": 33, "flags": 4},
{"matrix": [7, 1], "x": 0, "y": 31, "flags": 1},
{"matrix": [4, 0], "x": 25, "y": 46, "flags": 1},
{"matrix": [4, 1], "x": 40, "y": 48, "flags": 1},
{"matrix": [4, 2], "x": 56, "y": 51, "flags": 1},
{"matrix": [4, 3], "x": 70, "y": 56, "flags": 1},
{"matrix": [4, 4], "x": 84, "y": 63, "flags": 1},
{"matrix": [4, 5], "x": 138, "y": 63, "flags": 1},
{"matrix": [4, 6], "x": 152, "y": 56, "flags": 1},
{"matrix": [4, 7], "x": 166, "y": 51, "flags": 1},
{"matrix": [4, 8], "x": 182, "y": 48, "flags": 1},
{"matrix": [5, 8], "x": 197, "y": 46, "flags": 1},
{"matrix": [7, 7], "x": 223, "y": 31, "flags": 1},
{"matrix": [5, 7], "x": 209, "y": 33, "flags": 4},
{"matrix": [3, 8], "x": 200, "y": 34, "flags": 4},
{"matrix": [3, 7], "x": 179, "y": 33, "flags": 4},
{"matrix": [3, 6], "x": 165, "y": 38, "flags": 4},
{"matrix": [3, 5], "x": 151, "y": 42, "flags": 4},
{"matrix": [5, 2], "x": 135, "y": 50, "flags": 1},
{"matrix": [6, 6], "x": 134, "y": 35, "flags": 1},
{"matrix": [2, 5], "x": 148, "y": 31, "flags": 4},
{"matrix": [2, 6], "x": 162, "y": 27, "flags": 4},
{"matrix": [2, 7], "x": 176, "y": 23, "flags": 4},
{"matrix": [2, 8], "x": 191, "y": 23, "flags": 4},
{"matrix": [5, 6], "x": 206, "y": 22, "flags": 4},
{"matrix": [6, 7], "x": 220, "y": 20, "flags": 1},
{"matrix": [7, 8], "x": 218, "y": 9, "flags": 1},
{"matrix": [5, 5], "x": 203, "y": 12, "flags": 4},
{"matrix": [1, 8], "x": 189, "y": 12, "flags": 4},
{"matrix": [1, 7], "x": 174, "y": 12, "flags": 4},
{"matrix": [1, 6], "x": 160, "y": 16, "flags": 4},
{"matrix": [1, 5], "x": 146, "y": 20, "flags": 4},
{"matrix": [7, 5], "x": 132, "y": 24, "flags": 1},
{"matrix": [6, 5], "x": 129, "y": 14, "flags": 1},
{"matrix": [0, 5], "x": 143, "y": 10, "flags": 4},
{"matrix": [0, 6], "x": 157, "y": 5, "flags": 4},
{"matrix": [0, 7], "x": 171, "y": 1, "flags": 4},
{"matrix": [0, 8], "x": 186, "y": 2, "flags": 4},
{"matrix": [5, 3], "x": 201, "y": 1, "flags": 4},
{"matrix": [6, 8], "x": 215, "y": 0, "flags": 1}
],
"led_flush_limit": 12,
"led_process_limit": 7,
"max_brightness": 100,
"sleep": true
},
"secure": {
"unlock_sequence": [
[2, 0],
[2, 1],
[2, 2],
[2, 3]
]
},
"usb": {
"device_version": "0.0.1",
"pid": "0x1200",
"shared_endpoint": {
"keyboard": true
},
"vid": "0xFEFE"
},
"ws2812": {
"driver": "pwm",
"pin": "A1"
},
"layouts": {
"LAYOUT_rockon_bp": {
"layout": [
{"label": "K51", "matrix": [5, 0], "x": 0, "y": 0},
{"label": "K01", "matrix": [0, 0], "x": 1, "y": 0},
{"label": "K02", "matrix": [0, 1], "x": 2, "y": 0},
{"label": "K03", "matrix": [0, 2], "x": 3, "y": 0},
{"label": "K04", "matrix": [0, 3], "x": 4, "y": 0},
{"label": "K05", "matrix": [0, 4], "x": 5, "y": 0},
{"label": "K63", "matrix": [6, 2], "x": 6, "y": 0},
{"label": "K66", "matrix": [6, 5], "x": 7, "y": 0},
{"label": "K06", "matrix": [0, 5], "x": 8, "y": 0},
{"label": "K07", "matrix": [0, 6], "x": 9, "y": 0},
{"label": "K08", "matrix": [0, 7], "x": 10, "y": 0},
{"label": "K09", "matrix": [0, 8], "x": 11, "y": 0},
{"label": "K54", "matrix": [5, 3], "x": 12, "y": 0},
{"label": "K69", "matrix": [6, 8], "x": 13, "y": 0},
{"label": "K61", "matrix": [6, 0], "x": 14, "y": 0},
{"label": "K11", "matrix": [1, 0], "x": 15, "y": 0},
{"label": "K12", "matrix": [1, 1], "x": 16, "y": 0},
{"label": "K13", "matrix": [1, 2], "x": 17, "y": 0},
{"label": "K14", "matrix": [1, 3], "x": 18, "y": 0},
{"label": "K15", "matrix": [1, 4], "x": 19, "y": 0},
{"label": "K73", "matrix": [7, 2], "x": 20, "y": 0},
{"label": "K76", "matrix": [7, 5], "x": 21, "y": 0},
{"label": "K16", "matrix": [1, 5], "x": 22, "y": 0},
{"label": "K17", "matrix": [1, 6], "x": 23, "y": 0},
{"label": "K18", "matrix": [1, 7], "x": 24, "y": 0},
{"label": "K19", "matrix": [1, 8], "x": 25, "y": 0},
{"label": "K56", "matrix": [5, 5], "x": 26, "y": 0},
{"label": "K79", "matrix": [7, 8], "x": 27, "y": 0},
{"label": "K71", "matrix": [7, 0], "x": 28, "y": 0},
{"label": "K21", "matrix": [2, 0], "x": 29, "y": 0},
{"label": "K22", "matrix": [2, 1], "x": 30, "y": 0},
{"label": "K23", "matrix": [2, 2], "x": 31, "y": 0},
{"label": "K24", "matrix": [2, 3], "x": 32, "y": 0},
{"label": "K25", "matrix": [2, 4], "x": 33, "y": 0},
{"label": "K64", "matrix": [6, 3], "x": 34, "y": 0},
{"label": "K67", "matrix": [6, 6], "x": 35, "y": 0},
{"label": "K26", "matrix": [2, 5], "x": 36, "y": 0},
{"label": "K27", "matrix": [2, 6], "x": 37, "y": 0},
{"label": "K28", "matrix": [2, 7], "x": 38, "y": 0},
{"label": "K29", "matrix": [2, 8], "x": 39, "y": 0},
{"label": "K57", "matrix": [5, 6], "x": 40, "y": 0},
{"label": "K68", "matrix": [6, 7], "x": 41, "y": 0},
{"label": "K72", "matrix": [7, 1], "x": 42, "y": 0},
{"label": "K31", "matrix": [3, 0], "x": 43, "y": 0},
{"label": "K32", "matrix": [3, 1], "x": 44, "y": 0},
{"label": "K33", "matrix": [3, 2], "x": 45, "y": 0},
{"label": "K34", "matrix": [3, 3], "x": 46, "y": 0},
{"label": "K35", "matrix": [3, 4], "x": 47, "y": 0},
{"label": "K52", "matrix": [5, 1], "x": 48, "y": 0},
{"label": "K53", "matrix": [5, 2], "x": 49, "y": 0},
{"label": "K36", "matrix": [3, 5], "x": 50, "y": 0},
{"label": "K37", "matrix": [3, 6], "x": 51, "y": 0},
{"label": "K38", "matrix": [3, 7], "x": 52, "y": 0},
{"label": "K39", "matrix": [3, 8], "x": 53, "y": 0},
{"label": "K58", "matrix": [5, 7], "x": 54, "y": 0},
{"label": "K78", "matrix": [7, 7], "x": 55, "y": 0},
{"label": "K41", "matrix": [4, 0], "x": 56, "y": 0},
{"label": "K42", "matrix": [4, 1], "x": 57, "y": 0},
{"label": "K43", "matrix": [4, 2], "x": 58, "y": 0},
{"label": "K44", "matrix": [4, 3], "x": 59, "y": 0},
{"label": "K45", "matrix": [4, 4], "x": 60, "y": 0},
{"label": "K77", "matrix": [7, 6], "x": 61, "y": 0},
{"label": "K74", "matrix": [7, 3], "x": 62, "y": 0},
{"label": "K46", "matrix": [4, 5], "x": 63, "y": 0},
{"label": "K47", "matrix": [4, 6], "x": 64, "y": 0},
{"label": "K48", "matrix": [4, 7], "x": 65, "y": 0},
{"label": "K49", "matrix": [4, 8], "x": 66, "y": 0},
{"label": "K59", "matrix": [5, 8], "x": 67, "y": 0}
]
}
}
}

View file

@ -0,0 +1,102 @@
#include QMK_KEYBOARD_H
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_QWERTY,
_COLEMAK,
_LOWER,
_RAISE,
_ADJUST
};
enum custom_keycodes {
QWERTY = SAFE_RANGE,
LOWER,
RAISE,
ADJUST
};
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_rockon_bp(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS,
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LCBR, KC_RCBR, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ADJUST, ADJUST, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, LOWER, KC_SPC, KC_LALT, KC_MUTE, LCTL(KC_BSPC), KC_RALT, KC_SPC, RAISE, KC_RGUI, KC_RCTL
),
[_COLEMAK] = LAYOUT_rockon_bp(
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LPRN, KC_RPRN, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_LBRC, KC_RBRC, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS,
KC_CAPS, KC_A, KC_R, KC_S, KC_T, KC_G, KC_LCBR, KC_RCBR, KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, ADJUST, ADJUST, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
KC_LCTL, KC_LGUI, LOWER, KC_SPC, KC_LALT, KC_MUTE, LCTL(KC_BSPC), KC_RALT, KC_SPC, RAISE, KC_RGUI, KC_RCTL
),
[_LOWER] = LAYOUT_rockon_bp(
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_RAISE] = LAYOUT_rockon_bp(
KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______,
_______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),
[_ADJUST] = LAYOUT_rockon_bp(
RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______,
_______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TG(_QWERTY), _______, _______, _______, _______, _______, KC_F11, KC_F12, _______,
_______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TG(_COLEMAK), _______, _______, _______, _______, _______, _______, _______, _______,
_______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
)
};
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;
default:
break;
}
return true;
}

View file

@ -0,0 +1,37 @@
/* Copyright 2020 QMK
*
* 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 <http://www.gnu.org/licenses/>.
*/
/*
* This file was auto-generated by:
* `qmk chibios-confupdate -i keyboards/tkw/grandiceps/mcuconf.h -r platforms/chibios/BLACKPILL_STM32_F411/configs/mcuconf.h`
*/
#pragma once
#include_next "mcuconf.h"
#undef STM32_I2C_USE_I2C1
#define STM32_I2C_USE_I2C1 TRUE
#undef STM32_I2C_I2C1_RX_DMA_STREAM
#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5)
#undef STM32_I2C_I2C1_TX_DMA_STREAM
#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7)
#undef STM32_PWM_USE_TIM5
#define STM32_PWM_USE_TIM5 TRUE
#undef STM32_PWM_USE_TIM1
#define STM32_PWM_USE_TIM1 TRUE

View file

@ -0,0 +1 @@
AUDIO_DRIVER = pwm_hardware