Skip to content

Commit

Permalink
[Keyboard] Update to ZSA Boards (qmk#10119)
Browse files Browse the repository at this point in the history
* Add VID/PIDs to ErgoDox EZ

* Add VID/PIDs for Planck EZ and Glow revision

* Make names consistent

* fix typo in docs

* Move LED config back, for maximum compatibility

* Add revisions for ErgoDox EZ boards

* Fix embarassing typo

* Typooooo

Co-authored-by: Nick Brassel <nick@tzarc.org>

* Update Licensing info

* Update Moonlander default keymap to match Oryx's default

* Fix formatting based on suggestions

Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>

* Make indicator LEDs more configurable

* Update default keymap

* Handle older eeprom settings

Co-authored-by: Nick Brassel <nick@tzarc.org>
Co-authored-by: James Young <18669334+noroadsleft@users.noreply.github.com>
  • Loading branch information
3 people committed Oct 13, 2020
1 parent 9088414 commit 8cfba95
Show file tree
Hide file tree
Showing 29 changed files with 301 additions and 96 deletions.
13 changes: 7 additions & 6 deletions keyboards/ergodox_ez/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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
Expand All @@ -21,10 +23,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "config_common.h"

/* USB Device descriptor parameter */
#define VENDOR_ID 0xFEED
#define PRODUCT_ID 0x1307
#define VENDOR_ID 0x3297
#define DEVICE_VER 0x0001
#define MANUFACTURER ZSA Technology Labs Inc
#define MANUFACTURER ZSA Technology Labs
#define PRODUCT_ID 0x4974
#define PRODUCT ErgoDox EZ

/* key matrix size */
Expand Down Expand Up @@ -115,7 +117,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
* manufacturer specs.
*/

#define USB_MAX_POWER_CONSUMPTION 500

// RGB backlight
#define DRIVER_ADDR_1 0b1110100
Expand Down Expand Up @@ -154,6 +155,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
//#define NO_ACTION_LAYER
//#define NO_ACTION_TAPPING
//#define NO_ACTION_ONESHOT
//#define NO_ACTION_MACRO
//#define NO_ACTION_FUNCTION
#define NO_ACTION_MACRO
#define NO_ACTION_FUNCTION
//#define DEBUG_MATRIX_SCAN_RATE
20 changes: 20 additions & 0 deletions keyboards/ergodox_ez/ergodox_ez.c
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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 "ergodox_ez.h"

extern inline void ergodox_board_led_on(void);
Expand Down
26 changes: 26 additions & 0 deletions keyboards/ergodox_ez/ergodox_ez.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,36 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#pragma once

#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "i2c_master.h"

#if defined(KEYBOARD_ergodox_ez_glow)
# include "glow.h"
#elif defined(KEYBOARD_ergodox_ez_shine)
# include "shine.h"
#endif

// I2C aliases and register addresses (see "mcp23018.md")
#define I2C_ADDR 0b0100000
#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE )
Expand Down
26 changes: 26 additions & 0 deletions keyboards/ergodox_ez/glow/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#pragma once

#undef PRODUCT_ID
#define PRODUCT_ID 0x4976
#undef PRODUCT
#define PRODUCT ErgoDox EZ Glow
23 changes: 23 additions & 0 deletions keyboards/ergodox_ez/glow/glow.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#pragma once

#include "ergodox_ez.h"
1 change: 1 addition & 0 deletions keyboards/ergodox_ez/glow/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RGB_MATRIX_ENABLE = yes
42 changes: 19 additions & 23 deletions keyboards/ergodox_ez/led_i2c.c
Original file line number Diff line number Diff line change
@@ -1,31 +1,27 @@
/*
* light weight WS2812 lib V2.0b
*
* Controls WS2811/WS2812/WS2812B RGB-LEDs
* Author: Tim (cpldcpu@gmail.com)
*
* Jan 18th, 2014 v2.0b Initial Version
* Nov 29th, 2015 v2.3 Added SK6812RGBW support
*
* 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/>.
*/
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#ifdef RGBLIGHT_ENABLE

# include "ergodox_ez.h"

extern rgblight_config_t rgblight_config;

void rgblight_call_driver(LED_TYPE *led, uint8_t led_num) {
i2c_init();
i2c_start(0x84, ERGODOX_EZ_I2C_TIMEOUT);
Expand Down
6 changes: 4 additions & 2 deletions keyboards/ergodox_ez/matrix.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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
Expand All @@ -17,6 +18,7 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/


/*
* scan matrix
*/
Expand Down
20 changes: 20 additions & 0 deletions keyboards/ergodox_ez/post_config.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#pragma once

#if !defined(ERGODOX_LED_15) && !defined(ERGODOX_LED_30)
Expand Down
5 changes: 5 additions & 0 deletions keyboards/ergodox_ez/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ The ErgoDox EZ is a mass produced version of the original ErgoDox keyboard, with
Make example for this keyboard (after setting up your build environment):

make ergodox_ez:default:flash

For the ErgoDox EZ Shine, and Glow, use one of the following:

make ergodox_ez/shine:default:flash
make ergodox_ez/glow:default:flash

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).

Expand Down
1 change: 0 additions & 1 deletion keyboards/ergodox_ez/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ UNICODE_ENABLE = yes # Unicode
SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard
SLEEP_LED_ENABLE = no
API_SYSEX_ENABLE = no
RGBLIGHT_ENABLE = yes

RGB_MATRIX_ENABLE = no # enable later
DEBOUNCE_TYPE = eager_pr
Expand Down
26 changes: 26 additions & 0 deletions keyboards/ergodox_ez/shine/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#pragma once

#undef PRODUCT_ID
#define PRODUCT_ID 0x4975
#undef PRODUCT
#define PRODUCT ErgoDox EZ Shine
1 change: 1 addition & 0 deletions keyboards/ergodox_ez/shine/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes
23 changes: 23 additions & 0 deletions keyboards/ergodox_ez/shine/shine.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
/*
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2013 Oleg Kostyuk <cub.uanic@gmail.com>
Copyright 2015 ZSA Technology Labs Inc (@zsa)
Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
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/>.
*/

#pragma once

#include "ergodox_ez.h"
2 changes: 1 addition & 1 deletion keyboards/moonlander/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Drashna Jael're <drashna@live.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
*
* 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
Expand Down
2 changes: 1 addition & 1 deletion keyboards/moonlander/keymaps/default/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright 2020 ZSA Technology Labs, Inc <@zsa>
* Copyright 2020 Jack Humbert <jack.humb@gmail.com>
* Copyright 2020 Drashna Jael're <drashna@live.com>
* Copyright 2020 Christopher Courtney <drashna@live.com> (@drashna)
*
* 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
Expand Down
Loading

0 comments on commit 8cfba95

Please sign in to comment.