From 693303ddbc24e37dba8db5e5914990e598c5df74 Mon Sep 17 00:00:00 2001 From: DeskDaily <65656486+DeskDaily@users.noreply.github.com> Date: Fri, 21 Oct 2022 10:21:04 +0800 Subject: [Keyboard] Add Octopad+ Keyboard (#18484) Co-authored-by: Neil Brian Ramirez --- keyboards/nightly_boards/octopadplus/config.h | 60 ++++++++++++++++++++++ keyboards/nightly_boards/octopadplus/info.json | 48 +++++++++++++++++ .../octopadplus/keymaps/default/keymap.c | 54 +++++++++++++++++++ .../octopadplus/keymaps/default/rules.mk | 1 + .../octopadplus/keymaps/via/keymap.c | 54 +++++++++++++++++++ .../octopadplus/keymaps/via/rules.mk | 2 + keyboards/nightly_boards/octopadplus/octopadplus.c | 17 ++++++ keyboards/nightly_boards/octopadplus/octopadplus.h | 37 +++++++++++++ keyboards/nightly_boards/octopadplus/readme.md | 26 ++++++++++ keyboards/nightly_boards/octopadplus/rules.mk | 19 +++++++ 10 files changed, 318 insertions(+) create mode 100644 keyboards/nightly_boards/octopadplus/config.h create mode 100644 keyboards/nightly_boards/octopadplus/info.json create mode 100644 keyboards/nightly_boards/octopadplus/keymaps/default/keymap.c create mode 100644 keyboards/nightly_boards/octopadplus/keymaps/default/rules.mk create mode 100644 keyboards/nightly_boards/octopadplus/keymaps/via/keymap.c create mode 100644 keyboards/nightly_boards/octopadplus/keymaps/via/rules.mk create mode 100644 keyboards/nightly_boards/octopadplus/octopadplus.c create mode 100644 keyboards/nightly_boards/octopadplus/octopadplus.h create mode 100644 keyboards/nightly_boards/octopadplus/readme.md create mode 100644 keyboards/nightly_boards/octopadplus/rules.mk (limited to 'keyboards/nightly_boards/octopadplus') diff --git a/keyboards/nightly_boards/octopadplus/config.h b/keyboards/nightly_boards/octopadplus/config.h new file mode 100644 index 0000000000..3b2a7cea1a --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/config.h @@ -0,0 +1,60 @@ +/* +Copyright 2022 DeskDaily + +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 . +*/ + +#pragma once + +#include "config_common.h" + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 6 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * + */ +#define MATRIX_ROW_PINS { F6, D3 } +#define MATRIX_COL_PINS { E6, F5, C7, D7, F4, D2 } + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + + +/* Encoders */ + +#define ENCODERS 2 +#define ENCODERS_PAD_A { F0, D1 } +#define ENCODERS_PAD_B { F1, D0 } +#define TAP_CODE_DELAY 10 +#define ENCODER_RESOLUTION 5 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* 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 diff --git a/keyboards/nightly_boards/octopadplus/info.json b/keyboards/nightly_boards/octopadplus/info.json new file mode 100644 index 0000000000..c4ae8b5200 --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/info.json @@ -0,0 +1,48 @@ +{ + "keyboard_name": "Octopad+" , + "manufacturer": "DeskDaily", + "url": "", + "maintainer": "DeskDaily", + "usb": { + "vid": "0xD812", + "pid": "0x0014", + "device_version": "0.0.1" + }, + "rgblight": { + "animations": { + "alternating": true, + "breathing": true, + "christmas": true, + "knight": true, + "rainbow_mood": true, + "rainbow_swirl": true, + "rgb_test": true, + "snake": true, + "static_gradient": true, + "twinkle": true + }, + "brightness_steps": 8, + "hue_steps": 8, + "led_count": 8, + "max_brightness": 255, + "pin": "F7", + "saturation_steps": 8, + "sleep": true + }, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1.25}, + {"x":1, "y":1.25}, + {"x":2, "y":1.25}, + {"x":3, "y":1.25}, + + {"x":0, "y":2.25}, + {"x":1, "y":2.25}, + {"x":2, "y":2.25}, + {"x":3, "y":2.25}] + } + } +} diff --git a/keyboards/nightly_boards/octopadplus/keymaps/default/keymap.c b/keyboards/nightly_boards/octopadplus/keymaps/default/keymap.c new file mode 100644 index 0000000000..0929f354ef --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/keymaps/default/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2022 DeskDaily + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, KC_MYCM, + KC_Q, KC_W, KC_E, KC_R, + KC_A, KC_S, KC_D, KC_F + + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + + ), + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif \ No newline at end of file diff --git a/keyboards/nightly_boards/octopadplus/keymaps/default/rules.mk b/keyboards/nightly_boards/octopadplus/keymaps/default/rules.mk new file mode 100644 index 0000000000..a40474b4d5 --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/keymaps/default/rules.mk @@ -0,0 +1 @@ +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/nightly_boards/octopadplus/keymaps/via/keymap.c b/keyboards/nightly_boards/octopadplus/keymaps/via/keymap.c new file mode 100644 index 0000000000..0929f354ef --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/keymaps/via/keymap.c @@ -0,0 +1,54 @@ +/* Copyright 2022 DeskDaily + * + * 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 . + */ +#include QMK_KEYBOARD_H + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( + KC_MUTE, KC_MYCM, + KC_Q, KC_W, KC_E, KC_R, + KC_A, KC_S, KC_D, KC_F + + ), + [1] = LAYOUT( + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + + ), + [2] = LAYOUT( + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + + ), + [3] = LAYOUT( + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + + ), + +}; + +#if defined(ENCODER_MAP_ENABLE) +const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][2] = { + [0] = { ENCODER_CCW_CW(KC_VOLD, KC_VOLU), ENCODER_CCW_CW(KC_BRID, KC_BRIU) }, + [1] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [2] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + [3] = { ENCODER_CCW_CW(KC_TRNS, KC_TRNS), ENCODER_CCW_CW(KC_TRNS, KC_TRNS) }, + }; +#endif \ No newline at end of file diff --git a/keyboards/nightly_boards/octopadplus/keymaps/via/rules.mk b/keyboards/nightly_boards/octopadplus/keymaps/via/rules.mk new file mode 100644 index 0000000000..4253f570f0 --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +ENCODER_MAP_ENABLE = yes \ No newline at end of file diff --git a/keyboards/nightly_boards/octopadplus/octopadplus.c b/keyboards/nightly_boards/octopadplus/octopadplus.c new file mode 100644 index 0000000000..6e5c025ba2 --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/octopadplus.c @@ -0,0 +1,17 @@ +/* Copyright 2022 DeskDaily + * + * 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 . + */ + +#include "octopadplus.h" diff --git a/keyboards/nightly_boards/octopadplus/octopadplus.h b/keyboards/nightly_boards/octopadplus/octopadplus.h new file mode 100644 index 0000000000..b32e6d8f2f --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/octopadplus.h @@ -0,0 +1,37 @@ +/* Copyright 2022 DeskDaily + * + * 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 . + */ + +#pragma once + +#include "quantum.h" + +/* This is a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K04, K15, \ + K00, K01, K02, K03, \ + K10, K11, K12, K13 \ +\ +) { \ + { K00, K01, K02, K03, K04, KC_NO }, \ + { K10, K11, K12, K13, KC_NO, K15 }, \ +} diff --git a/keyboards/nightly_boards/octopadplus/readme.md b/keyboards/nightly_boards/octopadplus/readme.md new file mode 100644 index 0000000000..c211cc2a14 --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/readme.md @@ -0,0 +1,26 @@ +# DeskDaily Octopad+ + +![Octopad+](https://i.imgur.com/Sa83N0Gh.jpg) + +Aluminum version of the Octopad. An 8 key macropad with 2 rotary encoders. + +* Keyboard Maintainer: [DeskDaily](https://github.com/DeskDaily) +* Hardware Supported: atmega32u4 + +Make example for this keyboard (after setting up your build environment): + + make nightly_boards/octopadplus:default + +Flashing example for this keyboard: + + make nightly_boards/octopadplus:default:flash + +## Bootloader + +Enter the bootloader in 3 ways: + +* **Bootmagic reset**: Hold down the key at (0,0) in the matrix (the top left key among the 8 keys) and plug in the keyboard +* **Physical reset button**: Briefly press the button on the back of the PCB - some may have pads you must short instead +* **Keycode in layout**: Press the key mapped to `QK_BOOT` if it is available + +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/octopadplus/rules.mk b/keyboards/nightly_boards/octopadplus/rules.mk new file mode 100644 index 0000000000..08b58953c2 --- /dev/null +++ b/keyboards/nightly_boards/octopadplus/rules.mk @@ -0,0 +1,19 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +ENCODER_ENABLE = yes # Enable Rotary Encoders + -- cgit v1.2.3