Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add both Ergodox EZ and Infinity Ergodox as sub-projects of Ergodox #503

Merged
merged 20 commits into from
Jul 30, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
9af995c
Initial structure for Ergodox as subprojects
fredizzimo Jul 7, 2016
b037668
All Ez keymaps compiles
fredizzimo Jul 8, 2016
e01b4c3
Most ergodox keymaps compiles on Infinity
fredizzimo Jul 8, 2016
e0f28c2
Add empty led control functions to Infinity Ergodox
fredizzimo Jul 8, 2016
e7670f6
Move some of the Ergodox config settings to shared
fredizzimo Jul 9, 2016
1641743
Change _delay_ms to wait_ms in algernon keymap
fredizzimo Jul 9, 2016
bf1c865
Speed up ChibiOS keymap compilation
fredizzimo Jul 9, 2016
a6577b2
Define weak matrix user function for Infinity Ergodox
fredizzimo Jul 9, 2016
426e9ec
Fix config.h include guards
fredizzimo Jul 10, 2016
fd7f20b
Rename supercoder config_user to config.h
fredizzimo Jul 10, 2016
650298c
Cleanup the townk_osx config.h and make files
fredizzimo Jul 10, 2016
37052a5
Remove the Infinity Ergodox default keymap
fredizzimo Jul 10, 2016
592ef7c
Move Infinity Ergodox drivers to subproject, and fix makefile
fredizzimo Jul 10, 2016
ad416fb
Include the main Makefile before including Ergodox infinity drivers
fredizzimo Jul 10, 2016
349f189
Move Ergodox readme from ez subfolder to parent
fredizzimo Jul 10, 2016
44cefcb
Refer to the right path in the readme
fredizzimo Jul 10, 2016
c65da1f
Unify the ErgoDox EZ and Infinity documentation
fredizzimo Jul 10, 2016
401dd09
A couple of more Ergodox readme fixes
fredizzimo Jul 10, 2016
6e8a5ac
Fix typo in the readme.
fredizzimo Jul 10, 2016
566c795
Small fix for infinity include guard
fredizzimo Jul 12, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions keyboards/ergodox/Makefile
Original file line number Diff line number Diff line change
@@ -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
36 changes: 36 additions & 0 deletions keyboards/ergodox/config.h
Original file line number Diff line number Diff line change
@@ -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_ */
Empty file added keyboards/ergodox/ergodox.c
Empty file.
10 changes: 10 additions & 0 deletions keyboards/ergodox/ergodox.h
Original file line number Diff line number Diff line change
@@ -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_ */
File renamed without changes.
12 changes: 1 addition & 11 deletions keyboards/ergodox_ez/Makefile → keyboards/ergodox/ez/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
33 changes: 7 additions & 26 deletions keyboards/ergodox_ez/config.h → keyboards/ergodox/ez/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "ergodox_ez.h"
#include "ez.h"
#include "i2cmaster.h"

bool i2c_initialized = 0;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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);
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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){
}
Loading