Merge pull request #503 from fredizzimo/ergodox_subproject

Add both Ergodox EZ and Infinity Ergodox as sub-projects of Ergodox
pull/589/head
Jack Humbert 8 years ago committed by GitHub
commit 063983639d

@ -0,0 +1,34 @@
#----------------------------------------------------------------------------
# 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).
#
#----------------------------------------------------------------------------
SUBPROJECT_DEFAULT = ez
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode
ifndef QUANTUM_DIR
include ../../Makefile
endif

@ -0,0 +1,36 @@
#ifndef KEYBOARDS_ERGODOX_CONFIG_H_
#define KEYBOARDS_ERGODOX_CONFIG_H_
#define MOUSEKEY_DELAY 100
#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_MAX_SPEED 3
#define MOUSEKEY_TIME_TO_MAX 10
#define TAPPING_TOGGLE 1
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* 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)) \
)
#ifdef SUBPROJECT_ez
#include "ez/config.h"
#endif
#ifdef SUBPROJECT_infinity
#include "infinity/config.h"
#endif
#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */

@ -0,0 +1,10 @@
#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_
#define KEYBOARDS_ERGODOX_ERGODOX_H_
#ifdef SUBPROJECT_ez
#include "ez.h"
#endif
#ifdef SUBPROJECT_infinity
#include "infinity.h"
#endif
#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */

@ -70,17 +70,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
CONSOLE_ENABLE ?= no # Console for debug(+400)
COMMAND_ENABLE ?= yes # Commands for debug and configuration
CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
MIDI_ENABLE ?= no # MIDI controls
UNICODE_ENABLE ?= yes # Unicode
ifndef QUANTUM_DIR
include ../../Makefile
include ../../../Makefile
endif

@ -16,10 +16,10 @@ 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
#ifndef ERGODOX_EZ_CONFIG_H
#define ERGODOX_EZ_CONFIG_H
#include "config_common.h"
#include "../config.h"
/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
@ -33,34 +33,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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 TAPPING_TOGGLE 1
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* 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

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ez.h"
#include "i2cmaster.h"
bool i2c_initialized = 0;

@ -33,7 +33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "util.h"
#include "matrix.h"
#include "ergodox_ez.h"
#include "ez.h"
#include "i2cmaster.h"
#ifdef DEBUG_MATRIX_SCAN_RATE
#include "timer.h"

@ -52,34 +52,26 @@ ARMV = 7
# Vector table for application
# 0x00000000-0x00001000 area is occupied by bootlaoder.*/
# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB
OPT_DEFS = -DCORTEX_VTOR_INIT=0x00002000
OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000
# Build Options
# comment out to disable the options.
#
BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration
## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.)
MOUSEKEY_ENABLE ?= yes # Mouse keys
EXTRAKEY_ENABLE ?= yes # Audio control and System control
CONSOLE_ENABLE ?= yes # Console for debug
COMMAND_ENABLE ?= yes # Commands for debug and configuration
SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
NKRO_ENABLE ?= yes # USB Nkey Rollover
CUSTOM_MATRIX ?= yes # Custom matrix file
SERIAL_LINK_ENABLE = yes
VISUALIZER_ENABLE ?= yes
VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile
LCD_ENABLE ?= yes
LED_ENABLE ?= yes
LCD_BACKLIGHT_ENABLE ?= yes
ifndef QUANTUM_DIR
include ../../../Makefile
endif
ifdef LCD_ENABLE
include drivers/gdisp/st7565ergodox/driver.mk
include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk
endif
ifdef LED_ENABLE
include drivers/gdisp/IS31FL3731C/driver.mk
include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk
endif
ifndef QUANTUM_DIR
include ../../Makefile
endif

