summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md7
-rw-r--r--common.mk4
-rw-r--r--common/matrix.h4
-rw-r--r--keyboard/atomic/extended_keymaps/extended_keymap_default.c2
-rwxr-xr-xkeyboard/atomic/flash-pcb.sh2
-rw-r--r--keyboard/ergodox_ez/Makefile114
-rw-r--r--keyboard/ergodox_ez/README.md1
-rw-r--r--keyboard/ergodox_ez/config.h87
-rw-r--r--keyboard/ergodox_ez/ergodox_ez.c123
-rw-r--r--keyboard/ergodox_ez/ergodox_ez.h145
-rw-r--r--keyboard/ergodox_ez/i2cmaster.h178
-rw-r--r--keyboard/ergodox_ez/keymaps/keymap_default.c133
-rw-r--r--keyboard/ergodox_ez/keymaps/keymap_ergodox_ez.c211
-rw-r--r--keyboard/ergodox_ez/matrix.c348
-rw-r--r--keyboard/ergodox_ez/twimaster.c208
-rw-r--r--keyboard/planck/Makefile21
-rw-r--r--keyboard/planck/Makefile.pjrc116
-rw-r--r--keyboard/planck/config.h5
-rw-r--r--keyboard/planck/config_definitions.h50
-rw-r--r--keyboard/planck/keymaps/keymap_default.c88
-rw-r--r--keyboard/planck/keymaps/keymap_joe.c32
-rw-r--r--keyboard/planck/keymaps/keymap_lock.c41
-rw-r--r--keyboard/planck/keymaps/keymap_monkey.c76
-rw-r--r--keyboard/planck/planck.c31
-rw-r--r--keyboard/planck/planck.h38
-rw-r--r--keyboard/planck/planck_pcb.hex3113
-rwxr-xr-xkeyboard/planck/planck_with_bootloader.hex1796
-rw-r--r--keyboard/preonic/Makefile3
-rw-r--r--keyboard/preonic/beeps.c386
-rw-r--r--keyboard/preonic/beeps.h5
-rw-r--r--keyboard/preonic/extended_keymaps/extended_keymap_lock.c2
-rw-r--r--keyboard/preonic/keymap_midi.c82
-rw-r--r--keyboard/preonic/keymap_midi.h6
-rw-r--r--protocol/bluefruit.mk2
-rw-r--r--protocol/bluefruit/bluefruit.c15
-rw-r--r--protocol/bluefruit/bluefruit.h5
-rw-r--r--protocol/bluefruit/main.c100
-rw-r--r--protocol/lufa.mk5
-rw-r--r--protocol/lufa/bluetooth.c37
-rw-r--r--protocol/lufa/bluetooth.h63
-rw-r--r--protocol/lufa/descriptor.c2
-rw-r--r--protocol/lufa/lufa.c59
-rw-r--r--protocol/lufa/lufa.h2
-rw-r--r--quantum.mk30
-rw-r--r--quantum/analog.c (renamed from keyboard/planck/analog.c)0
-rw-r--r--quantum/analog.h (renamed from keyboard/planck/analog.h)0
-rw-r--r--quantum/beeps.c (renamed from keyboard/planck/beeps.c)62
-rw-r--r--quantum/beeps.h (renamed from keyboard/planck/beeps.h)0
-rw-r--r--quantum/config_common.h116
-rw-r--r--quantum/keymap_common.c (renamed from keyboard/planck/keymap_common.c)49
-rw-r--r--quantum/keymap_common.h (renamed from keyboard/planck/keymap_common.h)141
-rw-r--r--quantum/keymap_extras/keymap_colemak.h74
-rw-r--r--quantum/keymap_extras/keymap_dvorak.h72
-rw-r--r--quantum/keymap_extras/keymap_french.h83
-rw-r--r--quantum/keymap_extras/keymap_nordic.h59
-rw-r--r--quantum/keymap_extras/keymap_spanish.h62
-rw-r--r--quantum/keymap_extras/keymap_uk.h36
-rw-r--r--quantum/keymap_midi.c (renamed from keyboard/planck/keymap_midi.c)10
-rw-r--r--quantum/keymap_midi.h (renamed from keyboard/planck/keymap_midi.h)0
-rw-r--r--quantum/keymap_unicode.c59
-rw-r--r--quantum/led.c (renamed from keyboard/planck/led.c)0
-rw-r--r--quantum/matrix.c (renamed from keyboard/planck/matrix.c)89
62 files changed, 6490 insertions, 2200 deletions
diff --git a/README.md b/README.md
index 79f170ea66..403faaa40a 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,6 @@
-TMK Keyboard Firmware Collection
+Quantum Mechanical Keyboard Firmware
================================
-This is a keyboard firmware with some useful features for Atmel AVR controller.
-
-Source code is available here: <http://github.com/tmk/tmk_keyboard>
-
+This is a keyboard firmware with some useful features for Atmel AVR controller, based on the [tmk_keyboard firmware](http://github.com/tmk/tmk_keyboard)
Features
--------
diff --git a/common.mk b/common.mk
index e61ae69e5e..3237e539a6 100644
--- a/common.mk
+++ b/common.mk
@@ -68,6 +68,10 @@ ifdef BACKLIGHT_ENABLE
OPT_DEFS += -DBACKLIGHT_ENABLE
endif
+ifdef BLUETOOTH_ENABLE
+ OPT_DEFS += -DBLUETOOTH_ENABLE
+endif
+
ifdef KEYMAP_SECTION_ENABLE
OPT_DEFS += -DKEYMAP_SECTION_ENABLE
EXTRALDFLAGS = -Wl,-L$(TOP_DIR),-Tldscript_keymap_avr5.x
diff --git a/common/matrix.h b/common/matrix.h
index 107ee72653..7c133f142a 100644
--- a/common/matrix.h
+++ b/common/matrix.h
@@ -61,6 +61,10 @@ void matrix_print(void);
void matrix_power_up(void);
void matrix_power_down(void);
+void *matrix_init_kb(void);
+void *matrix_scan_kb(void);
+
+
#ifdef __cplusplus
}
#endif
diff --git a/keyboard/atomic/extended_keymaps/extended_keymap_default.c b/keyboard/atomic/extended_keymaps/extended_keymap_default.c
index e662c91889..ab08bb6d25 100644
--- a/keyboard/atomic/extended_keymaps/extended_keymap_default.c
+++ b/keyboard/atomic/extended_keymaps/extended_keymap_default.c
@@ -39,7 +39,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// ┌─ 2u ────────────┐
// │ X │
// └─────────────────┘
- { KC_LCTL, KC_LGUI, KC_LALT, KC_LGUI, KC_LCTL, KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT },
+ { BL_STEP, KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, KC_SPC, KC_SPC, KC_RGUI, KC_RGUI, KC_RALT, KC_RCTL, BL_STEP, KC_LEFT, KC_DOWN, KC_RGHT },
// ┌────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┬────────┐
// │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
// └────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┴────────┘
diff --git a/keyboard/atomic/flash-pcb.sh b/keyboard/atomic/flash-pcb.sh
index 2ae15458c0..46abc6982a 100755
--- a/keyboard/atomic/flash-pcb.sh
+++ b/keyboard/atomic/flash-pcb.sh
@@ -1,3 +1,3 @@
dfu-programmer atmega32u4 erase --force
-dfu-programmer atmega32u4 flash planck_pcb.hex
+dfu-programmer atmega32u4 flash atomic_pcb.hex
dfu-programmer atmega32u4 reset \ No newline at end of file
diff --git a/keyboard/ergodox_ez/Makefile b/keyboard/ergodox_ez/Makefile
new file mode 100644
index 0000000000..e0d303c9df
--- /dev/null
+++ b/keyboard/ergodox_ez/Makefile
@@ -0,0 +1,114 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make = Make software.
+#
+# make clean = Clean out built project files.
+#
+# That's pretty much all you need. To compile, always go make clean,
+# followed by make.
+#
+# For advanced users only:
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+# (must have teensy_loader_cli installed).
+#
+#----------------------------------------------------------------------------
+
+# Target file name (without extension).
+TARGET = ergodox_ez
+
+
+# Directory common source filess exist
+TOP_DIR = ../..
+
+# Directory keyboard dependent files exist
+TARGET_DIR = .
+
+# # project specific files
+SRC = ergodox_ez.c \
+ twimaster.c
+
+ifdef KEYMAP
+ SRC := keymaps/keymap_$(KEYMAP).c $(SRC)
+else
+ SRC := keymaps/keymap_default.c $(SRC)
+endif
+
+CONFIG_H = config.h
+
+# MCU name
+#MCU = at90usb1287
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = yes # Commands for debug and configuration
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend
+# NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA
+# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+# MIDI_ENABLE = YES # MIDI controls
+# UNICODE_ENABLE = YES # Unicode
+# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
+
+
+# Optimize size but this may cause error "relocation truncated to fit"
+#EXTRALDFLAGS = -Wl,--relax
+
+# Search Path
+VPATH += $(TARGET_DIR)
+VPATH += $(TOP_DIR)
+
+include $(TOP_DIR)/quantum.mk
+
diff --git a/keyboard/ergodox_ez/README.md b/keyboard/ergodox_ez/README.md
new file mode 100644
index 0000000000..f750d8dbec
--- /dev/null
+++ b/keyboard/ergodox_ez/README.md
@@ -0,0 +1 @@
+// TODO: Make up a proper readme for the ErgoDox EZ.
diff --git a/keyboard/ergodox_ez/config.h b/keyboard/ergodox_ez/config.h
new file mode 100644
index 0000000000..850d245791
--- /dev/null
+++ b/keyboard/ergodox_ez/config.h
@@ -0,0 +1,87 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2013 Oleg Kostyuk <cub.uanic@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/>.
+*/
+
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1307
+#define DEVICE_VER 0x0001
+#define MANUFACTURER ErgoDox EZ
+#define PRODUCT ErgoDox EZ
+#define DESCRIPTION t.m.k. keyboard firmware for Ergodox
+
+/* key matrix size */
+#define MATRIX_ROWS 14
+#define MATRIX_COLS 6
+
+#define MOUSEKEY_DELAY 100
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_MAX_SPEED 3
+#define MOUSEKEY_TIME_TO_MAX 10
+
+#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 }
+#define ROWS (int []){ D0, D5, B5, B6 }
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 2
+#define TAPPING_TERM 100
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \
+ keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \
+)
+
+/*
+ * Feature disable options
+ * These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+// #define NO_DEBUG
+
+/* disable print */
+// #define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+//#define DEBUG_MATRIX_SCAN_RATE
+
+#endif
diff --git a/keyboard/ergodox_ez/ergodox_ez.c b/keyboard/ergodox_ez/ergodox_ez.c
new file mode 100644
index 0000000000..f7e156b319
--- /dev/null
+++ b/keyboard/ergodox_ez/ergodox_ez.c
@@ -0,0 +1,123 @@
+#include "ergodox_ez.h"
+#include "i2cmaster.h"
+
+bool i2c_initialized = 0;
+uint8_t mcp23018_status = 0x20;
+
+bool ergodox_left_led_1 = 0; // left top
+bool ergodox_left_led_2 = 0; // left middle
+bool ergodox_left_led_3 = 0; // left bottom
+
+__attribute__ ((weak))
+void * matrix_init_user(void) {
+
+};
+
+__attribute__ ((weak))
+void * matrix_scan_user(void) {
+
+};
+
+void * matrix_init_kb(void) {
+ // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md")
+ TCCR1A = 0b10101001; // set and configure fast PWM
+ TCCR1B = 0b00001001; // set and configure fast PWM
+
+ // (tied to Vcc for hardware convenience)
+ DDRB &= ~(1<<4); // set B(4) as input
+ PORTB &= ~(1<<4); // set B(4) internal pull-up disabled
+
+ // unused pins - C7, D4, D5, D7, E6
+ // set as input with internal pull-ip enabled
+ DDRC &= ~(1<<7);
+ DDRD &= ~(1<<7 | 1<<5 | 1<<4);
+ DDRE &= ~(1<<6);
+ PORTC |= (1<<7);
+ PORTD |= (1<<7 | 1<<5 | 1<<4);
+ PORTE |= (1<<6);
+
+ ergodox_blink_all_leds();
+
+ if (matrix_init_user) {
+ (*matrix_init_user)();
+ }
+};
+
+void * matrix_scan_kb(void) {
+
+ if (matrix_scan_user) {
+ (*matrix_scan_user)();
+ }
+};
+
+
+void ergodox_blink_all_leds(void)
+{
+ ergodox_led_all_off();
+ ergodox_led_all_set(LED_BRIGHTNESS_HI);
+ ergodox_led_all_on();
+ _delay_ms(333);
+ ergodox_led_all_off();
+}
+
+uint8_t init_mcp23018(void) {
+ mcp23018_status = 0x20;
+
+ // I2C subsystem
+ if (i2c_initialized == 0) {
+ i2c_init(); // on pins D(1,0)
+ i2c_initialized++;
+ _delay_ms(1000);
+ }
+
+ // set pin direction
+ // - unused : input : 1
+ // - input : input : 1
+ // - driving : output : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
+ i2c_stop();
+
+ // set pull-up
+ // - unused : on : 1
+ // - input : on : 1
+ // - driving : off : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out;
+
+out:
+ i2c_stop();
+
+ if (!mcp23018_status) mcp23018_status = ergodox_left_leds_update();
+
+ return mcp23018_status;
+}
+
+uint8_t ergodox_left_leds_update(void) {
+ if (mcp23018_status) { // if there was an error
+ return mcp23018_status;
+ }
+
+ // set logical value (doesn't matter on inputs)
+ // - unused : hi-Z : 1
+ // - input : hi-Z : 1
+ // - driving : hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(OLATA); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111
+ & ~(ergodox_left_led_3<<LEFT_LED_3_SHIFT)
+ ); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111
+ & ~(ergodox_left_led_2<<LEFT_LED_2_SHIFT)
+ & ~(ergodox_left_led_1<<LEFT_LED_1_SHIFT)
+ ); if (mcp23018_status) goto out;
+
+out:
+ i2c_stop();
+ return mcp23018_status;
+}
+
diff --git a/keyboard/ergodox_ez/ergodox_ez.h b/keyboard/ergodox_ez/ergodox_ez.h
new file mode 100644
index 0000000000..9d0691dfe2
--- /dev/null
+++ b/keyboard/ergodox_ez/ergodox_ez.h
@@ -0,0 +1,145 @@
+#ifndef PLANCK_H
+#define PLANCK_H
+
+#include "matrix.h"
+#include "keymap_common.h"
+#include "backlight.h"
+#include <stddef.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include "i2cmaster.h"
+#include <util/delay.h>
+
+#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
+#define CPU_16MHz 0x00
+
+// I2C aliases and register addresses (see "mcp23018.md")
+#define I2C_ADDR 0b0100000
+#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
+#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ )
+#define IODIRA 0x00 // i/o direction register
+#define IODIRB 0x01
+#define GPPUA 0x0C // GPIO pull-up resistor register
+#define GPPUB 0x0D
+#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
+#define GPIOB 0x13
+#define OLATA 0x14 // output latch register
+#define OLATB 0x15
+
+extern uint8_t mcp23018_status;
+
+void init_ergodox(void);
+void ergodox_blink_all_leds(void);
+uint8_t init_mcp23018(void);
+uint8_t ergodox_left_leds_update(void);
+
+#define LED_BRIGHTNESS_LO 31
+#define LED_BRIGHTNESS_HI 255
+
+#define LEFT_LED_1_SHIFT 7 // in MCP23018 port B
+#define LEFT_LED_2_SHIFT 6 // in MCP23018 port B
+#define LEFT_LED_3_SHIFT 7 // in MCP23018 port A
+
+extern bool ergodox_left_led_1; // left top
+extern bool ergodox_left_led_2; // left middle
+extern bool ergodox_left_led_3; // left bottom
+
+inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); }
+inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); }
+inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); }
+inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); }
+inline void ergodox_left_led_1_on(void) { ergodox_left_led_1 = 1; }
+inline void ergodox_left_led_2_on(void) { ergodox_left_led_2 = 1; }
+inline void ergodox_left_led_3_on(void) { ergodox_left_led_3 = 1; }
+
+inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); }
+inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); }
+inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); }
+inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); }
+inline void ergodox_left_led_1_off(void) { ergodox_left_led_1 = 0; }
+inline void ergodox_left_led_2_off(void) { ergodox_left_led_2 = 0; }
+inline void ergodox_left_led_3_off(void) { ergodox_left_led_3 = 0; }
+
+inline void ergodox_led_all_on(void)
+{
+ ergodox_board_led_on();
+ ergodox_right_led_1_on();
+ ergodox_right_led_2_on();
+ ergodox_right_led_3_on();
+ ergodox_left_led_1_on();
+ ergodox_left_led_2_on();
+ ergodox_left_led_3_on();
+ ergodox_left_leds_update();
+}
+
+inline void ergodox_led_all_off(void)
+{
+ ergodox_board_led_off();
+ ergodox_right_led_1_off();
+ ergodox_right_led_2_off();
+ ergodox_right_led_3_off();
+ ergodox_left_led_1_off();
+ ergodox_left_led_2_off();
+ ergodox_left_led_3_off();
+ ergodox_left_leds_update();
+}
+
+inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; }
+inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; }
+inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; }
+
+inline void ergodox_led_all_set(uint8_t n)
+{
+ ergodox_right_led_1_set(n);
+ ergodox_right_led_2_set(n);
+ ergodox_right_led_3_set(n);
+}
+
+#define KEYMAP( \
+ \
+ /* left hand, spatial positions */ \
+ k00,k01,k02,k03,k04,k05,k06, \
+ k10,k11,k12,k13,k14,k15,k16, \
+ k20,k21,k22,k23,k24,k25, \