From aa0b7079a4a7a3174c7f078fc5fa81e630df1775 Mon Sep 17 00:00:00 2001 From: Alabahuy Date: Thu, 29 Jul 2021 23:12:29 +0700 Subject: [Keyboard] add sus board (#13701) --- keyboards/ocean/sus/config.h | 51 ++++++++++++++++++++++++++++ keyboards/ocean/sus/info.json | 28 +++++++++++++++ keyboards/ocean/sus/keymaps/default/keymap.c | 45 ++++++++++++++++++++++++ keyboards/ocean/sus/keymaps/via/keymap.c | 45 ++++++++++++++++++++++++ keyboards/ocean/sus/keymaps/via/rules.mk | 2 ++ keyboards/ocean/sus/readme.md | 24 +++++++++++++ keyboards/ocean/sus/rules.mk | 22 ++++++++++++ keyboards/ocean/sus/sus.c | 15 ++++++++ keyboards/ocean/sus/sus.h | 31 +++++++++++++++++ 9 files changed, 263 insertions(+) create mode 100644 keyboards/ocean/sus/config.h create mode 100644 keyboards/ocean/sus/info.json create mode 100644 keyboards/ocean/sus/keymaps/default/keymap.c create mode 100644 keyboards/ocean/sus/keymaps/via/keymap.c create mode 100644 keyboards/ocean/sus/keymaps/via/rules.mk create mode 100644 keyboards/ocean/sus/readme.md create mode 100644 keyboards/ocean/sus/rules.mk create mode 100644 keyboards/ocean/sus/sus.c create mode 100644 keyboards/ocean/sus/sus.h (limited to 'keyboards/ocean') diff --git a/keyboards/ocean/sus/config.h b/keyboards/ocean/sus/config.h new file mode 100644 index 0000000000..c3e2a3263a --- /dev/null +++ b/keyboards/ocean/sus/config.h @@ -0,0 +1,51 @@ +/*Copyright 2021 Ocean + +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" + +#define VENDOR_ID 0x9624 +#define PRODUCT_ID 0x0009 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Ocean +#define PRODUCT Sus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 3 + +/* + * 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) + * + */ +/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14*/ +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { C6, D4, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION ROW2COL + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + diff --git a/keyboards/ocean/sus/info.json b/keyboards/ocean/sus/info.json new file mode 100644 index 0000000000..9bfad4239f --- /dev/null +++ b/keyboards/ocean/sus/info.json @@ -0,0 +1,28 @@ +{ + "keyboard_name": "SUS", + "url": " ", + "maintainer": "Ocean", + "width": 3, + "height": 4, + "layouts": { + "LAYOUT_ortho_3x4": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/ocean/sus/keymaps/default/keymap.c b/keyboards/ocean/sus/keymaps/default/keymap.c new file mode 100644 index 0000000000..166e84018e --- /dev/null +++ b/keyboards/ocean/sus/keymaps/default/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2021 Ocean + * 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_ortho_3x4( + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + KC_PENT, KC_P0, MO(1) + ), + + [1] = LAYOUT_ortho_3x4( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ortho_3x4( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ortho_3x4( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/ocean/sus/keymaps/via/keymap.c b/keyboards/ocean/sus/keymaps/via/keymap.c new file mode 100644 index 0000000000..166e84018e --- /dev/null +++ b/keyboards/ocean/sus/keymaps/via/keymap.c @@ -0,0 +1,45 @@ +/* Copyright 2021 Ocean + * 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_ortho_3x4( + KC_P7, KC_P8, KC_P9, + KC_P4, KC_P5, KC_P6, + KC_P1, KC_P2, KC_P3, + KC_PENT, KC_P0, MO(1) + ), + + [1] = LAYOUT_ortho_3x4( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_ortho_3x4( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_ortho_3x4( + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ) +}; diff --git a/keyboards/ocean/sus/keymaps/via/rules.mk b/keyboards/ocean/sus/keymaps/via/rules.mk new file mode 100644 index 0000000000..36b7ba9cbc --- /dev/null +++ b/keyboards/ocean/sus/keymaps/via/rules.mk @@ -0,0 +1,2 @@ +VIA_ENABLE = yes +LTO_ENABLE = yes diff --git a/keyboards/ocean/sus/readme.md b/keyboards/ocean/sus/readme.md new file mode 100644 index 0000000000..5cc8a94590 --- /dev/null +++ b/keyboards/ocean/sus/readme.md @@ -0,0 +1,24 @@ +# SUS Board + +![SUS](https://user-images.githubusercontent.com/30220306/126883340-47401d95-2095-4e55-ba5c-4ae7acaa430f.png) + + +A Macropad like a amogus + +* Keyboard Maintainer: Ocean +* Hardware Supported: Sus Board, Pro Micro +* Hardware Availability: Private GB + +Make example for this keyboard (after setting up your build environment): + + make ocean/sus:default + +Flashing example for this keyboard: + + make ocean/sus:default:flash + +## Bootloader + +To Enter the bootloader you can double click reset button on board when you flash the firmware + +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/ocean/sus/rules.mk b/keyboards/ocean/sus/rules.mk new file mode 100644 index 0000000000..68a44eb8bd --- /dev/null +++ b/keyboards/ocean/sus/rules.mk @@ -0,0 +1,22 @@ +# MCU name +MCU = atmega32u4 + +# Bootloader selection +BOOTLOADER = caterina + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +BLUETOOTH_ENABLE = no # Enable Bluetooth +AUDIO_ENABLE = no # Audio output \ No newline at end of file diff --git a/keyboards/ocean/sus/sus.c b/keyboards/ocean/sus/sus.c new file mode 100644 index 0000000000..d04a12bfba --- /dev/null +++ b/keyboards/ocean/sus/sus.c @@ -0,0 +1,15 @@ +/* Copyright 2021 Ocean + * 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 "sus.h" diff --git a/keyboards/ocean/sus/sus.h b/keyboards/ocean/sus/sus.h new file mode 100644 index 0000000000..394b003388 --- /dev/null +++ b/keyboards/ocean/sus/sus.h @@ -0,0 +1,31 @@ +/* Copyright 2021 Ocean + * + * 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" + +#define LAYOUT_ortho_3x4(\ + K00, K01, K02, \ + K10, K11, K12, \ + K20, K21, K22, \ + K30, K31, K32 \ +) \ +{ \ + { K00, K01, K02 }, \ + { K10, K11, K12 }, \ + { K20, K21, K22 }, \ + { K30, K31, K32 }, \ +} -- cgit v1.2.3