@ -15,8 +15,10 @@ 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
#ifndef INFINITY_ERGODOX_CONFIG_H
#define INFINITY_ERGODOX_CONFIG_H
#include "../config.h"
/* USB Device descriptor parameter */
@ -35,25 +37,18 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 5
#define LOCAL_MATRIX_ROWS 9
/* number of backlight levels */
#define BACKLIGHT_LEVELS 3
#define LED_BRIGHTNESS_LO 15
#define LED_BRIGHTNESS_HI 255
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST
/* Set 0 if debouncing isn't needed */
#define DEBOUNCE 5
/* 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_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
)
/* Keymap for Infiity prototype */
#define INFINITY_PROTOTYPE
#define SERIAL_LINK_BAUD 562500
#define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1)
// The visualizer needs gfx thread priorities

@ -1,8 +1,10 @@
#include "infinity_ergodox.h"
#include "infinity.h"
#include "ch.h"
#include "hal.h"
#include "serial_link/system/serial_link.h"
#ifdef VISUALIZER_ENABLE
#include "lcd_backlight.h"
#endif
void init_serial_link_hal(void) {
PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2);
@ -36,7 +38,7 @@ void init_serial_link_hal(void) {
// Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced
// Which will reduce the brightness range
#define PRESCALAR_DEFINE 0
#ifdef VISUALIZER_ENABLE
void lcd_backlight_hal_init(void) {
// Setup Backlight
SIM->SCGC6 |= SIM_SCGC6_FTM0;
@ -74,3 +76,57 @@ void lcd_backlight_hal_color(uint16_t r, uint16_t g, uint16_t b) {
CHANNEL_GREEN.CnV = g;
CHANNEL_BLUE.CnV = b;
}
#endif
__attribute__ ((weak))
void matrix_init_user(void) {
}
__attribute__ ((weak))
void matrix_scan_user(void) {
}
void matrix_init_kb(void) {
// put your keyboard start-up code here
// runs once when the firmware starts up
matrix_init_user();
}
void matrix_scan_kb(void) {
// put your looping keyboard code here
// runs every cycle (a lot)
matrix_scan_user();
}
void ergodox_board_led_on(void){
}
void ergodox_right_led_1_on(void){
}
void ergodox_right_led_2_on(void){
}
void ergodox_right_led_3_on(void){
}
void ergodox_right_led_on(uint8_t led){
}
void ergodox_board_led_off(void){
}
void ergodox_right_led_1_off(void){
}
void ergodox_right_led_2_off(void){
}
void ergodox_right_led_3_off(void){
}
void ergodox_right_led_off(uint8_t led){
}

@ -0,0 +1,110 @@
#ifndef KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_
#define KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_
#include "quantum.h"
void ergodox_board_led_on(void);
void ergodox_right_led_1_on(void);
void ergodox_right_led_2_on(void);
void ergodox_right_led_3_on(void);
void ergodox_right_led_on(uint8_t led);
void ergodox_board_led_off(void);
void ergodox_right_led_1_off(void);
void ergodox_right_led_2_off(void);
void ergodox_right_led_3_off(void);
void ergodox_right_led_off(uint8_t led);
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();
}
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();
}
inline void ergodox_right_led_1_set(uint8_t n){
if (n) {
ergodox_right_led_1_on();
} else {
ergodox_right_led_1_off();
}
}
inline void ergodox_right_led_2_set(uint8_t n){
if (n) {
ergodox_right_led_2_on();
} else {
ergodox_right_led_2_off();
}
}
inline void ergodox_right_led_3_set(uint8_t n){
if (n) {
ergodox_right_led_3_on();
} else {
ergodox_right_led_3_off();
}
}
inline void ergodox_right_led_set(uint8_t led, uint8_t n){
if (n) {
ergodox_right_led_on(led);
} else {
ergodox_right_led_off(led);
}
}
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( \
A80, A70, A60, A50, A40, A30, A20, \
A81, A71, A61, A51, A41, A31, A21, \
A82, A72, A62, A52, A42, A32, \
A83, A73, A63, A53, A43, A33, A23, \
A84, A74, A64, A54, A44, \
A13, A03, \
A04, \
A34, A24, A14, \
B20, B30, B40, B50, B60, B70, B80, \
B21, B31, B41, B51, B61, B71, B81, \
B32, B42, B52, B62, B72, B82, \
B23, B33, B43, B53, B63, B73, B83, \
B44, B54, B64, B74, B84, \
B03, B13, \
B04, \
B14, B24, B34 \
) { \
{ KC_NO, KC_NO, KC_NO, A03, A04 }, \
{ KC_NO, KC_NO, KC_NO, A13, A14 }, \
{ A20, A21, KC_NO, A23, A24 }, \
{ A30, A31, A32, A33, A34 }, \
{ A40, A41, A42, A43, A44 }, \
{ A50, A51, A52, A53, A54 }, \
{ A60, A61, A62, A63, A64 }, \
{ A70, A71, A72, A73, A74 }, \
{ A80, A81, A82, A83, A84 }, \
{ KC_NO, KC_NO, KC_NO, B03, B04 }, \
{ KC_NO, KC_NO, KC_NO, B13, B14 }, \
{ B20, B21, KC_NO, B23, B24 }, \
{ B30, B31, B32, B33, B34 }, \
{ B40, B41, B42, B43, B44 }, \
{ B50, B51, B52, B53, B54 }, \
{ B60, B61, B62, B63, B64 }, \
{ B70, B71, B72, B73, B74 }, \
{ B80, B81, B82, B83, B84 } \
}
#endif /* KEYBOARDS_ERGODOX_INFINITY_INFINITY_H_ */

