summaryrefslogtreecommitdiff
path: root/keyboards/salicylic_acid3/nafuda
diff options
context:
space:
mode:
authorpeepeetee <43021794+peepeetee@users.noreply.github.com>2022-01-11 07:03:15 +0800
committerGitHub <noreply@github.com>2022-01-10 15:03:15 -0800
commite6e6529b4a85e9bdcb2708216b5434c52d5be15e (patch)
tree4fb399d03eee1f810c6603e1053936fee3b1fa6e /keyboards/salicylic_acid3/nafuda
parent4cff18a70594f2bb1143a19cbe1109e9c458f618 (diff)
downloadqmk_firmware-e6e6529b4a85e9bdcb2708216b5434c52d5be15e.tar.gz
qmk_firmware-e6e6529b4a85e9bdcb2708216b5434c52d5be15e.zip
[Keyboard] move Salicylic-acid3's keyboards to salicylic-acid3/ (#15791)
Diffstat (limited to 'keyboards/salicylic_acid3/nafuda')
-rw-r--r--keyboards/salicylic_acid3/nafuda/config.h70
-rw-r--r--keyboards/salicylic_acid3/nafuda/info.json18
-rw-r--r--keyboards/salicylic_acid3/nafuda/keymaps/default/config.h23
-rw-r--r--keyboards/salicylic_acid3/nafuda/keymaps/default/keymap.c61
-rw-r--r--keyboards/salicylic_acid3/nafuda/keymaps/default/readme.md34
-rw-r--r--keyboards/salicylic_acid3/nafuda/nafuda.c1
-rw-r--r--keyboards/salicylic_acid3/nafuda/nafuda.h24
-rw-r--r--keyboards/salicylic_acid3/nafuda/readme.md17
-rw-r--r--keyboards/salicylic_acid3/nafuda/rules.mk19
9 files changed, 267 insertions, 0 deletions
diff --git a/keyboards/salicylic_acid3/nafuda/config.h b/keyboards/salicylic_acid3/nafuda/config.h
new file mode 100644
index 0000000000..22e17c6cc7
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/config.h
@@ -0,0 +1,70 @@
+/*
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+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 <http://www.gnu.org/licenses/>.
+*/
+
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x3060
+#define DEVICE_VER 0x0012
+#define MANUFACTURER Salicylic_Acid
+#define PRODUCT nafuda
+
+/* key matrix size */
+#define MATRIX_ROWS 3
+#define MATRIX_COLS 3
+
+// wiring of each half
+#define MATRIX_ROW_PINS { D1, D0, D4 }
+#define MATRIX_COL_PINS { F4, F5, F6 }
+
+#define DIODE_DIRECTION COL2ROW
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCE 5
+
+/* 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
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN D3
+
+#define RGBLED_NUM 7 // Number of LEDs
+#define RGBLIGHT_ANIMATIONS
+
+#ifndef IOS_DEVICE_ENABLE
+ #define RGBLIGHT_LIMIT_VAL 180
+ #define RGBLIGHT_VAL_STEP 17
+#else
+ #define RGBLIGHT_LIMIT_VAL 50
+ #define RGBLIGHT_VAL_STEP 4
+#endif
+#define RGBLIGHT_HUE_STEP 10
+#define RGBLIGHT_SAT_STEP 17
+
+#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE)
+ #define USB_MAX_POWER_CONSUMPTION 400
+#else
+ // fix iPhone and iPad power adapter issue
+ // iOS device need lessthan 100
+ #define USB_MAX_POWER_CONSUMPTION 100
+#endif
diff --git a/keyboards/salicylic_acid3/nafuda/info.json b/keyboards/salicylic_acid3/nafuda/info.json
new file mode 100644
index 0000000000..d418341d19
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/info.json
@@ -0,0 +1,18 @@
+{
+ "keyboard_name": "nafuda",
+ "url": "https://salicylic-acid3.hatenablog.com/",
+ "maintainer": "Salicylic_acid3",
+ "layouts": {
+ "LAYOUT": {
+ "layout": [
+ {"label":"Mouse", "x":1, "y":0},
+ {"label":"Backspace", "x":0, "y":0.5},
+ {"label":"\u2191", "x":1, "y":1},
+ {"label":"Browser", "x":2, "y":0.5},
+ {"label":"\u2190", "x":0, "y":1.5},
+ {"label":"\u2193", "x":1, "y":2},
+ {"label":"\u2192", "x":2, "y":1.5}
+ ]
+ }
+ }
+}
diff --git a/keyboards/salicylic_acid3/nafuda/keymaps/default/config.h b/keyboards/salicylic_acid3/nafuda/keymaps/default/config.h
new file mode 100644
index 0000000000..e35fe2ccd7
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/keymaps/default/config.h
@@ -0,0 +1,23 @@
+/* Copyright 2018 Salicylic_acid3
+ *
+ * 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 <http://www.gnu.org/licenses/>.
+ */
+
+#pragma once
+
+/* Select hand configuration */
+
+#define TAPPING_FORCE_HOLD
+#define TAPPING_TERM 180
+
diff --git a/keyboards/salicylic_acid3/nafuda/keymaps/default/keymap.c b/keyboards/salicylic_acid3/nafuda/keymaps/default/keymap.c
new file mode 100644
index 0000000000..f0baff6c22
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/keymaps/default/keymap.c
@@ -0,0 +1,61 @@
+#include QMK_KEYBOARD_H
+
+#ifdef RGBLIGHT_ENABLE
+//Following line allows macro to read current RGB settings
+extern rgblight_config_t rgblight_config;
+#endif
+
+extern uint8_t is_master;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+enum layer_number {
+ _BASE,
+ _MOUSE,
+ _BROWSER,
+ _ADJUST,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT(
+ //|-------------------------------------------|
+ TG(_MOUSE),
+ //|---------------+---------------+-----------|
+LT(_ADJUST, KC_BSPC), KC_UP,TG(_BROWSER),
+ //|---------------+---------------+-----------|
+ KC_LEFT, KC_DOWN, KC_RIGHT
+ //|-------------------------------------------|
+ ),
+
+ [_MOUSE] = LAYOUT(
+ //|-------------------------------------------|
+ TG(_MOUSE),
+ //|---------------+---------------+-----------|
+ KC_BTN1, KC_MS_U, KC_BTN2,
+ //|---------------+---------------+-----------|
+ KC_MS_L, KC_MS_D, KC_MS_R
+ //|-------------------------------------------|
+ ),
+
+ [_BROWSER] = LAYOUT(
+ //|-------------------------------------------|
+ LCTL(KC_W),
+ //|---------------+---------------+-----------|
+ LCTL(LSFT(KC_T)), KC_WH_U,TG(_BROWSER),
+ //|---------------+---------------+-----------|
+ LCTL(LSFT(KC_TAB)), KC_WH_D,LCTL(KC_TAB)
+ //|-------------------------------------------|
+ ),
+
+ [_ADJUST] = LAYOUT( /* Base */
+ //|-------------------------------------------|
+ RGB_VAD,
+ //|---------------+---------------+-----------|
+ MO(_ADJUST), RGB_SAD, RGB_VAI,
+ //|---------------+---------------+-----------|
+ RGB_MOD, RGB_TOG, RGB_SAI
+ //|-------------------------------------------|
+ )
+};
diff --git a/keyboards/salicylic_acid3/nafuda/keymaps/default/readme.md b/keyboards/salicylic_acid3/nafuda/keymaps/default/readme.md
new file mode 100644
index 0000000000..b84276bf8a
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/keymaps/default/readme.md
@@ -0,0 +1,34 @@
+# The default keymap for nafuda
+
+## Base
+| 1 | 2 | 3 |
+|:--------------:|:--------:|:-----:|
+| | MOUSE | |
+| ADJUST or BSPC | UP |BROWSER|
+| LEFT | DOWN | RIGHT|
+
+
+## MOUSE
+| 1 | 2 | 3 |
+|:--------:|:--------:|:---------:|
+| | BASE | |
+| Btn 1 | MOUSE_UP | Btn2 |
+|MOUSE_LEFT|MOUSE_DOWN|MOUSE_RIGHT|
+
+
+## BROWSER
+| 1 | 2 | 3 |
+|:-----------:|:--------:|:-------:|
+| | LCTL(W) | |
+| LCTL+LSFT(T)| WHEEL_UP | BROWSER |
+|LCTL+SFT(TAB)|WHEEL_DOWN|LCTL(TAB)|
+
+
+## Adjust
+| 1 | 2 | 3 |
+|:-------:|:-------:|:------:|
+| | RGB_VAD | |
+| Adjust | RGB_SAD | RGB_VAI|
+| RGB_MOD | RGB_TOG | RGB_SAI|
+
+
diff --git a/keyboards/salicylic_acid3/nafuda/nafuda.c b/keyboards/salicylic_acid3/nafuda/nafuda.c
new file mode 100644
index 0000000000..334b3dab27
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/nafuda.c
@@ -0,0 +1 @@
+#include "nafuda.h"
diff --git a/keyboards/salicylic_acid3/nafuda/nafuda.h b/keyboards/salicylic_acid3/nafuda/nafuda.h
new file mode 100644
index 0000000000..008a9c16f4
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/nafuda.h
@@ -0,0 +1,24 @@
+#pragma once
+
+#include "quantum.h"
+
+/*
+ * ,-----------------.
+ * | | L01 | |
+ * |-----------------+
+ * | L10 | L11 | L12 |
+ * |-----------------+
+ * | L20 | L21 | L22 |
+ * |-----------------'
+ */
+
+#define LAYOUT( \
+ L01, \
+ L10, L11, L12, \
+ L20, L21, L22 \
+ ) \
+ { \
+ {KC_NO, L01,KC_NO }, \
+ { L10, L11, L12 }, \
+ { L20, L21, L22 } \
+ }
diff --git a/keyboards/salicylic_acid3/nafuda/readme.md b/keyboards/salicylic_acid3/nafuda/readme.md
new file mode 100644
index 0000000000..5df9b5df0f
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/readme.md
@@ -0,0 +1,17 @@
+# nafuda
+
+![nafuda](https://cdn-ak.f.st-hatena.com/images/fotolife/S/Salicylic_acid3/20190608/20190608024901.jpg)
+
+This is 7 keys cursor macropad.
+
+* Keyboard Maintainer: [Salicylic_acid3](https://github.com/Salicylic-acid3)
+* Hardware Supported: Nafuda PCB, Pro Micro
+* Hardware Availability: [PCB & Case Data](https://github.com/Salicylic-acid3/PCB_Data), [Booth Shop](https://salicylic-acid3.booth.pm/items/1271706)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make salicylic_acid3/nafuda:default
+
+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).
+
+[Build guide](https://salicylic-acid3.hatenablog.com/entry/nafuda-build-guide)
diff --git a/keyboards/salicylic_acid3/nafuda/rules.mk b/keyboards/salicylic_acid3/nafuda/rules.mk
new file mode 100644
index 0000000000..e9d90e7ad8
--- /dev/null
+++ b/keyboards/salicylic_acid3/nafuda/rules.mk
@@ -0,0 +1,19 @@
+# MCU name
+MCU = atmega32u4
+
+# Bootloader selection
+BOOTLOADER = caterina
+
+# Build Options
+# change yes to no to disable
+#
+BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite
+MOUSEKEY_ENABLE = yes # Mouse keys
+EXTRAKEY_ENABLE = yes # Audio control and System control
+CONSOLE_ENABLE = no # Console for debug
+COMMAND_ENABLE = yes # Commands for debug and configuration
+NKRO_ENABLE = no # Enable N-Key Rollover
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+AUDIO_ENABLE = no # Audio output
+RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
+OLED_ENABLE = no