summaryrefslogtreecommitdiff
path: root/keyboards/gboards/ergotaco
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2022-02-12 11:54:48 +0800
committerGitHub <noreply@github.com>2022-02-11 19:54:48 -0800
commit17c0ca6fa4f7b6f65b4442c2f5bc32fee914b376 (patch)
treeaecec74184b82d75dd19e4566cf04a3423c6e3c6 /keyboards/gboards/ergotaco
parent52d6f07a829baf38e16b61f1804bf5dd555ab45d (diff)
[Keyboard] move g heavy industry boards into /gboards (#16040)
Co-authored-by: zvecr <git@zvecr.com>
Diffstat (limited to 'keyboards/gboards/ergotaco')
-rw-r--r--keyboards/gboards/ergotaco/config.h60
-rw-r--r--keyboards/gboards/ergotaco/ergotaco.c72
-rw-r--r--keyboards/gboards/ergotaco/ergotaco.h48
-rw-r--r--keyboards/gboards/ergotaco/info.json59
-rw-r--r--keyboards/gboards/ergotaco/keymaps/default/keymap.c34
-rw-r--r--keyboards/gboards/ergotaco/keymaps/default/readme.md6
-rw-r--r--keyboards/gboards/ergotaco/keymaps/default/rules.mk4
-rw-r--r--keyboards/gboards/ergotaco/matrix.c326
-rw-r--r--keyboards/gboards/ergotaco/post_rules.mk8
-rw-r--r--keyboards/gboards/ergotaco/readme.md24
-rw-r--r--keyboards/gboards/ergotaco/rules.mk16
11 files changed, 657 insertions, 0 deletions
diff --git a/keyboards/gboards/ergotaco/config.h b/keyboards/gboards/ergotaco/config.h
new file mode 100644
index 0000000000..d415e77dc6
--- /dev/null
+++ b/keyboards/gboards/ergotaco/config.h
@@ -0,0 +1,60 @@
+/*
+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"
+
+#define VERBOSE
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x1337
+#define DEVICE_VER 0x0001
+#define MANUFACTURER g Heavy Industries
+#define PRODUCT ErgoTaco
+
+/* key matrix size */
+#define MATRIX_ROWS 12
+#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
+#define MATRIX_COLS 1
+
+#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() (get_mods() == MOD_MASK_CTRL || get_mods() == MOD_MASK_SHIFT)
+
+#define DEBOUNCE 5
+#define USB_MAX_POWER_CONSUMPTION 500
diff --git a/keyboards/gboards/ergotaco/ergotaco.c b/keyboards/gboards/ergotaco/ergotaco.c
new file mode 100644
index 0000000000..ecab74b3a2
--- /dev/null
+++ b/keyboards/gboards/ergotaco/ergotaco.c
@@ -0,0 +1,72 @@
+#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
+ // set as input with internal pull-up enabled
+ DDRB &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
+ PORTB |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
+
+ DDRC &= ~(1<<7 | 1<<6);
+ PORTC |= (1<<7 | 1<<6);
+
+ DDRD &= ~(1<<4 | 1<<5 | 1<<6 | 1<<7);
+ PORTD |= (1<<4 | 1<<5 | 1<<6 | 1<<7);
+
+ DDRE &= ~(1<<6);
+ PORTE |= (1<<6);
+
+ DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7);
+ PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<6 | 1<<7);
+
+ 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);
+ }
+
+ // 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(0b00000000, 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();
+
+ // 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(0b00000000, 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();
+ // SREG=sreg_prev;
+ //uprintf("Init %x\n", mcp23018_status);
+ return mcp23018_status;
+}
diff --git a/keyboards/gboards/ergotaco/ergotaco.h b/keyboards/gboards/ergotaco/ergotaco.h
new file mode 100644
index 0000000000..5a0cd5e8fb
--- /dev/null
+++ b/keyboards/gboards/ergotaco/ergotaco.h
@@ -0,0 +1,48 @@
+#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
+
+// 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( \
+ L00,L01,L02,L03,L04,L05, R00,R01,R02,R03,R04,R05) \
+ \
+ /* matrix positions */ \
+ { \
+ {R00}, \
+ {R01}, \
+ {R02}, \
+ {R03}, \
+ {R04}, \
+ {R05}, \
+ {L05}, \
+ {L04}, \
+ {L03}, \
+ {L02}, \
+ {L01}, \
+ {L00}, \
+}
diff --git a/keyboards/gboards/ergotaco/info.json b/keyboards/gboards/ergotaco/info.json
new file mode 100644
index 0000000000..e7794e6ee3
--- /dev/null
+++ b/keyboards/gboards/ergotaco/info.json
@@ -0,0 +1,59 @@
+{
+ "keyboard_name": "ErgoTaco",
+ "url": "http://gboards.ca",
+ "maintainer": "germ",
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {
+ "x": 0,
+ "y": 1.25
+ },
+ {
+ "x": 1,
+ "y": 0.75
+ },
+ {
+ "x": 2,
+ "y": 0.5
+ },
+ {
+ "x": 3,
+ "y": 0.25
+ },
+ {
+ "x": 4,
+ "y": 1
+ },
+ {
+ "x": 5,
+ "y": 1.75
+ },
+ {
+ "x": 7,
+ "y": 1.75
+ },
+ {
+ "x": 8,
+ "y": 1
+ },
+ {
+ "x": 9,
+ "y": 0.25
+ },
+ {
+ "x": 10,
+ "y": 0.5
+ },
+ {
+ "x": 11,
+ "y": 0.75
+ },
+ {
+ "x": 12,
+ "y": 1.25
+ }
+ ]
+ }
+ }
+}
diff --git a/keyboards/gboards/ergotaco/keymaps/default/keymap.c b/keyboards/gboards/ergotaco/keymaps/default/keymap.c
new file mode 100644
index 0000000000..8de5ea6371
--- /dev/null
+++ b/keyboards/gboards/ergotaco/keymaps/default/keymap.c
@@ -0,0 +1,34 @@
+/* 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 FIESTA 0 // default layer
+#define TACOTIME 1 // symbols
+
+// Blank template at the bottom
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Keymap template
+ *
+ * ,-------------------------------------------------. ,--------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------' */
+[FIESTA] = LAYOUT(
+ KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H
+),
+};
+
+/* Keymap template
+ *
+ * ,-------------------------------------------------. ,--------------------------------------------.
+ * | | | | | | | | | | | | | | |
+ * `-------+------+------+------+------+-------------' `-------+------+------+------+------+--------'
+[FIESTA] = LAYOUT(
+ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
+),
+ */
diff --git a/keyboards/gboards/ergotaco/keymaps/default/readme.md b/keyboards/gboards/ergotaco/keymaps/default/readme.md
new file mode 100644
index 0000000000..d9c7c1601f
--- /dev/null
+++ b/keyboards/gboards/ergotaco/keymaps/default/readme.md
@@ -0,0 +1,6 @@
+This is the default keymap for the ErgoTaco, Make it your own!
+
+## Settings
+To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gboards/ergotaco/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/gboards/ergotaco/keymaps/default/rules.mk b/keyboards/gboards/ergotaco/keymaps/default/rules.mk
new file mode 100644
index 0000000000..870d047dc9
--- /dev/null
+++ b/keyboards/gboards/ergotaco/keymaps/default/rules.mk
@@ -0,0 +1,4 @@
+#Debug options
+VERBOSE = yes
+DEBUG_MATRIX_SCAN_RATE = no
+DEBUG_MATRIX = yes
diff --git a/keyboards/gboards/ergotaco/matrix.c b/keyboards/gboards/ergotaco/matrix.c
new file mode 100644
index 0000000000..16300a7e4f
--- /dev/null
+++ b/keyboards/gboards/ergotaco/matrix.c
@@ -0,0 +1,326 @@
+/*
+
+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/>.
+*/
+
+#include "matrix.h"
+#include <stdint.h>
+#include <stdbool.h>
+#include <avr/io.h>
+#include "wait.h"
+#include "action_layer.h"
+#include "print.h"
+#include "debug.h"
+#include "util.h"
+#include QMK_KEYBOARD_H
+
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
+#endif
+
+// ATmega pin defs
+#define ROW1 (1<<5)
+#define COL6 (1<<0)
+#define COL7 (1<<1)
+#define COL8 (1<<2)
+#define COL9 (1<<3)
+#define COL10 (1<<2)
+#define COL11 (1<<3)
+
+
+// bit masks
+#define BMASK (COL7 | COL8 | COL9 | COL6)
+#define DMASK (COL10 | COL11)
+#define FMASK (ROW1)
+
+/* matrix state(1:on, 0:off) */
+static matrix_row_t matrix[MATRIX_ROWS];
+/*
+ * matrix state(1:on, 0:off)
+ * contains the raw values without debounce filtering of the last read cycle.
+ */
+static matrix_row_t raw_matrix[MATRIX_ROWS];
+
+// Debouncing: store for each key the number of scans until it's eligible to
+// change. When scanning the matrix, ignore any changes in keys that have
+// already changed in the last DEBOUNCE scans.
+static uint8_t debounce_matrix[MATRIX_ROWS * MATRIX_COLS];
+
+static matrix_row_t read_cols(uint8_t row);
+static void init_cols(void);
+static void unselect_rows(void);
+static void select_row(uint8_t row);
+
+static uint8_t mcp23018_reset_loop;
+// static uint16_t mcp23018_reset_loop;
+
+__attribute__ ((weak))
+void matrix_init_user(void) {}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {}
+
+__attribute__ ((weak))
+void matrix_init_kb(void) {
+ matrix_init_user();
+}
+
+__attribute__ ((weak))
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
+
+inline
+uint8_t matrix_rows(void)
+{
+ return MATRIX_ROWS;
+}
+
+inline
+uint8_t matrix_cols(void)
+{
+ return MATRIX_COLS;
+}
+
+
+void matrix_init(void)
+{
+ // initialize row and col
+ mcp23018_status = init_mcp23018();
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ raw_matrix[i] = 0;
+ for (uint8_t j=0; j < MATRIX_COLS; ++j) {
+ debounce_matrix[i * MATRIX_COLS + j] = 0;
+ }
+ }
+
+ matrix_init_quantum();
+}
+
+void matrix_power_up(void) {
+ mcp23018_status = init_mcp23018();
+
+ unselect_rows();
+ init_cols();
+
+ // initialize matrix state: all keys off
+ for (uint8_t i=0; i < MATRIX_ROWS; i++) {
+ matrix[i] = 0;
+ }
+}
+
+// Returns a matrix_row_t whose bits are set if the corresponding key should be
+// eligible to change in this scan.
+matrix_row_t debounce_mask(matrix_row_t rawcols, uint8_t row) {
+ matrix_row_t result = 0;
+ matrix_row_t change = rawcols ^ raw_matrix[row];
+ raw_matrix[row] = rawcols;
+ for (uint8_t i = 0; i < MATRIX_COLS; ++i) {
+ if (debounce_matrix[row * MATRIX_COLS + i]) {
+ --debounce_matrix[row * MATRIX_COLS + i];
+ } else {
+ result |= (1 << i);
+ }
+ if (change & (1 << i)) {
+ debounce_matrix[row * MATRIX_COLS + i] = DEBOUNCE;
+ }
+ }
+ return result;
+}
+
+matrix_row_t debounce_read_cols(uint8_t row) {
+ // Read the row without debouncing filtering and store it for later usage.
+ matrix_row_t cols = read_cols(row);
+ // Get the Debounce mask.
+ matrix_row_t mask = debounce_mask(cols, row);
+ // debounce the row and return the result.
+ return (cols & mask) | (matrix[row] & ~mask);;
+}
+
+uint8_t matrix_scan(void)
+{
+ // Then the keyboard
+ if (mcp23018_status) { // if there was an error
+ if (++mcp23018_reset_loop == 0) {
+ // if (++mcp23018_reset_loop >= 1300) {
+ // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans
+ // this will be approx bit more frequent than once per second
+ print("trying to reset mcp23018\n");
+ mcp23018_status = init_mcp23018();
+ if (mcp23018_status) {
+ print("left side not responding\n");
+ } else {
+ print("left side attached\n");
+ }
+ }
+ }
+
+ for (uint8_t i = 0; i < MATRIX_ROWS_PER_SIDE; i++) {
+ select_row(i);
+ // and select on left hand
+ select_row(i + MATRIX_ROWS_PER_SIDE);
+ // we don't need a 30us delay anymore, because selecting a
+ // left-hand row requires more than 30us for i2c.
+
+ // grab cols from left hand
+ matrix[i] = debounce_read_cols(i);
+ // grab cols from right hand
+ matrix[i + MATRIX_ROWS_PER_SIDE] = debounce_read_cols(i + MATRIX_ROWS_PER_SIDE);
+
+ unselect_rows();
+ }
+
+ matrix_scan_quantum();
+
+#ifdef DEBUG_MATRIX
+ for (uint8_t c = 0; c < MATRIX_COLS; c++)
+ for (uint8_t r = 0; r < MATRIX_ROWS; r++)
+ if (matrix_is_on(r, c)) xprintf("r:%d c:%d \n", r, c);
+#endif
+
+ return 1;
+}
+
+inline
+bool matrix_is_on(uint8_t row, uint8_t col)
+{
+ return (matrix[row] & ((matrix_row_t)1<<col));
+}
+
+inline
+matrix_row_t matrix_get_row(uint8_t row)
+{
+ return matrix[row];
+}
+
+void matrix_print(void)
+{
+ print("\nr/c 0123456789ABCDEF\n");
+ for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
+ print_hex8(row); print(": ");
+ print_bin_reverse16(matrix_get_row(row));
+ print("\n");
+ }
+}
+
+uint8_t matrix_key_count(void)
+{
+ uint8_t count = 0;
+ for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
+ count += bitpop16(matrix[i]);
+ }
+ return count;
+}
+
+// Remember this means ROWS
+static void init_cols(void)
+{
+ // init on mcp23018
+ // not needed, already done as part of init_mcp23018()
+
+ // Input with pull-up(DDR:0, PORT:1)
+ DDRF &= ~FMASK;
+ PORTF |= FMASK;
+}
+
+static matrix_row_t read_cols(uint8_t row)
+{
+ if (row < 6) {
+ if (mcp23018_status) { // if there was an error
+ return 0;
+ } else {
+ uint8_t data = 0;
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status < 0) goto out;
+ data = (~((uint8_t)mcp23018_status) >> 2) & 0x01 ;
+ mcp23018_status = I2C_STATUS_SUCCESS;
+ out:
+ i2c_stop();
+
+#ifdef DEBUG_MATRIX
+ if (data != 0x00) xprintf("I2C: %d\n", data);
+#endif
+ return data;
+ }
+ } else {
+ // Read using bitmask
+ return ~((((PINF & ROW1) >> 5)) & 0x1);
+ }
+}
+
+// Row pin configuration
+static void unselect_rows(void)
+{
+ // no need to unselect on mcp23018, because the select step sets all
+ // the other row bits high, and it's not changing to a different
+ // direction
+ // Hi-Z(DDR:0, PORT:0) to unselect
+ DDRB &= ~BMASK;
+ PORTB &= ~BMASK;
+ DDRD &= ~DMASK;
+ PORTD &= ~DMASK;
+}
+
+static void select_row(uint8_t row)
+{
+ if (row < 6) {
+ // select on mcp23018
+ if (mcp23018_status) { // do nothing on error
+ // Read using bitmask
+ } else { // set active row low : 0 // set other rows hi-Z : 1
+ mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(GPIOA, ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ mcp23018_status = i2c_write(~(1<<row), ERGODOX_EZ_I2C_TIMEOUT); if (mcp23018_status) goto out;
+ out:
+ i2c_stop();
+ }
+ } else {
+ // Output low(DDR:1, PORT:0) to select
+ switch (row) {
+ case 6:
+ DDRB |= COL6;
+ PORTB &= ~COL6;
+ break;
+ case 7:
+ DDRB |= COL7;
+ PORTB &= ~COL7;
+ break;
+ case 8:
+ DDRB |= COL8;
+ PORTB &= ~COL8;
+ break;
+ case 9:
+ DDRB |= COL9;
+ PORTB &= ~COL9;
+ break;
+ case 10:
+ DDRD |= COL10;
+ PORTD &= ~COL10;
+ break;
+ case 11:
+ DDRD |= COL11;
+ PORTD &= ~COL11;
+ break;
+ }
+ }
+}
diff --git a/keyboards/gboards/ergotaco/post_rules.mk b/keyboards/gboards/ergotaco/post_rules.mk
new file mode 100644
index 0000000000..0db3171b33
--- /dev/null
+++ b/keyboards/gboards/ergotaco/post_rules.mk
@@ -0,0 +1,8 @@
+
+# A bunch of stuff that you shouldn't touch unless you
+# know what you're doing.
+#
+# No touchy, capiche?
+ifeq ($(strip $(DEBUG_MATRIX)), yes)
+ OPT_DEFS += -DDEBUG_MATRIX
+endif
diff --git a/keyboards/gboards/ergotaco/readme.md b/keyboards/gboards/ergotaco/readme.md
new file mode 100644
index 0000000000..dc9db3bb64
--- /dev/null
+++ b/keyboards/gboards/ergotaco/readme.md
@@ -0,0 +1,24 @@
+# Gergo
+
+![ErgoTaco](https://i.redd.it/dbcu5i21m3i21.jpg)
+
+It's a Taco with a side of HASL. A 12 key fiesta of a board.
+
+Keyboard Maintainer: [Jane Bernhardt](https://github.com/germ)
+Hardware Supported: ErgoTaco
+Hardware Availability: [gboards.ca](http://gboards.ca)
+
+## Firmware building
+Clone the QMK Repo and install dfu-programmer, flash with:
+
+ make gboards/ergotaco:default:dfu
+
+And reset your keyboard!
+
+To just test if your build system is sane, try compiling the default keymap using:
+
+ make gboards/ergotaco:default
+
+See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
+
+## Have an idea? [Reach out to me!](mailto:bernhardtjeremy@gmail.com)
diff --git a/keyboards/gboards/ergotaco/rules.mk b/keyboards/gboards/ergotaco/rules.mk
new file mode 100644
index 0000000000..db236477b0
--- /dev/null
+++ b/keyboards/gboards/ergotaco/rules.mk
@@ -0,0 +1,16 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = atmel-dfu
+
+CUSTOM_MATRIX = yes
+EXTRAKEY_ENABLE = yes
+CONSOLE_ENABLE = yes
+COMMAND_ENABLE = yes
+
+# 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