@ -63,6 +63,8 @@ void matrix_init(void)
memset(matrix, 0, MATRIX_ROWS);
memset(matrix_debouncing, 0, LOCAL_MATRIX_ROWS);
matrix_init_quantum();
}
uint8_t matrix_scan(void)
@ -127,6 +129,7 @@ uint8_t matrix_scan(void)
}
debouncing = false;
}
matrix_scan_quantum();
return 1;
}

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_german.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

Before

Width:  |  Height:  |  Size: 814 KiB

After

Width:  |  Height:  |  Size: 814 KiB

@ -1,7 +1,7 @@
// Netable differences vs. the default firmware for the ErgoDox EZ:
// 1. The Cmd key is now on the right side, making Cmd+Space easier.
// 2. The media keys work on OSX (But not on Windows).
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_bepo.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "led.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_norwegian.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

Before

Width:  |  Height:  |  Size: 189 KiB

After

Width:  |  Height:  |  Size: 189 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,7 +1,7 @@
// Netable differences vs. the default firmware for the ErgoDox EZ:
// 1. The Cmd key is now on the right side, making Cmd+Space easier.
// 2. The media keys work on OSX (But not on Windows).
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,5 +1,5 @@
#include <keymap_extras/keymap_colemak.h>
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,7 +1,7 @@
// German keymap derived from "german", but more closely resembling the German layout of the Kinesis Ergo Elan.
//
// chschmitz, 2016-01-27
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_german.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "action_layer.h"
#include "keymap.h"
#include "keymap_german.h"

@ -12,7 +12,7 @@ Tested with python 2.7 and python 3.4
{
"layout": "ergodox_ez",
"keymaps_includes": [
"ergodox_ez.h",
"ergodox.h",
"action_layer.h",
"keymap_common.h",
"keymap_extras/keymap_german.h",

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_german.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_colemak.h"

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "led.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_german_osx.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_neo2.h"

@ -1,5 +1,5 @@
// French AZERTY version of the default_osx file
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_french_osx.h"
@ -184,4 +184,4 @@ void matrix_scan_user(void) {
break;
}
};
};

@ -5,7 +5,7 @@
// Only default layer was remapped all others layers are standard Ergodox EZ
// Very personal mapping of-course, but who knows a starting point for others.
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 218 KiB

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,7 +1,7 @@
// Based on `default_osx`
// Replace left Bksp with Ctrl/Esc
// Remove the Ctrl from Z and /
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_neo2.h"

@ -1,7 +1,7 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H 1
#include "config.h"
#include "../../config.h"
#undef LOCKING_SUPPORT_ENABLE
#undef LOCKING_RESYNC_ENABLE

