mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-08-17 21:52:34 +08:00
Remove broken userspace and keymaps (#18806)
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
|
||||
// Kyria specific
|
||||
#ifdef KEYBOARD_splitkb_kyria_rev1
|
||||
// Split definition; use the following to flash;
|
||||
// pro-micro: avrdude-split-left/right
|
||||
// elite-c: dfu-split-left/right
|
||||
# define ENCODER_DIRECTION_FLIP
|
||||
# define EE_HANDS
|
||||
|
||||
// Make sure kyria has bigger oled display
|
||||
# ifdef OLED_ENABLE
|
||||
# define OLED_DISPLAY_128X64
|
||||
# endif
|
||||
#endif
|
||||
@@ -1,109 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
#include "bbaserdem.h"
|
||||
|
||||
#define LAYOUT_split_3x6_5_wrapper(...) LAYOUT_split_3x6_5(__VA_ARGS__)
|
||||
|
||||
/* F layout
|
||||
* ┌───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┐
|
||||
* │ W │ F │ G │ Ğ │ I │ O │ │ D │ R │ N │ H │ P │ Q │
|
||||
* ├───┼───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┼───┤
|
||||
* │ X │ A │ S │ D │ F │ G │ │ T │ K │ M │ L │ Y │ Ş │
|
||||
* ├───┼───┼───┼───┼───┼───┼───┬───┐ ┌───┬───┼───┼───┼───┼───┼───┼───┤
|
||||
* │* +│ J │ Ö │ V │ C │ Ç │ │ │ │ │ │ Z │ S │ B │. :│, ;│< >│
|
||||
* └───┴───┴───┼───┼───┼───┤Esc│Shf│ │Shf│Del├───┼───┼───┼───┴───┴───┘
|
||||
* │En1│Tab│Ent│ │ │ │ │ │Spc│Bsp│En2│
|
||||
* └───┴───┴───┴───┴───┘ └───┴───┴───┴───┴───┘
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_split_3x6_5_wrapper(
|
||||
_BL1_1_,_BL1_5_, _BR1_5_,_BR1_1_,
|
||||
_BL2_1_,_BL2_5_, _BR2_5_,_BR2_1_,
|
||||
_BL3_1_,_BL3_5_,xxx2xxx,xxx2xxx,_BR3_5_,_BR3_1_,
|
||||
BB_ENC0, _BL4_3_,KC_LSFT,KC_RSFT,_BR4_3_,BB_ENC1
|
||||
),
|
||||
[_CHAR] = LAYOUT_split_3x6_5_wrapper(
|
||||
XXXXXXX,_CL1_5_, _CR1_5_,XXXXXXX,
|
||||
XXXXXXX,_CL2_5_, _CR2_5_,XXXXXXX,
|
||||
XXXXXXX,_CL3_5_,xxx2xxx,xxx2xxx,_CR3_5_,XXXXXXX,
|
||||
_______,_CL4_3_,_______,_______,_CR4_3_,_______
|
||||
),
|
||||
[_GAME] = LAYOUT_split_3x6_5_wrapper(
|
||||
_GA1_1_,_GA1_5_, ___5___,___1___,
|
||||
_GA2_1_,_GA2_5_, ___5___,___1___,
|
||||
_GA3_1_,_GA3_5_,xxx2xxx,xxx2xxx,___5___,___1___,
|
||||
_______,_GA4_3_,_______,_______,___3___,_______
|
||||
),
|
||||
[_MEDI] = LAYOUT_split_3x6_5_wrapper(
|
||||
___1___,___5___, _ME1_5_,___1___,
|
||||
___1___,___5___, _ME2_5_,___1___,
|
||||
___1___,___5___,xxx2xxx,xxx2xxx,_ME3_5_,___1___,
|
||||
___1___,___3___,_______,_______,_ME4_3_,___1___
|
||||
),
|
||||
[_NAVI] = LAYOUT_split_3x6_5_wrapper(
|
||||
___1___,___5___, _NA1_5_,___1___,
|
||||
___1___,___5___, _NA2_5_,___1___,
|
||||
___1___,___5___,xxx2xxx,xxx2xxx,_NA3_5_,___1___,
|
||||
___1___,___3___,_______,_______,_NA4_3_,___1___
|
||||
),
|
||||
[_SYMB] = LAYOUT_split_3x6_5_wrapper(
|
||||
___1___,___5___, _SY1_5_,___1___,
|
||||
___1___,___5___, _SY2_5_,___1___,
|
||||
___1___,___5___,xxx2xxx,xxx2xxx,_SY3_5_,___1___,
|
||||
___1___,___3___,_______,_______,_SY4_3_,___1___
|
||||
),
|
||||
[_NUMB] = LAYOUT_split_3x6_5_wrapper(
|
||||
___1___,_NU1_5_, ___5___,___1___,
|
||||
___1___,_NU2_5_, ___5___,___1___,
|
||||
___1___,_NU3_5_,xxx2xxx,xxx2xxx,___5___,___1___,
|
||||
___1___,_NU4_3_,_______,_______,___3___,___1___
|
||||
),
|
||||
[_FUNC] = LAYOUT_split_3x6_5_wrapper(
|
||||
___1___,_FU1_5_, ___5___,___1___,
|
||||
___1___,_FU2_5_, ___5___,___1___,
|
||||
___1___,_FU3_5_,xxx2xxx,xxx2xxx,___5___,___1___,
|
||||
___1___,_FU4_3_,_______,_______,___3___,___1___
|
||||
),
|
||||
[_MOUS] = LAYOUT_split_3x6_5_wrapper(
|
||||
___1___,_MO1_5_, ___5___,___1___,
|
||||
___1___,_MO2_5_, ___5___,___1___,
|
||||
___1___,_MO3_5_,xxx2xxx,xxx2xxx,___5___,___1___,
|
||||
___1___,_MO4_3_,_______,_______,___3___,___1___
|
||||
),
|
||||
[_MUSI] = LAYOUT_split_3x6_5_wrapper(
|
||||
_MU_12_,_MU_12_,
|
||||
_MU_06_,xxx2xxx,xxx2xxx,_MU_06_,
|
||||
MU_TOG,_MUL_3_,_MU_02_,_MUR_3_,___1___
|
||||
)
|
||||
};
|
||||
|
||||
#ifdef KEYBOARD_splitkb_kyria_rev1 // Kyria specific code
|
||||
#ifdef OLED_ENABLE // Kyria's oled screen
|
||||
// Rotate the display on kyria
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
return OLED_ROTATION_180;
|
||||
}
|
||||
// For kyria; print logo, and allow default status printing
|
||||
bool oled_task_keymap(void) {
|
||||
render_qmk_logo(0, 0);
|
||||
render_status_lite(4, 0);
|
||||
return false;
|
||||
}
|
||||
#endif //OLED_ENABLE
|
||||
#endif //KEYBOARD_splitkb_kyria_rev1
|
||||
@@ -1,32 +0,0 @@
|
||||
This folder contains my Kyria (`split_3x6_5`) board layout.
|
||||
Check out the [user readme](../../../../../users/bbaserdem/readme.md) for more info.
|
||||
|
||||
# Kyria
|
||||
|
||||
I use a rev 1.3 PCB as a daily driver.
|
||||
|
||||
## Hardware
|
||||
|
||||
* Using a modified High-profile case; with metal switch plate.
|
||||
* Currently using a Pro-Micro and an Elite-C as microcontrollers.
|
||||
* Using Gateron Silent Black Ink with Progressive springs (100g), lubed.
|
||||
* Have mill-max sockets for hotswap feature.
|
||||
* All microcontrollers and OLED's are socketed for easy removal.
|
||||
|
||||
## Features
|
||||
|
||||
* Use two thumb keys in the 2u layout.
|
||||
* Have rotary encoders in the outermost keys of the thumb cluster.
|
||||
* Have underglow leds soldered.
|
||||
|
||||
## Issues
|
||||
|
||||
* Stabilizers squiek, and need lubing.
|
||||
* The double tap buttons (home row; left leader the most) don't contact well.
|
||||
|
||||
## Todo
|
||||
|
||||
* Switch to Proton C conversion with a game plan.
|
||||
* Lube stabilizers.
|
||||
* Get tenting puck.
|
||||
* (Not depending on me) migrate this code to layouts.
|
||||
@@ -1,30 +0,0 @@
|
||||
# Copyright 2021 Batuhan Başerdem
|
||||
# <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Kyria hardware
|
||||
ifneq (,$(findstring splitkb/kyria/rev1,$(KEYBOARD)))
|
||||
# Elective features
|
||||
ENCODER_ENABLE = yes
|
||||
OLED_ENABLE = yes
|
||||
# Nonexistent features
|
||||
AUDIO_ENABLE = no
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = no
|
||||
# Space savers
|
||||
NKRO_ENABLE = no
|
||||
VELOCIKEY_ENABLE = no
|
||||
WPM_ENABLE = no
|
||||
endif
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
Copyright 2019 Batuhan Başerdem <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
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
|
||||
|
||||
// Gherkin specific
|
||||
#ifdef KEYBOARD_40percentclub_gherkin
|
||||
#define MUSIC_MAP
|
||||
#define RGB_DI_PIN F6
|
||||
#define RGB_MATRIX_LED_COUNT 10
|
||||
#endif
|
||||
@@ -1,98 +0,0 @@
|
||||
/*
|
||||
Copyright 2019 Batuhan Başerdem <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
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 QMK_KEYBOARD_H
|
||||
#include "bbaserdem.h"
|
||||
|
||||
#ifdef KEYBOARD_40percentclub_gherkin
|
||||
// Flip it
|
||||
#undef LAYOUT_ortho_3x10
|
||||
#define LAYOUT_ortho_3x10( \
|
||||
K00, K01, K02, K03, K04, K05, K10, K11, K12, K13 , \
|
||||
K14, K15, K20, K21, K22, K23, K24, K25, K30, K31 , \
|
||||
K32, K33, K34, K35, K40, K41, K42, K43, K44, K45 \
|
||||
) { \
|
||||
{ K45, K44, K43, K42, K41, K40 }, \
|
||||
{ K35, K34, K33, K32, K31, K30 }, \
|
||||
{ K25, K24, K23, K22, K21, K20 }, \
|
||||
{ K15, K14, K13, K12, K11, K10 }, \
|
||||
{ K05, K04, K03, K02, K01, K00 } \
|
||||
}
|
||||
#endif
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Game pad
|
||||
* ,-----------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | F1 | F2 | F3 |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |AdjsL| Q | W | E | R | Ent | Tab | Ctr | |^| | Alt |
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Music| A | S | D | F | Spc |Shift| <-- | |v| | --> |
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_BASE] = LAYOUT_ortho_3x10(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F1, KC_F2, KC_F3,
|
||||
MO(_MEDI), KC_Q, KC_W, KC_E, KC_R, KC_ENT, KC_TAB, KC_LCTL,KC_UP, KC_LALT,
|
||||
MU_TOG, KC_A, KC_S, KC_D, KC_F, KC_SPC, KC_LSFT,KC_LEFT,KC_DOWN,KC_RGHT
|
||||
),
|
||||
/* Adjust
|
||||
* ,-----------------------------------------------------------.
|
||||
* | Esc |RGBTg|HueUp|HueDn|SatUp|SatDn|ValUp|ValDn|ModNx|ModPr|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* | |BltTg|Breth|BriUp|BriDn| | |Veloc|SpdUp|SpdDn|
|
||||
* |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----|
|
||||
* |Music| | | | | | | |EEprm|Reset|
|
||||
* `-----------------------------------------------------------'
|
||||
*/
|
||||
[_MEDI] = LAYOUT_ortho_3x10(
|
||||
CK_TOGG,RGB_TOG,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,RGB_MOD,RGB_RMOD,
|
||||
_______,BL_TOGG,BL_BRTG,BL_INC, BL_DEC, XXXXXXX,XXXXXXX,VLK_TOG,RGB_SPI,RGB_SPD,
|
||||
AU_TOG, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,EE_CLR,QK_BOOT
|
||||
),
|
||||
[_MUSI] = LAYOUT_ortho_3x10_wrapper(
|
||||
MU_FAST,_MU_08_,MU_REC,
|
||||
MU_SLOW,_MU_08_,MU_STOP,
|
||||
MU_TOG, _MU_08_,MU_PLAY
|
||||
),
|
||||
};
|
||||
|
||||
// Music map, guitar like.
|
||||
#ifdef AUDIO_ENABLE
|
||||
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_ortho_3x10(
|
||||
10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
|
||||
5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9
|
||||
);
|
||||
#endif
|
||||
|
||||
// RGB matrix code
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// Gherkin
|
||||
#if defined(KEYBOARD_40percentclub_gherkin)
|
||||
led_config_t g_led_config = {
|
||||
{ // Key Matrix to LED Index
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED},
|
||||
{ NO_LED, NO_LED, NO_LED, NO_LED, NO_LED}
|
||||
}, { // LED Index to Physical Position
|
||||
{224, 0}, {168, 0}, {112, 0}, { 56, 0}, { 0, 0},
|
||||
{ 0, 64}, { 56, 64}, {112, 64}, {168, 64}, {224, 64},
|
||||
}, { // LED Index to Flag
|
||||
2,2,2,2,2,2,2,2,2,2
|
||||
}};
|
||||
// Disable layer switching
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {return true;}
|
||||
#endif // Gherkin
|
||||
#endif // RGB Matrix
|
||||
@@ -1,19 +0,0 @@
|
||||
This folder contains my [3x10\_ortho](../../../default/ortho_3x10) board layouts
|
||||
Check out the [user readme](../../../../users/bbaserdem/readme.md) for more info.
|
||||
|
||||
# Gherkin
|
||||
|
||||
I use [Gherkin](../../../../keyboards/40percentclub/gherkin/readme.md).
|
||||
|
||||
It is used as a game pad, and key layout is inspired by spare keys I had lying around.
|
||||
The firmware is very simple, and only includes one layer keymap, and RGB effects.
|
||||
|
||||
## Status
|
||||
|
||||
* [x] Layout adapted
|
||||
* [x] Tested build
|
||||
* [x] Confirmed on board
|
||||
|
||||
## Build
|
||||
|
||||
Build command: `CFLAGS="-Wno-error=deprecated" <FILL-IN-LATER>`
|
||||
@@ -1,23 +0,0 @@
|
||||
# Copyright 2019 Batuhan Başerdem <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
# 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 small layout is a macro-pad; does not need userspace
|
||||
|
||||
# Gherkin has both RGB strip and LED lights
|
||||
ifneq (,$(findstring 40percentclub/gherkin,$(KEYBOARD)))
|
||||
CONVERT_TO_PROTON_C = yes
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGB_MATRIX_DRIVER = WS2812
|
||||
AUDIO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = yes
|
||||
VELOCIKEY_ENABLE = yes
|
||||
endif
|
||||
@@ -1,26 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
|
||||
// Code pertaining to planck rev6
|
||||
#ifdef KEYBOARD_planck_rev6
|
||||
// Encoder I use;
|
||||
# ifdef ENCODER_RESOLUTION
|
||||
# undef ENCODER_RESOLUTION
|
||||
# endif
|
||||
# define ENCODER_RESOLUTION 2
|
||||
#endif
|
||||
@@ -1,88 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
#include "bbaserdem.h"
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
// Base layer
|
||||
[_BASE] = LAYOUT_ortho_4x12_wrapper(
|
||||
_BL1_5_,_BL1_1_,_BR1_1_,_BR1_5_,
|
||||
_BL2_5_,_BL2_1_,_BR2_1_,_BR2_5_,
|
||||
_BL3_5_,_BL3_1_,_BR3_1_,_BR3_5_,
|
||||
BB_ENC0,KC_DOWN,KC_UP, _BL4_3_,_BR4_3_,KC_LEFT,KC_RGHT,RGB_TOG
|
||||
),
|
||||
// Extra characters overlay
|
||||
[_CHAR] = LAYOUT_ortho_4x12_wrapper(
|
||||
_CL1_5_,xxx2xxx,_CR1_5_,
|
||||
_CL2_5_,xxx2xxx,_CR2_5_,
|
||||
_CL3_5_,xxx2xxx,_CR3_5_,
|
||||
___3___,_CL4_3_,_CR4_3_,___3___
|
||||
),
|
||||
// Game layer: left_half
|
||||
[_GAME] = LAYOUT_ortho_4x12_wrapper(
|
||||
_GA1_5_,_GA1_1_,___6___,
|
||||
_GA2_5_,_GA2_1_,___6___,
|
||||
_GA3_5_,_GA3_1_,___6___,
|
||||
___3___,_GA4_3_,___6___
|
||||
),
|
||||
// Media layer: right_half
|
||||
[_MEDI] = LAYOUT_ortho_4x12_wrapper(
|
||||
___6___,xxx1xxx,_ME1_5_,
|
||||
___6___,xxx1xxx,_ME2_5_,
|
||||
___6___,xxx1xxx,_ME3_5_,
|
||||
___6___,_ME4_3_,___3___
|
||||
),
|
||||
// Navigation layer: right_half
|
||||
[_NAVI] = LAYOUT_ortho_4x12_wrapper(
|
||||
___6___,xxx1xxx,_NA1_5_,
|
||||
___6___,xxx1xxx,_NA2_5_,
|
||||
___6___,xxx1xxx,_NA3_5_,
|
||||
___6___,_NA4_3_,___3___
|
||||
),
|
||||
// Symbol layer: right_half
|
||||
[_SYMB] = LAYOUT_ortho_4x12_wrapper(
|
||||
___6___,xxx1xxx,_SY1_5_,
|
||||
___6___,xxx1xxx,_SY2_5_,
|
||||
___6___,xxx1xxx,_SY3_5_,
|
||||
___6___,_SY4_3_,___3___
|
||||
),
|
||||
// Number layer: left_half
|
||||
[_NUMB] = LAYOUT_ortho_4x12_wrapper(
|
||||
xxx1xxx,_NU1_5_,___6___,
|
||||
xxx1xxx,_NU2_5_,___6___,
|
||||
xxx1xxx,_NU3_5_,___6___,
|
||||
___3___,_NU4_3_,___6___
|
||||
),
|
||||
// Function layer: left_half
|
||||
[_FUNC] = LAYOUT_ortho_4x12_wrapper(
|
||||
_FU1_5_,xxx1xxx,___6___,
|
||||
_FU2_5_,xxx1xxx,___6___,
|
||||
_FU3_5_,xxx1xxx,___6___,
|
||||
___3___,_FU4_3_,___6___
|
||||
),
|
||||
// Mouse layer: left_half
|
||||
[_MOUS] = LAYOUT_ortho_4x12_wrapper(
|
||||
_MO1_5_,xxx1xxx,___6___,
|
||||
_MO2_5_,xxx1xxx,___6___,
|
||||
_MO3_5_,xxx1xxx,___6___,
|
||||
___3___,_MO4_3_,___6___
|
||||
),
|
||||
// Music layer: everything
|
||||
[_MUSI] = LAYOUT_ortho_4x12_wrapper(
|
||||
_MU_12_,_MU_12_,_MU_12_,
|
||||
___1___,_MU_02_,_MUL_3_,_MUR_3_,_MU_02_,___1___)
|
||||
};
|
||||
@@ -1,12 +0,0 @@
|
||||
This folder contains my [4x12\_ortho](../../../default/ortho_4x12) board layouts
|
||||
Check out the [user readme](../../../../users/bbaserdem/readme.md) for more info.
|
||||
|
||||
# Planck Light
|
||||
|
||||
I use a couple [planck](../../../../keyboards/planck/readme.md) keyboards.
|
||||
To sell soon; don't use them anymore, but will keep the light version.
|
||||
|
||||
# JJ40
|
||||
|
||||
A planck rev4 replacement; for my acrylic planck case which used to host a now
|
||||
defunct rev4.
|
||||
@@ -1,26 +0,0 @@
|
||||
|
||||
# Copyright 2021 Batuhan Başerdem
|
||||
# <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Planck rev6 has both RGBLIGHT and RGB_MATRIX enabled
|
||||
ifneq (,$(findstring planck/rev6,$(KEYBOARD)))
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = no
|
||||
endif
|
||||
# JJ40 here
|
||||
ifneq (,$(findstring jj40,$(KEYBOARD)))
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
endif
|
||||
@@ -1,35 +0,0 @@
|
||||
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
|
||||
// Split definition; use the following to flash;
|
||||
// pro-micro: avrdude-split-left/right
|
||||
// elite-c: dfu-split-left/right
|
||||
#define EE_HANDS
|
||||
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
// Corne overrides
|
||||
# ifdef RGBLED_NUM
|
||||
# undef RGBLED_NUM
|
||||
# endif
|
||||
# ifdef RGB_MATRIX_LED_COUNT
|
||||
# undef RGB_MATRIX_LED_COUNT
|
||||
# endif
|
||||
# define RGBLED_NUM 48
|
||||
# define RGB_MATRIX_LED_COUNT RGBLED_NUM
|
||||
#endif // KEYBOARD_crkbd_rev1
|
||||
@@ -1,117 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
#include "bbaserdem.h"
|
||||
|
||||
/* D layout
|
||||
* ┌───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┐
|
||||
* │' "│, <│. >│ P │ Y │ │ F │ G │ C │ R │ L │
|
||||
* ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
|
||||
* │ A │ O │ E │ U │ I │ │ D │ H │ T │ N │ S │
|
||||
* ├───┼───┼───┼───┼───┤ ├───┼───┼───┼───┼───┤
|
||||
* │; :│ Q │ J │ K │ X │ │ B │ M │ W │ V │ Z │
|
||||
* └───┴───┴───┼───┼───┼───┐ ┌───┼───┼───┼───┴───┴───┘
|
||||
* │Del│Tab│Spc│ │Ent│Esc│Bsp│
|
||||
* └───┴───┴───┘ └───┴───┴───┘
|
||||
*/
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_split_3x5_3_wrapper(
|
||||
_BL1_5_,_BR1_5_,
|
||||
_BL2_5_,_BR2_5_,
|
||||
_BL3_5_,_BR3_5_,
|
||||
_BL4_3_,_BR4_3_
|
||||
),
|
||||
[_CHAR] = LAYOUT_split_3x5_3_wrapper(
|
||||
_CL1_5_,_CR1_5_,
|
||||
_CL2_5_,_CR2_5_,
|
||||
_CL3_5_,_CR3_5_,
|
||||
_CL4_3_,_CR4_3_
|
||||
),
|
||||
[_GAME] = LAYOUT_split_3x5_3_wrapper(
|
||||
_GA1_5_,___5___,
|
||||
_GA2_5_,___5___,
|
||||
_GA3_5_,___5___,
|
||||
_GA4_3_,___3___
|
||||
),
|
||||
[_MEDI] = LAYOUT_split_3x5_3_wrapper(
|
||||
___5___,_ME1_5_,
|
||||
___5___,_ME2_5_,
|
||||
___5___,_ME3_5_,
|
||||
___3___,_ME4_3_
|
||||
),
|
||||
[_NAVI] = LAYOUT_split_3x5_3_wrapper(
|
||||
___5___,_NA1_5_,
|
||||
___5___,_NA2_5_,
|
||||
___5___,_NA3_5_,
|
||||
___3___,_NA4_3_
|
||||
),
|
||||
[_SYMB] = LAYOUT_split_3x5_3_wrapper(
|
||||
___5___,_SY1_5_,
|
||||
___5___,_SY2_5_,
|
||||
___5___,_SY3_5_,
|
||||
___3___,_SY4_3_
|
||||
),
|
||||
[_NUMB] = LAYOUT_split_3x5_3_wrapper(
|
||||
_NU1_5_,___5___,
|
||||
_NU2_5_,___5___,
|
||||
_NU3_5_,___5___,
|
||||
_NU4_3_,___3___
|
||||
),
|
||||
[_FUNC] = LAYOUT_split_3x5_3_wrapper(
|
||||
_FU1_5_,___5___,
|
||||
_FU2_5_,___5___,
|
||||
_FU3_5_,___5___,
|
||||
_FU4_3_,___3___
|
||||
),
|
||||
[_MOUS] = LAYOUT_split_3x5_3_wrapper(
|
||||
_MO1_5_,___5___,
|
||||
_MO2_5_,___5___,
|
||||
_MO3_5_,___5___,
|
||||
_MO4_3_,___3___
|
||||
),
|
||||
[_MUSI] = LAYOUT_split_3x5_3_wrapper(
|
||||
_MU_10_,
|
||||
_MU_10_,
|
||||
_MU_10_,
|
||||
_MUL_3_,_MUR_3_
|
||||
)
|
||||
};
|
||||
|
||||
// RGB Matrix configuration
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
|
||||
// crkbd
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
/* This is left-right for crkbd indicator light
|
||||
* ┌──┬──┬──┬──┬──┐ ┌──┬──┬──┬──┬──┐
|
||||
* │23│18│17│10│09│ │33│34│41│42│47│
|
||||
* ├02┼──┼01┼──┼00┤ ├24┼──┼25┼──┼26┤
|
||||
* │22│19│16│11│08│ │32│35│40│43│46│
|
||||
* ├03┼──┼04┼──┼05┤ ├29┼──┼28┼──┼27┤
|
||||
* │21│20│15│12│07│ │31│36│39│44│45│
|
||||
* └──┴──┴──┼──┼──┼──┐┌──┼──┼──┼──┴──┴──┘
|
||||
* │14│13│06││30│37│38│
|
||||
* └──┴──┴──┘└──┴──┴──┘
|
||||
*/
|
||||
|
||||
// End of differentiations
|
||||
#endif // KEYBOARD_crkbd_rev1
|
||||
|
||||
// End of code for the RGB_MATRIX setup
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
@@ -1,18 +0,0 @@
|
||||
This folder contains my [split\_3x5\_3](../../../default/split_3x5_3) board layouts
|
||||
Check out the [user readme](../../../../users/bbaserdem/readme.md) for more info.
|
||||
|
||||
# Crkbd
|
||||
|
||||
Using a no 6th column crkbd (rev 2.1 choc) as a mobile keyboard.
|
||||
|
||||
This version uses ProMicro as controllers; can't have OLED and RGB at the same time.
|
||||
|
||||
## Build
|
||||
|
||||
QMK cli commands no longer works with Archlinux (2021 Sep.) on my PC for flashing promicro.
|
||||
In the past; I used to flash Pro Micro explicitly using the following line, for referance.
|
||||
|
||||
```
|
||||
sudo avrdude -p atmgea34u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:<hexfile>.hex
|
||||
```
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
# Copyright 2021 Batuhan Başerdem
|
||||
# <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Corne keyboard
|
||||
ifneq (,$(findstring crkbd/rev1,$(KEYBOARD)))
|
||||
RGBLIGHT_ENABLE = no
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
OLED_ENABLE = no
|
||||
endif
|
||||
@@ -1,23 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
|
||||
// Code pertaining the ARM crkbd version
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
# define CH_CFG_ST_RESOLUTION 16
|
||||
# define CH_CFG_ST_FREQUENCY 10000
|
||||
# include_next "chconf.h"
|
||||
#endif // KEYBOARD_crkbd_rev1
|
||||
@@ -1,77 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
// Split definition; use the following to flash;
|
||||
// pro-micro: avrdude-split-left/right
|
||||
// elite-c: dfu-split-left/right
|
||||
|
||||
// Code pertaining to Corne ARM; from Waffle's keymap
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
// Use EE_HANDS to determine handedness
|
||||
# define EE_HANDS
|
||||
|
||||
// Rebrand the PCB
|
||||
# undef PRODUCT
|
||||
# define PRODUCT "Protorne Keyboard"
|
||||
# undef MANUFACTURER
|
||||
# define MANUFACTURER "Waffles"
|
||||
|
||||
// Remove OLED definitions?
|
||||
# undef USE_I2C
|
||||
# undef SSD1306OLED
|
||||
|
||||
// Audio output on pin A5 (actualy will be output on B1 using keymap init)
|
||||
# ifdef AUDIO_ENABLE
|
||||
# define AUDIO_PIN A5
|
||||
# define MUSIC_MAP
|
||||
# endif
|
||||
|
||||
// Set serial pin as D3 for sure
|
||||
# undef SOFT_SERIAL_PIN
|
||||
# define SOFT_SERIAL_PIN D3
|
||||
# define SERIAL_USART_SPEED 921600
|
||||
# define SERIAL_USART_DRIVER SD1
|
||||
# define SERIAL_USART_TX_PAL_MODE 7
|
||||
|
||||
// Things to make RGB matrix work on the waffle board
|
||||
# undef RGBLED_NUM
|
||||
# define RGBLED_NUM 54
|
||||
# undef RGB_DI_PIN
|
||||
# define RGB_DI_PIN B5
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
# define RGB_MATRIX_MAXIMUM_BRIGHTNESS 100
|
||||
# define RGB_MATRIX_SPLIT { 27, 27 }
|
||||
# endif
|
||||
# define WS2812_PWM_DRIVER PWMD3
|
||||
# define WS2812_PWM_CHANNEL 3
|
||||
# define WS2812_PWM_PAL_MODE 2
|
||||
# define WS2812_DMA_STREAM STM32_DMA1_STREAM3
|
||||
# define WS2812_DMA_CHANNEL 3
|
||||
|
||||
// OLED related code
|
||||
# ifdef OLED_ENABLE
|
||||
# define OLED_UPDATE_INTERVAL 100
|
||||
# endif
|
||||
|
||||
// Encoder definitons
|
||||
# define ENCODERS_PAD_A { B2 }
|
||||
# define ENCODERS_PAD_B { B6 }
|
||||
# define ENCODER_RESOLUTIONS { 4 }
|
||||
# define ENCODERS_PAD_A_RIGHT { B2 }
|
||||
# define ENCODERS_PAD_B_RIGHT { B6 }
|
||||
# define ENCODER_RESOLUTIONS_RIGHT { 2 }
|
||||
#endif
|
||||
@@ -1,24 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
// #define HAL_USE_DAC TRUE
|
||||
# define HAL_USE_PWM TRUE
|
||||
# define HAL_USE_SERIAL TRUE
|
||||
# include_next <halconf.h>
|
||||
#endif
|
||||
@@ -1,191 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 QMK_KEYBOARD_H
|
||||
#include "bbaserdem.h"
|
||||
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
# include "bb-oled-extra.h"
|
||||
#endif // KEYBOARD_crkbd_rev1
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_split_3x6_3_wrapper(
|
||||
BB_ENC0,_BL1_5_,_BR1_5_,BB_ENC1,
|
||||
_BL2_1_,_BL2_5_,_BR2_5_,_BR2_1_,
|
||||
_BL3_1_,_BL3_5_,_BR3_5_,_BR3_1_,
|
||||
_BL4_3_,_BR4_3_
|
||||
),
|
||||
[_CHAR] = LAYOUT_split_3x6_3_wrapper(
|
||||
_______,_CL1_5_,_CR1_5_,_______,
|
||||
XXXXXXX,_CL2_5_,_CR2_5_,XXXXXXX,
|
||||
XXXXXXX,_CL3_5_,_CR3_5_,XXXXXXX,
|
||||
_CL4_3_,_CR4_3_
|
||||
),
|
||||
[_GAME] = LAYOUT_split_3x6_3_wrapper(
|
||||
_______,_GA1_5_,___6___,
|
||||
_GA2_1_,_GA2_5_,___6___,
|
||||
_GA3_1_,_GA3_5_,___6___,
|
||||
_GA4_3_,___3___
|
||||
),
|
||||
[_MEDI] = LAYOUT_split_3x6_3_wrapper(
|
||||
___6___,_ME1_5_,_______,
|
||||
___6___,_ME2_5_,xxx1xxx,
|
||||
___6___,_ME3_5_,xxx1xxx,
|
||||
___3___,_ME4_3_
|
||||
),
|
||||
[_NAVI] = LAYOUT_split_3x6_3_wrapper(
|
||||
___6___,_NA1_5_,_______,
|
||||
___6___,_NA2_5_,xxx1xxx,
|
||||
___6___,_NA3_5_,xxx1xxx,
|
||||
___3___,_NA4_3_
|
||||
),
|
||||
[_SYMB] = LAYOUT_split_3x6_3_wrapper(
|
||||
___6___,_SY1_5_,_______,
|
||||
___6___,_SY2_5_,xxx1xxx,
|
||||
___6___,_SY3_5_,xxx1xxx,
|
||||
___3___,_SY4_3_
|
||||
),
|
||||
[_NUMB] = LAYOUT_split_3x6_3_wrapper(
|
||||
_______,_NU1_5_,___6___,
|
||||
xxx1xxx,_NU2_5_,___6___,
|
||||
xxx1xxx,_NU3_5_,___6___,
|
||||
_NU4_3_,___3___
|
||||
),
|
||||
[_FUNC] = LAYOUT_split_3x6_3_wrapper(
|
||||
_______,_FU1_5_,___6___,
|
||||
xxx1xxx,_FU2_5_,___6___,
|
||||
xxx1xxx,_FU3_5_,___6___,
|
||||
_FU4_3_,___3___
|
||||
),
|
||||
[_MOUS] = LAYOUT_split_3x6_3_wrapper(
|
||||
_______,_MO1_5_,___6___,
|
||||
xxx1xxx,_MO2_5_,___6___,
|
||||
xxx1xxx,_MO3_5_,___6___,
|
||||
_MO4_3_,___3___
|
||||
),
|
||||
[_MUSI] = LAYOUT_split_3x6_3_wrapper(
|
||||
_MU_12_,
|
||||
_MU_12_,
|
||||
_MU_12_,
|
||||
_MUL_3_,_MUR_3_
|
||||
)
|
||||
};
|
||||
|
||||
// crkbd
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
#ifdef AUDIO_ENABLE
|
||||
const uint8_t music_map[MATRIX_ROWS][MATRIX_COLS] = LAYOUT_split_3x6_3(
|
||||
24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
|
||||
12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
|
||||
0, 0, 0, 0, 0, 0
|
||||
);
|
||||
#endif // AUDIO_ENABLE
|
||||
void keyboard_pre_init_keymap(void) {
|
||||
# ifdef AUDIO_ENABLE
|
||||
//thank you to @sigprof for this
|
||||
// Set audio pins to analog mode
|
||||
palSetLineMode(A5, PAL_MODE_INPUT_ANALOG);
|
||||
palSetLineMode(B1, PAL_MODE_INPUT_ANALOG);
|
||||
# endif // AUDIO_ENABLE
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
// Led locations are different on protorne; need to be fixed
|
||||
g_led_config = (led_config_t) { {
|
||||
// Logical Layout
|
||||
// 0 1 2 3 4 5 COLS
|
||||
// -LEFT ROWS
|
||||
// 16 17 18 19 20 21 0
|
||||
// 15 14 13 12 11 10 1
|
||||
// 04 05 06 07 08 09 2
|
||||
// 03 02 01 3
|
||||
// -Right
|
||||
// 21 20 19 18 17 16 4
|
||||
// 10 11 12 13 14 15 5
|
||||
// 09 08 07 06 05 04 6
|
||||
// 01 02 03 7
|
||||
{ 15, 16, 17, 18, 19, 20},
|
||||
{ 14, 13, 12, 11, 10, 9 },
|
||||
{ 3, 4, 5, 6, 7, 8 },
|
||||
{ NO_LED, NO_LED, NO_LED, 2, 1, 0 },
|
||||
{ 47, 46, 45, 44, 43, 42 },
|
||||
{ 36, 37, 38, 39, 40, 41 },
|
||||
{ 35, 34, 33, 32, 31, 30 },
|
||||
{ NO_LED, NO_LED, NO_LED, 27, 28, 29 }
|
||||
}, {
|
||||
// Physical Layout
|
||||
// LEFT RIGHT
|
||||
// 16 17 18 19 20 21 16 17 18 19 20 21
|
||||
// 24 23 22 24 23 22
|
||||
// 15 14 13 12 11 10 15 14 13 12 11 10
|
||||
// 25 27
|
||||
// 04 05 06 07 08 09 04 05 06 07 08 09
|
||||
// 26 27 25 26
|
||||
// 03 02 01 03 02 01
|
||||
{ 95, 63 }, { 80, 58 }, { 60, 55 },
|
||||
{ 0, 41 }, { 16, 42 }, { 33, 37 }, { 50, 35 }, { 68, 37 }, { 85, 39 },
|
||||
{ 85, 21 }, { 68, 19 }, { 50, 13 }, { 33, 20 }, { 16, 24 }, { 0, 24 },
|
||||
{ 0, 7 }, { 16, 7 }, { 33, 3 }, { 50, 0 }, { 68, 2 }, { 85, 4 },
|
||||
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 },
|
||||
{ 164, 55 }, { 144, 58 }, { 129, 63 },
|
||||
{ 139, 39 }, { 156, 37 }, { 174, 35 }, { 191, 37 }, { 208, 42 }, { 224, 41 },
|
||||
{ 224, 24 }, { 208, 24 }, { 191, 20 }, { 174, 13 }, { 156, 19 }, { 139, 21 },
|
||||
{ 139, 4 }, { 156, 2 }, { 174, 0 }, { 191, 3 }, { 208, 7 }, { 224, 7 },
|
||||
{ 208, 20 }, { 174, 13 }, { 139, 16 }, { 139, 52 }, { 174, 48 }, { 208, 38 }
|
||||
}, {
|
||||
// (x---)8 stands for indicator
|
||||
// (-x--)4 stands for per-key led
|
||||
// (--x-)2 stands for underglow led
|
||||
// (---1)1 stands for modifier key
|
||||
12, 12, 12,
|
||||
4, 4, 5, 4, 4, 4,
|
||||
4, 5, 5, 5, 5, 4,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
10, 10, 10, 10, 10, 10,
|
||||
12, 12, 12,
|
||||
4, 4, 4, 5, 4, 4,
|
||||
4, 5, 5, 5, 5, 4,
|
||||
4, 4, 4, 4, 4, 4,
|
||||
10, 10, 10, 10, 10, 10
|
||||
} };
|
||||
# endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
||||
// Enable OPAMP1 as A5 → B1 follower
|
||||
#ifdef AUDIO_ENABLE
|
||||
void keyboard_post_init_keymap(void) {
|
||||
OPAMP3->CSR = OPAMP3_CSR_VMSEL_1 | OPAMP3_CSR_VMSEL_0 | OPAMP3_CSR_VPSEL_0 | OPAMP3_CSR_OPAMP3EN;
|
||||
}
|
||||
#endif // AUDIO_ENABLE
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
// Flip the display on the right half
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (!is_keyboard_left()) {
|
||||
return OLED_ROTATION_180;
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
bool oled_task_keymap(void) {
|
||||
if (is_keyboard_left()) {
|
||||
render_status_left(0, 0);
|
||||
} else {
|
||||
render_status_right(0, 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif // OLED_ENABLE
|
||||
#endif // KEYBOARD_crkbd_rev1
|
||||
@@ -1,25 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
|
||||
#ifdef KEYBOARD_crkbd_rev1
|
||||
# include_next <mcuconf.h>
|
||||
# undef STM32_PWM_USE_TIM3
|
||||
# define STM32_PWM_USE_TIM3 TRUE
|
||||
# undef STM32_SERIAL_USE_USART1
|
||||
# define STM32_SERIAL_USE_USART1 TRUE
|
||||
#endif
|
||||
@@ -1,15 +0,0 @@
|
||||
This folder contains my [split\_3x6\_3](../../../default/split_3x6_3) board layouts
|
||||
Check out the [user readme](../../../../users/bbaserdem/readme.md) for more info.
|
||||
|
||||
# Crkbd
|
||||
|
||||
Using [this](https://github.com/ItsWaffIe/waffle_corne) Proton-C compatible PCB.
|
||||
|
||||
Applying the similar keymap to [@waffle](https://github.com/ItsWaffIe/waffle_corne);
|
||||
using their `crkbd:rev1:arm` build.
|
||||
|
||||
## Build
|
||||
|
||||
Build commands;
|
||||
|
||||
* For ARM: `CFLAGS="-Wno-error=deprecated" qmk flash -kb crkdb/rev1 -km bbaserdem -bl dfu-util-split-{left,right}`
|
||||
@@ -1,47 +0,0 @@
|
||||
# Copyright 2021 Batuhan Başerdem
|
||||
# <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Corne keyboard; with ARM
|
||||
ifneq (,$(findstring crkbd/rev1,$(KEYBOARD)))
|
||||
# Proton C conversion
|
||||
MCU = STM32F303
|
||||
CTPC = yes
|
||||
# BOARD = QMK_PROTON_C
|
||||
# BOOTLOADER = stm32-dfu
|
||||
# My usual features
|
||||
AUDIO_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
ENCODER_ENABLE = yes
|
||||
RGB_MATRIX_ENABLE = yes
|
||||
OLED_ENABLE = yes
|
||||
# Features that take otherwise too much space
|
||||
WPM_ENABLE = yes
|
||||
NKRO_ENABLE = yes
|
||||
# Config
|
||||
SERIAL_DRIVER = usart
|
||||
WS2812_DRIVER = pwm
|
||||
AUDIO_DRIVER = dac_basic
|
||||
SPLIT_KEYBOARD = yes
|
||||
# These are from waffle
|
||||
DEBUG_MATRIX_SCAN_RATE_ENABLE = no # output matrix scan rate in qmk console/qmk toolbox
|
||||
QUANTUM_LIB_SRC += i2c_master.c #drivers/chibios/i2cmaster.h needs patch - see lines 27/28
|
||||
VIA_ENABLE = no
|
||||
# COMMAND_ENABLE = no
|
||||
# CONSOLE_ENABLE = no
|
||||
# BOOTMAGIC_ENABLE = lite
|
||||
# LTO_ENABLE = yes
|
||||
# PIMORONI_TRACKBALL = no
|
||||
endif
|
||||
@@ -1,16 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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/>.
|
||||
*/
|
||||
@@ -1,2 +0,0 @@
|
||||
/secrets.h
|
||||
/secrets.c
|
||||
@@ -1,82 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bb-audio.h"
|
||||
/* AUDIO
|
||||
* This contains some audio related stuff.
|
||||
* There is no need to wrap this up with preprocessor commands;
|
||||
* This is only called if audio is enabled
|
||||
*/
|
||||
|
||||
float tone_game_intro[][2] = GAME_ON_SONG;
|
||||
float tone_game_outro[][2] = GAME_OFF_SONG;
|
||||
|
||||
// Audio playing when layer changes
|
||||
layer_state_t layer_state_set_audio(layer_state_t state) {
|
||||
// Get this layer
|
||||
static bool prev_game = false;
|
||||
|
||||
// If entering the game layer; play the intro sound
|
||||
if (layer_state_cmp(state, _GAME) && (!prev_game)) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(tone_game_intro);
|
||||
prev_game = true;
|
||||
}
|
||||
// If exiting the game layer; play the outro sound
|
||||
if ((!layer_state_cmp(state, _GAME)) && prev_game) {
|
||||
stop_all_notes();
|
||||
PLAY_SONG(tone_game_outro);
|
||||
prev_game = false;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
// Audio layer switch; add the music layer on top of this
|
||||
bool process_record_audio(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case MU_TOG:
|
||||
if (!record->event.pressed) {
|
||||
// On release, exit music mode if enabled
|
||||
if (layer_state_is(_MUSI)) {
|
||||
layer_off(_MUSI);
|
||||
// If not enabled; turn off all layers and load music layer
|
||||
} else {
|
||||
layer_clear();
|
||||
layer_on(_MUSI);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
case MU_ON:
|
||||
if (!record->event.pressed) {
|
||||
// On release, enter music mode
|
||||
layer_clear();
|
||||
layer_on(_MUSI);
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
case MU_OFF:
|
||||
if (!record->event.pressed) {
|
||||
// On release, exit music mode
|
||||
layer_off(_MUSI);
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
/* AUDIO
|
||||
* Some functions to hook to some modes
|
||||
*/
|
||||
|
||||
// Hook to layer change effects
|
||||
layer_state_t layer_state_set_audio(layer_state_t state);
|
||||
|
||||
// Hook to audio keycodes
|
||||
bool process_record_audio(uint16_t keycode, keyrecord_t *record);
|
||||
@@ -1,30 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bb-backlight.h"
|
||||
/* Replaced functions with noeeprom varieties; I don't need retention across
|
||||
* booting.
|
||||
*/
|
||||
|
||||
// Backlight LEDs
|
||||
void keyboard_post_init_backlight(void) {
|
||||
backlight_enable();
|
||||
backlight_level(2);
|
||||
# ifdef BACKLIGHT_BREATHING
|
||||
breathing_enable();
|
||||
# endif // BACKLIGHT_BREATHING
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
/* Hooks for backlight definitions
|
||||
*/
|
||||
|
||||
void keyboard_post_init_backlight(void);
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
// Hook to encoder stuff
|
||||
bool encoder_update_user(uint8_t index, bool clockwise);
|
||||
// Complicated code for what the encoder keys do when pressed
|
||||
bool process_record_encoder(uint16_t keycode, keyrecord_t *record);
|
||||
// Clear the encoder settings
|
||||
void reset_encoder_state(void);
|
||||
// This is so that encoder state is synched between two halves
|
||||
void housekeeping_task_encoder(void);
|
||||
// This is purely for oled; should it want to use it
|
||||
void encoder_state_string(uint8_t index, uint8_t layer, char* buffer);
|
||||
@@ -1,156 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bb-macro.h"
|
||||
|
||||
/* MACRO Definitions
|
||||
* This file has my macros/unicodes
|
||||
* Hooks for other functionality to inject itself into the process_record
|
||||
*/
|
||||
|
||||
// Tap dance definitons
|
||||
#ifdef AUDIO_ENABLE
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
qk_tap_dance_action_t tap_dance_actions[] = {
|
||||
// Music playback speed modulator
|
||||
[TD_AUDIO_TEMPO] = ACTION_TAP_DANCE_DOUBLE(MU_SLOW, MU_FAST),
|
||||
};
|
||||
#endif // AUDIO_ENABLE
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
|
||||
// Unicode definitions; for single character keys
|
||||
// We mask their definitions if unicode is not enabled
|
||||
#ifdef UNICODEMAP_ENABLE
|
||||
const uint32_t PROGMEM unicode_map[] = {
|
||||
[UPC_A_CIRC] = 0x00C2, [LOW_A_CIRC] = 0x00E2, // Â â
|
||||
[UPC_C_CEDI] = 0x00C7, [LOW_C_CEDI] = 0x00E7, // Ç ç
|
||||
[UPC_G_BREV] = 0x011E, [LOW_G_BREV] = 0x001F, // Ğ ğ
|
||||
[UPC_I_CIRC] = 0x00CE, [LOW_I_CIRC] = 0x00EE, // Î î
|
||||
[UPC_I_DOTL] = 0x0049, [LOW_I_DOTL] = 0x0131, // I ı
|
||||
[UPC_I_DOTT] = 0x0130, [LOW_I_DOTT] = 0x0069, // İ i
|
||||
[UPC_O_DIAE] = 0x00D6, [LOW_O_DIAE] = 0x00F6, // Ö ö
|
||||
[UPC_S_CEDI] = 0x015E, [LOW_S_CEDI] = 0x015F, // Ş ş
|
||||
[UPC_U_CIRC] = 0x00DB, [LOW_U_CIRC] = 0x00FB, // Û û
|
||||
[UPC_U_DIAE] = 0x00DC, [LOW_U_DIAE] = 0x00FC, // Ü ü
|
||||
[UPC_ALPHA] = 0x0391, [LOW_ALPHA] = 0x03B1, // Α α
|
||||
[UPC_BETA] = 0x0392, [LOW_BETA] = 0x03B2, // Β β
|
||||
[UPC_GAMMA] = 0x0393, [LOW_GAMMA] = 0x03B3, // Γ γ
|
||||
[UPC_DELTA] = 0x0394, [LOW_DELTA] = 0x03B4, // Δ δ
|
||||
[UPC_EPSILON] = 0x0395, [LOW_EPSILON] = 0x03B5, // Ε ε
|
||||
[UPC_ZETA] = 0x0396, [LOW_ZETA] = 0x03B6, // Ζ ζ
|
||||
[UPC_ETA] = 0x0397, [LOW_ETA] = 0x03B7, // Η η
|
||||
[UPC_THETA] = 0x0398, [LOW_THETA] = 0x03B8, // Θ θ
|
||||
[UPC_IOTA] = 0x0399, [LOW_IOTA] = 0x03B9, // Ι ι
|
||||
[UPC_KAPPA] = 0x039A, [LOW_KAPPA] = 0x03BA, // Κ κ
|
||||
[UPC_LAMBDA] = 0x039B, [LOW_LAMBDA] = 0x03BB, // Λ λ
|
||||
[UPC_MU] = 0x039C, [LOW_MU] = 0x03BC, // Μ μ
|
||||
[UPC_NU] = 0x039D, [LOW_NU] = 0x03BD, // Ν ν
|
||||
[UPC_XI] = 0x039E, [LOW_XI] = 0x03BE, // Ξ ξ
|
||||
[UPC_OMICRON] = 0x039F, [LOW_OMICRON] = 0x03BF, // Ο ο
|
||||
[UPC_PI] = 0x03A0, [LOW_PI] = 0x03C0, // Π π
|
||||
[UPC_RHO] = 0x03A1, [LOW_RHO] = 0x03C1, // Ρ ρ
|
||||
[UPC_SIGMA] = 0x03A3, [LOW_SIGMA] = 0x03C3, // Σ σ
|
||||
[UPC_TAU] = 0x03A4, [LOW_TAU] = 0x03C4, // Τ τ
|
||||
[UPC_UPSILON] = 0x03A5, [LOW_UPSILON] = 0x03C5, // Υ υ
|
||||
[UPC_PHI] = 0x03A6, [LOW_PHI] = 0x03C6, // Φ φ
|
||||
[UPC_CHI] = 0x03A7, [LOW_CHI] = 0x03C7, // Χ χ
|
||||
[UPC_PSI] = 0x03A8, [LOW_PSI] = 0x03C8, // Ψ ψ
|
||||
[UPC_OMEGA] = 0x03A9, [LOW_OMEGA] = 0x03C9, // Ω ω
|
||||
[ELLIPSIS] = 0x2026, // …
|
||||
[PLANCK_CON] = 0x210F, // ℏ
|
||||
[ANGSTROM] = 0x212B, // Å
|
||||
[BITCOIN] = 0x20BF // ₿
|
||||
};
|
||||
#endif // UNICODEMAP_ENABLE
|
||||
|
||||
// Keycodes
|
||||
bool process_record_macro(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// AltGr + Caps should change the oled layout variable
|
||||
case KC_CAPS_LOCK:
|
||||
if (record->event.pressed) {
|
||||
if (get_mods() & MOD_BIT(KC_RALT)) {
|
||||
userspace_config.layout = (userspace_config.layout + 1) % 3;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
case BB_OLED:
|
||||
if (record->event.pressed) {
|
||||
if (get_mods() & MOD_MASK_SHIFT) {
|
||||
// Scroll in opposite direction
|
||||
userspace_config.layout = (userspace_config.layout + 4) % 3;
|
||||
} else {
|
||||
userspace_config.layout = (userspace_config.layout + 1) % 3;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
// Plain macros
|
||||
case BB_PGPK:
|
||||
// My public PGP key
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("0B7151C823559DD8A7A04CE36426139E2F4C6CCE");
|
||||
}
|
||||
return false; break;
|
||||
case DBL_ANG:
|
||||
// Double angular bracket
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("<>"SS_TAP(X_LEFT));
|
||||
}
|
||||
return false; break;
|
||||
case DBL_PAR:
|
||||
// Double paranthesis
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("()"SS_TAP(X_LEFT));
|
||||
}
|
||||
return false; break;
|
||||
case DBL_BRC:
|
||||
// Double square brackets
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("[]"SS_TAP(X_LEFT));
|
||||
}
|
||||
return false; break;
|
||||
case DBL_CBR:
|
||||
// Double curly brackets
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("{}"SS_TAP(X_LEFT));
|
||||
}
|
||||
return false; break;
|
||||
// Unicode macros
|
||||
# ifdef UNICODEMAP_ENABLE
|
||||
case TR_FLAG:
|
||||
// Turkish flag
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("🇹🇷");
|
||||
}
|
||||
return false; break;
|
||||
case BB_LENY:
|
||||
// Lenny face: ( ͡° ͜ʖ ͡°)
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("( ͡° ͜ʖ ͡°)");
|
||||
}
|
||||
return false; break;
|
||||
case BB_TABL:
|
||||
// Table flip: ┻━┻︵ \(°□°)/ ︵ ┻━┻
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("┻━┻︵ \\(°□°)/ ︵ ┻━┻");
|
||||
}
|
||||
return false; break;
|
||||
# endif // UNICODEMAP_ENABLE
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
/* This header file contains definitons regarding custom keycodes.
|
||||
* - Both regular and unicode macros are dealt with in this file
|
||||
*/
|
||||
|
||||
// These will be delegated to keymap specific stuff (weak definition)
|
||||
bool process_record_macro(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
// Unicodemap implementation
|
||||
#ifdef UNICODEMAP_ENABLE
|
||||
enum userspace_unicodemap {
|
||||
UPC_A_CIRC,
|
||||
UPC_C_CEDI,
|
||||
UPC_G_BREV,
|
||||
UPC_I_CIRC,
|
||||
UPC_I_DOTL,
|
||||
UPC_I_DOTT,
|
||||
UPC_O_DIAE,
|
||||
UPC_S_CEDI,
|
||||
UPC_U_CIRC,
|
||||
UPC_U_DIAE,
|
||||
LOW_A_CIRC,
|
||||
LOW_C_CEDI,
|
||||
LOW_G_BREV,
|
||||
LOW_I_CIRC,
|
||||
LOW_I_DOTL,
|
||||
LOW_I_DOTT,
|
||||
LOW_O_DIAE,
|
||||
LOW_S_CEDI,
|
||||
LOW_U_CIRC,
|
||||
LOW_U_DIAE,
|
||||
ELLIPSIS,
|
||||
PLANCK_CON,
|
||||
ANGSTROM,
|
||||
MATHPI,
|
||||
BITCOIN,
|
||||
UPC_ALPHA,
|
||||
UPC_BETA,
|
||||
UPC_GAMMA,
|
||||
UPC_DELTA,
|
||||
UPC_EPSILON,
|
||||
UPC_ZETA,
|
||||
UPC_ETA,
|
||||
UPC_THETA,
|
||||
UPC_IOTA,
|
||||
UPC_KAPPA,
|
||||
UPC_LAMBDA,
|
||||
UPC_MU,
|
||||
UPC_NU,
|
||||
UPC_XI,
|
||||
UPC_OMICRON,
|
||||
UPC_PI,
|
||||
UPC_RHO,
|
||||
UPC_SIGMA,
|
||||
UPC_TAU,
|
||||
UPC_UPSILON,
|
||||
UPC_PHI,
|
||||
UPC_CHI,
|
||||
UPC_PSI,
|
||||
UPC_OMEGA,
|
||||
LOW_ALPHA,
|
||||
LOW_BETA,
|
||||
LOW_GAMMA,
|
||||
LOW_DELTA,
|
||||
LOW_EPSILON,
|
||||
LOW_ZETA,
|
||||
LOW_ETA,
|
||||
LOW_THETA,
|
||||
LOW_IOTA,
|
||||
LOW_KAPPA,
|
||||
LOW_LAMBDA,
|
||||
LOW_MU,
|
||||
LOW_NU,
|
||||
LOW_XI,
|
||||
LOW_OMICRON,
|
||||
LOW_PI,
|
||||
LOW_RHO,
|
||||
LOW_SIGMA,
|
||||
LOW_TAU,
|
||||
LOW_UPSILON,
|
||||
LOW_PHI,
|
||||
LOW_CHI,
|
||||
LOW_PSI,
|
||||
LOW_OMEGA,
|
||||
};
|
||||
#endif // UNICODEMAP_ENABLE
|
||||
|
||||
// Tap dance stuff
|
||||
#ifdef AUDIO_ENABLE
|
||||
#ifdef TAP_DANCE_ENABLE
|
||||
enum {
|
||||
TD_AUDIO_TEMPO,
|
||||
};
|
||||
#endif // AUDIO_ENABLE
|
||||
#endif // TAP_DANCE_ENABLE
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,25 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
// OLED layout images writer function
|
||||
void render_modifiers(uint8_t row, uint8_t col, uint8_t mods);
|
||||
void render_layout(uint8_t row, uint8_t col, uint8_t mods, bool isLeft);
|
||||
void render_rgb(uint8_t row, uint8_t col);
|
||||
void render_status_left(uint8_t row, uint8_t col);
|
||||
void render_status_right(uint8_t row, uint8_t col);
|
||||
@@ -1,216 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bb-oled.h"
|
||||
|
||||
#include <string.h>
|
||||
// Grab the print function
|
||||
#ifdef ENCODER_ENABLE
|
||||
# include "bb-encoder.h"
|
||||
#endif // ENCODER_ENABLE
|
||||
|
||||
/* OLED
|
||||
* This contains general purpose oled code
|
||||
*/
|
||||
|
||||
// Allow default to be overwritten by keymap if they return false
|
||||
__attribute__ ((weak)) bool oled_task_keymap(void) {return true;}
|
||||
|
||||
// Do sane defaults for regular oled rendering
|
||||
void oled_task_user(void) {
|
||||
if (is_oled_on()) {
|
||||
if (oled_task_keymap()) {
|
||||
render_status_lite(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*-------------------------*\
|
||||
|*---RENDERING FUNCTIONS---*|
|
||||
\*-------------------------*/
|
||||
void render_qmk_logo(uint8_t row, uint8_t col) {
|
||||
static const char PROGMEM qmk_logo[] = {
|
||||
0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,
|
||||
0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,
|
||||
0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
|
||||
0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,
|
||||
0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,0};
|
||||
oled_set_cursor(col, row);
|
||||
oled_write_P(qmk_logo, false);
|
||||
}
|
||||
|
||||
void render_layer(uint8_t row, uint8_t col, uint8_t top_layer) {
|
||||
// Write the layer state; 17 chars
|
||||
oled_set_cursor(col, row);
|
||||
oled_write("Layer: ", false);
|
||||
switch (top_layer) {
|
||||
case _BASE:
|
||||
oled_write("Default ", false);
|
||||
break;
|
||||
case _CHAR:
|
||||
oled_write("Sp. Chars ", false);
|
||||
break;
|
||||
case _GAME:
|
||||
oled_write("Gaming ", false);
|
||||
break;
|
||||
case _MEDI:
|
||||
oled_write("Media Ctr ", false);
|
||||
break;
|
||||
case _NAVI:
|
||||
oled_write("Navigation", false);
|
||||
break;
|
||||
case _SYMB:
|
||||
oled_write("Symbols ", false);
|
||||
break;
|
||||
case _NUMB:
|
||||
oled_write("Numpad ", false);
|
||||
break;
|
||||
case _FUNC:
|
||||
oled_write("Funct Keys", false);
|
||||
break;
|
||||
case _MOUS:
|
||||
oled_write("Mouse Keys", false);
|
||||
break;
|
||||
case _MUSI:
|
||||
oled_write("Music Mode", false);
|
||||
break;
|
||||
default:
|
||||
oled_write("?? N/A ?? ", false);
|
||||
}
|
||||
}
|
||||
|
||||
void render_modifiers_lite(uint8_t row, uint8_t col, uint8_t mods) {
|
||||
// Write the modifier state, 16 characters
|
||||
oled_set_cursor(col, row);
|
||||
oled_write((mods & MOD_MASK_SHIFT ) ? "Shft " : " ", false);
|
||||
oled_write((mods & MOD_MASK_CTRL ) ? "Ctrl " : " ", false);
|
||||
oled_write((mods & MOD_MASK_ALT ) ? "Alt" : " ", false);
|
||||
oled_write((mods & MOD_BIT(KC_RALT)) ? "G " : " ", false);
|
||||
oled_write((mods & MOD_MASK_GUI ) ? "Meta " : " ", false);
|
||||
}
|
||||
|
||||
void render_encoder(uint8_t row, uint8_t col, uint8_t index, uint8_t layer) {
|
||||
// Renders the encoder state, 14 characters
|
||||
oled_set_cursor(col, row);
|
||||
|
||||
# ifdef ENCODER_ENABLE
|
||||
static char encoder_temp9[9] = {0};
|
||||
oled_write("Enc: ", false);
|
||||
encoder_state_string(index, layer, encoder_temp9);
|
||||
oled_write(encoder_temp9, false);
|
||||
# else // ENCODER_ENABLE
|
||||
oled_write("No enc. avail.", false);
|
||||
# endif // ENCODER_ENABLE
|
||||
}
|
||||
|
||||
void render_wpm(uint8_t row, uint8_t col) {
|
||||
// Renders the WPM, 8 characters
|
||||
oled_set_cursor(col, row);
|
||||
# ifdef WPM_ENABLE
|
||||
static char wpm_temp4[4] = {0};
|
||||
oled_write("WPM: ", false);
|
||||
itoa(get_current_wpm(), wpm_temp4, 10);
|
||||
oled_write(wpm_temp4, false);
|
||||
oled_write(" ", false);
|
||||
# else // WPM_ENABLE
|
||||
oled_write("WPM: N/A", false);
|
||||
# endif // WPM_ENABLE
|
||||
}
|
||||
|
||||
// Writes the currently used OLED display layout
|
||||
void render_keymap(uint8_t row, uint8_t col, bool isLite) {
|
||||
// Render the oled layout; lite is 11, regular is 14 characters
|
||||
oled_set_cursor(col, row);
|
||||
if (isLite) {
|
||||
oled_write("KM: ", false);
|
||||
} else {
|
||||
oled_write("Layout: ", false);
|
||||
}
|
||||
switch (userspace_config.layout % 3) {
|
||||
case 0:
|
||||
oled_write("Dvorak", false);
|
||||
break;
|
||||
case 1:
|
||||
oled_write("Tur. F", false);
|
||||
break;
|
||||
case 2:
|
||||
oled_write("Qwerty", false);
|
||||
break;
|
||||
}
|
||||
if (isLite) {
|
||||
oled_write(" ", false);
|
||||
}
|
||||
}
|
||||
|
||||
// Writes the currently used OLED display layout
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void render_rgb_lite(uint8_t row, uint8_t col) {
|
||||
// Writes the currently used OLED display layout, 19 characters
|
||||
static char rgb_temp4[4] = {0};
|
||||
// Render the oled layout
|
||||
oled_set_cursor(col, row);
|
||||
oled_write("m", false);
|
||||
itoa(rgb_matrix_get_mode(), rgb_temp4, 10);
|
||||
oled_write(rgb_temp4, false);
|
||||
oled_write(" h", false);
|
||||
itoa(rgb_matrix_get_hue(), rgb_temp4, 10);
|
||||
oled_write(rgb_temp4, false);
|
||||
oled_write(" s", false);
|
||||
itoa(rgb_matrix_get_sat(), rgb_temp4, 10);
|
||||
oled_write(rgb_temp4, false);
|
||||
oled_write(" v", false);
|
||||
itoa(rgb_matrix_get_val(), rgb_temp4, 10);
|
||||
oled_write(rgb_temp4, false);
|
||||
}
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
|
||||
void render_status_lite(uint8_t row, uint8_t col) {
|
||||
// Function to print state information; for low flash memory
|
||||
uint8_t this_layer = get_highest_layer(layer_state);
|
||||
uint8_t this_mod = get_mods();
|
||||
|
||||
// Line 1: Layer State
|
||||
render_layer(row + 0, col + 0, this_layer);
|
||||
|
||||
// Line 2: Mod or info
|
||||
switch (this_layer) {
|
||||
// Show RGB mode as an overlay in media mode.
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
case _MEDI:
|
||||
render_rgb_lite(row + 1, col + 0);
|
||||
break;
|
||||
# endif // RGB_MATRIX_ENABLE
|
||||
// Show the modifier if nothing else is doing anything
|
||||
default:
|
||||
render_modifiers_lite(row + 1, col + 0, this_mod);
|
||||
break;
|
||||
}
|
||||
|
||||
// Line 3: WPM and layout
|
||||
render_keymap(row + 2, col + 0, true);
|
||||
render_wpm(row + 2, col + 11);
|
||||
|
||||
// Line 4: Encoder states
|
||||
# ifdef SPLIT_KEYBOARD
|
||||
if (is_keyboard_left()) {
|
||||
render_encoder(row + 3, col + 0, 0, this_layer);
|
||||
} else {
|
||||
render_encoder(row + 3, col + 0, 1, this_layer);
|
||||
}
|
||||
# else // SPLIT_KEYBOARD
|
||||
render_encoder(row + 3, col + 0, 0, this_layer);
|
||||
# endif // SPLIT_KEYBOARD
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
// Contain the main oled writer here
|
||||
void oled_task_user(void);
|
||||
// Some generic rendering functions
|
||||
void render_qmk_logo(uint8_t row, uint8_t col);
|
||||
void render_layer(uint8_t row, uint8_t col, uint8_t top_layer);
|
||||
void render_modifiers_lite(uint8_t row, uint8_t col, uint8_t mods);
|
||||
void render_encoder(uint8_t row, uint8_t col, uint8_t index, uint8_t layer);
|
||||
void render_wpm(uint8_t row, uint8_t col);
|
||||
void render_keymap(uint8_t row, uint8_t col, bool isLite);
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
void render_rgb_lite(uint8_t row, uint8_t col);
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
void render_status_lite(uint8_t row, uint8_t col);
|
||||
@@ -1,123 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bb-rgb.h"
|
||||
#include "color.h"
|
||||
|
||||
#define X_DIV 224/2
|
||||
/* Code relating to per-key RGB LED stuff
|
||||
*/
|
||||
|
||||
// Allow hooking into the RGB matrix indications using keymap code
|
||||
|
||||
// Modulates the brightness of indicator
|
||||
RGB helper_dimmer(uint8_t r, uint8_t g, uint8_t b) {
|
||||
RGB output;
|
||||
output.r = r / 2;
|
||||
output.g = g / 2;
|
||||
output.b = b / 2;
|
||||
return output;
|
||||
}
|
||||
// x range from 0-left to 224-right
|
||||
// y range from 0-top to 64-bottom
|
||||
void helper_painter(uint8_t led_min, uint8_t led_max, RGB col, uint8_t side) {
|
||||
if (side == 1) {
|
||||
// Left
|
||||
for(uint8_t i = led_min; i <= led_max; i++) {
|
||||
if((g_led_config.point[i].x < X_DIV) && (g_led_config.flags[i] & LED_FLAG_INDICATOR)) {
|
||||
rgb_matrix_set_color(i, col.r, col.g, col.b);
|
||||
}
|
||||
}
|
||||
} else if (side == 2) {
|
||||
// Right
|
||||
for(uint8_t i = led_min; i <= led_max; i++) {
|
||||
if((g_led_config.point[i].x > X_DIV) && (g_led_config.flags[i] & LED_FLAG_INDICATOR)) {
|
||||
rgb_matrix_set_color(i, col.r, col.g, col.b);
|
||||
}
|
||||
}
|
||||
} else if (side == 0) {
|
||||
// Both
|
||||
for(uint8_t i = led_min; i <= led_max; i++) {
|
||||
if(g_led_config.flags[i] & LED_FLAG_INDICATOR) {
|
||||
rgb_matrix_set_color(i, col.r, col.g, col.b);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Allow to turn off global handling
|
||||
__attribute__ ((weak)) bool rgb_matrix_indicators_advanced_keymap(uint8_t led_min, uint8_t led_max) {
|
||||
return false;
|
||||
}
|
||||
// Set RGB state depending on layer
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max) {
|
||||
uint8_t thisInd = 3;
|
||||
RGB thisCol;
|
||||
// Load keymap hooks
|
||||
if(rgb_matrix_indicators_advanced_keymap(led_min, led_max)) {
|
||||
return false;
|
||||
}
|
||||
// Grab color info
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _GAME: // Set left side as purple
|
||||
thisCol = helper_dimmer(RGB_PURPLE);
|
||||
thisInd = 1;
|
||||
break;
|
||||
case _CHAR: // Set full board as gold
|
||||
thisCol = helper_dimmer(RGB_GOLD);
|
||||
thisInd = 0;
|
||||
break;
|
||||
case _MEDI: // Set right side as pink
|
||||
thisCol = helper_dimmer(RGB_MAGENTA);
|
||||
thisInd = 2;
|
||||
break;
|
||||
case _NAVI: // Set right side as green
|
||||
thisCol = helper_dimmer(RGB_GREEN);
|
||||
thisInd = 2;
|
||||
break;
|
||||
case _SYMB: // Set right side as yellow
|
||||
thisCol = helper_dimmer(RGB_YELLOW);
|
||||
thisInd = 2;
|
||||
break;
|
||||
case _NUMB: // Set left side as blue
|
||||
thisCol = helper_dimmer(RGB_BLUE);
|
||||
thisInd = 1;
|
||||
break;
|
||||
case _FUNC: // Set left side as red
|
||||
thisCol = helper_dimmer(RGB_RED);
|
||||
thisInd = 1;
|
||||
break;
|
||||
case _MOUS: // Set left side as blue-green
|
||||
thisCol = helper_dimmer(RGB_SPRINGGREEN);
|
||||
thisInd = 1;
|
||||
break;
|
||||
case _MUSI: // Set full board as orange
|
||||
thisCol = helper_dimmer(RGB_ORANGE);
|
||||
thisInd = 0;
|
||||
break;
|
||||
}
|
||||
helper_painter(led_min, led_max, thisCol, thisInd);
|
||||
return false;
|
||||
}
|
||||
|
||||
// Hook into shutdown code to make all perkey LED's red on hitting reset
|
||||
void shutdown_rgb(void) {
|
||||
// Flash all the key LED's red on shutdown
|
||||
uint16_t timer_start = timer_read();
|
||||
rgb_matrix_set_color_all(RGB_CORAL);
|
||||
// Delay until this registers
|
||||
while(timer_elapsed(timer_start) < 250) {wait_ms(1);}
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
/* Hooks involving perkey RGB LEDs
|
||||
*/
|
||||
|
||||
// For custom indicators
|
||||
bool rgb_matrix_indicators_advanced_user(uint8_t led_min, uint8_t led_max);
|
||||
// Hook into shutdown code
|
||||
void shutdown_rgb(void);
|
||||
void suspend_wakeup_init_rgb(void);
|
||||
void suspend_power_down_rgb(void);
|
||||
@@ -1,116 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bb-underglow.h"
|
||||
|
||||
/* UNDERGLOW IMPLEMENTATION
|
||||
*/
|
||||
|
||||
// Define the layer switching code
|
||||
|
||||
// An empty layer on the base
|
||||
const rgblight_segment_t PROGMEM bb_base_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, 0, HSV_WHITE}
|
||||
);
|
||||
// Gaming layer is turquoise
|
||||
const rgblight_segment_t PROGMEM bb_game_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_PURPLE}
|
||||
);
|
||||
// Character overlay is chartereuse
|
||||
const rgblight_segment_t PROGMEM bb_char_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_GOLD}
|
||||
);
|
||||
|
||||
// Right-hand layers
|
||||
|
||||
// Media layer is orange
|
||||
const rgblight_segment_t PROGMEM bb_medi_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_RIGHT_BEG, RGBLIGHT_RIGHT_NUM, HSV_MAGENTA}
|
||||
);
|
||||
// Navigation layer is green
|
||||
const rgblight_segment_t PROGMEM bb_navi_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_RIGHT_BEG, RGBLIGHT_RIGHT_NUM, HSV_GREEN}
|
||||
);
|
||||
// Symbol layer is purple
|
||||
const rgblight_segment_t PROGMEM bb_symb_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_RIGHT_BEG, RGBLIGHT_RIGHT_NUM, HSV_YELLOW}
|
||||
);
|
||||
|
||||
// Left-hand layers
|
||||
|
||||
// Number layer is blue
|
||||
const rgblight_segment_t PROGMEM bb_numb_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_BLUE}
|
||||
);
|
||||
// Function layer is red
|
||||
const rgblight_segment_t PROGMEM bb_func_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_RED}
|
||||
);
|
||||
// Pointer layer is yellow
|
||||
const rgblight_segment_t PROGMEM bb_mous_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{RGBLIGHT_LEFT_BEG, RGBLIGHT_LEFT_NUM, HSV_SPRINGGREEN}
|
||||
);
|
||||
|
||||
// Music playback layer is magenta
|
||||
const rgblight_segment_t PROGMEM bb_musi_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{0, RGBLED_NUM, HSV_ORANGE}
|
||||
);
|
||||
|
||||
const rgblight_segment_t* const PROGMEM bb_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
bb_base_layer,
|
||||
bb_char_layer,
|
||||
bb_game_layer,
|
||||
bb_medi_layer,
|
||||
bb_navi_layer,
|
||||
bb_symb_layer,
|
||||
bb_numb_layer,
|
||||
bb_func_layer,
|
||||
bb_mous_layer,
|
||||
bb_musi_layer
|
||||
);
|
||||
|
||||
// Enable the LED switching layers
|
||||
void keyboard_post_init_underglow(void) {
|
||||
rgblight_layers = bb_rgb_layers;
|
||||
// Default rgb mode is rainbow swirl; set this
|
||||
rgblight_sethsv_noeeprom(100, 255, 255);
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_RAINBOW_SWIRL + 0);
|
||||
}
|
||||
|
||||
// Set RGBLIGHT state depending on layer
|
||||
layer_state_t layer_state_set_underglow(layer_state_t state) {
|
||||
// Activate layers if on that region
|
||||
rgblight_set_layer_state(_BASE, layer_state_cmp(state, _BASE));
|
||||
rgblight_set_layer_state(_GAME, layer_state_cmp(state, _GAME));
|
||||
rgblight_set_layer_state(_CHAR, layer_state_cmp(state, _CHAR));
|
||||
rgblight_set_layer_state(_MEDI, layer_state_cmp(state, _MEDI));
|
||||
rgblight_set_layer_state(_NAVI, layer_state_cmp(state, _NAVI));
|
||||
rgblight_set_layer_state(_SYMB, layer_state_cmp(state, _SYMB));
|
||||
rgblight_set_layer_state(_NUMB, layer_state_cmp(state, _NUMB));
|
||||
rgblight_set_layer_state(_FUNC, layer_state_cmp(state, _FUNC));
|
||||
rgblight_set_layer_state(_MOUS, layer_state_cmp(state, _MOUS));
|
||||
rgblight_set_layer_state(_MUSI, layer_state_cmp(state, _MUSI));
|
||||
// Return so other stuff can be done
|
||||
return state;
|
||||
}
|
||||
|
||||
// Hook into shutdown code
|
||||
void shutdown_underglow(void) {
|
||||
// Make the LED's red on shutdown
|
||||
rgblight_enable_noeeprom();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_sethsv(HSV_WHITE);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
#include "bbaserdem.h"
|
||||
|
||||
/* UNDERGLOW IMPLEMENTATION
|
||||
*/
|
||||
|
||||
// Used to initialize layer switching overlay
|
||||
void keyboard_post_init_underglow(void);
|
||||
// Used to change RGB underglow layers on keymap layer change
|
||||
layer_state_t layer_state_set_underglow(layer_state_t state);
|
||||
// Hook into shutdown to show effect on shutdown
|
||||
void shutdown_underglow(void);
|
||||
@@ -1,376 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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 "bbaserdem.h"
|
||||
// Language imports
|
||||
#include <sendstring_dvorak.h>
|
||||
// Need memcpy and memcmp from string.h along with transfer stuff
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
#include "transactions.h"
|
||||
#include <string.h>
|
||||
#endif // SPLIT_KEYBOARD
|
||||
|
||||
/*-------------------------*\
|
||||
|*-----KEYBOARD CONFIG-----*|
|
||||
\*-------------------------*/
|
||||
userspace_config_t userspace_config;
|
||||
userspace_runtime_t userspace_runtime;
|
||||
|
||||
/*---------------------------------*\
|
||||
|*----SPLIT KEYBOARD TRANSPORT-----*|
|
||||
\*---------------------------------*/
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
userspace_config_t transport_userspace_config;
|
||||
userspace_runtime_t transport_userspace_runtime;
|
||||
|
||||
// Translate the RPC data to the local variable
|
||||
void userspace_config_sync(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
|
||||
// Copy incoming data to local variable
|
||||
if (in_buflen == sizeof(transport_userspace_config)) {
|
||||
memcpy(&transport_userspace_config, in_data, in_buflen);
|
||||
}
|
||||
// There is no data to send back; so no output handling
|
||||
}
|
||||
void userspace_runtime_sync(uint8_t in_buflen, const void* in_data, uint8_t out_buflen, void* out_data) {
|
||||
// Copy incoming data to local variable
|
||||
if (in_buflen == sizeof(transport_userspace_runtime)) {
|
||||
memcpy(&transport_userspace_runtime, in_data, in_buflen);
|
||||
}
|
||||
// There is no data to send back; so no output handling
|
||||
}
|
||||
|
||||
// Either send or receive the correct data
|
||||
void userspace_transport_update(void) {
|
||||
if (is_keyboard_master()) {
|
||||
// If we are the main device; we want to send info.
|
||||
transport_userspace_config.raw = userspace_config.raw;
|
||||
transport_userspace_runtime.raw = userspace_runtime.raw;
|
||||
} else {
|
||||
// If we are the secondary device; we want to receive info, and save to eeprom.
|
||||
userspace_config.raw = transport_userspace_config.raw;
|
||||
userspace_runtime.raw = transport_userspace_runtime.raw;
|
||||
}
|
||||
}
|
||||
|
||||
// Initiate the protocol on sync
|
||||
void userspace_transport_sync(bool force_sync) {
|
||||
if (is_keyboard_master()) {
|
||||
// Keep track of the last state
|
||||
static userspace_config_t last_userspace_config;
|
||||
static userspace_runtime_t last_userspace_runtime;
|
||||
bool needs_sync = false;
|
||||
|
||||
// Check if the config values are different
|
||||
if (memcmp(&transport_userspace_config, &last_userspace_config, sizeof(transport_userspace_config))) {
|
||||
needs_sync = true;
|
||||
memcpy(&last_userspace_config, &transport_userspace_config, sizeof(transport_userspace_config));
|
||||
}
|
||||
// Perform the sync if requested
|
||||
if (needs_sync || force_sync) {
|
||||
transaction_rpc_send(RPC_ID_CONFIG_SYNC, sizeof(transport_userspace_config), &transport_userspace_config);
|
||||
needs_sync = false;
|
||||
}
|
||||
|
||||
// Check if the runtime values are different
|
||||
if (memcmp(&transport_userspace_runtime, &last_userspace_runtime, sizeof(transport_userspace_runtime))) {
|
||||
needs_sync = true;
|
||||
memcpy(&last_userspace_runtime, &transport_userspace_runtime, sizeof(transport_userspace_runtime));
|
||||
}
|
||||
|
||||
// Perform the sync if requested
|
||||
if (needs_sync || force_sync) {
|
||||
transaction_rpc_send(RPC_ID_RUNTIME_SYNC, sizeof(transport_userspace_runtime), &transport_userspace_runtime);
|
||||
needs_sync = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // SPLIT_KEYBOARD
|
||||
|
||||
/*---------------------------*\
|
||||
|*-----KEYBOARD PRE INIT-----*|
|
||||
\*---------------------------*/
|
||||
/* This code runs before anything is started.
|
||||
* Good for early hardware setup
|
||||
*/
|
||||
__attribute__ ((weak)) void keyboard_pre_init_keymap(void) {}
|
||||
__attribute__ ((weak)) void keyboard_pre_init_user(void) {
|
||||
// Keymap specific stuff
|
||||
keyboard_pre_init_keymap();
|
||||
}
|
||||
|
||||
/*---------------------*\
|
||||
|*-----MATRIX INIT-----*|
|
||||
\*---------------------*/
|
||||
/* This code runs once midway thru the firmware process.
|
||||
* So far, sets the base layer and fixes unicode mode
|
||||
*/
|
||||
__attribute__ ((weak)) void matrix_init_keymap(void) {}
|
||||
void matrix_init_user (void) {
|
||||
// Keymap specific things
|
||||
matrix_init_keymap();
|
||||
}
|
||||
|
||||
/*----------------------------*\
|
||||
|*-----KEYBOARD POST INIT-----*|
|
||||
\*----------------------------*/
|
||||
/* This code runs after anything is started.
|
||||
* Good for late hardware setup, like setting up layer specifications
|
||||
*/
|
||||
__attribute__ ((weak)) void keyboard_post_init_keymap(void) {}
|
||||
__attribute__ ((weak)) void keyboard_post_init_user(void) {
|
||||
// Fix beginning base layer, in case some other firmware was flashed
|
||||
// set_single_persistent_default_layer(_BASE);
|
||||
|
||||
// Unicode mode
|
||||
# ifdef UNICODEMAP_ENABLE
|
||||
set_unicode_input_mode(UC_LNX);
|
||||
# endif // UNICODEMAP_ENABLE
|
||||
|
||||
// Split keyboard halves communication
|
||||
# ifdef SPLIT_KEYBOARD
|
||||
// Register the transactions
|
||||
transaction_register_rpc( RPC_ID_CONFIG_SYNC, userspace_config_sync );
|
||||
transaction_register_rpc(RPC_ID_RUNTIME_SYNC, userspace_runtime_sync);
|
||||
// Load default config values
|
||||
if (is_keyboard_master()) {
|
||||
// If we are main; load from eeconfig
|
||||
userspace_config.raw = eeconfig_read_user();
|
||||
// And update the transport variable
|
||||
userspace_transport_update();
|
||||
// Do one forced transfer to sync halves
|
||||
userspace_transport_sync(true);
|
||||
} else {
|
||||
// Just sync the data received
|
||||
userspace_transport_update();
|
||||
}
|
||||
# else // SPLIT_KEYBOARD
|
||||
// If we are not split; just load from eeprom
|
||||
userspace_config.raw = eeconfig_read_user();
|
||||
# endif // SPLIT_KEYBOARD
|
||||
|
||||
// Backlight LED
|
||||
# ifdef BACKLIGHT_ENABLE
|
||||
keyboard_post_init_backlight();
|
||||
# endif // BACKLIGHT_ENABLE
|
||||
|
||||
// RGB underglow
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
keyboard_post_init_underglow();
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
|
||||
// Keymap specific stuff
|
||||
keyboard_post_init_keymap();
|
||||
}
|
||||
|
||||
/*---------------------------*\
|
||||
|*-----HOUSEKEEPING TASK-----*|
|
||||
\*---------------------------*/
|
||||
/* I have no idea what this does
|
||||
*/
|
||||
__attribute__ ((weak)) void housekeeping_task_keymap(void) {}
|
||||
void housekeeping_task_user(void) {
|
||||
// Check eeprom every now and then
|
||||
static userspace_config_t prev_userspace_config;
|
||||
static fast_timer_t throttle_timer = 0;
|
||||
static bool init_flag = true;
|
||||
|
||||
// Read this if we never read it before
|
||||
if (init_flag) {
|
||||
init_flag = false;
|
||||
prev_userspace_config.raw = eeconfig_read_user();
|
||||
}
|
||||
|
||||
// Throttled tasks here
|
||||
if (timer_elapsed_fast(throttle_timer) >= HOUSEKEEPING_THROTTLE_INTERVAL_MS) {
|
||||
// Refresh timer
|
||||
throttle_timer = timer_read_fast();
|
||||
// Check userspace config for eeprom updates
|
||||
if (memcmp(&prev_userspace_config, &userspace_config, sizeof(userspace_config))) {
|
||||
memcpy(&prev_userspace_config, &userspace_config, sizeof(userspace_config));
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
}
|
||||
}
|
||||
|
||||
// Do transport stuff
|
||||
# ifdef SPLIT_KEYBOARD
|
||||
userspace_transport_update();
|
||||
userspace_transport_sync(false);
|
||||
# endif // SPLIT_KEYBOARD
|
||||
|
||||
// Hook to keymap code
|
||||
housekeeping_task_keymap();
|
||||
}
|
||||
|
||||
/*-----------------------*\
|
||||
|*-----EECONFIG INIT-----*|
|
||||
\*-----------------------*/
|
||||
/* Default values to send to the eeprom
|
||||
*/
|
||||
void eeconfig_init_user(void) {
|
||||
// Set everything to default
|
||||
userspace_config.raw = 0;
|
||||
// Set encoder states to sane defaults if enabled
|
||||
# ifdef ENCODER_ENABLE
|
||||
reset_encoder_state();
|
||||
# endif // ENCODER_ENABLE
|
||||
}
|
||||
|
||||
/*------------------------*\
|
||||
|*-----PROCESS RECORD-----*|
|
||||
\*------------------------*/
|
||||
/* Process record: custom keycodes to process here
|
||||
* Allow also the following codes to hook here as well;
|
||||
* Macro definitions
|
||||
* Audio hooks
|
||||
*/
|
||||
__attribute__ ((weak))
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
|
||||
return true;
|
||||
}
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// Return after running through all individual hooks
|
||||
return
|
||||
process_record_keymap(keycode, record) &&
|
||||
# ifdef AUDIO_ENABLE
|
||||
process_record_audio(keycode, record) &&
|
||||
# endif // AUDIO_ENABLE
|
||||
# ifdef ENCODER_ENABLE
|
||||
process_record_encoder(keycode, record) &&
|
||||
# endif // ENCODER_ENABLE
|
||||
process_record_macro(keycode, record);
|
||||
}
|
||||
|
||||
/*---------------------*\
|
||||
|*-----MATRIX SCAN-----*|
|
||||
\*---------------------*/
|
||||
/* This code runs every frame
|
||||
* I used to check for layer switching here, but layer state is better used.
|
||||
* Try to not put anything here; as it runs hundreds time per second-ish
|
||||
*/
|
||||
__attribute__ ((weak)) void matrix_scan_keymap(void) { }
|
||||
void matrix_scan_user (void) {
|
||||
// Keymap specific scan function
|
||||
matrix_scan_keymap();
|
||||
}
|
||||
|
||||
/*---------------------*\
|
||||
|*-----LAYER STATE-----*|
|
||||
\*---------------------*/
|
||||
/* This code runs after every layer change
|
||||
* State represents the new layer state.
|
||||
*/
|
||||
__attribute__ ((weak))
|
||||
layer_state_t layer_state_set_keymap (layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
// Keymap layer state setting
|
||||
state = layer_state_set_keymap(state);
|
||||
// For underglow stuff
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
state = layer_state_set_underglow(state);
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
// Audio playback
|
||||
# ifdef AUDIO_ENABLE
|
||||
state = layer_state_set_audio(state);
|
||||
# endif // AUDIO_ENABLE
|
||||
|
||||
return state;
|
||||
}
|
||||
|
||||
/*-----------------------------*\
|
||||
|*-----DEFAULT LAYER STATE-----*|
|
||||
\*-----------------------------*/
|
||||
/* This code runs after every time default base layer is changed
|
||||
*/
|
||||
__attribute__ ((weak))
|
||||
layer_state_t default_layer_state_set_keymap (layer_state_t state) {
|
||||
return state;
|
||||
}
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
// Keymap level code
|
||||
state = default_layer_state_set_keymap(state);
|
||||
return state;
|
||||
}
|
||||
|
||||
/*------------------------*\
|
||||
|*-----LED SET KEYMAP-----*|
|
||||
\*------------------------*/
|
||||
/* Code for LED indicators
|
||||
* I'm not sure when exactly does this code run
|
||||
*/
|
||||
__attribute__ ((weak)) void led_set_keymap(uint8_t usb_led) {}
|
||||
void led_set_user(uint8_t usb_led) {
|
||||
led_set_keymap(usb_led);
|
||||
}
|
||||
|
||||
/*-----------------*\
|
||||
|*-----SUSPEND-----*|
|
||||
\*-----------------*/
|
||||
/* Suspend stuff here, mostly for the rgb lighting.
|
||||
*/
|
||||
__attribute__ ((weak)) void suspend_power_down_keymap (void) { }
|
||||
void suspend_power_down_user(void) {
|
||||
suspend_power_down_keymap();
|
||||
// RGB matrix sleep hook
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
suspend_power_down_rgb();
|
||||
# endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
__attribute__ ((weak)) void suspend_wakeup_init_keymap (void) { }
|
||||
void suspend_wakeup_init_user(void) {
|
||||
suspend_wakeup_init_keymap();
|
||||
// RGB matrix sleep hook
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
suspend_wakeup_init_rgb();
|
||||
# endif // RGB_MATRIX_ENABLE
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
state = layer_state_set_keymap (state);
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// Change RGB lighting depending on the last layer activated
|
||||
rgblight_change( get_highest_layer(state) );
|
||||
#endif
|
||||
return state;
|
||||
||||||| f439fe6055
|
||||
state = layer_state_set_keymap (state);
|
||||
#ifdef RGBLIGHT_ENABLE
|
||||
// Change RGB lighting depending on the last layer activated
|
||||
rgblight_change( biton32(state) );
|
||||
#endif
|
||||
return state;
|
||||
=======
|
||||
/*------------------*\
|
||||
|*-----SHUTDOWN-----*|
|
||||
\*------------------*/
|
||||
/* Shutdown stuff here; for when entering bootmode.
|
||||
*/
|
||||
__attribute__ ((weak)) void shutdown_keymap (void) { }
|
||||
void shutdown_user(void) {
|
||||
// Underglow LED hook on boot
|
||||
# ifdef RGBLIGHT_ENABLE
|
||||
shutdown_underglow();
|
||||
# endif // RGBLIGHT_ENABLE
|
||||
// Perkey led hook on boot
|
||||
# ifdef RGB_MATRIX_ENABLE
|
||||
shutdown_rgb();
|
||||
# endif // RGB_MATRIX_ENABLE
|
||||
// Keymap hooks
|
||||
shutdown_keymap();
|
||||
>>>>>>> upstream/master
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,134 +0,0 @@
|
||||
/* Copyright 2021 Batuhan Başerdem
|
||||
* <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
*
|
||||
* 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
|
||||
|
||||
/* CONFIG
|
||||
* Common hardware configuration accross my boards
|
||||
*/
|
||||
// Space saving
|
||||
#ifdef LOCKING_SUPPORT_ENABLE
|
||||
# undef LOCKING_SUPPORT_ENABLE
|
||||
#endif
|
||||
#ifdef LOCKING_RESYNC_ENABLE
|
||||
# undef LOCKING_RESYNC_ENABLE
|
||||
#endif
|
||||
#ifndef NO_DEBUG
|
||||
# define NO_DEBUG
|
||||
#endif
|
||||
|
||||
#if !defined(NO_PRINT) && !defined(CONSOLE_ENABLE)
|
||||
# define NO_PRINT
|
||||
#endif
|
||||
|
||||
// Some of my own settings
|
||||
# define HOUSEKEEPING_THROTTLE_INTERVAL_MS 250
|
||||
|
||||
// Split transport settings
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
# define SPLIT_TRANSPORT_MIRROR
|
||||
# define SPLIT_LAYER_STATE_ENABLE
|
||||
# define SPLIT_MODS_ENABLE
|
||||
# define SPLIT_TRANSACTION_IDS_USER RPC_ID_CONFIG_SYNC, RPC_ID_RUNTIME_SYNC, RPC_ID_KEYMAP_SYNC
|
||||
# define SPLIT_LED_STATE_ENABLE
|
||||
# ifdef WPM_ENABLE
|
||||
# define SPLIT_WPM_ENABLE
|
||||
# endif // WPM_ENABLE
|
||||
# ifdef OLED_ENABLE
|
||||
# define SPLIT_OLED_ENABLE
|
||||
# endif // OLED_ENABLE
|
||||
#endif // SPLIT_KEYBOARD
|
||||
|
||||
// Unicode entry mode
|
||||
#ifdef UNICODEMAP_ENABLE
|
||||
# define UNICODE_SELECTED_MODES UC_LNX
|
||||
// Adapt the unicode entry mode to dvorak
|
||||
# ifdef UNICODE_KEY_LNX
|
||||
# undef UNICODE_KEY_LNX
|
||||
# endif
|
||||
# define UNICODE_KEY_LNX LCTL(LSFT(KC_F))
|
||||
#endif // UNICODEMAP_ENABLE
|
||||
|
||||
// Mousekey mode
|
||||
#ifdef MOUSEKEY_ENABLE
|
||||
# define MK_COMBINED
|
||||
#endif // MOUSEKEY_ENABLE
|
||||
|
||||
// Tap-hold settings
|
||||
#define TAPPING_TERM 200
|
||||
#define TAP_CODE_DELAY 20
|
||||
#define IGNORE_MOD_TAP_INTERRUPT
|
||||
#define PERMISSIVE_HOLD
|
||||
#define TAPPING_FORCE_HOLD
|
||||
|
||||
// Backlight settings
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
# define BACKLIGHT_BREATHING
|
||||
# define BREATHING_PERIOD 5
|
||||
#endif // BACKLIGHT_ENABLE
|
||||
|
||||
// Audio definitions
|
||||
#ifdef AUDIO_ENABLE
|
||||
//# define AUDIO_ENABLE_TONE_MULTIPLEXING
|
||||
// Make findable songs as defaults
|
||||
# ifdef HOROLOGY
|
||||
# define STARTUP_SONG SONG(HOROLOGY)
|
||||
# endif
|
||||
# ifdef PEOPLE_VULTURES
|
||||
# define GOODBYE_SONG SONG(PEOPLE_VULTURES)
|
||||
# endif
|
||||
# ifdef NONAGON_INFINITY
|
||||
# define MUSIC_ON_SONG SONG(NONAGON_INFINITY)
|
||||
# endif
|
||||
# ifdef WAH_WAH
|
||||
# define MUSIC_OFF_SONG SONG(WAH_WAH)
|
||||
# endif
|
||||
// Audio code expects these to be defined
|
||||
# ifdef BIG_FIG_WASP
|
||||
# define GAME_ON_SONG SONG(BIG_FIG_WASP)
|
||||
# else
|
||||
# define GAME_ON_SONG SONG(USSR_ANTHEM)
|
||||
# endif
|
||||
# ifdef POLYGONDWANALAND
|
||||
# define GAME_OFF_SONG SONG(POLYGONDWANALAND)
|
||||
# else
|
||||
# define GAME_OFF_SONG SONG(NOCTURNE_OP_9_NO_1)
|
||||
# endif
|
||||
#endif // AUDIO_ENABLE
|
||||
|
||||
// OLED definitions
|
||||
#ifdef OLED_ENABLE
|
||||
// Timeout does not work for split secondary board; i implemented it myself
|
||||
# define OLED_TIMEOUT 30000
|
||||
// Fade out the screen when timing out
|
||||
# define OLED_FADE_OUT
|
||||
# define OLED_FADE_OUT_INTERVAL 15
|
||||
#endif // OLED_ENABLE
|
||||
|
||||
// For perkey leds
|
||||
#ifdef RGB_MATRIX_ENABLE
|
||||
// This is not working
|
||||
//# define RGB_MATRIX_TIMEOUT 1800000
|
||||
# define RGB_DISABLE_WHEN_USB_SUSPENDED true
|
||||
// Start using this mode
|
||||
# define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_RAINBOW_BEACON
|
||||
# define RGB_MATRIX_STARTUP_HUE 100
|
||||
# define RGB_MATRIX_STARTUP_SAT 255
|
||||
# define RGB_MATRIX_STARTUP_VAL RGB_MATRIX_MAXIMUM_BRIGHTNESS
|
||||
// Some config options
|
||||
# define RGB_MATRIX_KEYRELEASES
|
||||
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS // Enable framebuffer effects
|
||||
#endif // RGB_MATRIX_ENABLE
|
||||
@@ -1,4 +0,0 @@
|
||||
*.bmp
|
||||
splitImages
|
||||
templates
|
||||
!.gitignore
|
||||
@@ -1,38 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2021 Batuhan Başerdem
|
||||
# <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Goes through all the files and turns them into strips in their respective folder
|
||||
if [ -z "${1}" ] ; then
|
||||
echo 'No argument; defaulting to script directory.'
|
||||
target_dir="$(dirname "${0}")"
|
||||
elif [ -d "${1}" ] ; then
|
||||
echo "Targeting files in '${1}'."
|
||||
target_dir="${1}"
|
||||
else
|
||||
echo 'Argument is not directory.'
|
||||
exit 1
|
||||
fi
|
||||
|
||||
output_dir="${target_dir}/splitImages"
|
||||
mkdir -p "${output_dir}"
|
||||
|
||||
for this_image in "${target_dir}/"*.bmp ; do
|
||||
echo "Found '${this_image}'."
|
||||
this_name="$(basename "${this_image%%.bmp}")"
|
||||
convert "${this_image}" -crop 'x8' "${output_dir}/${this_name}"_%d.bmp
|
||||
done
|
||||
@@ -1,131 +0,0 @@
|
||||
# BBASERDEM userspace code for qmk
|
||||
|
||||
My userspace code for my various keyboards; available here.
|
||||
|
||||
## Builds
|
||||
|
||||
These are my keyboard builds and info, it allows me to plan out my builds.
|
||||
|
||||
### Planck SERVER
|
||||
|
||||
* Board: `kprepublic/jj40`
|
||||
* Microcontroller: Embedded
|
||||
* Layout: `ortho_4x12`
|
||||
* Functionality: Underglow RGB Lighting, LED diode lighting.
|
||||
* Case: Clear Acrylic Top and Bottow, with Frosted Acrylic Diffuser (Smashing Acrylics)
|
||||
* Switches: BOX Navy
|
||||
* Keycaps: Datamancer Tall Deco Typewriter Keycaps
|
||||
|
||||
Just a decorative planck replacement (for my rev4 PCB that died.)
|
||||
|
||||
### Planck Light
|
||||
|
||||
* Board: `planck/light`
|
||||
* Microcontroller: Embedded
|
||||
* Layout: `ortho_4x12`
|
||||
* Functionality: Per-key RGB Lighting, Audio.
|
||||
* Case: Clear Acrylic Top and Bottow, with Frosted Acrylic Diffuser (Smashing Acrylics)
|
||||
* Switches: BOX Navy
|
||||
* Keycaps: Datamancer Tall Deco Typewriter Keycaps
|
||||
|
||||
Just a decorative planck replacement (for my rev4 PCB that died.)
|
||||
|
||||
### Corne ARM
|
||||
|
||||
* Board: `crkbd/rev1`
|
||||
* Microcontroller: Proton C (x2)
|
||||
* Layout: `split_3x6_3`
|
||||
* Functionality: OLED, Audio, Per-key RGB Lighting, Rotary Encoder (x2)
|
||||
* Case: IMK Corne Case v2 Polycarbonate
|
||||
* Switches: Healios V2
|
||||
* Keycaps: POM Jelly
|
||||
|
||||
PCB is actually [Proton-C Compatible crkbd PCB](https://github.com/ItsWaffIe/waffle_corne).
|
||||
|
||||
### Corne Lite
|
||||
|
||||
* Board: `crkbd/rev1`
|
||||
* Microcontroller: Pro Micro (x2)
|
||||
* Layout: `split_3x5_3`
|
||||
* Functionality: Per-key RGB Lighting, OLED (No firmware space)
|
||||
* Case: Custom
|
||||
* Switches: Choc Low Burnt Orange
|
||||
* Keycaps: [Scooped Choc Keycaps](https://mkultra.click/collections/keycaps/products/scooped-choc-keycaps?variant=31223543365730)
|
||||
|
||||
Maybe try adding a trackpad for this, as detailed
|
||||
[here](https://github.com/manna-harbour/crkbd/blob/master/trackpoint/readme.org).
|
||||
|
||||
### Kyria
|
||||
|
||||
* Board: `splitkb/kyria/rev1`
|
||||
* Microcontroller: Pro Micro (x2)
|
||||
* Layout: `split_3x6_6`
|
||||
* Functionality: OLED, Underglow RGB Lighting (No firmware space), Rotary Encoder (x2)
|
||||
* Case: Matte Black Acrylic High-Profile case
|
||||
* Switches: Gateron Ink Silent Black
|
||||
* Keycaps: Oblotzky SA Oblivion
|
||||
|
||||
Main driver at work currently; love the switches and the board layout.
|
||||
|
||||
# Firmware building
|
||||
|
||||
## Archlinux
|
||||
|
||||
On archlinux, the package *arm-none-eabi-gcc* is too new.
|
||||
To fix; add to the environment `CFLAGS="-Wno-error=deprecated"` to compilation commands.
|
||||
Also; says to run `avr-gcc` version `8.4.0` for smaller firmware,
|
||||
but I find that it only saves a few bytes.
|
||||
|
||||
## Bootloader
|
||||
|
||||
Needed to type this out from the QMK website.
|
||||
If I want to flash a new bootloader for a machine; here are steps;
|
||||
|
||||
1. Flash the util/pro_micro_ISP_B6_10.hex to a spare promicro using;
|
||||
`avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:pro_micro_ISP_B6_10.hex`
|
||||
2. Wire the pins; (first is the ISP pro micro; second is the target)
|
||||
```
|
||||
Pro Micro 10 (B6) <-> Keyboard RESET
|
||||
Pro Micro 15 (B1) <-> Keyboard B1 (SCLK)
|
||||
Pro Micro 16 (B2) <-> Keyboard B2 (MOSI)
|
||||
Pro Micro 14 (B3) <-> Keyboard B3 (MISO)
|
||||
Pro Micro VCC <-> Keyboard VCC
|
||||
Pro Micro GND <-> Keyboard GND
|
||||
```
|
||||
I do have this on hand I believe; from massdrop's planck light firmware updater.
|
||||
3. Connect the flashed pro micro to my computer and run
|
||||
`avrdude -c avrisp -P "$(ls /dev/ttyACM*)" -p atmega32u4 -U flash:w:bootloader_atmega32u4_1.0.0.hex:i -U lfuse:w:0x5E:m -U hfuse:w:0xD9:m -U efuse:w:0xC3:m`
|
||||
|
||||
The avrisp here refers to the firmware on the ISP flasher pro micro.
|
||||
The `atmega32u4` refers to the CPU used in the respective breakout boards.
|
||||
The `avrdude` command interacts with catalina bootloader.
|
||||
The shell call after the `-P` flag auto finds the port that the pro micro connects to.
|
||||
The last few arguments are some jumpers apparently.
|
||||
|
||||
# Features
|
||||
|
||||
My userspace has a lot of shared code between different keyboards.
|
||||
These files are prefixed with `sbp-` to remove any naming clash.
|
||||
|
||||
* [bb-audio](bb-audio.c): Code dealing with audio playback using onboard sound.
|
||||
* [bb-encoder](bb-encoder.c): Rotary encoder sutff.
|
||||
* [bb-macro](bb-macro.c): My custom keycodes; macros, tap dances, etc.
|
||||
* [bb-oled](bb-oled.c): Controls OLED displays. For higher memory; there is also [bb-oled-extra](bb-oled-extra.c).
|
||||
* [bb-rgb](bb-rgb.c): Controls per-key RGB LED matrix stuff, and layer indication. Uses `RGB_MATRIX`.
|
||||
* [bb-underglaw](bb-underglow.c): Controls RGB LED strip, and layer indication. Uses `RGBLIGHT`.
|
||||
|
||||
# Layout
|
||||
|
||||
My personal layout is mostly inspired by the
|
||||
[Miryoku layout](../manna-harbour_miryoku/miryoku.org).
|
||||
There are some changes to make it friendlier to international keyboards.
|
||||
My board is compatible with software implementation of Dvorak and Turkish F.
|
||||
|
||||
## Base
|
||||
|
||||
Base layer uses tap-hold functionality to have access to modifiers.
|
||||
The modifiers are mirrored on each half of the layout;
|
||||
as to make those modifiers accessible to the keys that overlap them.
|
||||
Besides the Alt key; each side has the proper L/R version of the modifier.
|
||||
Since Right Alt key functions as AltGr key;
|
||||
both the L and R versions are available on each side.
|
||||
@@ -1,87 +0,0 @@
|
||||
# Copyright 2021 Batuhan Başerdem
|
||||
# <baserdem.batuhan@gmail.com> @bbaserdem
|
||||
#
|
||||
# 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/>.
|
||||
|
||||
# Common compilation flags
|
||||
LTO_ENABLE = yes
|
||||
|
||||
# These should be enabled in all boards
|
||||
MOUSEKEY_ENABLE = yes # Mouse emulation keys
|
||||
EXTRAKEY_ENABLE = yes # OS signals like volume control
|
||||
UNICODEMAP_ENABLE = yes # Used for unicode character emulation
|
||||
|
||||
# These should be disabled in all boards
|
||||
BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed
|
||||
CONSOLE_ENABLE = no # Allows console output with a command
|
||||
COMMAND_ENABLE = no # Some bootmagic thing i dont use
|
||||
SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested.
|
||||
MIDI_ENABLE = no # Midi driver (untested)
|
||||
UNICODE_ENABLE = no # We use unicodemap, not unicode
|
||||
UCIS_ENABLE = no # We use unicodemap, not ucis
|
||||
VARIABLE_TRACE = no # Allows debugging variables
|
||||
KEY_LOCK_ENABLE = no # Allows locking any key. Not used in general
|
||||
RGBLIGHT_ENABLE = no # LED strip, but there is RGB_MATRIX instead
|
||||
TAP_DANCE_ENABLE = no # Tap dance keys; i don't use tap dance
|
||||
|
||||
# These features can be disabled at whim
|
||||
NKRO_ENABLE ?= yes # Default is 6KRO
|
||||
VELOCIKEY_ENABLE ?= yes # Speed effects change with typing speed
|
||||
WPM_ENABLE ?= yes # Get WPM reports as you type
|
||||
|
||||
# Manually configure these on each keyboard individually
|
||||
# AUDIO_ENABLE # Audio stuff
|
||||
# BACKLIGHT_ENABLE # Switch LEDs
|
||||
# ENCODER_ENABLE # Rotary encoder
|
||||
# RGB_MATRIX_ENABLE # RGB LEDs
|
||||
# OLED_ENABLE # For OLED
|
||||
|
||||
# Userspace code
|
||||
SRC += bbaserdem.c
|
||||
|
||||
# Macros
|
||||
SRC += bb-macro.c
|
||||
|
||||
# Audio code
|
||||
ifeq ($(strip $(AUDIO_ENABLE)), yes)
|
||||
SRC += bb-audio.c
|
||||
endif
|
||||
|
||||
# Rotary encoder stuff
|
||||
ifeq ($(strip $(ENCODER_ENABLE)), yes)
|
||||
SRC += bb-encoder.c
|
||||
endif
|
||||
|
||||
# RGB LED (Underglow) code
|
||||
ifeq ($(strip $(RGBLIGHT_ENABLE)), yes)
|
||||
SRC += bb-underglow.c
|
||||
endif
|
||||
|
||||
# RGB LED (Perkey) code
|
||||
ifeq ($(strip $(RGB_MATRIX_ENABLE)), yes)
|
||||
SRC += bb-rgb.c
|
||||
endif
|
||||
|
||||
# Backlight code
|
||||
ifeq ($(strip $(BACKLIGHT_ENABLE)), yes)
|
||||
SRC += bb-backlight.c
|
||||
endif
|
||||
|
||||
# OLED code
|
||||
ifeq ($(strip $(OLED_ENABLE)), yes)
|
||||
SRC += bb-oled.c
|
||||
ifeq ($(strip $(CTPC)), yes)
|
||||
SRC += bb-oled-extra.c
|
||||
endif
|
||||
endif
|
||||
Reference in New Issue
Block a user