aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/polycarbdiet/readme.md6
-rw-r--r--keyboards/polycarbdiet/s20/config.h61
-rw-r--r--keyboards/polycarbdiet/s20/info.json88
-rw-r--r--keyboards/polycarbdiet/s20/keymaps/default/keymap.c47
-rw-r--r--keyboards/polycarbdiet/s20/keymaps/default/readme.md1
-rw-r--r--keyboards/polycarbdiet/s20/readme.md27
-rw-r--r--keyboards/polycarbdiet/s20/rules.mk23
-rw-r--r--keyboards/polycarbdiet/s20/s20.c17
-rw-r--r--keyboards/polycarbdiet/s20/s20.h61
9 files changed, 331 insertions, 0 deletions
diff --git a/keyboards/polycarbdiet/readme.md b/keyboards/polycarbdiet/readme.md
new file mode 100644
index 000000000..c928ebed5
--- /dev/null
+++ b/keyboards/polycarbdiet/readme.md
@@ -0,0 +1,6 @@
1# polycarbdiet
2QMK folder for custom PCB firmware.
3
4Github: polycarbdiet
5Discord: polycarb_diet
6Reddit: u/polycarb_diet
diff --git a/keyboards/polycarbdiet/s20/config.h b/keyboards/polycarbdiet/s20/config.h
new file mode 100644
index 000000000..58f998e76
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/config.h
@@ -0,0 +1,61 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
2
3This program is free software: you can redistribute it and/or modify
4it under the terms of the GNU General Public License as published by
5the Free Software Foundation, either version 2 of the License, or
6(at your option) any later version.
7
8This program is distributed in the hope that it will be useful,
9but WITHOUT ANY WARRANTY; without even the implied warranty of
10MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11GNU General Public License for more details.
12
13You should have received a copy of the GNU General Public License
14along with this program. If not, see <http://www.gnu.org/licenses/>.
15*/
16
17#pragma once
18
19#include "config_common.h"
20
21/* USB Device descriptor parameter */
22#define VENDOR_ID 0x5040 // PD = polycarbdiet
23#define PRODUCT_ID 0x7320 // S20
24#define DEVICE_VER 0x0001
25#define MANUFACTURER polycarbdiet
26#define PRODUCT S20
27
28/* key matrix size */
29#define MATRIX_ROWS 5
30#define MATRIX_COLS 4
31
32// 1 2 3 4 5
33#define MATRIX_ROW_PINS { B7, E6, D0, D1, D5 }
34#define MATRIX_COL_PINS { C6, C7, D4, D6 }
35#define UNUSED_PINS
36
37/* COL2ROW, ROW2COL */
38#define DIODE_DIRECTION ROW2COL
39
40#define BACKLIGHT_PIN B6
41#define BACKLIGHT_LEVELS 3
42#define BACKLIGHT_BREATHING
43
44#define RGB_DI_PIN B3
45#define RGBLED_NUM 4
46#define RGBLIGHT_HUE_STEP 8
47#define RGBLIGHT_SAT_STEP 8
48#define RGBLIGHT_VAL_STEP 8
49#define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */
50#define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */
51
52#define RGBLIGHT_ANIMATIONS
53
54#define DEBOUNCE 5
55
56/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
57#define LOCKING_SUPPORT_ENABLE
58/* Locking resynchronize hack */
59#define LOCKING_RESYNC_ENABLE
60
61#define FORCE_NKRO
diff --git a/keyboards/polycarbdiet/s20/info.json b/keyboards/polycarbdiet/s20/info.json
new file mode 100644
index 000000000..32407beea
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/info.json
@@ -0,0 +1,88 @@
1{
2 "keyboard_name": "S20 revA",
3 "url": "",
4 "maintainer": "polycarbdiet",
5 "width": 4,
6 "height": 5,
7 "layouts": {
8 "LAYOUT_ortho_5x4": {
9 "layout": [
10 {"x":0, "y":0},
11 {"x":1, "y":0},
12 {"x":2, "y":0},
13 {"x":3, "y":0},
14
15 {"x":0, "y":1},
16 {"x":1, "y":1},
17 {"x":2, "y":1},
18 {"x":3, "y":1},
19
20 {"x":0, "y":2},
21 {"x":1, "y":2},
22 {"x":2, "y":2},
23 {"x":3, "y":2},
24
25 {"x":0, "y":3},
26 {"x":1, "y":3},
27 {"x":2, "y":3},
28 {"x":3, "y":3},
29
30 {"x":0, "y":4},
31 {"x":1, "y":4},
32 {"x":2, "y":4},
33 {"x":3, "y":4}
34 ]
35 },
36 "LAYOUT_numpad_5x4":{
37 "layout": [
38 {"x":0, "y":0},
39 {"x":1, "y":0},
40 {"x":2, "y":0},
41 {"x":3, "y":0},
42
43 {"x":0, "y":1},
44 {"x":1, "y":1},
45 {"x":2, "y":1},
46
47 {"x":0, "y":2},
48 {"x":1, "y":2},
49 {"x":2, "y":2},
50 {"x":3, "y":1, "h":2},
51 {"x":0, "y":3},
52 {"x":1, "y":3},
53 {"x":2, "y":3},
54
55 {"x":0, "y":4, "w":2},
56 {"x":2, "y":4},
57 {"x":3, "y":3, "h":2}
58 ]
59 },
60 "LAYOUT_enter": {
61 "layout": [
62 {"x":0, "y":0},
63 {"x":1, "y":0},
64 {"x":2, "y":0},
65 {"x":3, "y":0},
66
67 {"x":0, "y":1},
68 {"x":1, "y":1},
69 {"x":2, "y":1},
70 {"x":3, "y":1},
71
72 {"x":0, "y":2},
73 {"x":1, "y":2},
74 {"x":2, "y":2},
75 {"x":3, "y":2},
76
77 {"x":0, "y":3},
78 {"x":1, "y":3},
79 {"x":2, "y":3},
80 {"x":3, "y":3, "h":2},
81
82 {"x":0, "y":4},
83 {"x":1, "y":4},
84 {"x":2, "y":4}
85 ]
86 }
87 }
88}
diff --git a/keyboards/polycarbdiet/s20/keymaps/default/keymap.c b/keyboards/polycarbdiet/s20/keymaps/default/keymap.c
new file mode 100644
index 000000000..b39920206
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/keymaps/default/keymap.c
@@ -0,0 +1,47 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
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_ortho_5x4(
20 KC_ESC, KC_PAST, KC_PSLS, KC_BSPC,
21 KC_P7, KC_P8, KC_P9, KC_PMNS,
22 KC_P4, KC_P5, KC_P6, KC_PPLS,
23 KC_P1, KC_P2, KC_P3, KC_PENT,
24 KC_P0, KC_PDOT, MO(1), RGB_TOG
25 ),
26 [1] = LAYOUT_ortho_5x4(
27 KC_NLCK, KC_TRNS, KC_TRNS, KC_TRNS,
28 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
29 KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS,
30 KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS,
31 RESET, MO(2), KC_TRNS, KC_TRNS
32 ),
33 [2] = LAYOUT_ortho_5x4(
34 RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI,
35 RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD,
36 BL_TOGG, BL_ON, BL_INC, BL_STEP,
37 KC_TRNS, BL_OFF, BL_DEC, BL_BRTG,
38 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
39 ),
40 [3] = LAYOUT_ortho_5x4(
41 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
42 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
44 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
45 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS
46 )
47};
diff --git a/keyboards/polycarbdiet/s20/keymaps/default/readme.md b/keyboards/polycarbdiet/s20/keymaps/default/readme.md
new file mode 100644
index 000000000..81c2266b4
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/keymaps/default/readme.md
@@ -0,0 +1 @@
# The default keymap for S20
diff --git a/keyboards/polycarbdiet/s20/readme.md b/keyboards/polycarbdiet/s20/readme.md
new file mode 100644
index 000000000..7eb292771
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/readme.md
@@ -0,0 +1,27 @@
1# S20
2
3![S20](https://i.imgur.com/RvOACqR.jpg?1)
4
5The S20 keyboard is a FR4 sandwich keyboard which was orginally designed to add extra functionality to a user's current keyboard setup.
6
7* Keyboard Maintainer: [polycarbdiet](https://github.com/polycarbdiet)
8* Hardware Supported: S20 - FR4 sandwich MacroPad/NumberPad
9* Hardware Availability: Custom, limitied quantaties.
10
11Make example for this keyboard (after setting up your build environment):
12
13 make polycarbdiet/s20:default
14
15Flashing example for this keyboard:
16
17 make polycarbdiet/s20:default:flash
18
19**Reset Method:**
20- Press the `RESET` button on the under side of the PCB
21
22**Bootloader Method:**
23- Hold down the key located at `K00`, commonly programmed as `ESC`, while plugging in the keyboard.
24- Hold down the key located at `K00`, commonly programmed as `ESC`, and press the RESET button on the PCB.
25- Hold down the key located at `K42` and then press the key located at `K40`.
26
27See 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/polycarbdiet/s20/rules.mk b/keyboards/polycarbdiet/s20/rules.mk
new file mode 100644
index 000000000..152430af9
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/rules.mk
@@ -0,0 +1,23 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = atmel-dfu
6
7# Build Options
8
9BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
10MOUSEKEY_ENABLE = yes # Mouse keys
11EXTRAKEY_ENABLE = yes # Audio control and System control
12CONSOLE_ENABLE = no # Console for debug
13COMMAND_ENABLE = no # Commands for debug and configuration
14# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
15SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
16# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
17NKRO_ENABLE = yes # USB Nkey Rollover
18BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
19RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow
20BLUETOOTH_ENABLE = no # Enable Bluetooth
21AUDIO_ENABLE = no # Audio output
22
23LAYOUTS = ortho_5x4 numpad_5x4
diff --git a/keyboards/polycarbdiet/s20/s20.c b/keyboards/polycarbdiet/s20/s20.c
new file mode 100644
index 000000000..f7b3fa903
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/s20.c
@@ -0,0 +1,17 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
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 "s20.h"
diff --git a/keyboards/polycarbdiet/s20/s20.h b/keyboards/polycarbdiet/s20/s20.h
new file mode 100644
index 000000000..0e3eec12e
--- /dev/null
+++ b/keyboards/polycarbdiet/s20/s20.h
@@ -0,0 +1,61 @@
1/* Copyright 2020 Muhammad Galib (polycarbdiet) <pd.keyboards@gmail.com>
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
21#define LAYOUT_ortho_5x4( \
22 K00, K01, K02, K03, \
23 K10, K11, K12, K13, \
24 K20, K21, K22, K23, \
25 K30, K31, K32, K33, \
26 K40, K41, K42, K43 \
27) { \
28 { K00, K01, K02, K03 }, \
29 { K10, K11, K12, K13 }, \
30 { K20, K21, K22, K23 }, \
31 { K30, K31, K32, K33 }, \
32 { K40, K41, K42, K43 } \
33}
34
35#define LAYOUT_numpad_5x4( \
36 K00, K01, K02, K03, \
37 K10, K11, K12, \
38 K20, K21, K22, K13, \
39 K30, K31, K32, \
40 K40, K42, K33 \
41) { \
42 { K00, K01, K02, K03 }, \
43 { K10, K11, K12, K13 }, \
44 { K20, K21, K22, KC_NO }, \
45 { K30, K31, K32, K33 }, \
46 { K40, KC_NO, K42, KC_NO } \
47}
48
49#define LAYOUT_enter( \
50 K00, K01, K02, K03, \
51 K10, K11, K12, K13, \
52 K20, K21, K22, K23, \
53 K30, K31, K32, K33, \
54 K40, K41, K42 \
55) { \
56 { K00, K01, K02, K03 }, \
57 { K10, K11, K12, K13 }, \
58 { K20, K21, K22, K23 }, \
59 { K30, K31, K32, K33 }, \
60 { K40, K41, K42, KC_NO } \
61}