summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--keyboards/gergo/config.h73
-rw-r--r--keyboards/gergo/gergo.c66
-rw-r--r--keyboards/gergo/gergo.h58
-rw-r--r--keyboards/gergo/i2cmaster.h178
-rw-r--r--keyboards/gergo/info.json277
-rw-r--r--keyboards/gergo/keymaps/default/keymap.c151
-rw-r--r--keyboards/gergo/keymaps/default/readme.md10
-rw-r--r--keyboards/gergo/keymaps/default/rules.mk36
-rw-r--r--keyboards/gergo/matrix.c517
-rw-r--r--keyboards/gergo/readme.md26
-rw-r--r--keyboards/gergo/rules.mk20
11 files changed, 1412 insertions, 0 deletions
diff --git a/keyboards/gergo/config.h b/keyboards/gergo/config.h
new file mode 100644
index 0000000000..a795f8dba1
--- /dev/null
+++ b/keyboards/gergo/config.h
@@ -0,0 +1,73 @@
+/*
+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/>.
+*/
+
+// Copy and worked on with love from the EZ team
+
+#pragma once
+#include "config_common.h"
+
+/* Defaults */
+#ifndef BALLSTEP
+#define BALLSTEP 20
+#endif
+
+#ifndef SCROLLSTEP
+#define SCROLLSTEP 1
+#endif
+
+#define VERBOSE
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1307
+#define DEVICE_VER 0x0001
+#define MANUFACTURER g Heavy Industries
+#define PRODUCT Gergo
+#define DESCRIPTION QMK keyboard firmware for Gergo
+
+/* key matrix size */
+#define MATRIX_ROWS 14
+#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
+#define MATRIX_COLS 4
+
+#define MOUSEKEY_INTERVAL 20
+#define MOUSEKEY_DELAY 0
+#define MOUSEKEY_TIME_TO_MAX 60
+#define MOUSEKEY_MAX_SPEED 7
+#define MOUSEKEY_WHEEL_DELAY 0
+#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)) \
+)
+
+#define DEBOUNCE 5
+#define USB_MAX_POWER_CONSUMPTION 500
diff --git a/keyboards/gergo/gergo.c b/keyboards/gergo/gergo.c
new file mode 100644
index 0000000000..c6ba91bb28
--- /dev/null
+++ b/keyboards/gergo/gergo.c
@@ -0,0 +1,66 @@
+#include QMK_KEYBOARD_H
+
+bool i2c_initialized = 0;
+i2c_status_t mcp23018_status = 0x20;
+
+void matrix_init_kb(void) {
+ // (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-up enabled
+ DDRC &= ~(1<<7);
+ DDRD &= ~(1<<5 | 1<<4 | 1<<6 | 1<<7);
+ DDRE &= ~(1<<6);
+ PORTC |= (1<<7);
+ PORTD |= (1<<5 | 1<<4 | 1<<6 | 1<<7);
+ PORTE |= (1<<6);
+
+ matrix_init_user();
+}
+
+
+uint8_t init_mcp23018(void) {
+ print("starting init");
+ mcp23018_status = 0x20;
+
+ // I2C subsystem
+
+ // uint8_t sreg_prev;
+ // sreg_prev=SREG;
+ // cli();
+
+ if (i2c_initialized == 0) {
+ i2c_init(); // on pins D(1,0)
+ i2c_initialized = true;
+ _delay_ms(1000);
+ }
+ // i2c_init(); // on pins D(1,0)
+ // _delay_ms(1000);
+
+ // set pin direction
+ // - unused : input : 1
+ // - input : input : 1
+ // - driving : output : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(IODIRA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+
+ // set pull-up
+ // - unused : on : 1
+ // - input : on : 1
+ // - driving : off : 0
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPPUA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b10000000, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(0b11111111, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+
+out:
+ i2c_stop(ERGODOX_EZ_I2C_TIMEOUT);
+ // SREG=sreg_prev;
+ //uprintf("Init %x\n", mcp23018_status);
+ return mcp23018_status;
+}
diff --git a/keyboards/gergo/gergo.h b/keyboards/gergo/gergo.h
new file mode 100644
index 0000000000..c0d885029b
--- /dev/null
+++ b/keyboards/gergo/gergo.h
@@ -0,0 +1,58 @@
+#pragma once
+#include <util/delay.h>
+#include <stdint.h>
+#include <stdbool.h>
+#include "quantum.h"
+#include "i2c_master.h"
+#include "matrix.h"
+
+
+extern i2c_status_t mcp23018_status;
+#define ERGODOX_EZ_I2C_TIMEOUT 1000
+#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 0x20
+#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
+
+void init_ergodox(void);
+uint8_t init_mcp23018(void);
+
+/* ---------- LEFT HAND ----------- ---------- RIGHT HAND ---------- */
+#define LAYOUT_GERGO( \
+ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05, \
+ L10,L11,L12,L13,L14,L15,L16, R10,R11,R12,R13,R14,R15,R16, \
+ L20,L21,L22,L23,L24,L25,L26, R20,R21,R22,R23,R24,R25,R26, \
+ L31,L32, R33,R34, \
+ L30, R30, \
+ L33,L34, R31,R32) \
+ \
+ /* matrix positions */ \
+ { \
+ { KC_NO, L16, L26, L30}, \
+ { L05, L15, L25, L34}, \
+ { L04, L14, L24, L33}, \
+ { L03, L13, L23, L32}, \
+ { L02, L12, L22, L31}, \
+ { L01, L11, L21, KC_NO}, \
+ { L00, L10, L20, KC_NO}, \
+ \
+ { R10, KC_NO, R20, R30}, \
+ { R00, R11, R21, R31}, \
+ { R01, R12, R22, R32}, \
+ { R02, R13, R23, R33}, \
+ { R03, R14, R24, R34}, \
+ { R04, R15, R25, KC_NO}, \
+ { R05, R16, R26, KC_NO}, \
+}
diff --git a/keyboards/gergo/i2cmaster.h b/keyboards/gergo/i2cmaster.h
new file mode 100644
index 0000000000..72e0508494
--- /dev/null
+++ b/keyboards/gergo/i2cmaster.h
@@ -0,0 +1,178 @@
+#ifndef _I2CMASTER_H
+#define _I2CMASTER_H 1
+/*************************************************************************
+* Title: C include file for the I2C master interface
+* (i2cmaster.S or twimaster.c)
+* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury
+* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $
+* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3
+* Target: any AVR device
+* Usage: see Doxygen manual
+**************************************************************************/
+
+#ifdef DOXYGEN
+/**
+ @defgroup pfleury_ic2master I2C Master library
+ @code #include <i2cmaster.h> @endcode
+
+ @brief I2C (TWI) Master Software Library
+
+ Basic routines for communicating with I2C slave devices. This single master
+ implementation is limited to one bus master on the I2C bus.
+
+ This I2c library is implemented as a compact assembler software implementation of the I2C protocol
+ which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c).
+ Since the API for these two implementations is exactly the same, an application can be linked either against the
+ software I2C implementation or the hardware I2C implementation.
+
+ Use 4.7k pull-up resistor on the SDA and SCL pin.
+
+ Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module
+ i2cmaster.S to your target when using the software I2C implementation !
+
+ Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion.
+
+ @note
+ The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted
+ to GNU assembler and AVR-GCC C call interface.
+ Replaced the incorrect quarter period delays found in AVR300 with
+ half period delays.
+
+ @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury
+
+ @par API Usage Example
+ The following code shows typical usage of this library, see example test_i2cmaster.c
+
+ @code
+
+ #include <i2cmaster.h>
+
+
+ #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet
+
+ int main(void)
+ {
+ unsigned char ret;
+
+ i2c_init(); // initialize I2C library
+
+ // write 0x75 to EEPROM address 5 (Byte Write)
+ i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
+ i2c_write(0x05); // write address = 5
+ i2c_write(0x75); // write value 0x75 to EEPROM
+ i2c_stop(); // set stop conditon = release bus
+
+
+ // read previously written value back from EEPROM address 5
+ i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode
+
+ i2c_write(0x05); // write address = 5
+ i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode
+
+ ret = i2c_readNak(); // read one byte from EEPROM
+ i2c_stop();
+
+ for(;;);
+ }
+ @endcode
+
+*/
+#endif /* DOXYGEN */
+
+/**@{*/
+
+#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304
+#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !"
+#endif
+
+#include <avr/io.h>
+
+/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */
+#define I2C_READ 1
+
+/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */
+#define I2C_WRITE 0
+
+
+/**
+ @brief initialize the I2C master interace. Need to be called only once
+ @param void
+ @return none
+ */
+void i2c_init(void);
+
+
+/**
+ @brief Terminates the data transfer and releases the I2C bus
+ @param void
+ @return none
+ */
+void i2c_stop(void);
+
+
+/**
+ @brief Issues a start condition and sends address and transfer direction
+
+ @param addr address and transfer direction of I2C device
+ @retval 0 device accessible
+ @retval 1 failed to access device
+ */
+unsigned char i2c_start(unsigned char addr);
+
+
+/**
+ @brief Issues a repeated start condition and sends address and transfer direction
+
+ @param addr address and transfer direction of I2C device
+ @retval 0 device accessible
+ @retval 1 failed to access device
+ */
+unsigned char i2c_rep_start(unsigned char addr);
+
+
+/**
+ @brief Issues a start condition and sends address and transfer direction
+
+ If device is busy, use ack polling to wait until device ready
+ @param addr address and transfer direction of I2C device
+ @return none
+ */
+void i2c_start_wait(unsigned char addr);
+
+
+/**
+ @brief Send one byte to I2C device
+ @param data byte to be transfered
+ @retval 0 write successful
+ @retval 1 write failed
+ */
+unsigned char i2c_write(unsigned char data);
+
+
+/**
+ @brief read one byte from the I2C device, request more data from device
+ @return byte read from I2C device
+ */
+unsigned char i2c_readAck(void);
+
+/**
+ @brief read one byte from the I2C device, read is followed by a stop condition
+ @return byte read from I2C device
+ */
+unsigned char i2c_readNak(void);
+
+/**
+ @brief read one byte from the I2C device
+
+ Implemented as a macro, which calls either i2c_readAck or i2c_readNak
+
+ @param ack 1 send ack, request more data from device<br>
+ 0 send nak, read is followed by a stop condition
+ @return byte read from I2C device
+ */
+unsigned char i2c_read(unsigned char ack);
+#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak();
+
+
+/**@}*/
+#endif
diff --git a/keyboards/gergo/info.json b/keyboards/gergo/info.json
new file mode 100644
index 0000000000..433582b54b
--- /dev/null
+++ b/keyboards/gergo/info.json
@@ -0,0 +1,277 @@
+{
+ "maintainer": "germ",
+ "height": 4.75,
+ "width": 19.5,
+ "keyboard_name": "Gergo",
+ "url": "http://gboards.ca",
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {
+ "label": "L00",
+ "w": 1.5,
+ "x": 0,
+ "y": 0.38
+ },
+ {
+ "label": "L01",
+ "x": 1.5,
+ "y": 0.38
+ },
+ {
+ "label": "L02",
+ "x": 2.5,
+ "y": 0.13
+ },
+ {
+ "label": "L03",
+ "x": 3.5,
+ "y": 0
+ },
+ {
+ "label": "L04",
+ "x": 4.5,
+ "y": 0.13
+ },
+ {
+ "label": "L05",
+ "x": 5.5,
+ "y": 0.25
+ },
+ {
+ "label": "R00",
+ "x": 13,
+ "y": 0.25
+ },
+ {
+ "label": "R01",
+ "x": 14,
+ "y": 0.13
+ },
+ {
+ "label": "R02",
+ "x": 15,
+ "y": 0
+ },
+ {
+ "label": "R03",
+ "x": 16,
+ "y": 0.13
+ },
+ {
+ "label": "R04",
+ "x": 17,
+ "y": 0.38
+ },
+ {
+ "label": "R05",
+ "w": 1.5,
+ "x": 18,
+ "y": 0.38
+ },
+ {
+ "label": "L10",
+ "w": 1.5,
+ "x": 0,
+ "y": 1.3800000000000001
+ },
+ {
+ "label": "L11",
+ "x": 1.5,
+ "y": 1.3800000000000001
+ },
+ {
+ "label": "L12",
+ "x": 2.5,
+ "y": 1.1300000000000001
+ },
+ {
+ "label": "L13",
+ "x": 3.5,
+ "y": 1.0
+ },
+ {
+ "label": "L14",
+ "x": 4.5,
+ "y": 1.1300000000000001
+ },
+ {
+ "label": "L15",
+ "x": 5.5,
+ "y": 1.25
+ },
+ {
+ "h": 1.5,
+ "label": "L16",
+ "x": 6.5,
+ "y": 0.25
+ },
+ {
+ "h": 1.5,
+ "label": "R10",
+ "x": 12,
+ "y": 0.25
+ },
+ {
+ "label": "R11",
+ "x": 13,
+ "y": 1.25
+ },
+ {
+ "label": "R12",
+ "x": 14,
+ "y": 1.1300000000000001
+ },
+ {
+ "label": "R13",
+ "x": 15,
+ "y": 1.0
+ },
+ {
+ "label": "R14",
+ "x": 16,
+ "y": 1.1300000000000001
+ },
+ {
+ "label": "R15",
+ "x": 17,
+ "y": 1.3800000000000001
+ },
+ {
+ "label": "R16",
+ "w": 1.5,
+ "x": 18,
+ "y": 1.3800000000000001
+ },
+ {
+ "label": "L20",
+ "w": 1.5,
+ "x": 0,
+ "y": 2.38
+ },
+ {
+ "label": "L21",
+ "x": 1.5,
+ "y": 2.38
+ },
+ {
+ "label": "L22",
+ "x": 2.5,
+ "y": 2.13
+ },
+ {
+ "label": "L23",
+ "x": 3.5,
+ "y": 2
+ },
+ {
+ "label": "L24",
+ "x": 4.5,
+ "y": 2.13
+ },
+ {
+ "label": "L25",
+ "x": 5.5,
+ "y": 2.25
+ },
+ {
+ "h": 1.5,
+ "label": "L26",
+ "x": 6.5,
+ "y": 1.75
+ },
+ {
+ "h": 1.5,
+ "label": "R20",
+ "x": 12,
+ "y": 1.75
+ },
+ {
+ "label": "R21",
+ "x": 13,
+ "y": 2.25
+ },
+ {
+ "label": "R22",
+ "x": 14,
+ "y": 2.13
+ },
+ {
+ "label": "R23",
+ "x": 15,
+ "y": 2
+ },
+ {
+ "label": "R24",
+ "x": 16,
+ "y": 2.13
+ },
+ {
+ "label": "R25",
+ "x": 17,
+ "y": 2.38
+ },
+ {
+ "label": "R26",
+ "w": 1.5,
+ "x": 18,
+ "y": 2.38
+ },
+ {
+ "label": "L31",
+ "x": 4.75,
+ "y": 3.25
+ },
+ {
+ "label": "L32",
+ "x": 6,
+ "y": 3.63
+ },
+ {
+ "label": "R33",
+ "x": 12.5,
+ "y": 3.63
+ },
+ {
+ "label": "R34",
+ "x": 13.75,
+ "y": 3.25
+ },
+ {
+ "label": "L30",
+ "x": 8.25,
+ "y": 2.75
+ },
+ {
+ "label": "R30",
+ "x": 10.25,
+ "y": 2.75
+ },
+ {
+ "h": 2,
+ "label": "L33",
+ "x": 7.25,
+ "y": 3.75
+ },
+ {
+ "h": 2,
+ "label": "L34",
+ "x": 8.25,
+ "y": 3.75
+ },
+ {
+ "h": 2,
+ "label": "R31",
+ "x": 10.25,
+ "y": 3.75
+ },
+ {
+ "h": 2,
+ "label": "R32",
+ "x": 11.25,
+ "y": 3.75
+ }
+ ]
+ }
+ }
+}
diff --git a/keyboards/gergo/keymaps/default/keymap.c b/keyboards/gergo/keymaps/default/keymap.c
new file mode 100644
index 0000000000..fabd945fef
--- /dev/null
+++ b/keyboards/gergo/keymaps/default/keymap.c
@@ -0,0 +1,151 @@
+/* Good on you for modifying your layout! if you don't have
+ * time to read the QMK docs, a list of keycodes can be found at
+ *
+ * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
+ *
+ * There's also a template for adding new layers at the bottom of this file!
+ */
+
+#include QMK_KEYBOARD_H
+
+#define IGNORE_MOD_TAP_INTERRUPT
+#define BASE 0 // default layer
+#define SYMB 1 // symbols
+#define NUMB 2 // numbers/motion
+
+// Blank template at the bottom
+
+enum customKeycodes {
+ URL = 1
+};
+
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap 0: Basic layer
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | L1/ESC | Q | W | E | R | T | | Y | U | I | O | P | | \ |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * |Ctrl/BS | A | S | D | F | G | RMB | | | H | J | K | L | ; : | ' " |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | LShift | Z | X | C | V | B | LMB | | | N | M | , < | . > | / ? | - _ |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .----------. .-------. .------. .-----.
+ * | Super/Del| |Ent/ALT| | Tab | |BKSP |
+ * '----------' '-------' `------. '-----'
+ * ,-------. ,-------.
+ * | MMB | | PgDn |
+ * ,------|-------| |-------|------.
+ * | SYMB | NUMB | | SYMB | NUMB |
+ * | Space| Escape| | Mod |Space |
+ * | | | | | |
+ * `--------------' `--------------'
+ */
+[BASE] = LAYOUT_GERGO(
+LT(NUMB, KC_ESC), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_PIPE,
+MT(MOD_LCTL, KC_BSPC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_BTN2, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+KC_RSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BTN1, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
+
+ MT(MOD_LGUI, KC_DEL), MT(MOD_LALT, KC_ENT), KC_TAB, KC_BSPC,
+
+ KC_BTN3, KC_PGDN,
+ LT(SYMB, KC_SPC), LT(NUMB, KC_ESC), LT(SYMB, KC_ENT), LT(NUMB, KC_SPC)),
+/* Keymap 1: Symbols layer
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | | ! | @ | { | } | | | | | | | | | \ | |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * | | # | $ | ( | ) | ` | | | | + | - | / | * | % | ' " |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | | % | ^ | [ | ] | ~ | | | | & | = | , | . | / ? | - _ |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .------. .------. .------. .-----.
+ * | | | | | | | DEL |
+ * '------' '------' `------. '-----'
+ * ,-------. ,-------.
+ * | | | PgUp |
+ * ,------|-------| |-------|------.
+ * | | | | | |
+ * | ; | = | | = | ; |
+ * | | | | | |
+ * `--------------' `--------------'
+ */
+[SYMB] = LAYOUT_GERGO(
+KC_TRNS, KC_EXLM, KC_AT, KC_LCBR,KC_RCBR, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS,
+KC_TRNS, KC_HASH, KC_DLR, KC_LPRN,KC_RPRN, KC_GRV, KC_TRNS, KC_TRNS, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_PERC, KC_QUOT,
+KC_TRNS, KC_PERC, KC_CIRC,KC_LBRC,KC_RBRC, KC_TILD, KC_TRNS, KC_TRNS, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_SLSH, KC_MINS,
+
+ KC_TRNS, KC_TRNS, KC_PGUP, KC_DEL,
+ KC_TRNS, KC_TRNS,
+ KC_SCLN, KC_EQL, KC_EQL, KC_SCLN),
+/* Keymap 2: Pad/Function layer
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | | LEFT | DOWN | UP | RIGHT|VolDn | VolUp |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT|Ply/Pa| Skip |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .------. .------. .------. .-----.
+ * | | | | | | | |
+ * '------' '------' `------. '-----'
+ * ,-------. ,-------.
+ * | | | PgUp |
+ * ,------|-------| |-------|------.
+ * | | | | | |
+ * | | | | | |
+ * | | | | | |
+ * `--------------' `--------------'
+ */
+[NUMB] = LAYOUT_GERGO(
+KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLD, KC_VOLU,
+KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_MPLY, KC_MNXT,
+
+ KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
+};
+
+/* Keymap template
+ *
+ * ,-------------------------------------------. ,-------------------------------------------.
+ * | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
+ * | | | | | | | | | | | | | | | |
+ * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
+ * | | | | | | | | | | | | | | | |
+ * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
+ * .------. .------. .------. .-----.
+ * | | | | | | | |
+ * '------' '------' `------. '-----'
+ * ,-------. ,-------.
+ * | | | |
+ * ,------|-------| |-------|------.
+ * | | | | | |
+ * | | | | | |
+ * | | | | | |
+ * `--------------' `--------------'
+[SYMB] = LAYOUT_GERGO(
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS,
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
+ */
+
+// Runs just one time when the keyboard initializes.
+void matrix_init_user(void) {
+
+};
+
+// Runs constantly in the background, in a loop.
+void matrix_scan_user(void) {
+ //uint8_t layer = biton32(layer_state);
+ biton32(layer_state);
+};
+
+
diff --git a/keyboards/gergo/keymaps/default/readme.md b/keyboards/gergo/keymaps/default/readme.md
new file mode 100644
index 0000000000..471a20fbdf
--- /dev/null
+++ b/keyboards/gergo/keymaps/default/readme.md
@@ -0,0 +1,10 @@
+# [Gergo! By g Heavy Industries](http://gboards.ca)
+
+![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg)
+
+This is the default keymap for Gergo, it's based heavily off of the naps62 ErgoDox layout and is aimed at a programmer friendly keymap.
+
+## Settings
+To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk
+
+Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
diff --git a/keyboards/gergo/keymaps/default/rules.mk b/keyboards/gergo/keymaps/default/rules.mk
new file mode 100644
index 0000000000..2f825a7663
--- /dev/null
+++ b/keyboards/gergo/keymaps/default/rules.mk
@@ -0,0 +1,36 @@
+#----------------------------------------------------------------------------
+# make gergo:germ:dfu
+# Make sure you have dfu-programmer installed!
+#----------------------------------------------------------------------------
+# Firmware options
+BALLER = yes # Enable to ball out
+BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
+SCROLLSTEP = 1 # Lines to scroll with ball
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
+
+#Debug options
+VERBOSE = yes
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_BALLER = no
+DEBUG_MATRIX = no
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+SRC += matrix.c i2c_master.c
+ifneq ($(strip $(BALLSTEP)),)
+ OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
+endif
+ifneq ($(strip $(SCROLLSTEP)),)
+ OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
+endif
+ifeq ($(strip $(BALLER)), yes)
+ OPT_DEFS += -DBALLER
+endif
+ifeq ($(strip $(DEBUG_BALLER)), yes)
+ OPT_DEFS += -DDEBUG_BALLER
+endif
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c
new file mode 100644
index 0000000000..29fe48ccb3
--- /dev/null
+++ b/keyboards/gergo/matrix.c
@@ -0,0 +1,517 @@
+/*
+Note for ErgoDox EZ customizers: Here be dragons!
+This is not a file you want to be messing with.
+All of the interesting stuff for you is under keymaps/ :)
+Love, Erez
+
+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)