diff options
Diffstat (limited to 'keyboards/nyquist/rev1')
| -rw-r--r-- | keyboards/nyquist/rev1/Makefile | 3 | ||||
| -rw-r--r-- | keyboards/nyquist/rev1/config.h | 89 | ||||
| -rw-r--r-- | keyboards/nyquist/rev1/rev1.c | 39 | ||||
| -rw-r--r-- | keyboards/nyquist/rev1/rev1.h | 66 | ||||
| -rw-r--r-- | keyboards/nyquist/rev1/rules.mk | 5 |
5 files changed, 202 insertions, 0 deletions
diff --git a/keyboards/nyquist/rev1/Makefile b/keyboards/nyquist/rev1/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/nyquist/rev1/Makefile | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ifndef MAKEFILE_INCLUDED | ||
| 2 | include ../../Makefile | ||
| 3 | endif \ No newline at end of file | ||
diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/nyquist/rev1/config.h new file mode 100644 index 000000000..c2907cf5d --- /dev/null +++ b/keyboards/nyquist/rev1/config.h | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2017 Danny Nguyen <danny@hexwire.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xCEEB | ||
| 25 | #define PRODUCT_ID 0x1156 | ||
| 26 | #define DEVICE_VER 0x0100 | ||
| 27 | #define MANUFACTURER Keebio | ||
| 28 | #define PRODUCT The Nyquist Keyboard | ||
| 29 | #define DESCRIPTION Split 60 percent ortholinear keyboard | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | // Rows are doubled-up | ||
| 33 | #define MATRIX_ROWS 10 | ||
| 34 | #define MATRIX_COLS 6 | ||
| 35 | |||
| 36 | // wiring of each half | ||
| 37 | #define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } | ||
| 38 | #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } | ||
| 39 | |||
| 40 | #define CATERINA_BOOTLOADER | ||
| 41 | |||
| 42 | /* COL2ROW or ROW2COL */ | ||
| 43 | #define DIODE_DIRECTION COL2ROW | ||
| 44 | |||
| 45 | /* define if matrix has ghost */ | ||
| 46 | //#define MATRIX_HAS_GHOST | ||
| 47 | |||
| 48 | /* number of backlight levels */ | ||
| 49 | // #define BACKLIGHT_LEVELS 3 | ||
| 50 | |||
| 51 | /* Set 0 if debouncing isn't needed */ | ||
| 52 | #define DEBOUNCING_DELAY 5 | ||
| 53 | |||
| 54 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 55 | #define LOCKING_SUPPORT_ENABLE | ||
| 56 | /* Locking resynchronize hack */ | ||
| 57 | #define LOCKING_RESYNC_ENABLE | ||
| 58 | |||
| 59 | /* key combination for command */ | ||
| 60 | #define IS_COMMAND() ( \ | ||
| 61 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 62 | ) | ||
| 63 | |||
| 64 | /* ws2812 RGB LED */ | ||
| 65 | #define RGB_DI_PIN D3 | ||
| 66 | #define RGBLIGHT_TIMER | ||
| 67 | #define RGBLED_NUM 16 // Number of LEDs | ||
| 68 | #define ws2812_PORTREG PORTD | ||
| 69 | #define ws2812_DDRREG DDRD | ||
| 70 | |||
| 71 | /* | ||
| 72 | * Feature disable options | ||
| 73 | * These options are also useful to firmware size reduction. | ||
| 74 | */ | ||
| 75 | |||
| 76 | /* disable debug print */ | ||
| 77 | // #define NO_DEBUG | ||
| 78 | |||
| 79 | /* disable print */ | ||
| 80 | // #define NO_PRINT | ||
| 81 | |||
| 82 | /* disable action features */ | ||
| 83 | //#define NO_ACTION_LAYER | ||
| 84 | //#define NO_ACTION_TAPPING | ||
| 85 | //#define NO_ACTION_ONESHOT | ||
| 86 | //#define NO_ACTION_MACRO | ||
| 87 | //#define NO_ACTION_FUNCTION | ||
| 88 | |||
| 89 | #endif | ||
diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/nyquist/rev1/rev1.c new file mode 100644 index 000000000..fc984e18c --- /dev/null +++ b/keyboards/nyquist/rev1/rev1.c | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #include "nyquist.h" | ||
| 2 | |||
| 3 | #ifdef AUDIO_ENABLE | ||
| 4 | float tone_startup[][2] = SONG(STARTUP_SOUND); | ||
| 5 | float tone_goodbye[][2] = SONG(GOODBYE_SOUND); | ||
| 6 | #endif | ||
| 7 | |||
| 8 | #ifdef SSD1306OLED | ||
| 9 | void led_set_kb(uint8_t usb_led) { | ||
| 10 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | ||
| 11 | led_set_user(usb_led); | ||
| 12 | } | ||
| 13 | #endif | ||
| 14 | |||
| 15 | void matrix_init_kb(void) { | ||
| 16 | |||
| 17 | #ifdef AUDIO_ENABLE | ||
| 18 | _delay_ms(20); // gets rid of tick | ||
| 19 | PLAY_NOTE_ARRAY(tone_startup, false, 0); | ||
| 20 | #endif | ||
| 21 | |||
| 22 | // // green led on | ||
| 23 | // DDRD |= (1<<5); | ||
| 24 | // PORTD &= ~(1<<5); | ||
| 25 | |||
| 26 | // // orange led on | ||
| 27 | // DDRB |= (1<<0); | ||
| 28 | // PORTB &= ~(1<<0); | ||
| 29 | |||
| 30 | matrix_init_user(); | ||
| 31 | }; | ||
| 32 | |||
| 33 | void shutdown_user(void) { | ||
| 34 | #ifdef AUDIO_ENABLE | ||
| 35 | PLAY_NOTE_ARRAY(tone_goodbye, false, 0); | ||
| 36 | _delay_ms(150); | ||
| 37 | stop_all_notes(); | ||
| 38 | #endif | ||
| 39 | } | ||
diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/nyquist/rev1/rev1.h new file mode 100644 index 000000000..f2d0ece79 --- /dev/null +++ b/keyboards/nyquist/rev1/rev1.h | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #ifndef REV1_H | ||
| 2 | #define REV1_H | ||
| 3 | |||
| 4 | #include "../nyquist.h" | ||
| 5 | |||
| 6 | //void promicro_bootloader_jmp(bool program); | ||
| 7 | #include "quantum.h" | ||
| 8 | |||
| 9 | |||
| 10 | #ifdef USE_I2C | ||
| 11 | #include <stddef.h> | ||
| 12 | #ifdef __AVR__ | ||
| 13 | #include <avr/io.h> | ||
| 14 | #include <avr/interrupt.h> | ||
| 15 | #endif | ||
| 16 | #endif | ||
| 17 | |||
| 18 | //void promicro_bootloader_jmp(bool program); | ||
| 19 | |||
| 20 | #ifndef FLIP_HALF | ||
| 21 | // Standard Keymap | ||
| 22 | // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) | ||
| 23 | #define KEYMAP( \ | ||
| 24 | L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ | ||
| 25 | L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ | ||
| 26 | L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ | ||
| 27 | L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ | ||
| 28 | L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ | ||
| 29 | ) \ | ||
| 30 | { \ | ||
| 31 | { L00, L01, L02, L03, L04, L05 }, \ | ||
| 32 | { L10, L11, L12, L13, L14, L15 }, \ | ||
| 33 | { L20, L21, L22, L23, L24, L25 }, \ | ||
| 34 | { L30, L31, L32, L33, L34, L35 }, \ | ||
| 35 | { L40, L41, L42, L43, L44, L45 }, \ | ||
| 36 | { R05, R04, R03, R02, R01, R00 }, \ | ||
| 37 | { R15, R14, R13, R12, R11, R10 }, \ | ||
| 38 | { R25, R24, R23, R22, R21, R20 }, \ | ||
| 39 | { R35, R34, R33, R32, R31, R30 }, \ | ||
| 40 | { R45, R44, R43, R42, R41, R40 } \ | ||
| 41 | } | ||
| 42 | #else | ||
| 43 | // Keymap with right side flipped | ||
| 44 | // (TRRS jack on both halves are to the right) | ||
| 45 | #define KEYMAP( \ | ||
| 46 | L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ | ||
| 47 | L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ | ||
| 48 | L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ | ||
| 49 | L30, L31, L32, L33, L34, L35, R30, R31, R32, R33, R34, R35, \ | ||
| 50 | L40, L41, L42, L43, L44, L45, R40, R41, R42, R43, R44, R45 \ | ||
| 51 | ) \ | ||
| 52 | { \ | ||
| 53 | { L00, L01, L02, L03, L04, L05 }, \ | ||
| 54 | { L10, L11, L12, L13, L14, L15 }, \ | ||
| 55 | { L20, L21, L22, L23, L24, L25 }, \ | ||
| 56 | { L30, L31, L32, L33, L34, L35 }, \ | ||
| 57 | { L40, L41, L42, L43, L44, L45 }, \ | ||
| 58 | { R00, R01, R02, R03, R04, R05 }, \ | ||
| 59 | { R10, R11, R12, R13, R14, R15 }, \ | ||
| 60 | { R20, R21, R22, R23, R24, R25 }, \ | ||
| 61 | { R30, R31, R32, R33, R34, R35 }, \ | ||
| 62 | { R40, R41, R42, R43, R44, R45 } \ | ||
| 63 | } | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #endif | ||
diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/nyquist/rev1/rules.mk new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/nyquist/rev1/rules.mk | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | BACKLIGHT_ENABLE = no | ||
| 2 | |||
| 3 | ifndef QUANTUM_DIR | ||
| 4 | include ../../../Makefile | ||
| 5 | endif | ||