@ -2,7 +2,7 @@
* SuperCoder 2000 layout
*/
#include "ergodox_ez.h"
#include "ergodox.h"
/* Layers */

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "led.h"
#include "debug.h"
#include "action_layer.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,5 +1,5 @@
/* TypeMatrix-2030-like keymap */
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "led.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -0,0 +1,44 @@
/*
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.h"
/*
* 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
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 3000
#endif

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "action_util.h"

@ -1,4 +1,2 @@
# I don't want my keyboard blinking lights when is suppose to be asleep.
SLEEP_LED_ENABLE = no
CONFIG_H = keymaps/$(KEYMAP)/config.h
SLEEP_LED_ENABLE = no

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
#include "keymap_plover.h"

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"
// readme

@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ergodox.h"
#include "debug.h"
#include "action_layer.h"

@ -1,33 +1,38 @@
# Getting started
There are two main ways you could customize the ErgoDox EZ.
There are two main ways you could customize the ErgoDox (EZ and Infinity)
## The Easy Way: Use an existing firmware file and just flash it
This does not work for Infinity ErgoDox yet, you need to compile the firmware according to the instructions below
1. Download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). Some Linux distributions already provide a binary (may be called `teensy-loader-cli`), so you may prefer to use this.
2. Find a firmware file you like. You can find a few if these in the keymaps subdirectory right here. The file you need ends with .hex, and you can look at its .c counterpart (or its PNG image) to see what you'll be getting. You can also use the [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) to create a firmware Hex file you like.
2. Find a firmware file you like. You can find a few of these in the keymaps subdirectory right here. The file you need ends with .hex, and you can look at its .c counterpart (or its PNG image) to see what you'll be getting. You can also use the [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) to create a firmware Hex file you like.
3. Download the firmware file
4. Connect the keyboard, press its Reset button (gently insert a paperclip into the hole in the top-right corner) and flash it using the Teensy loader you installed on step 1 and the firmware you downloaded.
## More technical: create your own totally custom firmware by editing the source files.
## More technical: compile an existing keymap, or create your own totally custom firmware by editing the source files.
This requires a little bit of familiarity with coding.
This requires a little bit of familiarity with coding.
If you are just compiling an existing keymap and don't want to create your own, you can skip step 4, 5 and 8.
1. Go to https://github.com/jackhumbert/qmk_firmware and read the readme at the base of this repository, top to bottom. Then come back here :)
2. Clone the repository (download it)
3. Set up a build environment as per [the build guide](/doc/BUILD_GUIDE.md)
- Using a Mac and have homebrew? just run `brew tap osx-cross/avr && brew install avr-libc`
4. Copy `keyboards/ergodox_ez/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`)
4. Copy `keyboards/ergodox/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`)
5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work.
6. Compile your firmware by running `make keymap=your_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_your_name.hex`, e.g. `ergodox_ez_german.hex`.
6. Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successfull build by running `make teensy keymap=your_name`.
7. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics.
6. Compile your firmware by running `make keymap=keymap_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `subproject=infinity` to the make command.
7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make teensy keymap=keymap_name`.
**Infinity ErgoDox** - Flash the firmware by running `make dfu-util keymap=keymap_name subproject=infinity`
8. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics.
Good luck! :)
## Contributing your keymap
The ErgoDox EZ firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed almost 20 user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox EZ. To make it easy for these people to use your layout, I recommend submitting your PR in the following format.
The ErgoDox firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed almost 20 user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format.
1. All work goes inside your keymap subdirectory (`keymaps/german` in this example).
2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did.

@ -1,92 +0,0 @@
/*
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 TAPPING_TOGGLE 1
#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 200
#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.)
/* 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
#define ONESHOT_TAP_TOGGLE 2
#define ONESHOT_TIMEOUT 3000
#endif

@ -1,44 +0,0 @@
#ifndef KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_
#define KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_
#include "quantum.h"
#define KEYMAP( \
A80, A70, A60, A50, A40, A30, A20, \
A81, A71, A61, A51, A41, A31, A21, \
A82, A72, A62, A52, A42, A32, \
A83, A73, A63, A53, A43, A33, A23, \
A84, A74, A64, A54, A44, \
A13, A03, \
A04, \
A34, A24, A14, \
B20, B30, B40, B50, B60, B70, B80, \
B21, B31, B41, B51, B61, B71, B81, \
B32, B42, B52, B62, B72, B82, \
B23, B33, B43, B53, B63, B73, B83, \
B44, B54, B64, B74, B84, \
B03, B13, \
B04, \
B14, B24, B34 \
) { \
{ KC_NO, KC_NO, KC_NO, KC_##A03, KC_##A04 }, \
{ KC_NO, KC_NO, KC_NO, KC_##A13, KC_##A14 }, \
{ KC_##A20, KC_##A21, KC_NO, KC_##A23, KC_##A24 }, \
{ KC_##A30, KC_##A31, KC_##A32, KC_##A33, KC_##A34 }, \
{ KC_##A40, KC_##A41, KC_##A42, KC_##A43, KC_##A44 }, \
{ KC_##A50, KC_##A51, KC_##A52, KC_##A53, KC_##A54 }, \
{ KC_##A60, KC_##A61, KC_##A62, KC_##A63, KC_##A64 }, \
{ KC_##A70, KC_##A71, KC_##A72, KC_##A73, KC_##A74 }, \
{ KC_##A80, KC_##A81, KC_##A82, KC_##A83, KC_##A84 }, \
{ KC_NO, KC_NO, KC_NO, KC_##B03, KC_##B04 }, \
{ KC_NO, KC_NO, KC_NO, KC_##B13, KC_##B14 }, \
{ KC_##B20, KC_##B21, KC_NO, KC_##B23, KC_##B24 }, \
{ KC_##B30, KC_##B31, KC_##B32, KC_##B33, KC_##B34 }, \
{ KC_##B40, KC_##B41, KC_##B42, KC_##B43, KC_##B44 }, \
{ KC_##B50, KC_##B51, KC_##B52, KC_##B53, KC_##B54 }, \
{ KC_##B60, KC_##B61, KC_##B62, KC_##B63, KC_##B64 }, \
{ KC_##B70, KC_##B71, KC_##B72, KC_##B73, KC_##B74 }, \
{ KC_##B80, KC_##B81, KC_##B82, KC_##B83, KC_##B84 } \
}
#endif /* KEYBOARDS_INFINITY_ERGODOX_INFINITY_ERGODOX_H_ */

