aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcole smith <38364556+daysgobye@users.noreply.github.com>2020-08-18 13:46:09 -0600
committerGitHub <noreply@github.com>2020-08-18 12:46:09 -0700
commitc0df341f5c0db7217838dfb994ccbb6bd2d075fe (patch)
tree6a2a6b4bf3f3644d04b214334729e414c836753b
parent186b1b2ba2550d9a7a864a241e8f9503c37f188b (diff)
downloadqmk_firmware-c0df341f5c0db7217838dfb994ccbb6bd2d075fe.tar.gz
qmk_firmware-c0df341f5c0db7217838dfb994ccbb6bd2d075fe.zip
[Keyboard] Boardsource Microdox (#9971)
* microdox keyboard workidng * updated readme * cleaned up for pr * Apply suggestions from code review * Apply suggestions from code review * added license headers * Update keyboards/boardsource/microdox/keymaps/default/keymap.c * Update keyboards/boardsource/microdox/rules.mk * Update keyboards/boardsource/microdox/rules.mk * Update keyboards/boardsource/microdox/rules.mk
-rw-r--r--keyboards/boardsource/microdox/config.h80
-rw-r--r--keyboards/boardsource/microdox/info.json56
-rw-r--r--keyboards/boardsource/microdox/keymaps/cole/keymap.c116
-rw-r--r--keyboards/boardsource/microdox/keymaps/cole/rules.mk1
-rw-r--r--keyboards/boardsource/microdox/keymaps/default/keymap.c50
-rw-r--r--keyboards/boardsource/microdox/microdox.c19
-rw-r--r--keyboards/boardsource/microdox/microdox.h37
-rw-r--r--keyboards/boardsource/microdox/readme.md13
-rw-r--r--keyboards/boardsource/microdox/rules.mk23
9 files changed, 395 insertions, 0 deletions
diff --git a/keyboards/boardsource/microdox/config.h b/keyboards/boardsource/microdox/config.h
new file mode 100644
index 000000000..65af0f16d
--- /dev/null
+++ b/keyboards/boardsource/microdox/config.h
@@ -0,0 +1,80 @@
1/*
2Copyright 2020 Cole Smith <cole@boadsource.xyz>
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#define VENDOR_ID 0xF7E0
23#define PRODUCT_ID 0x0412
24#define DEVICE_VER 0x0000
25#define MANUFACTURER Boardsource
26#define PRODUCT microdox
27
28/* key matrix size */
29// Rows are doubled-up
30#define MATRIX_ROWS 8
31#define MATRIX_COLS 5
32#define MATRIX_ROW_PINS { B2, B6, B4, B5 }
33
34// wiring of each half
35#define MATRIX_COL_PINS { F4, F5, F6, F7, B1 }
36#define USE_SERIAL
37#define SOFT_SERIAL_PIN D2
38/* define if matrix has ghost */
39//#define MATRIX_HAS_GHOST
40
41/* number of backlight levels */
42// #define BACKLIGHT_LEVELS 3
43
44/* Set 0 if debouncing isn't needed */
45#define DEBOUNCE 5
46
47/* COL2ROW, ROW2COL*/
48#define DIODE_DIRECTION COL2ROW
49
50/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
51//#define LOCKING_SUPPORT_ENABLE
52/* Locking resynchronize hack */
53//#define LOCKING_RESYNC_ENABLE
54
55/* ws2812 RGB LED */
56#define RGBLIGHT_ANIMATIONS
57#define RGB_DI_PIN D3
58#define RGBLED_SPLIT { 6, 6 }
59#define EE_HANDS
60#ifdef RGBLIGHT_ENABLE
61#define RGBLED_NUM 12 // Number of LEDs
62#endif
63
64/*
65 * Feature disable options
66 * These options are also useful to firmware size reduction.
67 */
68
69/* disable debug print */
70// #define NO_DEBUG
71
72/* disable print */
73// #define NO_PRINT
74
75/* disable action features */
76//#define NO_ACTION_LAYER
77//#define NO_ACTION_TAPPING
78//#define NO_ACTION_ONESHOT
79//#define NO_ACTION_MACRO
80//#define NO_ACTION_FUNCTION \ No newline at end of file
diff --git a/keyboards/boardsource/microdox/info.json b/keyboards/boardsource/microdox/info.json
new file mode 100644
index 000000000..fad30399d
--- /dev/null
+++ b/keyboards/boardsource/microdox/info.json
@@ -0,0 +1,56 @@
1{
2 "keyboard_name": "microdox",
3 "url": "https://boardsource.xyz/store/5f2e7e4a2902de7151494f92",
4 "maintainer": "boardsource",
5 "width": 13,
6 "height": 4.7,
7 "layouts": {
8 "LAYOUT_split_3x5_3": {
9 "layout": [
10 { "label": "Q", "x": 0, "y": 0.3 },
11 { "label": "W", "x": 1, "y": 0.1 },
12 { "label": "E", "x": 2, "y": 0 },
13 { "label": "R", "x": 3, "y": 0.1 },
14 { "label": "T", "x": 4, "y": 0.2 },
15
16 { "label": "Y", "x": 8, "y": 0.2 },
17 { "label": "U", "x": 9, "y": 0.1 },
18 { "label": "I", "x": 10, "y": 0 },
19 { "label": "O", "x": 11, "y": 0.1 },
20 { "label": "P", "x": 12, "y": 0.3 },
21
22 { "label": "A", "x": 0, "y": 1.3 },
23 { "label": "S", "x": 1, "y": 1.1 },
24 { "label": "D", "x": 2, "y": 1 },
25 { "label": "F", "x": 3, "y": 1.1 },
26 { "label": "G", "x": 4, "y": 1.2 },
27
28 { "label": "H", "x": 8, "y": 1.2 },
29 { "label": "J", "x": 9, "y": 1.1 },
30 { "label": "K", "x": 10, "y": 1 },
31 { "label": "L", "x": 11, "y": 1.1 },
32 { "label": ";", "x": 12, "y": 1.3 },
33
34 { "label": "Z", "x": 0, "y": 2.3 },
35 { "label": "X", "x": 1, "y": 2.1 },
36 { "label": "C", "x": 2, "y": 2 },
37 { "label": "V", "x": 3, "y": 2.1 },
38 { "label": "B", "x": 4, "y": 2.2 },
39
40 { "label": "N", "x": 8, "y": 2.2 },
41 { "label": "M", "x": 9, "y": 2.1 },
42 { "label": ",", "x": 10, "y": 2 },
43 { "label": ".", "x": 11, "y": 2.1 },
44 { "label": "/", "x": 12, "y": 2.3 },
45
46 { "label": "GUI / KC_HANJ", "x": 3, "y": 3.7 },
47 { "label": "Lower", "x": 4, "y": 3.7 },
48 { "label": "Space", "x": 5, "y": 3.2 },
49
50 { "label": "Enter", "x": 7, "y": 3.2 },
51 { "label": "Raise", "x": 8, "y": 3.7 },
52 { "label": "Alt / KC_HAEN", "x": 9, "y": 3.7 }
53 ]
54 }
55 }
56}
diff --git a/keyboards/boardsource/microdox/keymaps/cole/keymap.c b/keyboards/boardsource/microdox/keymaps/cole/keymap.c
new file mode 100644
index 000000000..62d728000
--- /dev/null
+++ b/keyboards/boardsource/microdox/keymaps/cole/keymap.c
@@ -0,0 +1,116 @@
1/*
2Copyright 2020 Cole Smith <cole@boadsource.xyz>
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#include "split_util.h"
20
21enum layers {
22 _QWERTY,
23 _RAISE,
24 _LOWER,
25 _ADJUST
26};
27
28#define KC_CTSC RCTL_T(KC_SCLN)
29#define LOWER_SPC LT(_LOWER, KC_SPC)
30#define RASE_BACK LT(_RAISE, KC_BSPC)
31#define SHFT_Z MT(MOD_LSFT, KC_Z)
32#define SHIFT_SLASH MT(MOD_RSFT,KC_SLSH)
33#define RASE_ENT LT(_RAISE, KC_ENT)
34#define CTRL_A MT(MOD_LCTL,KC_A)
35#define PREVWINDOW MT(MOD_LCTL, KC_LEFT)
36#define NEXTWINDOW MT(MOD_LCTL, KC_RGHT)
37
38
39
40const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
41 [_QWERTY] = LAYOUT_split_3x5_3(
42 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
43 CTRL_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_CTSC,
44 SHFT_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, SHIFT_SLASH,
45 MO(_LOWER),KC_LGUI, RASE_ENT, RASE_BACK, LOWER_SPC, KC_TAB
46 ),
47 [_RAISE] = LAYOUT_split_3x5_3(
48 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
49 KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT,
50 KC_LSFT, KC_GRV, PREVWINDOW, NEXTWINDOW, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
51 _______, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, _______
52 ),
53 [_LOWER] = LAYOUT_split_3x5_3(
54 KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
55 KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, RGB_TOG, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DQT,
56 KC_ESC, KC_TILD, PREVWINDOW, NEXTWINDOW, RGB_MODE_FORWARD, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
57 _______, KC_LGUI, KC_ENT, KC_BSPC, KC_SPC, _______
58 )
59};
60
61#ifdef OLED_DRIVER_ENABLE
62oled_rotation_t oled_init_user(oled_rotation_t rotation) {
63 if (is_keyboard_master())
64 return OLED_ROTATION_180;
65 return rotation;
66}
67
68static void render_logo(void) {
69 static const char PROGMEM qmk_logo[] = {
70 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,
71 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,
72 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4,
73 0
74 };
75 oled_write_P(qmk_logo, false);
76}
77
78static void render_status(void) {
79 switch (get_highest_layer(layer_state)) {
80 case _QWERTY:
81 oled_write_P(PSTR("B R L A O\n"), false);
82 oled_write_P(PSTR("^\n"), false);
83 oled_write_P(PSTR("Layer: Base\n"), false);
84 break;
85 case _RAISE:
86 oled_write_P(PSTR("B R L A O\n"), false);
87 oled_write_P(PSTR(" ^\n"), false);
88 oled_write_P(PSTR("Layer: Raise\n"), false);
89 break;
90 case _LOWER:
91 oled_write_P(PSTR("B R L A O\n"), false);
92 oled_write_P(PSTR(" ^\n"), false);
93 oled_write_P(PSTR("Layer: Lower\n"), false);
94 break;
95 case _ADJUST:
96 oled_write_P(PSTR("B R L A O\n"), false);
97 oled_write_P(PSTR(" ^\n"), false);
98 oled_write_P(PSTR("Layer: Adjust\n"), false);
99 break;
100 default:
101 oled_write_P(PSTR("B R L A O"), false);
102 oled_write_P(PSTR(" ^\n"), false);
103 oled_write_P(PSTR("Layer: Other\n"), false);
104 }
105}
106
107void oled_task_user(void) {
108 if (is_keyboard_master()) {
109 render_status();
110 } else {
111 render_logo();
112 oled_scroll_left();
113 }
114}
115
116#endif
diff --git a/keyboards/boardsource/microdox/keymaps/cole/rules.mk b/keyboards/boardsource/microdox/keymaps/cole/rules.mk
new file mode 100644
index 000000000..48a51b225
--- /dev/null
+++ b/keyboards/boardsource/microdox/keymaps/cole/rules.mk
@@ -0,0 +1 @@
OLED_DRIVER_ENABLE = yes \ No newline at end of file
diff --git a/keyboards/boardsource/microdox/keymaps/default/keymap.c b/keyboards/boardsource/microdox/keymaps/default/keymap.c
new file mode 100644
index 000000000..06322be0b
--- /dev/null
+++ b/keyboards/boardsource/microdox/keymaps/default/keymap.c
@@ -0,0 +1,50 @@
1/*
2Copyright 2020 Cole Smith <cole@boadsource.xyz>
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
20enum layers {
21 _QWERTY,
22 _RAISE,
23 _LOWER,
24};
25
26#define RAISE MO(_RAISE)
27#define LOWER MO(_LOWER)
28
29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
30[_QWERTY] = LAYOUT_split_3x5_3(
31 KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P,
32 KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
33 KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,
34 KC_LCTL, LOWER, KC_SPC, KC_BSPC, RAISE, KC_ENT
35),
36
37[_RAISE] = LAYOUT_split_3x5_3(
38 KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
39 KC_TAB, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC,
40 KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_QUOT,
41 XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
42),
43
44[_LOWER] = LAYOUT_split_3x5_3(
45 KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
46 KC_ESC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR,
47 KC_CAPS, KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PIPE, KC_DQT,
48 XXXXXXX, XXXXXXX, XXXXXXX, KC_ENT, XXXXXXX, KC_DEL
49)
50};
diff --git a/keyboards/boardsource/microdox/microdox.c b/keyboards/boardsource/microdox/microdox.c
new file mode 100644
index 000000000..eef981297
--- /dev/null
+++ b/keyboards/boardsource/microdox/microdox.c
@@ -0,0 +1,19 @@
1/*
2Copyright 2020 Cole Smith <cole@boadsource.xyz>
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 "microdox.h"
19
diff --git a/keyboards/boardsource/microdox/microdox.h b/keyboards/boardsource/microdox/microdox.h
new file mode 100644
index 000000000..950d46d99
--- /dev/null
+++ b/keyboards/boardsource/microdox/microdox.h
@@ -0,0 +1,37 @@
1/*
2Copyright 2020 Cole Smith <cole@boadsource.xyz>
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_split_3x5_3(\
23 k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, \
24 k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, \
25 k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, \
26 k33, k34, k35, k75, k74, k73 \
27 ) \
28 { \
29 { k01, k02, k03, k04, k05 }, \
30 { k11, k12, k13, k14, k15 }, \
31 { k21, k22, k23, k24, k25 }, \
32 { KC_NO,KC_NO, k33, k34, k35 }, \
33 { k41, k42, k43, k44, k45 }, \
34 { k51, k52, k53, k54, k55 }, \
35 { k61, k62, k63, k64, k65 }, \
36 { KC_NO, KC_NO, k73, k74, k75 } \
37 }
diff --git a/keyboards/boardsource/microdox/readme.md b/keyboards/boardsource/microdox/readme.md
new file mode 100644
index 000000000..7b5428367
--- /dev/null
+++ b/keyboards/boardsource/microdox/readme.md
@@ -0,0 +1,13 @@
1# Microdox
2
3![boardsource Microdox](https://i.imgur.com/AliShkvl.jpg)
4
5* Keyboard Maintainer: [Boardsource](https://github.com/daysgobye)
6* Hardware Supported: microdox v1
7* Hardware Availability: this keyboard is available from the [Boardsource store](https://boardsource.xyz/store/5f2e7e4a2902de7151494f92)
8
9Make example for this keyboard (after setting up your build environment):
10
11 make boardsource/microdox:default
12
13See 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/boardsource/microdox/rules.mk b/keyboards/boardsource/microdox/rules.mk
new file mode 100644
index 000000000..b6afb77c7
--- /dev/null
+++ b/keyboards/boardsource/microdox/rules.mk
@@ -0,0 +1,23 @@
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 = no # Virtual DIP switch configuration
11MOUSEKEY_ENABLE = no # Mouse keys
12EXTRAKEY_ENABLE = no # 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 = yes # Enable keyboard RGB underglow
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output
23SPLIT_KEYBOARD = yes