mirror of
https://github.com/qmk/qmk_firmware.git
synced 2026-09-25 16:16:14 +08:00
Meira Refactor (#14566)
* clean up keyboard header files * use #pragma once include guard * convert tabs to spaces * remove redundant #include statements * update revision references to main header (`../meira.h` -> `meira.h`) * refactor default keymap * use LAYOUT as layout macro reference * use enum statement for layer indexes; make layers contiguous * use four-space indent * update keycode grid alignment * update layout macro aliases * move layout macro aliases to info.json * alias KEYMAP to LAYOUT_ortho_4x12 so the user keymaps don't have to be edited * touch up meira.h There's no Planck MIT layout reference here. * add copyright headers * workaround patch for grahampheath keymap The `matrix_init_kb()` function in `meira.c` calls `backlight_set()`, but the grahampheath keymap disables Backlight to make space for Audio, causing the firmware to fail to compile. This commit wraps the `backlight_set()` call in an ifdef statement, so the call is excluded if Backlight is disabled. * clean up rules.mk inline comments * re-order rules.mk settings * clean up readme.md * correct link to keyboard image * change metadata section to unordered list * spelling corrections * update make instructions and Docs links
This commit is contained in:
@@ -1 +1,17 @@
|
||||
/* Copyright 2017 Cole Markham, WoodKeys.click
|
||||
*
|
||||
* 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 "meira.h"
|
||||
|
||||
@@ -1,9 +1,19 @@
|
||||
#ifndef FEATHERBLE_H
|
||||
#define FEATHERBLE_H
|
||||
/* Copyright 2017 Cole Markham, WoodKeys.click
|
||||
*
|
||||
* 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 "../meira.h"
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
|
||||
#endif
|
||||
#include "meira.h"
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
"keyboard_name": "Meira",
|
||||
"url": "",
|
||||
"maintainer": "colemarkham",
|
||||
"layout_aliases": {
|
||||
"KEYMAP": "LAYOUT_ortho_4x12",
|
||||
"LAYOUT": "LAYOUT_ortho_4x12"
|
||||
},
|
||||
"layouts": {
|
||||
"LAYOUT_ortho_4x12": {
|
||||
"layout": [
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -30,7 +30,9 @@ void matrix_init_kb(void)
|
||||
#ifdef ISSI_ENABLE
|
||||
issi_init();
|
||||
#endif
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_set(5);
|
||||
#endif
|
||||
#ifdef WATCHDOG_ENABLE
|
||||
// This is done after turning the layer LED red, if we're caught in a loop
|
||||
// we should get a flashing red light
|
||||
|
||||
+9
-16
@@ -13,8 +13,7 @@
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#ifndef MEIRA_H
|
||||
#define MEIRA_H
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
#include "issi.h"
|
||||
@@ -22,23 +21,17 @@
|
||||
void reset_keyboard_kb(void);
|
||||
|
||||
// This a shortcut to help you visually see your layout.
|
||||
// The following is an example using the Planck MIT layout
|
||||
// The first section contains all of the arguments
|
||||
// The second converts the arguments into a two-dimensional array
|
||||
#define LAYOUT_ortho_4x12( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
|
||||
k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
|
||||
k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
|
||||
k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
|
||||
) \
|
||||
{ \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
|
||||
{ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
|
||||
{ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
|
||||
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
|
||||
}
|
||||
|
||||
#define LAYOUT LAYOUT_ortho_4x12
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,2 +1,17 @@
|
||||
#include "meira.h"
|
||||
/* Copyright 2017 Cole Markham, WoodKeys.click
|
||||
*
|
||||
* 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 "meira.h"
|
||||
|
||||
@@ -1,8 +1,19 @@
|
||||
#ifndef FEATHERBLE_H
|
||||
#define FEATHERBLE_H
|
||||
/* Copyright 2017 Cole Markham, WoodKeys.click
|
||||
*
|
||||
* 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 "../meira.h"
|
||||
#pragma once
|
||||
|
||||
#include "quantum.h"
|
||||
|
||||
#endif
|
||||
#include "meira.h"
|
||||
|
||||
+11
-14
@@ -1,26 +1,23 @@
|
||||
# Meira
|
||||
|
||||

|
||||

|
||||
|
||||
A 4x12 ortholinear low-profile keyboard.
|
||||
|
||||
Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
|
||||
Hardware Supported: Meira/ProMicro, Meira/FeatherBLE
|
||||
Hardware Availability: [WoodKeys.click](https://woodkeys.click/meira)
|
||||
* Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham)
|
||||
* Hardware Supported: Meira/ProMicro, Meira/FeatherBLE
|
||||
* Hardware Availability: [WoodKeys.click](https://woodkeys.click/meira)
|
||||
|
||||
Two controllers are support: the Pro Micro, and the Adafruit Feather BLE 32u4. Support for each is defined as a hardware revision subfolder in QMK. Main differences include processor frequencies and matrix pinouts.
|
||||
Two controllers are supported: the Pro Micro, and the Adafruit Feather BLE 32u4. Support for each is defined as a hardware revision subfolder in QMK. Main differences include processor frequencies and matrix pinouts.
|
||||
|
||||
Make example for this keyboard (after setting up your build environment):
|
||||
Make examples for this keyboard (after setting up your build environment):
|
||||
|
||||
make meira/promicro:default
|
||||
make meira/featherble:default # for Feather BLE 32u4 controllers
|
||||
make meira/promicro:default # for Pro Micro controllers
|
||||
|
||||
or
|
||||
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).
|
||||
|
||||
make meira/featherble:default
|
||||
|
||||
See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information on generic QMK configuration and setup.
|
||||
|
||||
Both the Pro Micro and the Feather BLE use the Catalina bootloader, which is typically programmed using avrdude.
|
||||
Both the Pro Micro and the Feather BLE use the Caterina bootloader, which is typically programmed using avrdude.
|
||||
|
||||
## Matrix
|
||||
|
||||
@@ -28,4 +25,4 @@ In order to have enough pins for the matrix and other functions, a custom matrix
|
||||
|
||||
## LED Controller
|
||||
|
||||
The in-switch LEDs are driven by an ISSI LED controller (IS31FL3731). The micro controller communicates with this chip using I2C. Individual LED control is possible, but currently only general backlighting support is implemented. This functionality is located in lighting.c, issi.c, and TWILib.c.
|
||||
The in-switch LEDs are driven by an ISSI LED controller (IS31FL3731). The micro controller communicates with this chip using I2C. Individual LED control is possible, but currently only general backlighting support is implemented. This functionality is located in lighting.c, issi.c, and TWILib.c.
|
||||
|
||||
@@ -8,27 +8,26 @@ BOOTLOADER = caterina
|
||||
# change yes to no to disable
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
MOUSEKEY_ENABLE = no # Mouse keys
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control
|
||||
CONSOLE_ENABLE = no # Console for debug
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
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 = no # USB Nkey Rollover
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Meira
|
||||
BACKLIGHT_DRIVER = custom
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera
|
||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||
ISSI_ENABLE = yes # If the I2C pullup resistors aren't install this must be disabled
|
||||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
|
||||
AUDIO_ENABLE = no # Audio output
|
||||
|
||||
CUSTOM_MATRIX = yes
|
||||
|
||||
#ifeq ($(strip $(ISSI_ENABLE)), yes)
|
||||
# TMK_COMMON_DEFS += -DISSI_ENABLE
|
||||
#endif
|
||||
#
|
||||
|
||||
#ifeq ($(strip $(WATCHDOG_ENABLE)), yes)
|
||||
# TMK_COMMON_DEFS += -DWATCHDOG_ENABLE
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user