* Keyboard: add treeadstone48 * rename layout defines * Use of pragma once * move common include code * fixed info.json * change keymap layout from kc to normal * fix alpha revision keymap * fixed info.json * remove USE_Link_Time_Optimization * Add keyboard the Rhymestone * fixed by PR review * fixed by review * Update keyboards/rhymestone/readme.md fixed * Fixed possible changes to oled_write_P * Change the name of the layout definition * Update keyboards/rhymestone/info.json * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/default/keymap.c * Update keyboards/rhymestone/keymaps/switch_tester/keymap.c * Update keyboards/rhymestone/keymaps/switch_tester/keymap.c * Update keyboards/rhymestone/rev1/rev1.h * add empty rules.mk in rev1 * Update from other review * Update keyboards/rhymestone/rules.mk * fixed other review * move rhymestone to marksard directory * move rhymestone to marksard directory (Commit the necessary modifications) * removepull/10243/head 0.10.4
@ -0,0 +1,233 @@ | |||
// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. | |||
// See gfxfont.h for newer custom bitmap font info. | |||
#include "progmem.h" | |||
// Standard ASCII 5x7 font | |||
static const unsigned char font[] PROGMEM = { | |||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |||
0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, | |||
0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, | |||
0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, | |||
0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, | |||
0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, | |||
0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, | |||
0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, | |||
0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, | |||
0x00, 0x18, 0x24, 0x18, 0x00, 0x00, | |||
0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, | |||
0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, | |||
0x26, 0x29, 0x79, 0x29, 0x26, 0x00, | |||
0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, | |||
0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, | |||
0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, | |||
0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, | |||
0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, | |||
0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, | |||
0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, | |||
0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, | |||
0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, | |||
0x60, 0x60, 0x60, 0x60, 0x60, 0x00, | |||
0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, | |||
0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, | |||
0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, | |||
0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, | |||
0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, | |||
0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, | |||
0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, | |||
0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, | |||
0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, | |||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |||
0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, | |||
0x00, 0x07, 0x00, 0x07, 0x00, 0x00, | |||
0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, | |||
0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, | |||
0x23, 0x13, 0x08, 0x64, 0x62, 0x00, | |||
0x36, 0x49, 0x56, 0x20, 0x50, 0x00, | |||
0x00, 0x08, 0x07, 0x03, 0x00, 0x00, | |||
0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, | |||
0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, | |||
0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, | |||
0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, | |||
0x00, 0x80, 0x70, 0x30, 0x00, 0x00, | |||
0x08, 0x08, 0x08, 0x08, 0x08, 0x00, | |||
0x00, 0x00, 0x60, 0x60, 0x00, 0x00, | |||
0x20, 0x10, 0x08, 0x04, 0x02, 0x00, | |||
0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, | |||
0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, | |||
0x72, 0x49, 0x49, 0x49, 0x46, 0x00, | |||
0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, | |||
0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, | |||
0x27, 0x45, 0x45, 0x45, 0x39, 0x00, | |||
0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, | |||
0x41, 0x21, 0x11, 0x09, 0x07, 0x00, | |||
0x36, 0x49, 0x49, 0x49, 0x36, 0x00, | |||
0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, | |||
0x00, 0x00, 0x14, 0x00, 0x00, 0x00, | |||
0x00, 0x40, 0x34, 0x00, 0x00, 0x00, | |||
0x00, 0x08, 0x14, 0x22, 0x41, 0x00, | |||
0x14, 0x14, 0x14, 0x14, 0x14, 0x00, | |||
0x00, 0x41, 0x22, 0x14, 0x08, 0x00, | |||
0x02, 0x01, 0x59, 0x09, 0x06, 0x00, | |||
0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, | |||
0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, | |||
0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, | |||
0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, | |||
0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, | |||
0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, | |||
0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, | |||
0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, | |||
0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, | |||
0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, | |||
0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, | |||
0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, | |||
0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, | |||
0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, | |||
0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, | |||
0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, | |||
0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, | |||
0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, | |||
0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, | |||
0x26, 0x49, 0x49, 0x49, 0x32, 0x00, | |||
0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, | |||
0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, | |||
0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, | |||
0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, | |||
0x63, 0x14, 0x08, 0x14, 0x63, 0x00, | |||
0x03, 0x04, 0x78, 0x04, 0x03, 0x00, | |||
0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, | |||
0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, | |||
0x02, 0x04, 0x08, 0x10, 0x20, 0x00, | |||
0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, | |||
0x04, 0x02, 0x01, 0x02, 0x04, 0x00, | |||
0x40, 0x40, 0x40, 0x40, 0x40, 0x00, | |||
0x00, 0x03, 0x07, 0x08, 0x00, 0x00, | |||
0x20, 0x54, 0x54, 0x78, 0x40, 0x00, | |||
0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, | |||
0x38, 0x44, 0x44, 0x44, 0x28, 0x00, | |||
0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, | |||
0x38, 0x54, 0x54, 0x54, 0x18, 0x00, | |||
0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, | |||
0x18, 0x24, 0x24, 0x1C, 0x78, 0x00, | |||
0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, | |||
0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, | |||
0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, | |||
0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, | |||
0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, | |||
0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, | |||
0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, | |||
0x38, 0x44, 0x44, 0x44, 0x38, 0x00, | |||
0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, | |||
0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, | |||
0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, | |||
0x48, 0x54, 0x54, 0x54, 0x24, 0x00, | |||
0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, | |||
0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, | |||
0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, | |||
0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, | |||
0x44, 0x28, 0x10, 0x28, 0x44, 0x00, | |||
0x4C, 0x10, 0x10, 0x10, 0x7C, 0x00, | |||
0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, | |||
0x00, 0x08, 0x36, 0x41, 0x00, 0x00, | |||
0x00, 0x00, 0x77, 0x00, 0x00, 0x00, | |||
0x00, 0x41, 0x36, 0x08, 0x00, 0x00, | |||
0x02, 0x01, 0x02, 0x04, 0x02, 0x00, | |||
0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, | |||
0x00, 0x00, 0xD8, 0xDE, 0xDE, 0xDE, | |||
0x1E, 0x1E, 0x1E, 0x1E, 0xFE, 0xFE, | |||
0xFE, 0xFE, 0x00, 0xF0, 0xFF, 0xFF, | |||
0xFF, 0xE3, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0x00, 0x80, 0xE0, 0xE0, | |||
0xE0, 0x00, 0x00, 0x00, 0x00, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0x00, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0x00, 0xC0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0x00, 0x80, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0x00, 0xFC, | |||
0xFC, 0xFC, 0xFC, 0xE0, 0xE0, 0x80, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xC0, 0x00, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 0x80, | |||
0x00, 0xC0, 0xE0, 0xE0, 0xE0, 0xE0, | |||
0xE0, 0xE0, 0xE0, 0xE0, 0xE0, 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, | |||
0x80, 0xFE, 0xFF, 0xFF, 0x7F, 0x0F, | |||
0x0E, 0x0E, 0xCE, 0xFF, 0xFF, 0xFF, | |||
0x7F, 0x80, 0xFE, 0xFF, 0xFF, 0x3F, | |||
0x01, 0x01, 0x01, 0x81, 0xFF, 0xFF, | |||
0xFF, 0x3F, 0xE0, 0xFF, 0xFF, 0xFF, | |||
0x8F, 0x80, 0x80, 0x80, 0xF8, 0xFF, | |||
0xFF, 0x7F, 0xC1, 0xFE, 0xFF, 0xFF, | |||
0x1F, 0x01, 0x01, 0xE1, 0xFF, 0xFF, | |||
0xFF, 0x0F, 0x01, 0x01, 0xF1, 0xFF, | |||
0xFF, 0xFF, 0x07, 0xFC, 0xFF, 0xFF, | |||
0xFF, 0x9D, 0x9D, 0x9D, 0x9D, 0x9F, | |||
0x9F, 0x9F, 0x1F, 0x80, 0x9F, 0x9F, | |||
0x9F, 0x9F, 0x9D, 0x9D, 0xDD, 0xFD, | |||
0xFD, 0xFD, 0x39, 0xC0, 0xFF, 0xFF, | |||
0xFF, 0x9F, 0x81, 0x01, 0xF1, 0xFF, | |||
0xFF, 0xFF, 0x87, 0x81, 0x81, 0x81, | |||
0xF9, 0xFF, 0xFF, 0xFF, 0x03, 0xFC, | |||
0xFF, 0xFF, 0x3F, 0x01, 0x01, 0x01, | |||
0x01, 0xFF, 0xFF, 0xFF, 0x7F, 0xC0, | |||
0xFF, 0xFF, 0xFF, 0x9F, 0x9D, 0x9D, | |||
0x9D, 0x9D, 0x9F, 0x9F, 0x1F, 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, | |||
0x07, 0x07, 0x07, 0x07, 0x00, 0x00, | |||
0x00, 0x00, 0x07, 0x07, 0x07, 0x07, | |||
0x00, 0x07, 0x07, 0x07, 0x07, 0x00, | |||
0x00, 0x00, 0x00, 0x07, 0x07, 0x07, | |||
0x07, 0x60, 0x73, 0x77, 0x77, 0x77, | |||
0x77, 0x77, 0x77, 0x7F, 0x7F, 0x7F, | |||
0x1F, 0x00, 0x07, 0x07, 0x07, 0x07, | |||
0x00, 0x00, 0x00, 0x07, 0x07, 0x07, | |||
0x03, 0x00, 0x00, 0x00, 0x07, 0x07, | |||
0x07, 0x01, 0x00, 0x07, 0x07, 0x07, | |||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, | |||
0x07, 0x00, 0x00, 0x07, 0x07, 0x07, | |||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, | |||
0x07, 0x03, 0x00, 0x03, 0x07, 0x07, | |||
0x07, 0x07, 0x07, 0x00, 0x03, 0x07, | |||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, | |||
0x07, 0x07, 0x03, 0x00, 0x07, 0x07, | |||
0x07, 0x07, 0x00, 0x00, 0x00, 0x00, | |||
0x07, 0x07, 0x07, 0x07, 0x00, 0x03, | |||
0x07, 0x07, 0x07, 0x07, 0x07, 0x07, | |||
0x07, 0x07, 0x07, 0x07, 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, | |||
}; |
@ -0,0 +1,87 @@ | |||
#ifdef OLED_DRIVER_ENABLE | |||
#include QMK_KEYBOARD_H | |||
#include <stdio.h> | |||
#include <string.h> | |||
void render_logo(void) { | |||
static const char PROGMEM logo_buf[]={ | |||
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_write_P(logo_buf, false); | |||
} | |||
void render_lock_status(void) { | |||
// Host Keyboard LED Status | |||
led_t led_state = host_keyboard_led_state(); | |||
oled_write_P(PSTR("Lock:"), false); | |||
if (led_state.num_lock) { | |||
oled_write_P(PSTR("Num "), false); | |||
} | |||
if (led_state.caps_lock) { | |||
oled_write_P(PSTR("Caps "), false); | |||
} | |||
if (led_state.scroll_lock) { | |||
oled_write_P(PSTR("Scrl"), false); | |||
} | |||
oled_write_P(PSTR("\n"), false); | |||
} | |||
static char keylog_buf[24] = "Key state ready.\n"; | |||
const char code_to_name[60] = { | |||
' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', | |||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', | |||
'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', | |||
'1', '2', '3', '4', '5', '6', '7', '8', '9', '0', | |||
'R', 'E', 'B', 'T', ' ', '-', ' ', '@', ' ', ' ', | |||
' ', ';', ':', ' ', ',', '.', '/', ' ', ' ', ' '}; | |||
void update_key_status(uint16_t keycode, keyrecord_t *record) { | |||
if (!record->event.pressed) return; | |||
char name = (keycode < 60) ? code_to_name[keycode] : ' '; | |||
snprintf(keylog_buf, sizeof(keylog_buf) - 1, "Key:%dx%d %2x %c\n", | |||
record->event.key.row, record->event.key.col, | |||
(uint16_t)keycode, name); | |||
} | |||
void render_key_status(void) { | |||
oled_write(keylog_buf, false); | |||
} | |||
#ifdef RGBLIGHT_ENABLE | |||
extern rgblight_config_t rgblight_config; | |||
static char led_buf[24] = "LED state ready.\n"; | |||
rgblight_config_t rgblight_config_bak; | |||
void update_led_status(void) { | |||
if (rgblight_config_bak.enable != rgblight_config.enable || | |||
rgblight_config_bak.mode != rgblight_config.mode || | |||
rgblight_config_bak.hue != rgblight_config.hue || | |||
rgblight_config_bak.sat != rgblight_config.sat || | |||
rgblight_config_bak.val != rgblight_config.val | |||
) { | |||
snprintf(led_buf, sizeof(led_buf) - 1, "LED%c:%2d hsv:%2d %2d %2d\n", | |||
rgblight_config.enable ? '*' : '.', (uint8_t)rgblight_config.mode, | |||
(uint8_t)(rgblight_config.hue / RGBLIGHT_HUE_STEP), | |||
(uint8_t)(rgblight_config.sat / RGBLIGHT_SAT_STEP), | |||
(uint8_t)(rgblight_config.val / RGBLIGHT_VAL_STEP)); | |||
rgblight_config_bak = rgblight_config; | |||
} | |||
} | |||
void render_led_status(void) { | |||
oled_write(led_buf, false); | |||
} | |||
#endif | |||
#endif |
@ -0,0 +1,32 @@ | |||
#ifdef OLED_DRIVER_ENABLE | |||
void render_logo(void); | |||
void render_lock_status(void); | |||
void update_key_status(uint16_t keycode, keyrecord_t *record); | |||
void render_key_status(void); | |||
#define RENDER_LOGO() render_logo() | |||
#define RENDER_LOCK_STATUS() render_lock_status() | |||
#define UPDATE_KEY_STATUS(a, b) update_key_status(a, b) | |||
#define RENDER_KEY_STATUS() render_key_status() | |||
#ifdef RGBLIGHT_ENABLE | |||
void update_led_status(void); | |||
void render_led_status(void); | |||
#define UPDATE_LED_STATUS() update_led_status() | |||
#define RENDER_LED_STATUS() render_led_status() | |||
#else | |||
#define UPDATE_LED_STATUS() | |||
#define RENDER_LED_STATUS() | |||
#endif | |||
#else | |||
#define RENDER_LOGO() | |||
#define RENDER_LOCK_STATUS() | |||
#define UPDATE_KEY_STATUS(a, b) | |||
#define RENDER_KEY_STATUS() | |||
#define UPDATE_LED_STATUS() | |||
#define RENDER_LED_STATUS() | |||
#endif |
@ -0,0 +1,213 @@ | |||
{ | |||
"keyboard_name": "Rhymestone", | |||
"url": "https://github.com/marksard/Keyboards", | |||
"maintainer": "marksard", | |||
"width": 11, | |||
"height": 4, | |||
"layouts": { | |||
"LAYOUT_ortho_4x10": { | |||
"layout": [ | |||
{ | |||
"label": "Q", | |||
"x": 0, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "W", | |||
"x": 1, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "E", | |||
"x": 2, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "R", | |||
"x": 3, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "T", | |||
"x": 4, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "Y", | |||
"x": 6, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "U", | |||
"x": 7, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "I", | |||
"x": 8, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "O", | |||
"x": 9, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "P", | |||
"x": 10, | |||
"y": 0 | |||
}, | |||
{ | |||
"label": "A", | |||
"x": 0, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "S", | |||
"x": 1, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "D", | |||
"x": 2, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "F", | |||
"x": 3, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "G", | |||
"x": 4, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "H", | |||
"x": 6, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "J", | |||
"x": 7, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "K", | |||
"x": 8, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "L", | |||
"x": 9, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "Enter", | |||
"x": 10, | |||
"y": 1 | |||
}, | |||
{ | |||
"label": "Z", | |||
"x": 0, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "X", | |||
"x": 1, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "C", | |||
"x": 2, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "V", | |||
"x": 3, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "B", | |||
"x": 4, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "N", | |||
"x": 6, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "M", | |||
"x": 7, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": ",", | |||
"x": 8, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": ".", | |||
"x": 9, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "/", | |||
"x": 10, | |||
"y": 2 | |||
}, | |||
{ | |||
"label": "Ctrl", | |||
"x": 0, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "Win", | |||
"x": 1, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "Alt", | |||
"x": 2, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "Lower", | |||
"x": 3, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "backspace", | |||
"x": 4, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "space", | |||
"x": 6, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "Upper", | |||
"x": 7, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "Alt", | |||
"x": 8, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "App", | |||
"x": 9, | |||
"y": 3 | |||
}, | |||
{ | |||
"label": "Ctrl", | |||
"x": 10, | |||
"y": 3 | |||
} | |||
] | |||
} | |||
} | |||
} |
@ -0,0 +1,27 @@ | |||
/* Copyright 2020 marksard | |||
* | |||
* 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 | |||
// place overrides here | |||
// If you use the HashTwenty(alpha), please enable USE_HASHTWENTY | |||
// #define USE_HASHTWENTY | |||
// If you plug in the USB on the right side, please enable MASTER_RIGHT | |||
// #define MASTER_RIGHT | |||
#define OLED_FONT_H "keyboards/rhymestone/common/glcdfont.c" |
@ -0,0 +1,226 @@ | |||
/* Copyright 2020 marksard | |||
* | |||
* 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 "./common/oled_helper.h" | |||
enum layer_number { | |||
_BASE, | |||
_LOWER, | |||
_RAISE, | |||
_ADJUST, | |||
}; | |||
enum custom_keycodes { | |||
LOWER = SAFE_RANGE, | |||
RAISE, | |||
ADJUST, | |||
KANJI, | |||
RGBRST | |||
}; | |||
// Base layer mod tap | |||
#define KC_Z_SF LSFT_T(KC_Z) | |||
#define KC_SLSF RSFT_T(KC_SLSH) | |||
// Lower layer mod tap | |||
#define KC_11SF LSFT_T(KC_F11) | |||
#define KC_GRSF RSFT_T(KC_GRV) | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[_BASE] = LAYOUT_ortho_4x10( | |||
//,---------------------------------------------------------------------------------------------------. | |||
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_ENT, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
KC_Z_SF, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSF, | |||
//`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' | |||
KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_BSPC, KC_SPC, RAISE, KC_RGUI, KC_APP, KC_RCTL | |||
//,---------------------------------------------------------------------------------------------------. | |||
), | |||
[_LOWER] = LAYOUT_ortho_4x10( | |||
//,---------------------------------------------------------------------------------------------------. | |||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, XXXXXXX, XXXXXXX, XXXXXXX, KC_SCLN, KC_QUOT, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
KC_11SF, KC_F12, KC_ESC, KC_TAB, KANJI, KC_DEL, XXXXXXX, XXXXXXX, KC_RO, KC_GRSF, | |||
//`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' | |||
_______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ | |||
//,---------------------------------------------------------------------------------------------------. | |||
), | |||
[_RAISE] = LAYOUT_ortho_4x10( | |||
//,---------------------------------------------------------------------------------------------------. | |||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RSFT, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_RO, KC_COMM, KC_DOT, KC_SLSF, | |||
//`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
//,---------------------------------------------------------------------------------------------------. | |||
), | |||
[_ADJUST] = LAYOUT_ortho_4x10( | |||
//,---------------------------------------------------------------------------------------------------. | |||
RESET, RGBRST, AG_NORM, AG_SWAP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, KC_PSCR, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_NLCK, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_BTN1, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' | |||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______ | |||
//,---------------------------------------------------------------------------------------------------. | |||
) | |||
}; | |||
#define L_BASE _BASE | |||
#define L_LOWER (1<<_LOWER) | |||
#define L_RAISE (1<<_RAISE) | |||
#define L_ADJUST (1<<_ADJUST) | |||
#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) | |||
#ifdef OLED_DRIVER_ENABLE | |||
#include <stdio.h> | |||
#include <string.h> | |||
typedef struct { | |||
uint8_t state; | |||
char name[8]; | |||
}LAYER_DISPLAY_NAME; | |||
#define LAYER_DISPLAY_MAX 5 | |||
const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = { | |||
{L_BASE, "Base"}, | |||
{L_BASE + 1, "Base"}, | |||
{L_LOWER, "Lower"}, | |||
{L_RAISE, "Raise"}, | |||
{L_ADJUST_TRI, "Adjust"} | |||
}; | |||
static inline const char* get_leyer_status(void) { | |||
for (uint8_t i = 0; i < LAYER_DISPLAY_MAX; ++i) { | |||
if (layer_state == 0 && layer_display_name[i].state == default_layer_state) { | |||
return layer_display_name[i].name; | |||
} else if (layer_state != 0 && layer_display_name[i].state == layer_state) { | |||
return layer_display_name[i].name; | |||
} | |||
} | |||
return "?"; | |||
} | |||
static char layer_status_buf[24] = "Layer state ready.\n"; | |||
static inline void update_keymap_status(void) { | |||
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "OS:%s Layer:%s\n", | |||
keymap_config.swap_lalt_lgui? "win" : "mac", get_leyer_status()); | |||
} | |||
static inline void render_keymap_status(void) { | |||
oled_write(layer_status_buf, false); | |||
} | |||
#define UPDATE_KEYMAP_STATUS() update_keymap_status() | |||
static inline void render_status(void) { | |||
UPDATE_LED_STATUS(); | |||
RENDER_LED_STATUS(); | |||
render_keymap_status(); | |||
RENDER_LOCK_STATUS(); | |||
RENDER_KEY_STATUS(); | |||
} | |||
oled_rotation_t oled_init_user(oled_rotation_t rotation) { | |||
if (is_keyboard_master()) | |||
return OLED_ROTATION_180; // flips the display 180 degrees if offhand | |||
return rotation; | |||
} | |||
void oled_task_user(void) { | |||
if (is_keyboard_master()) { | |||
render_status(); | |||
} else { | |||
render_logo(); | |||
} | |||
} | |||
#else | |||
#define UPDATE_KEYMAP_STATUS() | |||
#endif | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
UPDATE_KEY_STATUS(keycode, record); | |||
bool result = false; | |||
switch (keycode) { | |||
case LOWER: | |||
if (record->event.pressed) { | |||
layer_on(_LOWER); | |||
} else { | |||
layer_off(_LOWER); | |||
} | |||
update_tri_layer(_LOWER, _RAISE, _ADJUST); | |||
break; | |||
case RAISE: | |||
if (record->event.pressed) { | |||
layer_on(_RAISE); | |||
} else { | |||
layer_off(_RAISE); | |||
} | |||
update_tri_layer(_LOWER, _RAISE, _ADJUST); | |||
break; | |||
case KANJI: | |||
if (record->event.pressed) { | |||
if (keymap_config.swap_lalt_lgui == false) { | |||
register_code(KC_LANG2); | |||
} else { | |||
register_code16(A(KC_GRV)); | |||
} | |||
} else { | |||
unregister_code(KC_LANG2); | |||
} | |||
break; | |||
#ifdef RGBLIGHT_ENABLE | |||
case RGBRST: | |||
if (record->event.pressed) { | |||
eeconfig_update_rgblight_default(); | |||
rgblight_enable(); | |||
} | |||
break; | |||
#endif | |||
default: | |||
result = true; | |||
break; | |||
} | |||
UPDATE_KEYMAP_STATUS(); | |||
return result; | |||
} |
@ -0,0 +1,9 @@ | |||
MOUSEKEY_ENABLE = yes # Mouse keys | |||
TAP_DANCE_ENABLE = no | |||
RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | |||
OLED_DRIVER_ENABLE = no | |||
LTO_ENABLE = yes | |||
# If you want to change the display of OLED, you need to change here | |||
SRC += ./common/oled_helper.c \ |
@ -0,0 +1,76 @@ | |||
/* Copyright 2020 marksard | |||
* | |||
* 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 | |||
enum layer_number { | |||
_BASE, | |||
_ADJUST, | |||
}; | |||
enum custom_keycodes { | |||
LOWER = SAFE_RANGE, | |||
ADJUST, | |||
RGBRST | |||
}; | |||
// Layer Mode aliases | |||
#define KC_LTAD LT(_ADJUST, KC_NO) | |||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | |||
[_BASE] = LAYOUT_ortho_4x10( | |||
//,---------------------------------------------------------------------------------------------------. | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' | |||
KC_LTAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | |||
//,---------------------------------------------------------------------------------------------------. | |||
), | |||
[_ADJUST] = LAYOUT_ortho_4x10( | |||
//,---------------------------------------------------------------------------------------------------. | |||
RESET, RGBRST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//|---------+---------+---------+---------+---------+---------+---------+---------+---------+---------| | |||
RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | |||
//`---------+---------+---------+---------+---------+---------+---------+---------+---------+---------' | |||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | |||
//,---------------------------------------------------------------------------------------------------. | |||
) | |||
}; | |||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | |||
bool result = false; | |||
switch (keycode) { | |||
#ifdef RGBLIGHT_ENABLE | |||
case RGBRST: | |||
if (record->event.pressed) { | |||
eeconfig_update_rgblight_default(); | |||
rgblight_enable(); | |||
} | |||
break; | |||
#endif | |||
default: | |||
result = true; | |||
break; | |||
} | |||
return result; | |||
} |
@ -0,0 +1,3 @@ | |||
# The switch tester keymap for Rhymestone | |||
This keymap is Switch Tester and RGB_MATRIX Light demo. |
@ -0,0 +1,7 @@ | |||
MOUSEKEY_ENABLE = no # Mouse keys | |||
TAP_DANCE_ENABLE = no | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
OLED_DRIVER_ENABLE = no | |||
LTO_ENABLE = yes | |||
RGB_MATRIX_ENABLE = WS2812 |
@ -0,0 +1,18 @@ | |||
# Rhymestone | |||
![Rhymestone](https://github.com/marksard/Keyboards/blob/7950099e0679a6626dc9f77a70b8c6616d7030cf/_image/_rhymestone.jpg) | |||
This is 40 keys split Ortholinear keyboard. | |||
* Keyboard Maintainer: [marksard](https://github.com/marksard) | |||
* Hardware Supported: Rhymestone PCB (with Pro Micro) | |||
* Hardware Availability: [marksard keyboards](https://github.com/marksard/Keyboards/blob/master/rhymestone/) | |||
Make example for this keyboard (after setting up your build environment): | |||
make marksard/rhymestone:default | |||
See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). | |||
[Build guide](https://github.com/marksard/Keyboards/blob/master/rhymestone/documents/rhymestone_buildguide.md) | |||
[Firmware](https://github.com/marksard/qmk_firmware/tree/my_customize/keyboards/rhymestone) |
@ -0,0 +1,152 @@ | |||
/* | |||
Copyright 2020 marksard | |||
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" | |||
/* USB Device descriptor parameter */ | |||
#define VENDOR_ID 0xFEED | |||
#define PRODUCT_ID 0xDFA1 | |||
#define DEVICE_VER 0x0020 | |||
#define MANUFACTURER marksard | |||
#define PRODUCT Rhymestone | |||
/* key matrix size */ | |||
#define MATRIX_ROWS 8 | |||
#define MATRIX_COLS 5 | |||
/* | |||
* Keyboard Matrix Assignments | |||
* | |||
* Change this to how you wired your keyboard | |||
* COLS: AVR pins used for columns, left to right | |||
* ROWS: AVR pins used for rows, top to bottom | |||
* DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | |||
* ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | |||
* | |||
*/ | |||
#define MATRIX_ROW_PINS { F4, F5, F6, F7 } | |||
#define MATRIX_COL_PINS { D4, C6, D7, E6, B4 } | |||
#define UNUSED_PINS | |||
/* COL2ROW, ROW2COL*/ | |||
#define DIODE_DIRECTION COL2ROW | |||
/* | |||
* Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. | |||
*/ | |||
#define SOFT_SERIAL_PIN D2 // or D1, D2, D3, E6 | |||
// #define BACKLIGHT_PIN B7 | |||
// #define BACKLIGHT_BREATHING | |||
// #define BACKLIGHT_LEVELS 3 | |||
#define RGB_DI_PIN D3 | |||
#ifdef RGBLIGHT_ENABLE | |||
// #ifdef RGB_DI_PIN | |||
#define RGBLED_NUM 40 | |||
#define RGBLED_SPLIT {20, 20} | |||
#define RGBLIGHT_HUE_STEP 8 | |||
#define RGBLIGHT_SAT_STEP 8 | |||
#define RGBLIGHT_VAL_STEP 8 | |||
#define RGBLIGHT_LIMIT_VAL 150 /* The maximum brightness level */ | |||
#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | |||
/*== all animations enable ==*/ | |||
// #define RGBLIGHT_ANIMATIONS | |||
/*== or choose animations ==*/ | |||
// #define RGBLIGHT_EFFECT_BREATHING | |||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD | |||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL | |||
// #define RGBLIGHT_EFFECT_SNAKE | |||
#define RGBLIGHT_EFFECT_KNIGHT | |||
// #define RGBLIGHT_EFFECT_CHRISTMAS | |||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT | |||
// #define RGBLIGHT_EFFECT_RGB_TEST | |||
// #define RGBLIGHT_EFFECT_ALTERNATING | |||
/*== customize breathing effect ==*/ | |||
/*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | |||
#define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | |||
/*==== use exp() and sin() ====*/ | |||
#define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | |||
#define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | |||
#endif | |||
#ifdef RGB_MATRIX_ENABLE | |||
#define RGBLED_NUM 40 // Number of LEDs | |||
#define DRIVER_LED_TOTAL RGBLED_NUM | |||
#define RGB_MATRIX_KEYPRESSES // reacts to keypresses | |||
// #define RGB_MATRIX_KEYRELEASES // reacts to keyreleases (instead of keypresses) | |||
// #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects | |||
#define RGB_DISABLE_WHEN_USB_SUSPENDED true // turn off effects when suspended | |||
// #define RGB_MATRIX_LED_PROCESS_LIMIT (DRIVER_LED_TOTAL + 4) / 5 // limits the number of LEDs to process in an animation per task run (increases keyboard responsiveness) | |||
// #define RGB_MATRIX_LED_FLUSH_LIMIT 16 // limits in milliseconds how frequently an animation will update the LEDs. 16 (16ms) is equivalent to limiting to 60fps (increases keyboard responsiveness) | |||
#define RGB_MATRIX_MAXIMUM_BRIGHTNESS 150 // limits maximum brightness of LEDs to 200 out of 255. If not defined maximum brightness is set to 255 | |||
#define RGB_MATRIX_HUE_STEP 8 | |||
#define RGB_MATRIX_SAT_STEP 8 | |||
#define RGB_MATRIX_VAL_STEP 8 | |||
#define RGB_MATRIX_SPD_STEP 10 | |||
// #define DISABLE_RGB_MATRIX_ALPHAS_MODS | |||
// #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN | |||
// #define DISABLE_RGB_MATRIX_BREATHING | |||
// #define DISABLE_RGB_MATRIX_BAND_SAT | |||
// #define DISABLE_RGB_MATRIX_BAND_VAL | |||
// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT | |||
// #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_VAL | |||
// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT | |||
// #define DISABLE_RGB_MATRIX_BAND_SPIRAL_VAL | |||
// #define DISABLE_RGB_MATRIX_CYCLE_ALL | |||
// #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT | |||
// #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN | |||
// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN | |||
// #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL | |||
// #define DISABLE_RGB_MATRIX_RAINBOW_MOVING_CHEVRON | |||
// #define DISABLE_RGB_MATRIX_CYCLE_PINWHEEL | |||
// #define DISABLE_RGB_MATRIX_CYCLE_SPIRAL | |||
// #define DISABLE_RGB_MATRIX_DUAL_BEACON | |||
// #define DISABLE_RGB_MATRIX_RAINBOW_BEACON | |||
// #define DISABLE_RGB_MATRIX_RAINBOW_PINWHEELS | |||
// #define DISABLE_RGB_MATRIX_RAINDROPS | |||
// #define DISABLE_RGB_MATRIX_JELLYBEAN_RAINDROPS | |||
#define RGB_MATRIX_FRAMEBUFFER_EFFECTS | |||
// #define DISABLE_RGB_MATRIX_TYPING_HEATMAP | |||
// #define DISABLE_RGB_MATRIX_DIGITAL_RAIN | |||
// #define RGB_MATRIX_KEYPRESSES // reacts to keypresses | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_SIMPLE | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_WIDE | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTIWIDE | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_CROSS | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTICROSS | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_NEXUS | |||
// #define DISABLE_RGB_MATRIX_SOLID_REACTIVE_MULTINEXUS | |||
// #define DISABLE_RGB_MATRIX_SPLASH | |||
// #define DISABLE_RGB_MATRIX_MULTISPLASH | |||
// #define DISABLE_RGB_MATRIX_SOLID_SPLASH | |||
// #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH | |||
#define RGB_MATRIX_STARTUP_MODE RGB_MATRIX_TYPING_HEATMAP | |||
#endif | |||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | |||
#define DEBOUNCE 5 |
@ -0,0 +1,108 @@ | |||
/* Copyright 2020 marksard | |||
* | |||
* 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 "rev1.h" | |||
// Optional override functions below. | |||
// You can leave any or all of these undefined. | |||
// These are only required if you want to perform custom actions. | |||
#ifdef RGB_MATRIX_ENABLE | |||
led_config_t g_led_config = { { | |||
{ 10, 11, 12, 13, 0 }, | |||
{ 9, 18, 19, 14, 1 }, | |||
{ 8, 17, 16, 15, 2 }, | |||
{ 7, 6, 5, 4, 3 }, | |||
{ 30, 31, 32, 33, 20 }, | |||
{ 29, 38, 39, 34, 21 }, | |||
{ 28, 37, 36, 35, 22 }, | |||
{ 27, 26, 25, 24, 23 } | |||
}, { | |||
{ 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, | |||
{ 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, | |||
{ 0, 43 }, { 0, 21 }, { 0, 0 }, | |||
{ 25, 0 }, { 50, 0 }, { 75, 0 }, | |||
{ 75, 21 }, { 75, 43 }, | |||
{ 50, 43 }, { 25, 43 }, | |||
{ 25, 21 }, { 50, 21 }, | |||
{ 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, | |||
{ 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, | |||
{ 225, 43 }, { 225, 21 }, { 225, 0 }, | |||
{ 200, 0 }, { 175, 0 }, { 150, 0 }, | |||
{ 150, 21 }, { 150, 43 }, | |||
{ 175, 43 }, { 200, 43 }, | |||
{ 200, 21 }, { 150, 21 } | |||
}, { | |||
4, 4, 4, 1, | |||
1, 1, 1, 1, | |||
4, 4, 4, 4, | |||
4, 4, 4, 4, | |||
4, 4, 4, 4, | |||
4, 4, 4, 1, | |||
1, 1, 1, 1, | |||
4, 4, 4, 4, | |||
4, 4, 4, 4, | |||
4, 4, 4, 4 | |||
} }; | |||
#endif | |||
__attribute__((weak)) | |||
void matrix_init_user(void) {} | |||
void matrix_init_kb(void) { | |||
#ifdef RGB_MATRIX_ENABLE | |||
// if (!is_keyboard_master()) { | |||
// g_led_config = (led_config_t){ { | |||
// { 30, 31, 32, 33, 20 }, | |||
// { 29, 38, 39, 34, 21 }, | |||
// { 28, 37, 36, 35, 22 }, | |||
// { 27, 26, 25, 24, 23 }, | |||
// { 10, 11, 12, 13, 0 }, | |||
// { 9, 18, 19, 14, 1 }, | |||
// { 8, 17, 16, 15, 2 }, | |||
// { 7, 6, 5, 4, 3 } | |||
// }, { | |||
// { 125, 0 }, { 125, 21 }, { 125, 43 }, { 125, 64 }, | |||
// { 150, 64 }, { 175, 64 }, { 200, 64 }, { 225, 64 }, | |||
// { 225, 43 }, { 225, 21 }, { 225, 0 }, | |||
// { 200, 0 }, { 175, 0 }, { 150, 0 }, | |||
// { 150, 21 }, { 150, 43 }, | |||
// { 175, 43 }, { 200, 43 }, | |||
// { 200, 21 }, { 150, 21 }, | |||
// { 100, 0 }, { 100, 21 }, { 100, 43 }, { 100, 64 }, | |||
// { 75, 64 }, { 50, 64 }, { 25, 64 }, { 0, 64 }, | |||
// { 0, 43 }, { 0, 21 }, { 0, 0 }, | |||
// { 25, 0 }, { 50, 0 }, { 75, 0 }, | |||
// { 75, 21 }, { 75, 43 }, | |||
// { 50, 43 }, { 25, 43 }, | |||
// { 25, 21 }, { 50, 21 } | |||
// }, { | |||
// 4, 4, 4, 1, | |||
// 1, 1, 1, 1, | |||
// 4, 4, 4, 4, | |||
// 4, 4, 4, 4, | |||
// 4, 4, 4, 4, | |||
// 4, 4, 4, 1, | |||
// 1, 1, 1, 1, | |||
// 4, 4, 4, 4, | |||
// 4, 4, 4, 4, | |||
// 4, 4, 4, 4 | |||
// } }; | |||
// } | |||
#endif | |||
matrix_init_user(); | |||
} |
@ -0,0 +1,89 @@ | |||
/* Copyright 2020 marksard | |||
* | |||
* 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" | |||
/* This is a shortcut to help you visually see your layout. | |||
* | |||
* The first section contains all of the arguments representing the physical | |||
* layout of the board and position of the keys. | |||
* | |||
* The second converts the arguments into a two-dimensional array which | |||
* represents the switch matrix. | |||
*/ | |||
#ifndef FLIP_HALF | |||
// Standard Keymap | |||
// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) | |||
#define LAYOUT_ortho_4x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ | |||
L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ | |||
) \ | |||
{ \ | |||
{ L00, L01, L02, L03, L04 }, \ | |||
{ L10, L11, L12, L13, L14 }, \ | |||
{ L20, L21, L22, L23, L24 }, \ | |||
{ L30, L31, L32, L33, L34 }, \ | |||
{ R04, R03, R02, R01, R00 }, \ | |||
{ R14, R13, R12, R11, R10 }, \ | |||
{ R24, R23, R22, R21, R20 }, \ | |||
{ R34, R33, R32, R31, R30 }, \ | |||
} | |||
#else | |||
// Keymap with right side flipped | |||
// (TRRS jack on both halves are to the right) | |||
#define LAYOUT_ortho_4x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ | |||
L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ | |||
) \ | |||
{ \ | |||
{ L04, L03, L02, L01, L00 }, \ | |||
{ L14, L13, L12, L11, L10 }, \ | |||
{ L24, L23, L22, L21, L20 }, \ | |||
{ L34, L33, L32, L31, L30 }, \ | |||
{ R04, R03, R02, R01, R00 }, \ | |||
{ R14, R13, R12, R11, R10 }, \ | |||
{ R24, R23, R22, R21, R20 }, \ | |||
{ R34, R33, R32, R31, R30 }, \ | |||
} | |||
#endif | |||
#ifdef USE_HASHTWENTY // The HashTwenty is Alpha version of The Rhymestone | |||
#undef LAYOUT_ortho_4x10 | |||
// HashTwenty layout | |||
#define LAYOUT_ortho_4x10( \ | |||
L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, \ | |||
L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, \ | |||
L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, \ | |||
L30, L31, L32, L33, L34, R30, R31, R32, R33, R34 \ | |||
) \ | |||
{ \ | |||
{ L04, L03, L02, L01, L00 }, \ | |||
{ L14, L13, L12, L11, L10 }, \ | |||
{ L24, L23, L22, L21, L20 }, \ | |||
{ L34, L33, L32, L31, L30 }, \ | |||
{ R00, R01, R02, R03, R04 }, \ | |||
{ R10, R11, R12, R13, R14 }, \ | |||
{ R20, R21, R22, R23, R24 }, \ | |||
{ R30, R31, R32, R33, R34 }, \ | |||
} | |||
#endif |
@ -0,0 +1,27 @@ | |||
# MCU name | |||
MCU = atmega32u4 | |||
# Bootloader selection | |||
BOOTLOADER = caterina | |||
# Build Options | |||
# change yes to no to disable | |||
# | |||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration | |||
MOUSEKEY_ENABLE = no # Mouse keys | |||
EXTRAKEY_ENABLE = no # Audio control and System control | |||
CONSOLE_ENABLE = no # Console for debug | |||
COMMAND_ENABLE = no # Commands for debug and configuration | |||
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | |||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | |||
# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | |||
NKRO_ENABLE = yes # USB Nkey Rollover | |||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | |||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | |||
BLUETOOTH_ENABLE = no # Enable Bluetooth | |||
AUDIO_ENABLE = no # Audio output | |||
SPLIT_KEYBOARD = yes | |||
DEFAULT_FOLDER = marksard/rhymestone/rev1 | |||
LAYOUTS = ortho_4x10 |