Merge branch 'cheapino' of github.com:tompi/qmk_firmware into cheapino

This commit is contained in:
Thomas Haukland 2023-05-11 23:38:14 +02:00
commit 9b9040430e
19 changed files with 552 additions and 40 deletions

View File

@ -23,7 +23,7 @@
"LSFT_T(KC_T)",
"KC_G",
"KC_M",
"LSFT_T(KC_N)",
"RSFT_T(KC_N)",
"LCTL_T(KC_E)",
"LALT_T(KC_I)",
"LGUI_T(KC_O)",

View File

@ -24,3 +24,5 @@ SPLIT_KEYBOARD = yes
# WS2812_DRIVER = pwm
MOUSEKEY_ENABLE = yes
EXTRAKEY_ENABLE = yes
CAPS_WORD_ENABLE = yes

View File

@ -0,0 +1,8 @@
#pragma once
#define HAL_USE_PWM TRUE
#define HAL_USE_PAL TRUE
#define HAL_USE_I2C TRUE
#include_next <halconf.h>

View File

@ -133,9 +133,9 @@ bool has_matrix_changed(matrix_row_t current_matrix[]) {
// OK, this is nasty, still not sure why its happening, but
// this 3 key combo leads to ghosting of the 4th(the one missing from correct)
static const uint16_t ghost1_row2 = 0B0000010000100000;
static const uint16_t ghost1_row3 = 0B0000100000100000;
static const matrix_row_t ghost1_row3_correct = 0B0000000000010000;
static const uint16_t ghost1_row2 = 0B0000010000100000;
static const uint16_t ghost1_row3 = 0B0000100000100000;
static const matrix_row_t ghost1_row3_correct = 0B0000100000000000;
void fix_ghosting_issue(matrix_row_t current_matrix[]) {
if (current_matrix[1] == ghost1_row2 && current_matrix[2] == ghost1_row3) {

View File

@ -0,0 +1,6 @@
#pragma once
#include_next <mcuconf.h>
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE

View File

@ -16,6 +16,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#define BOTH_SHIFTS_TURNS_ON_CAPS_WORD
// Set the mouse settings to a comfortable speed/accuracy trade-off,
// assuming a screen refresh rate of 60 Htz or higher
// The default is 50. This makes the mouse ~3 times faster and more accurate
@ -33,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MOUSEKEY_WHEEL_TIME_TO_MAX 100
// Pick good defaults for enabling homerow modifiers
#define TAPPING_TERM 280
#define TAPPING_TERM 230
// #define PERMISSIVE_HOLD
#define IGNORE_MOD_TAP_INTERRUPT
#define TAPPING_FORCE_HOLD

View File

@ -23,7 +23,7 @@
"LSFT_T(KC_T)",
"KC_G",
"KC_M",
"LSFT_T(KC_N)",
"RSFT_T(KC_N)",
"LCTL_T(KC_E)",
"LALT_T(KC_I)",
"LGUI_T(KC_O)",
@ -59,10 +59,10 @@
"KC_MS_R",
"KC_MUTE",
"KC_NO",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_VOLD",
"KC_MNXT",
"KC_MS_D",
@ -85,9 +85,9 @@
"KC_PGUP",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_BTN1",
"KC_BTN2",
"KC_BTN3",
"KC_NO",
"KC_NO",
"KC_LEFT",
@ -116,9 +116,9 @@
],
[
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_BTN3",
"KC_BTN2",
"KC_BTN1",
"KC_NO",
"KC_AT",
"KC_UNDS",
@ -151,8 +151,8 @@
"KC_TRNS"
],
[
"KC_EQL",
"KC_COLN",
"KC_TILD",
"KC_EXLM",
"KC_LT",
"KC_GT",
"KC_SCLN",
@ -165,7 +165,7 @@
"KC_RCBR",
"KC_LPRN",
"KC_RPRN",
"KC_AT",
"KC_PEQL",
"KC_NO",
"KC_TRNS",
"KC_TRNS",
@ -197,10 +197,10 @@
"KC_F8",
"KC_F9",
"KC_F10",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_TRNS",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_NO",
"KC_F4",
@ -229,9 +229,9 @@
"KC_NO",
"KC_NO",
"KC_PPLS",
"KC_7",
"KC_8",
"KC_9",
"KC_P7",
"KC_P8",
"KC_P9",
"KC_PAST",
"KC_TRNS",
"KC_TRNS",
@ -239,9 +239,9 @@
"KC_TRNS",
"KC_NO",
"KC_PMNS",
"KC_4",
"KC_5",
"KC_6",
"KC_P4",
"KC_P5",
"KC_P6",
"KC_PSLS",
"KC_NO",
"KC_NO",
@ -249,13 +249,13 @@
"KC_NO",
"KC_NO",
"KC_PDOT",
"KC_1",
"KC_2",
"KC_3",
"KC_P1",
"KC_P2",
"KC_P3",
"KC_PEQL",
"KC_NO",
"KC_NO",
"KC_0",
"KC_P0",
"KC_COMM"
]
],

View File

@ -20,7 +20,7 @@
//#define SERIAL_USART_TX_PIN B6 // USART TX pin
//#define SERIAL_USART_RX_PIN B7 // USART RX pin
#define EE_HANDS
//#define EE_HANDS
#define SOFT_SERIAL_PIN B14 // D0 or D1, D2, D3, E6
#define SELECT_SOFT_SERIAL_SPEED 2 // or 0, 2, 3, 4, 5
@ -31,7 +31,8 @@
// 4: about 26kbps
// 5: about 20kbps
#define CRC8_USE_TABLE
#define CRC8_OPTIMIZE_SPEED
/* Top left key on left half */
#define BOOTMAGIC_LITE_ROW 0
#define BOOTMAGIC_LITE_COLUMN 0
@ -40,6 +41,6 @@
#define BOOTMAGIC_LITE_COLUMN_RIGHT 4
#define DEVICE_VER 0x0001
#define AUDIO_PIN A1
//#define AUDIO_PIN A1
//#define AUDIO_PWM_DRIVER PWMD1
//#define AUDIO_PWM_CHANNEL 1

View File

@ -2,7 +2,7 @@
"version": 1,
"notes": "My awesome keymap",
"documentation": "\"This file is a QMK Configurator export. You can import this at <https://config.qmk.fm>. It can also be used directly with QMK's source code.\n\nTo setup your QMK environment check out the tutorial: <https://docs.qmk.fm/#/newbs>\n\nYou can convert this file to a keymap.c using this command: `qmk json2c {keymap}`\n\nYou can compile this keymap using this command: `qmk compile {keymap}`\"\n",
"keyboard": "bastardkb/skeletyl",
"keyboard": "bastardkb/skeletyl/blackpill",
"keymap": "default",
"layout": "LAYOUT_split_3x5_3",
"layers": [
@ -23,7 +23,7 @@
"LSFT_T(KC_T)",
"KC_G",
"KC_M",
"LSFT_T(KC_N)",
"RSFT_T(KC_N)",
"LCTL_T(KC_E)",
"LALT_T(KC_I)",
"LGUI_T(KC_O)",

View File

@ -2,8 +2,8 @@ BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
SPLIT_KEYBOARD = yes
SERIAL_DRIVER = bitbang
AUDIO_ENABLE = yes
AUDIO_DRIVER = pwm_software
#AUDIO_ENABLE = yes
#AUDIO_DRIVER = pwm_software
# Bootloader selection
BOOTLOADER = stm32-dfu
@ -11,3 +11,4 @@ BOOTLOADER = stm32-dfu
CONSOLE_ENABLE = yes
DEBOUNCE_TYPE = asym_eager_defer_pk
CAPS_WORD_ENABLE = yes

79
keyboards/zompi/config.h Normal file
View File

@ -0,0 +1,79 @@
/*
* Copyright 2022 Thomas.Haukland@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "config_common.h"
#define VENDOR_ID 0xA8F8
#define PRODUCT_ID 0x1830
#define DEVICE_VER 0x0001
#define MANUFACTURER "tompi"
#define PRODUCT "Zompi"
#define SOFT_SERIAL_PIN GP0
#define CRC8_USE_TABLE
#define CRC8_OPTIMIZE_SPEED
//#define MASTER_RIGHT
#define MATRIX_ROWS 8
#define MATRIX_COLS 5
#define MATRIX_ROW_PINS { GP9, GP10, GP4, GP5 }
#define MATRIX_COL_PINS { GP6, GP7, GP8, GP11, GP12 }
#ifdef OLED_ENABLE
# define OLED_DISPLAY_128X32
#define I2C1_SCL_PIN GP3
#define I2C1_SDA_PIN GP2
#define I2C_DRIVER I2CD2
#define OLED_BRIGHTNESS 128
//#define OLED_FONT_H "keyboards/mlego/m65/lib/glcdfont.c"
#endif
#ifdef RGB_MATRIX_ENABLE
# define RGBLED_NUM 6
# define RGBLED_SPLIT { 3,3 }
# define RGB_DI_PIN GP14
# define DRIVER_LED_TOTAL 6
/* Enable Framebuffer and keypress effects */
# define RGB_MATRIX_FRAMEBUFFER_EFFECTS
# define RGB_MATRIX_KEYPRESSES
# define ENABLE_RGB_MATRIX_ALPHAS_MODS
# define ENABLE_RGB_MATRIX_GRADIENT_UP_DOWN
# define ENABLE_RGB_MATRIX_GRADIENT_LEFT_RIGHT
# define ENABLE_RGB_MATRIX_BREATHING
# define ENABLE_RGB_MATRIX_HUE_BREATHING
# define ENABLE_RGB_MATRIX_PIXEL_RAIN
# define ENABLE_RGB_MATRIX_PIXEL_FLOW
# define ENABLE_RGB_MATRIX_PIXEL_FRACTAL
# define ENABLE_RGB_MATRIX_TYPING_HEATMAP
# define ENABLE_RGB_MATRIX_DIGITAL_RAIN
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS
# define ENABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS
# define ENABLE_RGB_MATRIX_SPLASH
# define ENABLE_RGB_MATRIX_MULTISPLASH
# define ENABLE_RGB_MATRIX_SOLID_SPLASH
# define ENABLE_RGB_MATRIX_SOLID_MULTISPLASH
#endif

27
keyboards/zompi/halconf.h Normal file
View File

@ -0,0 +1,27 @@
/* Copyright 2020 QMK
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* This file was auto-generated by:
* `qmk chibios-confmigrate -i keyboards/handwired/onekey/blackpill_f401/halconf.h -r platforms/chibios/common/configs/halconf.h`
*/
#pragma once
#define HAL_USE_I2C TRUE
#include_next <halconf.h>

73
keyboards/zompi/info.json Normal file
View File

@ -0,0 +1,73 @@
{
"keyboard_name": "Zompi",
"url": "https://github.com/tompi/qmk_firmware/tree/develop",
"maintainer": "Thomas Haukland",
"bootloader": "rp2040",
"debounce": 5,
"diode_direction": "COL2ROW",
"encoder": {
"enabled": true,
"rotary": [
{
"pin_a": "GP24",
"pin_b": "GP25",
"resolution": 4
}
]
},
"features": {
"audio": false,
"backlight": false,
"bootmagic": true,
"command": false,
"console": true,
"encoder": true,
"extrakey": true,
"mousekey": true,
"nkro": true,
"oled": true,
"wpm": true
},
"layouts": {
"LAYOUT_split_3x5_3": {
"layout": [
{"label":"L00", "x":0, "y":0},
{"label":"L01", "x":1, "y":0},
{"label":"L02", "x":2, "y":0},
{"label":"L03", "x":3, "y":0},
{"label":"L04", "x":4, "y":0},
{"label":"R00", "x":11, "y":0},
{"label":"R01", "x":12, "y":0},
{"label":"R02", "x":13, "y":0},
{"label":"R03", "x":14, "y":0},
{"label":"R04", "x":15, "y":0},
{"label":"L10", "x":0, "y":1},
{"label":"L11", "x":1, "y":1},
{"label":"L12", "x":2, "y":1},
{"label":"L13", "x":3, "y":1},
{"label":"L14", "x":4, "y":1},
{"label":"R10", "x":11, "y":1},
{"label":"R11", "x":12, "y":1},
{"label":"R12", "x":13, "y":1},
{"label":"R13", "x":14, "y":1},
{"label":"R14", "x":15, "y":1},
{"label":"L20", "x":0, "y":2},
{"label":"L21", "x":1, "y":2},
{"label":"L22", "x":2, "y":2},
{"label":"L23", "x":3, "y":2},
{"label":"L24", "x":4, "y":2},
{"label":"R20", "x":11, "y":2},
{"label":"R21", "x":12, "y":2},
{"label":"R22", "x":13, "y":2},
{"label":"R23", "x":14, "y":2},
{"label":"R24", "x":15, "y":2},
{"label":"L33", "x":4, "y":3},
{"label":"L34", "x":5, "y":3},
{"label":"L31", "x":6, "y":3},
{"label":"R33", "x":9, "y":3},
{"label":"R34", "x":10, "y":3},
{"label":"R31", "x":11, "y":3}
]
}
}
}

View File

@ -0,0 +1,72 @@
/*
*
* 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
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x5_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
// KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
RGB_MOD, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RGB_MOD,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC , MO(1), MO(2), KC_ENT , KC_RALT
//`--------------------------' `--------------------------'
),
[1] = LAYOUT_split_3x5_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, _______, MO(3), KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[2] = LAYOUT_split_3x5_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, MO(3), _______, KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
),
[3] = LAYOUT_split_3x5_3(
//,-----------------------------------------------------. ,-----------------------------------------------------.
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
//|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
KC_LGUI, KC_SPC, _______, _______, KC_ENT, KC_RALT
//`--------------------------' `--------------------------'
)
};

View File

@ -0,0 +1,6 @@
#pragma once
#include_next "mcuconf.h"
#undef RP_I2C_USE_I2C1
#define RP_I2C_USE_I2C1 TRUE

11
keyboards/zompi/readme.md Normal file
View File

@ -0,0 +1,11 @@
# Zompi
My experiment with qmk and the rp2040-zero.
Blingy split keyboard using audio, leds and rotary encoders, because these
things are essentials, right?
Make example for this keyboard (after setting up your build environment):
make zompi:default

26
keyboards/zompi/rules.mk Normal file
View File

@ -0,0 +1,26 @@
# MCU name
MCU = RP2040
# Bootloader selection
BOOTLOADER = rp2040
# Build Options
# change yes to no to disable
#
RGB_MATRIX_ENABLE = yes # Enable keyboard RGB matrix (do not use together with RGBLIGHT_ENABLE)
RGB_MATRIX_DRIVER = WS2812 # RGB matrix driver support
WS2812_DRIVER = vendor
SPLIT_KEYBOARD = yes
LTO_ENABLE = yes
AUDIO_SUPPORTED = no
RGB_MATRIX_SUPPORTED = yes
#RGBLIGHT_ENABLE = yes
##BACKLIGHT_ENABLE = yes
SERIAL_DRIVER = vendor
LAYOUTS = split_3x5_3
OLED_DRIVER = SSD1306
# Project specific files
#QUANTUM_LIB_SRC += spi_master.c

158
keyboards/zompi/zompi.c Normal file
View File

@ -0,0 +1,158 @@
/*
* Copyright 2022 Thomas.Haukland@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "zompi.h"
#ifdef RGB_MATRIX
led_config_t g_led_config = { {
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 },
{ 1, 2, 1, 1, 1 }
}, {
{ 85, 16 }, { 50, 13 }, { 16, 20 }, { 16, 38 }, { 50, 48 }, { 85, 52 }
}, {
4, 4, 4, 4, 4, 4
} };
#endif
#ifdef OLED_ENABLE
static void render_logo(void) {
static const char PROGMEM raw_logo[] = {
0x00, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8,
0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0xf8, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x7c, 0xfe, 0xfe, 0xfe, 0xfc, 0x7c, 0x38, 0x00,
0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0xc1, 0xe1, 0xf1, 0xf9, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x7f,
0x3f, 0x1f, 0x0f, 0x07, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfc,
0xfc, 0xfe, 0x7e, 0x7e, 0x7e, 0x3e, 0x7e, 0x7e, 0x7e, 0xfe, 0xfc, 0xfc, 0xfc, 0xf8, 0xf0, 0xe0,
0xc0, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xf8, 0x7c, 0x7c, 0x3e,
0x3e, 0x7e, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xfc, 0xf8, 0xf8, 0xf8, 0x7c, 0x7c, 0x3e, 0x3e, 0x7e,
0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0xfc, 0xf8, 0xe0, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe,
0xfe, 0xfe, 0xfe, 0xfc, 0x7c, 0x7e, 0x7e, 0x3e, 0x7e, 0x7e, 0x7e, 0xfe, 0xfe, 0xfc, 0xfc, 0xf8,
0xf8, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfe, 0xfc, 0x00,
0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xf7, 0xf3, 0xf0, 0xf0,
0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0x00, 0x02, 0x1f, 0x3f, 0x7f, 0xff, 0xff, 0xff,
0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xe0, 0xf0, 0xf0, 0xf0, 0xfd, 0xff, 0xff, 0xff, 0xff, 0x7f, 0x3f,
0x1f, 0x07, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0xf0, 0xf0, 0xf0, 0xe0, 0xe0, 0xf0, 0xf0, 0xf8, 0xff, 0xff, 0xff, 0xff,
0xff, 0x7f, 0x3f, 0x0f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03,
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01,
0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff,
0xff, 0xff, 0xff, 0xff, 0x01, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x01, 0x01, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00
};
oled_write_raw_P(raw_logo, sizeof(raw_logo));
}
enum layers {
_QWERTY = 0,
_LOWER,
_RAISE,
_ADJUST,
};
static void render_status(void) {
render_logo();
return;
// Host Keyboard Layer Status
oled_write_P(PSTR("Layer: "), false);
switch (get_highest_layer(layer_state)) {
case _QWERTY:
oled_write_P(PSTR("Default\n"), false);
break;
case _LOWER:
oled_write_P(PSTR("Lower\n"), false);
break;
case _RAISE:
oled_write_P(PSTR("Raise\n"), false);
break;
case _ADJUST:
oled_write_P(PSTR("Adjust\n"), false);
break;
default:
oled_write_P(PSTR("Undefined\n"), false);
}
// Host Keyboard LED Status
led_t led_state = host_keyboard_led_state();
oled_write_P(led_state.num_lock ? PSTR("NUMLCK ") : PSTR(" "), false);
oled_write_P(led_state.caps_lock ? PSTR("CAPLCK ") : PSTR(" "), false);
oled_write_P(led_state.scroll_lock ? PSTR("SCRLCK ") : PSTR(" "), false);
}
bool oled_task_kb(void) {
if (!oled_task_user()) { return false; }
if (is_keyboard_left()) {
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
} else {
render_logo();
}
return true;
}
#endif
/* The encoder_update_user is a function.
* It'll be called by QMK every time you turn the encoder.
*
* The index parameter tells you which encoder was turned. If you only have
* one encoder, the index will always be zero.
*
* The clockwise parameter tells you the direction of the encoder. It'll be
* true when you turned the encoder clockwise, and false otherwise.
*/
bool encoder_update_user(uint8_t index, bool clockwise) {
/* With an if statement we can check which encoder was turned. */
if (index == 0) { /* First encoder */
/* And with another if statement we can check the direction. */
if (clockwise) {
/* This is where the actual magic happens: this bit of code taps on the
Page Down key. You can do anything QMK allows you to do here.
You'll want to replace these lines with the things you want your
encoders to do. */
tap_code(KC_PGDN);
} else {
/* And likewise for the other direction, this time Page Down is pressed. */
tap_code(KC_PGUP);
}
/* You can copy the code and change the index for every encoder you have. Most
keyboards will only have two, so this piece of code will suffice. */
} else if (index == 1) { /* Second encoder */
if (clockwise) {
tap_code(KC_UP);
} else {
tap_code(KC_DOWN);
}
}
return false;
}

39
keyboards/zompi/zompi.h Normal file
View File

@ -0,0 +1,39 @@
/*
* Copyright 2022 Thomas.Haukland@gmail.com
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "quantum.h"
// clang-format off
#define LAYOUT_split_3x5_3( \
k00, k01, k02, k03, k04, k44, k43, k42, k41, k40, \
k10, k11, k12, k13, k14, k54, k53, k52, k51, k50, \
k20, k21, k22, k23, k24, k64, k63, k62, k61, k60, \
k32, k33, k30, k70, k73, k72 \
) \
{ \
{ k00, k01, k02, k03, k04 }, \
{ k10, k11, k12, k13, k14 }, \
{ k20, k21, k22, k23, k24 }, \
{ k30, KC_NO, k32, k33, KC_NO }, \
{ k40, k41, k42, k43, k44 }, \
{ k50, k51, k52, k53, k54 }, \
{ k60, k61, k62, k63, k64 }, \
{ k70, KC_NO, k72, k73, KC_NO }, \
}
// clang-format on
//