diff options
| author | NightlyBoards <65656486+NightlyBoards@users.noreply.github.com> | 2020-12-30 08:58:14 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-12-29 16:58:14 -0800 |
| commit | ac433b218d2f0652833155f5eaa6b0c287f9cdec (patch) | |
| tree | a23a9a953daf25a560026b80f0a857dd809aa9f4 /keyboards/nightly_boards | |
| parent | 8ee03f6a6b3216fa0d4372d4db8c09f24473c6c6 (diff) | |
| download | qmk_firmware-ac433b218d2f0652833155f5eaa6b0c287f9cdec.tar.gz qmk_firmware-ac433b218d2f0652833155f5eaa6b0c287f9cdec.zip | |
[Keyboard] Add the Octopad (#9946)
* Create Alter folder
* Revert "Create Alter folder"
This reverts commit 361103b821dbb22957b66cdedb0d11f996def71c.
* Add octopad folder
* Added a new keyboard, the Octopad
* Edited files based on requested changes
* Moved encoder code in keyboard level
* Updated the readme
* Corrected the rows and columns of encoders on config.h
* Changed the Vendor ID to D812 since the first one was already taken
* Added support for ast1109MLTRQ speakers
* Increased number of layers to 8 on VIA keymap
* Edited files based on comments
* Edited rules.mk as per comment
* Edited readme.md as per comment
Diffstat (limited to 'keyboards/nightly_boards')
| -rw-r--r-- | keyboards/nightly_boards/octopad/config.h | 85 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/encoder_action.c | 51 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/encoder_action.h | 21 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/info.json | 29 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/keymaps/default/keymap.c | 32 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/keymaps/via/config.h | 1 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/keymaps/via/keymap.c | 73 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/keymaps/via/rules.mk | 2 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/octopad.c | 27 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/octopad.h | 39 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/readme.md | 20 | ||||
| -rw-r--r-- | keyboards/nightly_boards/octopad/rules.mk | 26 |
12 files changed, 406 insertions, 0 deletions
diff --git a/keyboards/nightly_boards/octopad/config.h b/keyboards/nightly_boards/octopad/config.h new file mode 100644 index 000000000..fc8956d1d --- /dev/null +++ b/keyboards/nightly_boards/octopad/config.h | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2020 Neil Brian Ramirez | ||
| 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 | #pragma once | ||
| 19 | |||
| 20 | #include "config_common.h" | ||
| 21 | |||
| 22 | /* USB Device descriptor parameter */ | ||
| 23 | #define VENDOR_ID 0xD812 | ||
| 24 | #define PRODUCT_ID 0x0004 | ||
| 25 | #define DEVICE_VER 0x0001 | ||
| 26 | #define MANUFACTURER Neil Brian Ramirez | ||
| 27 | #define PRODUCT Octopad | ||
| 28 | |||
| 29 | /* key matrix size */ | ||
| 30 | #define MATRIX_ROWS 3 | ||
| 31 | #define MATRIX_COLS 5 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * Keyboard Matrix Assignments | ||
| 35 | * | ||
| 36 | * Change this to how you wired your keyboard | ||
| 37 | * COLS: AVR pins used for columns, left to right | ||
| 38 | * ROWS: AVR pins used for rows, top to bottom | ||
| 39 | * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) | ||
| 40 | * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) | ||
| 41 | * | ||
| 42 | */ | ||
| 43 | #define MATRIX_ROW_PINS { B2, B3, NO_PIN } | ||
| 44 | #define MATRIX_COL_PINS { F1, F0, D0, D1, B1 } | ||
| 45 | #define UNUSED_PINS | ||
| 46 | |||
| 47 | /* COL2ROW, ROW2COL*/ | ||
| 48 | #define DIODE_DIRECTION COL2ROW | ||
| 49 | |||
| 50 | #define RGB_DI_PIN F7 | ||
| 51 | #ifdef RGB_DI_PIN | ||
| 52 | #define RGBLED_NUM 8 | ||
| 53 | #define RGBLIGHT_ANIMATIONS | ||
| 54 | |||
| 55 | #endif | ||
| 56 | |||
| 57 | /* Encoders */ | ||
| 58 | |||
| 59 | #define ENCODERS 2 | ||
| 60 | |||
| 61 | #define ENCODERS_PAD_A { C7, F4 } | ||
| 62 | #define ENCODERS_PAD_B { C6, F5 } | ||
| 63 | |||
| 64 | #define ENCODERS_CW_KEY { { 3, 2 },{ 1, 2 } } | ||
| 65 | #define ENCODERS_CCW_KEY { { 2, 2 },{ 0, 2 } } | ||
| 66 | |||
| 67 | /* Audio */ | ||
| 68 | |||
| 69 | #define B5_AUDIO | ||
| 70 | |||
| 71 | #define AUDIO_CLICKY | ||
| 72 | |||
| 73 | |||
| 74 | /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ | ||
| 75 | #define DEBOUNCE 5 | ||
| 76 | |||
| 77 | /* define if matrix has ghost (lacks anti-ghosting diodes) */ | ||
| 78 | //#define MATRIX_HAS_GHOST | ||
| 79 | |||
| 80 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 81 | #define LOCKING_SUPPORT_ENABLE | ||
| 82 | /* Locking resynchronize hack */ | ||
| 83 | #define LOCKING_RESYNC_ENABLE | ||
| 84 | |||
| 85 | |||
diff --git a/keyboards/nightly_boards/octopad/encoder_action.c b/keyboards/nightly_boards/octopad/encoder_action.c new file mode 100644 index 000000000..042a3871c --- /dev/null +++ b/keyboards/nightly_boards/octopad/encoder_action.c | |||
| @@ -0,0 +1,51 @@ | |||
| 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 3 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 "encoder_action.h" | ||
| 18 | |||
| 19 | #ifdef ENCODERS | ||
| 20 | static uint8_t encoder_state[ENCODERS] = {0}; | ||
| 21 | static keypos_t encoder_cw[ENCODERS] = ENCODERS_CW_KEY; | ||
| 22 | static keypos_t encoder_ccw[ENCODERS] = ENCODERS_CCW_KEY; | ||
| 23 | #endif | ||
| 24 | |||
| 25 | void encoder_action_unregister(void) { | ||
| 26 | #ifdef ENCODERS | ||
| 27 | for (int index = 0; index < ENCODERS; ++index) { | ||
| 28 | if (encoder_state[index]) { | ||
| 29 | keyevent_t encoder_event = (keyevent_t) { | ||
| 30 | .key = encoder_state[index] >> 1 ? encoder_cw[index] : encoder_ccw[index], | ||
| 31 | .pressed = false, | ||
| 32 | .time = (timer_read() | 1) | ||
| 33 | }; | ||
| 34 | encoder_state[index] = 0; | ||
| 35 | action_exec(encoder_event); | ||
| 36 | } | ||
| 37 | } | ||
| 38 | #endif | ||
| 39 | } | ||
| 40 | |||
| 41 | void encoder_action_register(uint8_t index, bool clockwise) { | ||
| 42 | #ifdef ENCODERS | ||
| 43 | keyevent_t encoder_event = (keyevent_t) { | ||
| 44 | .key = clockwise ? encoder_cw[index] : encoder_ccw[index], | ||
| 45 | .pressed = true, | ||
| 46 | .time = (timer_read() | 1) | ||
| 47 | }; | ||
| 48 | encoder_state[index] = (clockwise ^ 1) | (clockwise << 1); | ||
| 49 | action_exec(encoder_event); | ||
| 50 | #endif | ||
| 51 | } | ||
diff --git a/keyboards/nightly_boards/octopad/encoder_action.h b/keyboards/nightly_boards/octopad/encoder_action.h new file mode 100644 index 000000000..098210d40 --- /dev/null +++ b/keyboards/nightly_boards/octopad/encoder_action.h | |||
| @@ -0,0 +1,21 @@ | |||
| 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 3 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 "quantum.h" | ||
| 18 | |||
| 19 | void encoder_action_unregister(void); | ||
| 20 | |||
| 21 | void encoder_action_register(uint8_t index, bool clockwise); \ No newline at end of file | ||
diff --git a/keyboards/nightly_boards/octopad/info.json b/keyboards/nightly_boards/octopad/info.json new file mode 100644 index 000000000..0e83531ae --- /dev/null +++ b/keyboards/nightly_boards/octopad/info.json | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | { | ||
| 2 | "keyboard_name": "Octopad", | ||
| 3 | "url": "", | ||
| 4 | "maintainer": "Neil Brian Ramirez", | ||
| 5 | "width": 6.5, | ||
| 6 | "height": 3.25, | ||
| 7 | "layouts": { | ||
| 8 | "LAYOUT": { | ||
| 9 | "layout": [ | ||
| 10 | {"x":0, "y":0}, | ||
| 11 | {"x":1, "y":0}, | ||
| 12 | {"x":2, "y":0}, | ||
| 13 | {"x":3.5, "y":0}, | ||
| 14 | {"x":4.5, "y":0}, | ||
| 15 | {"x":5.5, "y":0}, | ||
| 16 | |||
| 17 | {"x":1.25, "y":1.25}, | ||
| 18 | {"x":2.25, "y":1.25}, | ||
| 19 | {"x":3.25, "y":1.25}, | ||
| 20 | {"x":4.25, "y":1.25}, | ||
| 21 | |||
| 22 | {"x":1.25, "y":2.25}, | ||
| 23 | {"x":2.25, "y":2.25}, | ||
| 24 | {"x":3.25, "y":2.25}, | ||
| 25 | {"x":4.25, "y":2.25} | ||
| 26 | ] | ||
| 27 | } | ||
| 28 | } | ||
| 29 | } | ||
diff --git a/keyboards/nightly_boards/octopad/keymaps/default/keymap.c b/keyboards/nightly_boards/octopad/keymaps/default/keymap.c new file mode 100644 index 000000000..5dfea2721 --- /dev/null +++ b/keyboards/nightly_boards/octopad/keymaps/default/keymap.c | |||
| @@ -0,0 +1,32 @@ | |||
| 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 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | /* Base */ | ||
| 21 | /* ENC1_CCW, ENC1_P, ENC1_CW, ENC2_CCW, ENC2_P, ENC2_CW, | ||
| 22 | MACRO1, MACRO2, MACRO3, MACRO4, | ||
| 23 | MACRO5, MACRO6, MACRO7, MACRO8 | ||
| 24 | */ | ||
| 25 | [0] = LAYOUT( | ||
| 26 | KC_VOLD, KC_ESC, KC_VOLU, KC_BRID, RESET, KC_BRIU, | ||
| 27 | KC_Q, KC_W, KC_E, KC_R, | ||
| 28 | KC_A, KC_S, KC_D, KC_F | ||
| 29 | |||
| 30 | ), | ||
| 31 | }; | ||
| 32 | |||
diff --git a/keyboards/nightly_boards/octopad/keymaps/via/config.h b/keyboards/nightly_boards/octopad/keymaps/via/config.h new file mode 100644 index 000000000..176563d6f --- /dev/null +++ b/keyboards/nightly_boards/octopad/keymaps/via/config.h | |||
| @@ -0,0 +1 @@ | |||
| #define DYNAMIC_KEYMAP_LAYER_COUNT 8 | |||
diff --git a/keyboards/nightly_boards/octopad/keymaps/via/keymap.c b/keyboards/nightly_boards/octopad/keymaps/via/keymap.c new file mode 100644 index 000000000..c6ac3ca0b --- /dev/null +++ b/keyboards/nightly_boards/octopad/keymaps/via/keymap.c | |||
| @@ -0,0 +1,73 @@ | |||
| 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 | |||
| 19 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 20 | /* Base */ | ||
| 21 | /* ENC1_CCW, ENC1_P, ENC1_CW, ENC2_CCW, ENC2_P, ENC2_CW, | ||
| 22 | MACRO1, MACRO2, MACRO3, MACRO4, | ||
| 23 | MACRO5, MACRO6, MACRO7, MACRO8 | ||
| 24 | */ | ||
| 25 | [0] = LAYOUT( | ||
| 26 | KC_VOLD, KC_ESC, KC_VOLU, KC_BRID, RESET, KC_BRIU, | ||
| 27 | KC_Q, KC_W, KC_E, KC_R, | ||
| 28 | KC_A, KC_S, KC_D, KC_F | ||
| 29 | |||
| 30 | ), | ||
| 31 | [1] = LAYOUT( | ||
| 32 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 33 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 34 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 35 | |||
| 36 | ), | ||
| 37 | [2] = LAYOUT( | ||
| 38 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 39 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 40 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 41 | |||
| 42 | ), | ||
| 43 | [3] = LAYOUT( | ||
| 44 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 45 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 46 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 47 | |||
| 48 | ), | ||
| 49 | [4] = LAYOUT( | ||
| 50 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 51 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 52 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 53 | |||
| 54 | ), | ||
| 55 | [5] = LAYOUT( | ||
| 56 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 57 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 58 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 59 | |||
| 60 | ), | ||
| 61 | [6] = LAYOUT( | ||
| 62 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 63 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 64 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 65 | |||
| 66 | ), | ||
| 67 | [7] = LAYOUT( | ||
| 68 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 69 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, | ||
| 70 | KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS | ||
| 71 | |||
| 72 | ), | ||
| 73 | }; | ||
diff --git a/keyboards/nightly_boards/octopad/keymaps/via/rules.mk b/keyboards/nightly_boards/octopad/keymaps/via/rules.mk new file mode 100644 index 000000000..43061db1d --- /dev/null +++ b/keyboards/nightly_boards/octopad/keymaps/via/rules.mk | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | VIA_ENABLE = yes | ||
| 2 | LTO_ENABLE = yes \ No newline at end of file | ||
diff --git a/keyboards/nightly_boards/octopad/octopad.c b/keyboards/nightly_boards/octopad/octopad.c new file mode 100644 index 000000000..9dd9b72a1 --- /dev/null +++ b/keyboards/nightly_boards/octopad/octopad.c | |||
| @@ -0,0 +1,27 @@ | |||
| 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 "octopad.h" | ||
| 18 | |||
| 19 | void matrix_scan_kb(void) { | ||
| 20 | encoder_action_unregister(); | ||
| 21 | matrix_scan_user(); | ||
| 22 | } | ||
| 23 | |||
| 24 | void encoder_update_kb(uint8_t index, bool clockwise) { | ||
| 25 | encoder_action_register(index, clockwise); | ||
| 26 | // encoder_update_user(index, clockwise); | ||
| 27 | }; \ No newline at end of file | ||
diff --git a/keyboards/nightly_boards/octopad/octopad.h b/keyboards/nightly_boards/octopad/octopad.h new file mode 100644 index 000000000..941afd3f0 --- /dev/null +++ b/keyboards/nightly_boards/octopad/octopad.h | |||
| @@ -0,0 +1,39 @@ | |||
| 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 | #include "encoder_action.h" | ||
| 21 | |||
| 22 | /* This is a shortcut to help you visually see your layout. | ||
| 23 | * | ||
| 24 | * The first section contains all of the arguments representing the physical | ||
| 25 | * layout of the board and position of the keys. | ||
| 26 | * | ||
| 27 | * The second converts the arguments into a two-dimensional array which | ||
| 28 | * represents the switch matrix. | ||
| 29 | */ | ||
| 30 | #define LAYOUT( \ | ||
| 31 | E00A, K04, E00B, E01A, K14, E01B, \ | ||
| 32 | K00, K01, K02, K03, \ | ||
| 33 | K10, K11, K12, K13 \ | ||
| 34 | \ | ||
| 35 | ) { \ | ||
| 36 | { K00, K01, K02, K03, K04 }, \ | ||
| 37 | { K10, K11, K12, K13, K14 }, \ | ||
| 38 | { E00A, E00B, E01A, E01B, KC_NO } \ | ||
| 39 | } | ||
diff --git a/keyboards/nightly_boards/octopad/readme.md b/keyboards/nightly_boards/octopad/readme.md new file mode 100644 index 000000000..022bd3182 --- /dev/null +++ b/keyboards/nightly_boards/octopad/readme.md | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | # Nightly Boards Octopad | ||
| 2 | |||
| 3 |  | ||
| 4 | |||
| 5 | An 8 key macropad with 2 rotary encoders | ||
| 6 | |||
| 7 | * Keyboard Maintainer: [Neil Brian Ramirez](https://github.com/NightlyBoards) | ||
| 8 | * Hardware Supported: atmega32u4 | ||
| 9 | |||
| 10 | Make example for this keyboard (after setting up your build environment): | ||
| 11 | |||
| 12 | make nightly_boards/octopad:default | ||
| 13 | |||
| 14 | Flashing example for this keyboard: | ||
| 15 | |||
| 16 | make nightly_boards/octopad:default:flash | ||
| 17 | |||
| 18 | You can enter bootloader mode by pressing the physical reset button at the back of the pcb or by holding the upper left key (among the 8 keys) while plugging the usb cable. | ||
| 19 | |||
| 20 | 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). | ||
diff --git a/keyboards/nightly_boards/octopad/rules.mk b/keyboards/nightly_boards/octopad/rules.mk new file mode 100644 index 000000000..0e0230e1e --- /dev/null +++ b/keyboards/nightly_boards/octopad/rules.mk | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | # MCU name | ||
| 2 | MCU = atmega32u4 | ||
| 3 | |||
| 4 | # Bootloader selection | ||
| 5 | BOOTLOADER = atmel-dfu | ||
| 6 | |||
| 7 | # Build Options | ||
| 8 | # change yes to no to disable | ||
| 9 | # | ||
| 10 | BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration | ||
| 11 | MOUSEKEY_ENABLE = yes # Mouse keys | ||
| 12 | EXTRAKEY_ENABLE = yes # Audio control and System control | ||
| 13 | CONSOLE_ENABLE = no # Console for debug | ||
| 14 | COMMAND_ENABLE = no # Commands for debug and configuration | ||
| 15 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 16 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 17 | # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 18 | NKRO_ENABLE = no # USB Nkey Rollover | ||
| 19 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 20 | RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow | ||
| 21 | BLUETOOTH_ENABLE = no # Enable Bluetooth | ||
| 22 | AUDIO_ENABLE = yes # Audio output | ||
| 23 | ENCODER_ENABLE = yes # Enable Rotary Encoders | ||
| 24 | |||
| 25 | # Added encoder Action | ||
| 26 | SRC += encoder_action.c \ No newline at end of file | ||
