aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaprikman <57448756+paprikman@users.noreply.github.com>2021-12-07 10:17:00 +0500
committerGitHub <noreply@github.com>2021-12-06 21:17:00 -0800
commit3cd77c53e2bb76496a43a60ef78dce3e47fde5ee (patch)
treeb20e72ca39999f0c9c555e6990bc69ff4c7912e9
parent23554726c8d6495e8153c994ed4a58112a79be49 (diff)
downloadqmk_firmware-3cd77c53e2bb76496a43a60ef78dce3e47fde5ee.tar.gz
qmk_firmware-3cd77c53e2bb76496a43a60ef78dce3e47fde5ee.zip
[Keyboard] Add Albacore (#13200)
Co-authored-by: Drashna Jaelre <drashna@live.com>
-rw-r--r--keyboards/paprikman/albacore/albacore.c30
-rw-r--r--keyboards/paprikman/albacore/albacore.h36
-rw-r--r--keyboards/paprikman/albacore/config.h80
-rw-r--r--keyboards/paprikman/albacore/info.json19
-rw-r--r--keyboards/paprikman/albacore/keymaps/default/keymap.c27
-rw-r--r--keyboards/paprikman/albacore/keymaps/pulp/keymap.c75
-rw-r--r--keyboards/paprikman/albacore/keymaps/pulp/rules.mk1
-rw-r--r--keyboards/paprikman/albacore/keymaps/via/keymap.c35
-rw-r--r--keyboards/paprikman/albacore/keymaps/via/rules.mk1
-rw-r--r--keyboards/paprikman/albacore/readme.md26
-rw-r--r--keyboards/paprikman/albacore/rules.mk26
11 files changed, 356 insertions, 0 deletions
diff --git a/keyboards/paprikman/albacore/albacore.c b/keyboards/paprikman/albacore/albacore.c
new file mode 100644
index 000000000..d90adce2b
--- /dev/null
+++ b/keyboards/paprikman/albacore/albacore.c
@@ -0,0 +1,30 @@
1/* Copyright 2021 paprikman
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 "albacore.h"
18
19#ifdef RGB_MATRIX_ENABLE
20led_config_t g_led_config = { {
21 { 0, 1, 2, 3 },
22 { 7, 6, 5, 4 }
23}, {
24 { 56, 16 }, { 112, 16 }, { 168, 16 }, { 224, 16 },
25 { 56, 24 }, { 112, 24 }, { 168, 24 }, { 224, 24 }
26}, {
27 1, 1, 1, 1,
28 1, 1, 1, 1
29} };
30#endif
diff --git a/keyboards/paprikman/albacore/albacore.h b/keyboards/paprikman/albacore/albacore.h
new file mode 100644
index 000000000..b725eba8b
--- /dev/null
+++ b/keyboards/paprikman/albacore/albacore.h
@@ -0,0 +1,36 @@
1/* Copyright 2021 paprikman
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#define ___ KC_NO
19
20#include "quantum.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 K01, K02, K03, \
32 K10, K11, K12, K13 \
33) { \
34 { ___, K01, K02, K03 }, \
35 { K10, K11, K12, K13 } \
36}
diff --git a/keyboards/paprikman/albacore/config.h b/keyboards/paprikman/albacore/config.h
new file mode 100644
index 000000000..3fa81b160
--- /dev/null
+++ b/keyboards/paprikman/albacore/config.h
@@ -0,0 +1,80 @@
1/*
2Copyright 2021 paprikman
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along 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 0x736D
24#define PRODUCT_ID 0x000A
25#define DEVICE_VER 0x0001
26#define MANUFACTURER paprikman
27#define PRODUCT Albacore
28
29/* key matrix size */
30#define MATRIX_ROWS 2
31#define MATRIX_COLS 4
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 { D5, C7 }
44#define MATRIX_COL_PINS { C6, B6, B5, B4 }
45
46/* COL2ROW, ROW2COL */
47#define DIODE_DIRECTION COL2ROW
48
49#define RGB_DI_PIN B3
50
51#ifdef RGB_MATRIX_ENABLE
52 #define DRIVER_LED_TOTAL 8
53 #define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects
54 #define RGB_DISABLE_WHEN_USB_SUSPENDED
55 #define RGB_MATRIX_MAXIMUM_BRIGHTNESS 220
56 #define DISABLE_RGB_MATRIX_GRADIENT_UP_DOWN
57 #define DISABLE_RGB_MATRIX_BAND_SAT
58 #define DISABLE_RGB_MATRIX_BAND_PINWHEEL_SAT
59 #define DISABLE_RGB_MATRIX_CYCLE_LEFT_RIGHT
60 #define DISABLE_RGB_MATRIX_CYCLE_UP_DOWN
61 #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN
62 #define DISABLE_RGB_MATRIX_CYCLE_OUT_IN_DUAL
63 #define DISABLE_RGB_MATRIX_BAND_SPIRAL_SAT
64 #define DISABLE_RGB_MATRIX_SPLASH
65 #define DISABLE_RGB_MATRIX_MULTISPLASH
66 #define DISABLE_RGB_MATRIX_SOLID_SPLASH
67 #define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH
68 #define DISABLE_RGB_MATRIX_DIGITAL_RAIN
69#endif
70
71/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
72#define DEBOUNCE 5
73
74/* disable these deprecated features by default */
75#define NO_ACTION_MACRO
76#define NO_ACTION_FUNCTION
77
78/* Set lower left modifier key as a bootmagic key */
79#define BOOTMAGIC_LITE_ROW 1
80#define BOOTMAGIC_LITE_COLUMN 0
diff --git a/keyboards/paprikman/albacore/info.json b/keyboards/paprikman/albacore/info.json
new file mode 100644
index 000000000..494f228a3
--- /dev/null
+++ b/keyboards/paprikman/albacore/info.json
@@ -0,0 +1,19 @@
1{
2 "keyboard_name": "Albacore",
3 "url": "https://github.com/paprikman/qmk_firmware/tree/master/keyboards/paprikman/albacore",
4 "maintainer": "paprikman",
5 "layouts": {
6 "LAYOUT": {
7 "layout": [
8 {"x": 0.75, "y": 0},
9 {"x": 1.75, "y": 0},
10 {"x": 2.75, "y": 0},
11
12 {"x": 0, "y": 1},
13 {"x": 1, "y": 1},
14 {"x": 2, "y": 1},
15 {"x": 3, "y": 1}
16 ]
17 }
18 }
19}
diff --git a/keyboards/paprikman/albacore/keymaps/default/keymap.c b/keyboards/paprikman/albacore/keymaps/default/keymap.c
new file mode 100644
index 000000000..022250caf
--- /dev/null
+++ b/keyboards/paprikman/albacore/keymaps/default/keymap.c
@@ -0,0 +1,27 @@
1/* Copyright 2021 paprikman
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT(
20 KC_VOLD, KC_MUTE, KC_VOLU,
21 MO(1), KC_MPRV, KC_MPLY, KC_MNXT
22 ),
23 [1] = LAYOUT(
24 RGB_TOG, RGB_MOD, RGB_VAI,
25 _______, RGB_SPI, RGB_SPD, RGB_VAD
26 ),
27};
diff --git a/keyboards/paprikman/albacore/keymaps/pulp/keymap.c b/keyboards/paprikman/albacore/keymaps/pulp/keymap.c
new file mode 100644
index 000000000..006b396ad
--- /dev/null
+++ b/keyboards/paprikman/albacore/keymaps/pulp/keymap.c
@@ -0,0 +1,75 @@
1/* Copyright 2021 paprikman
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
18uint16_t layer_timer;
19
20enum layer_keycodes {
21 TG_LAYER = USER00
22};
23
24uint8_t get_hold_layer(void) {
25 switch(get_highest_layer(layer_state)) {
26 case 0:
27 case 1:
28 return 1;
29 case 2:
30 case 3:
31 return 3;
32 default:
33 return 1;
34 }
35}
36
37bool process_record_user(uint16_t keycode, keyrecord_t *record) {
38 switch(keycode) {
39 case TG_LAYER:
40 if (record->event.pressed) {
41 layer_timer = timer_read();
42 layer_on(get_hold_layer());
43 } else {
44 layer_off(get_hold_layer());
45
46 if (timer_elapsed(layer_timer) < TAPPING_TERM) {
47 layer_invert(2);
48 }
49 }
50
51 return false;
52 break;
53 }
54
55 return true;
56}
57
58const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
59 [0] = LAYOUT(
60 KC_VOLD, KC_MUTE, KC_VOLU,
61 TG_LAYER, KC_MPRV, KC_MPLY, KC_MNXT
62 ),
63 [1] = LAYOUT(
64 RGB_TOG, RGB_MOD, RGB_VAI,
65 KC_NO, RGB_SPI, RGB_SPD, RGB_VAD
66 ),
67 [2] = LAYOUT(
68 KC_F1, KC_F2, KC_F3,
69 TG_LAYER, KC_F4, KC_F5, KC_F6
70 ),
71 [3] = LAYOUT(
72 LCTL(KC_PSCR), KC_NLCK, KC_SLCK,
73 KC_NO, _______, _______, _______
74 ),
75};
diff --git a/keyboards/paprikman/albacore/keymaps/pulp/rules.mk b/keyboards/paprikman/albacore/keymaps/pulp/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/paprikman/albacore/keymaps/pulp/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/paprikman/albacore/keymaps/via/keymap.c b/keyboards/paprikman/albacore/keymaps/via/keymap.c
new file mode 100644
index 000000000..e945b4c3c
--- /dev/null
+++ b/keyboards/paprikman/albacore/keymaps/via/keymap.c
@@ -0,0 +1,35 @@
1/* Copyright 2021 paprikman
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
18const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
19 [0] = LAYOUT(
20 KC_VOLD, KC_MUTE, KC_VOLU,
21 MO(1), KC_MPRV, KC_MPLY, KC_MNXT
22 ),
23 [1] = LAYOUT(
24 RGB_TOG, RGB_MOD, RGB_VAI,
25 _______, RGB_SPI, RGB_SPD, RGB_VAD
26 ),
27 [2] = LAYOUT(
28 _______, _______, _______,
29 _______, _______, _______, _______
30 ),
31 [3] = LAYOUT(
32 _______, _______, _______,
33 _______, _______, _______, _______
34 ),
35};
diff --git a/keyboards/paprikman/albacore/keymaps/via/rules.mk b/keyboards/paprikman/albacore/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/paprikman/albacore/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/paprikman/albacore/readme.md b/keyboards/paprikman/albacore/readme.md
new file mode 100644
index 000000000..57c113d42
--- /dev/null
+++ b/keyboards/paprikman/albacore/readme.md
@@ -0,0 +1,26 @@
1# Albacore
2
3A small 7-key macropad featuring hotswap and per-key RGB
4
5![Albacore](https://i.imgur.com/BTPHnuQh.jpg)
6
7* Keyboard Maintainer: paprikman
8* Hardware Supported: Albacore hotswap pcb
9* Hardware Availability: Private group buy
10
11Make example for this keyboard (after setting up your build environment):
12
13 make paprikman/albacore:default
14
15Flashing example for this keyboard:
16
17 make paprikman/albacore:default:flash
18
19See 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).
20
21## Bootloader
22
23There are several ways to enter the bootloader:
24* **Using keycode**: Press the `RESET` key (if mapped)
25* **Bootmagic reset**: Hold the left bottom key (default mod key) and plug the usb cable
26* **Physical reset**: In the top right corner of the bottom part of the pcb you will find two pads. Shorten them with tweezers and plug the usb cable, then release. It is also possible to shorten these pads while the macropad is already connected (shorten and hold for a couple of seconds, then release).
diff --git a/keyboards/paprikman/albacore/rules.mk b/keyboards/paprikman/albacore/rules.mk
new file mode 100644
index 000000000..baf1b10f2
--- /dev/null
+++ b/keyboards/paprikman/albacore/rules.mk
@@ -0,0 +1,26 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = yes # Audio control and System control
13CONSOLE_ENABLE = no # Console for debug
14COMMAND_ENABLE = no # Commands for debug and configuration
15# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
16SLEEP_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
18NKRO_ENABLE = no # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21AUDIO_ENABLE = no # Audio output
22
23RGB_MATRIX_ENABLE = yes
24RGB_MATRIX_DRIVER = WS2812
25
26LTO_ENABLE = yes