aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/arrayperipherals/1x4p1/1x4p1.c18
-rw-r--r--keyboards/arrayperipherals/1x4p1/1x4p1.h26
-rw-r--r--keyboards/arrayperipherals/1x4p1/config.h41
-rw-r--r--keyboards/arrayperipherals/1x4p1/info.json18
-rw-r--r--keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c39
-rw-r--r--keyboards/arrayperipherals/1x4p1/keymaps/default/readme.md5
-rw-r--r--keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c45
-rw-r--r--keyboards/arrayperipherals/1x4p1/keymaps/via/rules.mk1
-rw-r--r--keyboards/arrayperipherals/1x4p1/readme.md16
-rw-r--r--keyboards/arrayperipherals/1x4p1/rules.mk24
-rw-r--r--keyboards/arrayperipherals/readme.md5
11 files changed, 238 insertions, 0 deletions
diff --git a/keyboards/arrayperipherals/1x4p1/1x4p1.c b/keyboards/arrayperipherals/1x4p1/1x4p1.c
new file mode 100644
index 000000000..788ccff55
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/1x4p1.c
@@ -0,0 +1,18 @@
1/*
2Copyright 2020 David Doan
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#include "1x4p1.h"
diff --git a/keyboards/arrayperipherals/1x4p1/1x4p1.h b/keyboards/arrayperipherals/1x4p1/1x4p1.h
new file mode 100644
index 000000000..8f385a908
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/1x4p1.h
@@ -0,0 +1,26 @@
1/*
2Copyright 2020 David Doan
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 "quantum.h"
21
22#define LAYOUT_ortho_1x5( \
23 k01, k02, k03, k04, k05\
24 ) { \
25 { k01, k02, k03, k04, k05} \
26}
diff --git a/keyboards/arrayperipherals/1x4p1/config.h b/keyboards/arrayperipherals/1x4p1/config.h
new file mode 100644
index 000000000..44559be3e
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/config.h
@@ -0,0 +1,41 @@
1/*
2Copyright 2020 David Doan
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 0x4152 // "AR"
24#define PRODUCT_ID 0x4F46 // "OF"
25#define DEVICE_VER 0x0001
26#define MANUFACTURER Array Peripherals
27#define PRODUCT [1x4] + 1 Macropad
28
29/* key matrix size */
30#define MATRIX_ROWS 1
31#define MATRIX_COLS 5
32
33
34#define DIRECT_PINS { \
35 { C7, B7, D6, F5, F7} \
36}
37#define UNUSED_PINS
38
39/* rotary encoder*/
40#define ENCODERS_PAD_A {F0}
41#define ENCODERS_PAD_B {F1}
diff --git a/keyboards/arrayperipherals/1x4p1/info.json b/keyboards/arrayperipherals/1x4p1/info.json
new file mode 100644
index 000000000..3edf84ab0
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/info.json
@@ -0,0 +1,18 @@
1{
2 "keyboard_name": "[1 x 4] + 1 Macropad",
3 "url": "https://github.com/daviddoan",
4 "maintainer": "David Doan",
5 "width": 5,
6 "height": 1,
7 "layouts": {
8 "LAYOUT_ortho_1x5": {
9 "layout": [
10 {"label": "K01", "x":0, "y":0},
11 {"label": "K02", "x":1, "y":0},
12 {"label": "K03", "x":2, "y":0},
13 {"label": "K04", "x":3, "y":0},
14 {"label": "K05", "x":4, "y":0}
15 ]
16 }
17 }
18}
diff --git a/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c b/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c
new file mode 100644
index 000000000..cf4433d8c
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/keymaps/default/keymap.c
@@ -0,0 +1,39 @@
1/*
2Copyright 2020 David Doan
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#include QMK_KEYBOARD_H
19
20void encoder_update_user(uint8_t index, bool clockwise) {
21 if (index == 0) { /* First encoder */
22 if (clockwise) {
23 tap_code(KC_MS_WH_UP);
24 } else {
25 tap_code(KC_MS_WH_DOWN);
26 }
27 }
28}
29
30//
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //button closest to usb is first
32 [0] = LAYOUT_ortho_1x5(
33 KC_ESC, KC_TAB, KC_LSHIFT, KC_LCTRL, TG(1)
34 ),
35
36 [1] = LAYOUT_ortho_1x5(
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(0)
38 )
39};
diff --git a/keyboards/arrayperipherals/1x4p1/keymaps/default/readme.md b/keyboards/arrayperipherals/1x4p1/keymaps/default/readme.md
new file mode 100644
index 000000000..ba50c6bd2
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/keymaps/default/readme.md
@@ -0,0 +1,5 @@
1![[1x4] + 1 Macropad Layout](https://i.imgur.com/ZdXuIwb.png)
2
3# Default [1x4] + 1 Macropad Layout
4
5This is the default layout that comes flashed on every [1x4] + 1 Macropad. The right most key (red) is the rotary and the key is binded to layer switching. The second layer is left blank for the user. \ No newline at end of file
diff --git a/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c b/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c
new file mode 100644
index 000000000..d419050a3
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/keymaps/via/keymap.c
@@ -0,0 +1,45 @@
1/*
2Copyright 2020 David Doan
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#include QMK_KEYBOARD_H
19
20void encoder_update_user(uint8_t index, bool clockwise) {
21 if (index == 0) { /* First encoder */
22 if (clockwise) {
23 tap_code(KC_MS_WH_UP);
24 } else {
25 tap_code(KC_MS_WH_DOWN);
26 }
27 }
28}
29
30//
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //button closest to usb is first
32 [0] = LAYOUT_ortho_1x5(
33 KC_ESC, KC_TAB, KC_LSHIFT, KC_LCTRL, TG(1)
34 ),
35
36 [1] = LAYOUT_ortho_1x5(
37 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(2)
38 ),
39 [2] = LAYOUT_ortho_1x5(
40 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(3)
41 ),
42 [3] = LAYOUT_ortho_1x5(
43 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TG(0)
44 )
45};
diff --git a/keyboards/arrayperipherals/1x4p1/keymaps/via/rules.mk b/keyboards/arrayperipherals/1x4p1/keymaps/via/rules.mk
new file mode 100644
index 000000000..1e5b99807
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/keymaps/via/rules.mk
@@ -0,0 +1 @@
VIA_ENABLE = yes
diff --git a/keyboards/arrayperipherals/1x4p1/readme.md b/keyboards/arrayperipherals/1x4p1/readme.md
new file mode 100644
index 000000000..c9374cb7a
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/readme.md
@@ -0,0 +1,16 @@
1# [1x4] + 1 Macropad
2
3![[1x4] + 1 Macropad](https://images.squarespace-cdn.com/content/v1/5f5e7d5dc43c166c56c0ae39/1606977576841-KIT0TOI6L3FO8FTS4ZHB/ke17ZwdGBToddI8pDm48kDk1dm1oSR9gCa1mX4KqzjN7gQa3H78H3Y0txjaiv_0fDoOvxcdMmMKkDsyUqMSsMWxHk725yiiHCCLfrh8O1z4YTzHvnKhyp6Da-NYroOW3ZGjoBKy3azqku80C789l0luj0xCD0oh5KMc0gpox0u-wQWxfQHg04OxgQwaUq2yiAcNt5Kg2tE9yEtYfM4xwaw/DSC_0116.jpg)
4
5A macropad with a 1x4 matrix array with an additional rotary that also functions as a button. [More info at arrayperipherals.com](https://www.arrayperipherals.com/)
6
7* Keyboard Maintainer: [David Doan](https://github.com/daviddoan)
8* Hardware Supported: Adafruit ItsyBitsy 32u4
9* Hardware Availability: [arrayperipherals.com](https://www.arrayperipherals.com/)
10
11See 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).
12
13## Resetting macropad into bootloader mode.
14
15The stock version of the macropad has bootmagic lite enabled. To trigger the bootloader, the first key (key furthest way from the rotary) needs to be held down when plugging the keyboard in.
16NOTE: Using bootmagic lite will always reset the EEPROM, so you will lose any settings that have been saved.
diff --git a/keyboards/arrayperipherals/1x4p1/rules.mk b/keyboards/arrayperipherals/1x4p1/rules.mk
new file mode 100644
index 000000000..3bbc6dbf8
--- /dev/null
+++ b/keyboards/arrayperipherals/1x4p1/rules.mk
@@ -0,0 +1,24 @@
1# MCU name
2MCU = atmega32u4
3
4# Bootloader selection
5BOOTLOADER = caterina
6
7# Build Options
8# change yes to no to disable
9#
10BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = yes # 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 = yes # USB Nkey Rollover
19BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
20RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23UNICODE_ENABLE = yes
24ENCODER_ENABLE = yes
diff --git a/keyboards/arrayperipherals/readme.md b/keyboards/arrayperipherals/readme.md
new file mode 100644
index 000000000..3c6aba591
--- /dev/null
+++ b/keyboards/arrayperipherals/readme.md
@@ -0,0 +1,5 @@
1# Array Peripherals
2
3Array Peripherals is a small company operating out of an apartment by two brothers located in Northern California.
4
5Website: [Array Peripherals](www.arrayperipherals.com)