diff options
author | NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> | 2020-07-17 23:46:11 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-17 16:46:11 +0100 |
commit | 412c6bf44785e2312821a484a7cd36ce1ec6361a (patch) | |
tree | a5a7972ea519a10bf4430dc054aa176ba6bc9eef | |
parent | 9aa953ecb476b952e9cb16a1812e9e1aef88b8dd (diff) | |
download | qmk_firmware-412c6bf44785e2312821a484a7cd36ce1ec6361a.tar.gz qmk_firmware-412c6bf44785e2312821a484a7cd36ce1ec6361a.zip |
Add Alter Keyboard (#9579)
* Create Alter folder
* Revert "Create Alter folder"
This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c.
* Add Alter keyboard
* Fixed keymap.c
* Fixed another issue on the keymap.c
* Updated the files based on the comments
* Edited default keymap and enabled rgbanimations on config.h
* Updated the info.json
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/config.h | 96 | ||||
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/info.json | 82 | ||||
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c | 33 | ||||
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/readme.md | 12 | ||||
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/rev1.c | 37 | ||||
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/rev1.h | 46 | ||||
-rw-r--r-- | keyboards/nightly_boards/alter/rev1/rules.mk | 31 |
7 files changed, 337 insertions, 0 deletions
diff --git a/keyboards/nightly_boards/alter/rev1/config.h b/keyboards/nightly_boards/alter/rev1/config.h new file mode 100644 index 000000000..86ebe2ad7 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/config.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | Copyright 2020 Neil Brian Ramirez | ||
3 | This program is free software: you can redistribute it and/or modify | ||
4 | it under the terms of the GNU General Public License as published by | ||
5 | the Free Software Foundation, either version 2 of the License, or | ||
6 | (at your option) any later version. | ||
7 | This program is distributed in the hope that it will be useful, | ||
8 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
9 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
10 | GNU General Public License for more details. | ||
11 | You should have received a copy of the GNU General Public License | ||
12 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
13 | */ | ||
14 | |||
15 | #pragma once | ||
16 | |||
17 | #include "config_common.h" | ||
18 | |||
19 | /* USB Device descriptor parameter */ | ||
20 | #define VENDOR_ID 0x0717 | ||
21 | #define PRODUCT_ID 0x0002 | ||
22 | #define DEVICE_VER 0x0001 | ||
23 | #define MANUFACTURER Neil Brian Ramirez | ||
24 | #define PRODUCT Alter | ||
25 | #define DESCRIPTION An Alice layout keyboard | ||
26 | |||
27 | /* key matrix size */ | ||
28 | #define MATRIX_ROWS 10 | ||
29 | #define MATRIX_COLS 8 | ||
30 | |||
31 | /* | ||
32 | * Keyboard Matrix Assignments | ||
33 | * | ||
34 | * Change this to how you wired your keyboard | ||
35 | * COLS: AVR pins used for columns, left to right | ||
36 | * ROWS: AVR pins used for rows, top to bottom | ||
37 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
38 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
39 | * | ||
40 | */ | ||
41 | #define MATRIX_ROW_PINS { F7, F6, F5, E6, D0, B7, D5, D3, D2, D1 } | ||
42 | #define MATRIX_COL_PINS { C7, C6, B6, B5, B0, B1, B2, B3 } | ||
43 | #define UNUSED_PINS | ||
44 | |||
45 | /* COL2ROW, ROW2COL*/ | ||
46 | #define DIODE_DIRECTION COL2ROW | ||
47 | |||
48 | // #define BACKLIGHT_PIN F1 | ||
49 | // #define BACKLIGHT_BREATHING | ||
50 | // #define BACKLIGHT_LEVELS 3 | ||
51 | |||
52 | #define RGB_DI_PIN F1 | ||
53 | #ifdef RGB_DI_PIN | ||
54 | #define RGBLED_NUM 18 | ||
55 | #define RGBLIGHT_HUE_STEP 8 | ||
56 | #define RGBLIGHT_SAT_STEP 8 | ||
57 | #define RGBLIGHT_VAL_STEP 8 | ||
58 | #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ | ||
59 | #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ | ||
60 | // /*== all animations enable ==*/ | ||
61 | #define RGBLIGHT_ANIMATIONS | ||
62 | // /*== or choose animations ==*/ | ||
63 | // #define RGBLIGHT_EFFECT_BREATHING | ||
64 | // #define RGBLIGHT_EFFECT_RAINBOW_MOOD | ||
65 | // #define RGBLIGHT_EFFECT_RAINBOW_SWIRL | ||
66 | // #define RGBLIGHT_EFFECT_SNAKE | ||
67 | // #define RGBLIGHT_EFFECT_KNIGHT | ||
68 | // #define RGBLIGHT_EFFECT_CHRISTMAS | ||
69 | // #define RGBLIGHT_EFFECT_STATIC_GRADIENT | ||
70 | // #define RGBLIGHT_EFFECT_RGB_TEST | ||
71 | // #define RGBLIGHT_EFFECT_ALTERNATING | ||
72 | // /*== customize breathing effect ==*/ | ||
73 | // /*==== (DEFAULT) use fixed table instead of exp() and sin() ====*/ | ||
74 | // #define RGBLIGHT_BREATHE_TABLE_SIZE 256 // 256(default) or 128 or 64 | ||
75 | // /*==== use exp() and sin() ====*/ | ||
76 | // #define RGBLIGHT_EFFECT_BREATHE_CENTER 1.85 // 1 to 2.7 | ||
77 | // #define RGBLIGHT_EFFECT_BREATHE_MAX 255 // 0 to 255 | ||
78 | #endif | ||
79 | |||
80 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
81 | #define DEBOUNCE 5 | ||
82 | |||
83 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
84 | //#define MATRIX_HAS_GHOST | ||
85 | |||
86 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
87 | #define LOCKING_SUPPORT_ENABLE | ||
88 | /* Locking resynchronize hack */ | ||
89 | #define LOCKING_RESYNC_ENABLE | ||
90 | |||
91 | |||
92 | |||
93 | /* disable these deprecated features by default */ | ||
94 | #define NO_ACTION_MACRO | ||
95 | #define NO_ACTION_FUNCTION | ||
96 | |||
diff --git a/keyboards/nightly_boards/alter/rev1/info.json b/keyboards/nightly_boards/alter/rev1/info.json new file mode 100644 index 000000000..abf155f1c --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/info.json | |||
@@ -0,0 +1,82 @@ | |||
1 | { | ||
2 | "keyboard_name": "Alter", | ||
3 | "url": "", | ||
4 | "maintainer": "Neil Brian Ramirez", | ||
5 | "width": 20, | ||
6 | "height": 5.25, | ||
7 | "layouts": { | ||
8 | "LAYOUT": { | ||
9 | "layout": [ | ||
10 | {"x":0.5, "y":0}, | ||
11 | {"x":2, "y":0}, | ||
12 | {"x":3, "y":0}, | ||
13 | {"x":4, "y":0}, | ||
14 | {"x":5, "y":0}, | ||
15 | {"x":6, "y":0}, | ||
16 | {"x":7, "y":0}, | ||
17 | {"x":8, "y":0}, | ||
18 | {"x":11.25, "y":0}, | ||
19 | {"x":12.25, "y":0}, | ||
20 | {"x":13.25, "y":0}, | ||
21 | {"x":14.25, "y":0}, | ||
22 | {"x":15.25, "y":0}, | ||
23 | {"x":16.25, "y":0}, | ||
24 | {"x":17.25, "y":0}, | ||
25 | {"x":18.25, "y":0}, | ||
26 | |||
27 | {"x":0.25, "y":1}, | ||
28 | {"x":1.75, "y":1, "w":1.5}, | ||
29 | {"x":3.25, "y":1}, | ||
30 | {"x":4.25, "y":1}, | ||
31 | {"x":5.25, "y":1}, | ||
32 | {"x":6.25, "y":1}, | ||
33 | {"x":7.25, "y":1}, | ||
34 | {"x":11, "y":1}, | ||
35 | {"x":12, "y":1}, | ||
36 | {"x":13, "y":1}, | ||
37 | {"x":14, "y":1}, | ||
38 | {"x":15, "y":1}, | ||
39 | {"x":16, "y":1}, | ||
40 | {"x":17, "y":1}, | ||
41 | {"x":18, "y":1, "w":1.5}, | ||
42 | |||
43 | {"x":0, "y":2}, | ||
44 | {"x":1.5, "y":2, "w":1.75}, | ||
45 | {"x":3.25, "y":2}, | ||
46 | {"x":4.5, "y":2}, | ||
47 | {"x":5.5, "y":2}, | ||
48 | {"x":6.5, "y":2}, | ||
49 | {"x":7.5, "y":2}, | ||
50 | {"x":11.25, "y":2}, | ||
51 | {"x":12.25, "y":2}, | ||
52 | {"x":13.25, "y":2}, | ||
53 | {"x":14.25, "y":2}, | ||
54 | {"x":15.5, "y":2}, | ||
55 | {"x":16.5, "y":2}, | ||
56 | {"x":17.5, "y":2, "w":2.25}, | ||
57 | |||
58 | {"x":1.25, "y":3, "w":2.25}, | ||
59 | {"x":3.5, "y":3}, | ||
60 | {"x":5, "y":3}, | ||
61 | {"x":6, "y":3}, | ||
62 | {"x":7, "y":3}, | ||
63 | {"x":8, "y":3}, | ||
64 | {"x":10.75, "y":3}, | ||
65 | {"x":11.75, "y":3}, | ||
66 | {"x":12.75, "y":3}, | ||
67 | {"x":13.75, "y":3}, | ||
68 | {"x":15.25, "y":3}, | ||
69 | {"x":16.25, "y":3}, | ||
70 | {"x":17.25, "y":3, "w":1.75}, | ||
71 | {"x":19, "y":3}, | ||
72 | |||
73 | {"x":1.25, "y":4, "w":1.5}, | ||
74 | {"x":5, "y":4, "w":1.5}, | ||
75 | {"x":6.5, "y":4, "w":2}, | ||
76 | {"x":8.5, "y":4, "w":1.25}, | ||
77 | {"x":10.5, "y":4, "w":2.75}, | ||
78 | {"x":13.25, "y":4, "w":1.5}, | ||
79 | {"x":18.25, "y":4, "w":1.5}] | ||
80 | } | ||
81 | } | ||
82 | } | ||
diff --git a/keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c b/keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c new file mode 100644 index 000000000..cf2e561c7 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/keymaps/default/keymap.c | |||
@@ -0,0 +1,33 @@ | |||
1 | /* Copyright 2020 Neil Brian Ramirez | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | #include QMK_KEYBOARD_H | ||
17 | |||
18 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
19 | [0] = LAYOUT( | ||
20 | KC_ESC, KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_BSPC, | ||
21 | KC_PGUP, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, | ||
22 | KC_PGDN, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, | ||
23 | KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), | ||
24 | KC_LCTL, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RGUI, KC_RCTL | ||
25 | ), | ||
26 | [1] = LAYOUT( | ||
27 | RESET, _______, KC_F1 , KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, | ||
28 | KC_BRIU, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______ , _______, KC_DEL, | ||
29 | KC_BRID, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, | ||
30 | RGB_TOG, RGB_MOD, RGB_RMOD,RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, KC_HOME, KC_END, _______, _______, | ||
31 | _______, _______, _______, _______, _______, _______, _______ | ||
32 | ), | ||
33 | }; | ||
diff --git a/keyboards/nightly_boards/alter/rev1/readme.md b/keyboards/nightly_boards/alter/rev1/readme.md new file mode 100644 index 000000000..81079f064 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/readme.md | |||
@@ -0,0 +1,12 @@ | |||
1 | # Alter | ||
2 | |||
3 | An Alice layout keyboard | ||
4 | |||
5 | * Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) | ||
6 | * Hardware Supported: atmega32u4 | ||
7 | |||
8 | Make example for this keyboard (after setting up your build environment): | ||
9 | |||
10 | make nightly_boards/alter/rev1:default | ||
11 | |||
12 | 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). \ No newline at end of file | ||
diff --git a/keyboards/nightly_boards/alter/rev1/rev1.c b/keyboards/nightly_boards/alter/rev1/rev1.c new file mode 100644 index 000000000..df3dd6aed --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/rev1.c | |||
@@ -0,0 +1,37 @@ | |||
1 | /* Copyright 2020 Neil Brian Ramirez | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #include "rev1.h" | ||
18 | |||
19 | void keyboard_pre_init_kb(void) { | ||
20 | led_init_ports(); | ||
21 | keyboard_pre_init_user(); | ||
22 | } | ||
23 | |||
24 | void led_init_ports(void) { | ||
25 | setPinOutput(D7); | ||
26 | setPinOutput(D6); | ||
27 | setPinOutput(B4); | ||
28 | } | ||
29 | |||
30 | bool led_update_kb(led_t led_state) { | ||
31 | if (led_update_user(led_state)) { | ||
32 | writePin(D7, led_state.num_lock); | ||
33 | writePin(D6, led_state.caps_lock); | ||
34 | writePin(B4, led_state.scroll_lock); | ||
35 | } | ||
36 | return true; | ||
37 | } | ||
diff --git a/keyboards/nightly_boards/alter/rev1/rev1.h b/keyboards/nightly_boards/alter/rev1/rev1.h new file mode 100644 index 000000000..ee919c56d --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/rev1.h | |||
@@ -0,0 +1,46 @@ | |||
1 | /* Copyright 2020 Neil Brian Ramirez | ||
2 | * | ||
3 | * This program is free software: you can redistribute it and/or modify | ||
4 | * it under the terms of the GNU General Public License as published by | ||
5 | * the Free Software Foundation, either version 2 of the License, or | ||
6 | * (at your option) any later version. | ||
7 | * | ||
8 | * This program is distributed in the hope that it will be useful, | ||
9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
11 | * GNU General Public License for more details. | ||
12 | * | ||
13 | * You should have received a copy of the GNU General Public License | ||
14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
15 | */ | ||
16 | |||
17 | #pragma once | ||
18 | |||
19 | #include "quantum.h" | ||
20 | |||
21 | /* This is a shortcut to help you visually see your layout. | ||
22 | * | ||
23 | * The first section contains all of the arguments representing the physical | ||
24 | * layout of the board and position of the keys. | ||
25 | * | ||
26 | * The second converts the arguments into a two-dimensional array which | ||
27 | * represents the switch matrix. | ||
28 | */ | ||
29 | #define LAYOUT( \ | ||
30 | K00, K10, K01, K11, K02, K12, K03, K13, K04, K14, K05, K15, K06, K16, K17, K07, \ | ||
31 | K20, K30, K21, K31, K22, K32, K23, K24, K34, K25, K35, K26, K36, K27, K37, \ | ||
32 | K40, K50, K51, K42, K52, K43, K53, K44, K54, K45, K55, K46, K56, K47, \ | ||
33 | K70, K71, K62, K72, K63, K73, K64, K74, K65, K75, K66, K76, K67, K77, \ | ||
34 | K90, K82, K92, K83, K84, K95, K87 \ | ||
35 | ) { \ | ||
36 | { K00, K01, K02, K03, K04, K05, K06, K07 }, \ | ||
37 | { K10, K11, K12, K13, K14, K15, K16, K17 }, \ | ||
38 | { K20, K21, K22, K23, K24, K25, K26, K27 }, \ | ||
39 | { K30, K31, K32, KC_NO, K34, K35, K36, K37 }, \ | ||
40 | { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ | ||
41 | { K50, K51, K52, K53, K54, K55, K56, KC_NO }, \ | ||
42 | { KC_NO, KC_NO, K62, K63, K64, K65, K66, K67 }, \ | ||
43 | { K70, K71, K72, K73, K74, K75, K76, K77 }, \ | ||
44 | { KC_NO, KC_NO, K82, K83, K84, KC_NO, KC_NO, K87 }, \ | ||
45 | { K90, KC_NO, K92, KC_NO, KC_NO, K95, KC_NO, KC_NO }, \ | ||
46 | } | ||
diff --git a/keyboards/nightly_boards/alter/rev1/rules.mk b/keyboards/nightly_boards/alter/rev1/rules.mk new file mode 100644 index 000000000..5dbee69a1 --- /dev/null +++ b/keyboards/nightly_boards/alter/rev1/rules.mk | |||
@@ -0,0 +1,31 @@ | |||
1 | # MCU name | ||
2 | MCU = atmega32u4 | ||
3 | |||
4 | # Bootloader selection | ||
5 | # Teensy halfkay | ||
6 | # Pro Micro caterina | ||
7 | # Atmel DFU atmel-dfu | ||
8 | # LUFA DFU lufa-dfu | ||
9 | # QMK DFU qmk-dfu | ||
10 | # ATmega32A bootloadHID | ||
11 | # ATmega328P USBasp | ||
12 | BOOTLOADER = atmel-dfu | ||
13 | |||
14 | # Build Options | ||
15 | # change yes to no to disable | ||
16 | # | ||
17 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
18 | MOUSEKEY_ENABLE = no # Mouse keys | ||
19 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
20 | CONSOLE_ENABLE = no # Console for debug | ||
21 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
22 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
23 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
24 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
25 | NKRO_ENABLE = no # USB Nkey Rollover | ||
26 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
27 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
28 | MIDI_ENABLE = no # MIDI support | ||
29 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
30 | AUDIO_ENABLE = no # Audio output | ||
31 | FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches \ No newline at end of file | ||