@ -1,114 +0,0 @@
/*
Copyright 2016 Fred Sundvik <fsundvik@gmail.com>
Jun Wako <wakojun@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 "infinity_ergodox.h"
// Workaround for old keymap format
#define KC_RESET RESET
const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KEYMAP( // layer 0 : default
// left hand
EQL, 1, 2, 3, 4, 5, ESC,
BSLS,Q, W, E, R, T, FN1,
TAB, A, S, D, F, G,
LSFT,Z, X, C, V, B, FN0,
LGUI,GRV, BSLS,LEFT,RGHT,
LCTL,LALT,
HOME,
BSPC,DEL, END,
// right hand
FN2, 6, 7, 8, 9, 0, MINS,
LBRC,Y, U, I, O, P, RBRC,
H, J, K, L, SCLN,QUOT,
FN0, N, M, COMM,DOT, SLSH,RSFT,
LEFT,DOWN,UP, RGHT,RGUI,
RALT,RCTL,
PGUP,
PGDN,ENT, SPC
),
KEYMAP( // layer 1 : function and symbol keys
// left hand
TRNS,F1, F2, F3, F4, F5, F11,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,FN3,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS,
// right hand
F12, F6, F7, F8, F9, F10, TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS
),
KEYMAP( // layer 2 : keyboard functions
// left hand
RESET,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, FN3,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS,
// right hand
TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS
),
KEYMAP( // layer 3: numpad
// left hand
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,TRNS,TRNS,TRNS,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS,
// right hand
TRNS,NLCK,PSLS,PAST,PAST,PMNS,BSPC,
TRNS,NO, P7, P8, P9, PMNS,BSPC,
NO, P4, P5, P6, PPLS,PENT,
TRNS,NO, P1, P2, P3, PPLS,PENT,
P0, PDOT,SLSH,PENT,PENT,
TRNS,TRNS,
TRNS,
TRNS,TRNS,TRNS
),
};
const uint16_t fn_actions[] = {
ACTION_LAYER_MOMENTARY(1), // FN0 - switch to Layer1
ACTION_LAYER_SET(2, ON_PRESS), // FN1 - set Layer2
ACTION_LAYER_TOGGLE(3), // FN2 - toggle Layer3 aka Numpad layer
ACTION_LAYER_SET(0, ON_PRESS), // FN3 - set Layer0
};

@ -1,168 +0,0 @@
/*
Copyright 2016 Fred Sundvik <fsundvik@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/>.
*/
// Currently we are assuming that both the backlight and LCD are enabled
// But it's entirely possible to write a custom visualizer that use only
// one of them
#ifndef LCD_BACKLIGHT_ENABLE
#error This visualizer needs that LCD backlight is enabled
#endif
#ifndef LCD_ENABLE
#error This visualizer needs that LCD is enabled
#endif
#include "visualizer.h"
#include "led_test.h"
static const char* welcome_text[] = {"TMK", "Infinity Ergodox"};
// Just an example how to write custom keyframe functions, we could have moved
// all this into the init function
bool display_welcome(keyframe_animation_t* animation, visualizer_state_t* state) {
(void)animation;
// Read the uGFX documentation for information how to use the displays
// http://wiki.ugfx.org/index.php/Main_Page
gdispClear(White);
// You can use static variables for things that can't be found in the animation
// or state structs
gdispDrawString(0, 3, welcome_text[0], state->font_dejavusansbold12, Black);
gdispDrawString(0, 15, welcome_text[1], state->font_dejavusansbold12, Black);
// Always remember to flush the display
gdispFlush();
// you could set the backlight color as well, but we won't do it here, since
// it's part of the following animation
// lcd_backlight_color(hue, saturation, intensity);
// We don't need constant updates, just drawing the screen once is enough
return false;
}
// Feel free to modify the animations below, or even add new ones if needed
// Don't worry, if the startup animation is long, you can use the keyboard like normal
// during that time
static keyframe_animation_t startup_animation = {
.num_frames = 4,
.loop = false,
.frame_lengths = {0, gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(5000), 0},
.frame_functions = {
display_welcome,
keyframe_animate_backlight_color,
keyframe_no_operation,
enable_visualization
},
};
// The color animation animates the LCD color when you change layers
static keyframe_animation_t color_animation = {
.num_frames = 2,
.loop = false,
// Note that there's a 200 ms no-operation frame,
// this prevents the color from changing when activating the layer
// momentarily
.frame_lengths = {gfxMillisecondsToTicks(200), gfxMillisecondsToTicks(500)},
.frame_functions = {keyframe_no_operation, keyframe_animate_backlight_color},
};
// The LCD animation alternates between the layer name display and a
// bitmap that displays all active layers
static keyframe_animation_t lcd_animation = {
.num_frames = 2,
.loop = true,
.frame_lengths = {gfxMillisecondsToTicks(2000), gfxMillisecondsToTicks(2000)},
.frame_functions = {keyframe_display_layer_text, keyframe_display_layer_bitmap},
};
static keyframe_animation_t suspend_animation = {
.num_frames = 3,
.loop = false,
.frame_lengths = {0, gfxMillisecondsToTicks(1000), 0},
.frame_functions = {
keyframe_display_layer_text,
keyframe_animate_backlight_color,
keyframe_disable_lcd_and_backlight,
},
};
static keyframe_animation_t resume_animation = {
.num_frames = 5,
.loop = false,
.frame_lengths = {0, 0, gfxMillisecondsToTicks(1000), gfxMillisecondsToTicks(5000), 0},
.frame_functions = {
keyframe_enable_lcd_and_backlight,
display_welcome,
keyframe_animate_backlight_color,
keyframe_no_operation,
enable_visualization,
},
};
void initialize_user_visualizer(visualizer_state_t* state) {
// The brightness will be dynamically adjustable in the future
// But for now, change it here.
lcd_backlight_brightness(0x50);
state->current_lcd_color = LCD_COLOR(0x00, 0x00, 0xFF);
state->target_lcd_color = LCD_COLOR(0x10, 0xFF, 0xFF);
start_keyframe_animation(&startup_animation);
start_keyframe_animation(&led_test_animation);
}
void update_user_visualizer_state(visualizer_state_t* state) {
// Add more tests, change the colors and layer texts here
// Usually you want to check the high bits (higher layers first)
// because that's the order layers are processed for keypresses
// You can for check for example:
// state->status.layer
// state->status.default_layer
// state->status.leds (see led.h for available statuses)
if (state->status.layer & 0x8) {
state->target_lcd_color = LCD_COLOR(0xC0, 0xB0, 0xFF);
state->layer_text = "Numpad";
}
else if (state->status.layer & 0x4) {
state->target_lcd_color = LCD_COLOR(0, 0xB0, 0xFF);
state->layer_text = "KBD functions";
}
else if (state->status.layer & 0x2) {
state->target_lcd_color = LCD_COLOR(0x80, 0xB0, 0xFF);
state->layer_text = "Function keys";
}
else {
state->target_lcd_color = LCD_COLOR(0x40, 0xB0, 0xFF);
state->layer_text = "Default";
}
// You can also stop existing animations, and start your custom ones here
// remember that you should normally have only one animation for the LCD
// and one for the background. But you can also combine them if you want.
start_keyframe_animation(&lcd_animation);
start_keyframe_animation(&color_animation);
}
void user_visualizer_suspend(visualizer_state_t* state) {
state->layer_text = "Suspending...";
uint8_t hue = LCD_HUE(state->current_lcd_color);
uint8_t sat = LCD_SAT(state->current_lcd_color);
state->target_lcd_color = LCD_COLOR(hue, sat, 0);
start_keyframe_animation(&suspend_animation);
}
void user_visualizer_resume(visualizer_state_t* state) {
state->current_lcd_color = LCD_COLOR(0x00, 0x00, 0x00);
state->target_lcd_color = LCD_COLOR(0x10, 0xFF, 0xFF);
start_keyframe_animation(&resume_animation);
start_keyframe_animation(&led_test_animation);
}

