diff options
author | Legonut <legonut3@gmail.com> | 2018-02-06 23:44:10 -0500 |
---|---|---|
committer | Jack Humbert <jack.humb@gmail.com> | 2018-02-06 23:44:10 -0500 |
commit | ad01e3c03a5213a46d5e6bd14cbb3c3231f68c78 (patch) | |
tree | 790ce99ed792d643d4007a7c64357566529c35fd /keyboards/zen/rev1 | |
parent | 9cfcd494064439b0c8b31bc45969b0487ec6e81a (diff) | |
download | qmk_firmware-ad01e3c03a5213a46d5e6bd14cbb3c3231f68c78.tar.gz qmk_firmware-ad01e3c03a5213a46d5e6bd14cbb3c3231f68c78.zip |
New keyboard added "Zen" (#2347)
* New keyboard added
Zen is a split ortholinear currently in group buy.
* remove bad keymap
Keymap was throwing errors
* remove other bad keymap
I should have checked these before haha
* small fix to update folder name
* renamed temp
* renamed to zen
* update folder name
* Slim down matrix code
Suggested by drashna
* move KC_NO
* Update keymap
* change from rev2 to rev1
Diffstat (limited to 'keyboards/zen/rev1')
-rw-r--r-- | keyboards/zen/rev1/config.h | 91 | ||||
-rw-r--r-- | keyboards/zen/rev1/rev1.c | 22 | ||||
-rw-r--r-- | keyboards/zen/rev1/rev1.h | 40 | ||||
-rw-r--r-- | keyboards/zen/rev1/rules.mk | 2 |
4 files changed, 155 insertions, 0 deletions
diff --git a/keyboards/zen/rev1/config.h b/keyboards/zen/rev1/config.h new file mode 100644 index 0000000000..efae558927 --- /dev/null +++ b/keyboards/zen/rev1/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2017 Danny Nguyen <danny@hexwire.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/>. +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1256 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Legonut +#define PRODUCT Project Zen +#define DESCRIPTION Split gaming keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { C6, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { B2, B3, B1, F7, F6, D4, B6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 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)) \ +) + +#define BACKLIGHT_PIN F4 +#define BACKLIGHT_LEVELS 5 + + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D1 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 16 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/zen/rev1/rev1.c b/keyboards/zen/rev1/rev1.c new file mode 100644 index 0000000000..5f4cd32f69 --- /dev/null +++ b/keyboards/zen/rev1/rev1.c @@ -0,0 +1,22 @@ +#include "rev1.h" + +#ifdef SSD1306OLED +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); +} +#endif + +void matrix_init_kb(void) { + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + diff --git a/keyboards/zen/rev1/rev1.h b/keyboards/zen/rev1/rev1.h new file mode 100644 index 0000000000..4983bb2a30 --- /dev/null +++ b/keyboards/zen/rev1/rev1.h @@ -0,0 +1,40 @@ +#ifndef REV1_H +#define REV1_H + +#include "zen.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include <stddef.h> +#ifdef __AVR__ + #include <avr/io.h> + #include <avr/interrupt.h> +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k55, k54, k53, k52, k51, k50, \ + k10, k11, k12, k13, k14, k15, k65, k64, k63, k62, k61, k60, \ + k20, k21, k22, k23, k24, k25, k75, k74, k73, k72, k71, k70, \ + k30, k31, k32, k33, k34, k35, k85, k84, k83, k82, k81, k80, \ + k40, k41, k42, k43, k44, k45, k46, k96, k95, k94, k93, k92, k91, k90 \ + ) \ + { \ + { k00, k01, k02, k03, k04, k05, KC_NO }, \ + { k10, k11, k12, k13, k14, k15, KC_NO }, \ + { k20, k21, k22, k23, k24, k25, KC_NO }, \ + { k30, k31, k32, k33, k34, k35, KC_NO }, \ + { k40, k41, k42, k43, k44, k45, k46 }, \ + { k50, k51, k52, k53, k54, k55, KC_NO }, \ + { k60, k61, k62, k63, k64, k65, KC_NO }, \ + { k70, k71, k72, k73, k74, k75, KC_NO }, \ + { k80, k81, k82, k83, k84, k85, KC_NO }, \ + { k90, k91, k92, k93, k94, k95, k96 } \ + } + +#endif diff --git a/keyboards/zen/rev1/rules.mk b/keyboards/zen/rev1/rules.mk new file mode 100644 index 0000000000..d7463419b4 --- /dev/null +++ b/keyboards/zen/rev1/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes |