From d3db8d62f6fc6a7dee43978ddc8356579b502b37 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Wed, 28 Oct 2015 04:07:15 +0200 Subject: More work on ErgoDox EZ default keymap --- keyboard/ergodox_ez/Makefile | 16 +- keyboard/ergodox_ez/config.h | 2 +- keyboard/ergodox_ez/ergodox_ez.c | 29 - keyboard/ergodox_ez/ergodox_ez.h | 21 - keyboard/ergodox_ez/ergodox_ez.hex | 2880 +++++++++++++------------- keyboard/ergodox_ez/keymaps/keymap_default.c | 46 +- keyboard/ergodox_ez/matrix.c | 4 +- 7 files changed, 1436 insertions(+), 1562 deletions(-) (limited to 'keyboard/ergodox_ez') diff --git a/keyboard/ergodox_ez/Makefile b/keyboard/ergodox_ez/Makefile index f9260b1ced..16ced9032b 100644 --- a/keyboard/ergodox_ez/Makefile +++ b/keyboard/ergodox_ez/Makefile @@ -27,7 +27,8 @@ TARGET_DIR = . # # project specific files SRC = ergodox_ez.c \ - twimaster.c + twimaster.c \ + matrix.c ifdef KEYMAP SRC := keymaps/keymap_$(KEYMAP).c $(SRC) @@ -84,17 +85,18 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +OPT_DEFS += -DBOOTLOADER_SIZE=512 # 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 +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 +CUSTOM_MATRIX = yes # Custom matrix file for the ErgoDox EZ # 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 diff --git a/keyboard/ergodox_ez/config.h b/keyboard/ergodox_ez/config.h index 850d245791..583ad84f58 100644 --- a/keyboard/ergodox_ez/config.h +++ b/keyboard/ergodox_ez/config.h @@ -52,7 +52,7 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 2 -#define TAPPING_TERM 100 +#define TAPPING_TERM 200 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE diff --git a/keyboard/ergodox_ez/ergodox_ez.c b/keyboard/ergodox_ez/ergodox_ez.c index f7e156b319..78e956a042 100644 --- a/keyboard/ergodox_ez/ergodox_ez.c +++ b/keyboard/ergodox_ez/ergodox_ez.c @@ -4,10 +4,6 @@ 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) { @@ -92,32 +88,7 @@ uint8_t init_mcp23018(void) { 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<