@ -25,6 +25,7 @@
#include "led.h"
#include "action_util.h"
#include <stdlib.h>
#include "print.h"
extern uint32_t default_layer_state;

@ -29,7 +29,9 @@
#include <stdbool.h>
#include "util.h"
#if defined(PROTOCOL_CHIBIOS)
#define PSTR(x) x
#endif
#ifndef NO_PRINT

@ -253,6 +253,14 @@ MSG_SUBMODULE_DIRTY = $(WARN_COLOR)WARNING:$(NO_COLOR)\n \
# Define all object files.
OBJ = $(patsubst %.c,$(OBJDIR)/%.o,$(patsubst %.cpp,$(OBJDIR)/%.o,$(patsubst %.S,$(OBJDIR)/%.o,$(SRC))))
# The files in the lib folder are shared between all keymaps, so generate that folder name by removing
# the keymap from the name
KBOBJDIR=$(subst _$(KEYMAP),,$(OBJDIR))
# And fixup the object files to match
LIBOBJ = $(foreach v,$(OBJ),$(if $(findstring /lib/,$v),$v))
NONLIBOBJ := $(filter-out $(LIBOBJ),$(OBJ))
LIBOBJ := $(subst _$(KEYMAP)/,/,$(LIBOBJ))
OBJ := $(LIBOBJ) $(NONLIBOBJ)
# Define all listing files.
LST = $(patsubst %.c,$(OBJDIR)/%.lst,$(patsubst %.cpp,$(OBJDIR)/%.lst,$(patsubst %.S,$(OBJDIR)/%.lst,$(SRC))))
@ -370,20 +378,35 @@ BEGIN = gccversion check_submodule sizebefore
$(eval CMD=$(CC) $(ALL_CFLAGS) $^ --output $@ $(LDFLAGS))
@$(BUILD_CMD)
define GEN_OBJRULE
# Compile: create object files from C source files.
$(OBJDIR)/%.o : %.c | $(BEGIN)
@mkdir -p $(@D)
@$(SILENT) || printf "$(MSG_COMPILING) $<" | $(AWK_CMD)
$(eval CMD=$(CC) -c $(ALL_CFLAGS) $< -o $@)
@$(BUILD_CMD)
$1/%.o : %.c | $(BEGIN)
@mkdir -p $$(@D)
@$$(SILENT) || printf "$$(MSG_COMPILING) $$<" | $$(AWK_CMD)
$$(eval CMD=$$(CC) -c $$(ALL_CFLAGS) $$< -o $$@)
@$$(BUILD_CMD)
# Compile: create object files from C++ source files.
$(OBJDIR)/%.o : %.cpp | $(BEGIN)
@mkdir -p $(@D)
@$(SILENT) || printf "$(MSG_COMPILING_CPP) $<" | $(AWK_CMD)
$(eval CMD=$(CC) -c $(ALL_CPPFLAGS) $< -o $@)
$1/%.o : %.cpp | $(BEGIN)
@mkdir -p $$(@D)
@$$(SILENT) || printf "$$(MSG_COMPILING_CPP) $$<" | $$(AWK_CMD)
$$(eval CMD=$$(CC) -c $$(ALL_CPPFLAGS) $$< -o $$@)
@$(BUILD_CMD)
# Assemble: create object files from assembler source files.
$1/%.o : %.S | $(BEGIN)
@mkdir -p $$(@D)
@$(SILENT) || printf "$$(MSG_ASSEMBLING) $$<" | $$(AWK_CMD)
$$(eval CMD=$$(CC) -c $$(ALL_ASFLAGS) $$< -o $$@)
@$$(BUILD_CMD)
endef
# Since the object files could be in two different folders, generate
# separate rules for them, rather than having too generic rules
$(eval $(call GEN_OBJRULE,$(OBJDIR)))
$(eval $(call GEN_OBJRULE,$(KBOBJDIR)))
# Compile: create assembler files from C source files.
%.s : %.c | $(BEGIN)
@$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
@ -396,13 +419,6 @@ $(OBJDIR)/%.o : %.cpp | $(BEGIN)
$(eval CMD=$(CC) -S $(ALL_CPPFLAGS) $< -o $@)
@$(BUILD_CMD)
# Assemble: create object files from assembler source files.
$(OBJDIR)/%.o : %.S | $(BEGIN)
@mkdir -p $(@D)
@$(SILENT) || printf "$(MSG_ASSEMBLING) $<" | $(AWK_CMD)
$(eval CMD=$(CC) -c $(ALL_ASFLAGS) $< -o $@)
@$(BUILD_CMD)
# Create preprocessed source for use in sending a bug report.
%.i : %.c | $(BEGIN)
$(CC) -E -mmcu=$(MCU) $(CFLAGS) $< -o $@
@ -486,7 +502,7 @@ $(shell mkdir $(BUILD_DIR) 2>/dev/null)
# Create object files directory
$(shell mkdir $(OBJDIR) 2>/dev/null)
$(shell mkdir $(KBOBJDIR) 2>/dev/null)
# Include the dependency files.
-include $(shell mkdir $(BUILD_DIR)/.dep 2>/dev/null) $(wildcard $(BUILD_DIR)/.dep/*)

Loading…
Cancel
Save