aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehee <ljh34210329@gmail.com>2021-04-20 01:39:54 +0900
committerGitHub <noreply@github.com>2021-04-19 09:39:54 -0700
commit3990c0f43d9048b10097487595e969bfeb5bc859 (patch)
treecdf9876e30811b4472f8f172d4540b90f0e627bf
parent20f35afd53d6a8851d5809e082344134c0e79470 (diff)
downloadqmk_firmware-3990c0f43d9048b10097487595e969bfeb5bc859.tar.gz
qmk_firmware-3990c0f43d9048b10097487595e969bfeb5bc859.zip
[Keyboard] Add jkdlab/binary_monkey (#12374)
Co-authored-by: Ryan <fauxpark@gmail.com>
-rw-r--r--keyboards/jkdlab/binary_monkey/binary_monkey.c19
-rw-r--r--keyboards/jkdlab/binary_monkey/binary_monkey.h28
-rw-r--r--keyboards/jkdlab/binary_monkey/config.h42
-rw-r--r--keyboards/jkdlab/binary_monkey/info.json16
-rw-r--r--keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c70
-rw-r--r--keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c30
-rw-r--r--keyboards/jkdlab/binary_monkey/readme.md21
-rw-r--r--keyboards/jkdlab/binary_monkey/rules.mk22
8 files changed, 248 insertions, 0 deletions
diff --git a/keyboards/jkdlab/binary_monkey/binary_monkey.c b/keyboards/jkdlab/binary_monkey/binary_monkey.c
new file mode 100644
index 000000000..bdbcac18e
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/binary_monkey.c
@@ -0,0 +1,19 @@
1/*
2 * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
3 * Copyright 2021 Jaehee <ljh34210329@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License,
8 * or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see https://www.gnu.org/licenses/.
17 */
18
19#include "binary_monkey.h"
diff --git a/keyboards/jkdlab/binary_monkey/binary_monkey.h b/keyboards/jkdlab/binary_monkey/binary_monkey.h
new file mode 100644
index 000000000..598886b78
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/binary_monkey.h
@@ -0,0 +1,28 @@
1/*
2 * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
3 * Copyright 2021 Jaehee <ljh34210329@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License,
8 * or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see https://www.gnu.org/licenses/.
17 */
18
19#pragma once
20
21#include "quantum.h"
22
23#define LAYOUT( \
24 K00, K01, \
25 K10 \
26) { \
27 { K10, K00, K01 } \
28}
diff --git a/keyboards/jkdlab/binary_monkey/config.h b/keyboards/jkdlab/binary_monkey/config.h
new file mode 100644
index 000000000..ba8bfcd8d
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/config.h
@@ -0,0 +1,42 @@
1/*
2 * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
3 * Copyright 2021 Jaehee <ljh34210329@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License,
8 * or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see https://www.gnu.org/licenses/.
17 */
18
19#pragma once
20
21#include "config_common.h"
22
23#define VENDOR_ID 0x4934
24#define PRODUCT_ID 0x0101
25#define DEVICE_VER 0x0001
26#define MANUFACTURER JKDLAB.
27#define PRODUCT Binary_Monkey
28
29#define MATRIX_ROWS 1
30#define MATRIX_COLS 3
31#define MATRIX_ROW_PINS { D0 }
32#define MATRIX_COL_PINS { D1, D2, D3 }
33
34#define DIODE_DIRECTION COL2ROW
35
36#define DEBOUNCE 5
37
38#define USB_MAX_POWER_CONSUMPTION 100
39
40/* Bootmagic Lite key configuration */
41#define BOOTMAGIC_LITE_ROW 0
42#define BOOTMAGIC_LITE_COLUMN 2
diff --git a/keyboards/jkdlab/binary_monkey/info.json b/keyboards/jkdlab/binary_monkey/info.json
new file mode 100644
index 000000000..e15b43e70
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/info.json
@@ -0,0 +1,16 @@
1{
2 "keyboard_name": "Binary_Monkey",
3 "url": "https://gumroad.com/jkdlab",
4 "maintainer": "JKDLAB.",
5 "width": 3,
6 "height": 1,
7 "layouts": {
8 "LAYOUT": {
9 "layout": [
10 {"label": "0", "x": 0, "y": 0},
11 {"label": "1", "x": 1, "y": 0},
12 {"label": "ENTER", "x": 0, "y": 1, "w" : 2}
13 ]
14 }
15 }
16}
diff --git a/keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c b/keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c
new file mode 100644
index 000000000..e10df7ce0
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/keymaps/ascii/keymap.c
@@ -0,0 +1,70 @@
1/*
2 * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
3 * Copyright 2021 Jaehee <ljh34210329@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License,
8 * or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see https://www.gnu.org/licenses/.
17 */
18
19#include QMK_KEYBOARD_H
20
21char ascii = 0;
22
23enum custom_keycodes {
24 BIN_0 = SAFE_RANGE,
25 BIN_1,
26 BIN_RETURN
27};
28
29enum layers {
30 _BASE = 0
31};
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34 [_BASE] = LAYOUT(
35 BIN_0, BIN_1,
36 BIN_RETURN
37 )
38};
39
40bool process_record_user(uint16_t keycode, keyrecord_t* record) {
41 switch (keycode) {
42 case BIN_0:
43 if (record->event.pressed) {
44 ascii = ascii << 1;
45 }
46
47 return true;
48 case BIN_1:
49 if (record->event.pressed) {
50 ascii = ascii << 1;
51 ++ascii;
52 }
53
54 return true;
55 case BIN_RETURN:
56 if (record->event.pressed) {
57 char str[2] = { ascii & 127, '\0' };
58
59 send_string(str);
60
61 ascii = 0;
62 }
63
64 return true;
65 default:
66 return true;
67 }
68
69 return true;
70}
diff --git a/keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c b/keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c
new file mode 100644
index 000000000..629dfd3b2
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/keymaps/default/keymap.c
@@ -0,0 +1,30 @@
1/*
2 * Copyright 2021 JKDLAB. <jkdlab.co@gmail.com>
3 * Copyright 2021 Jaehee <ljh34210329@gmail.com>
4 *
5 * This program is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License,
8 * or (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see https://www.gnu.org/licenses/.
17 */
18
19#include QMK_KEYBOARD_H
20
21enum layers {
22 _BASE = 0
23};
24
25const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
26 [_BASE] = LAYOUT(
27 KC_0, KC_1,
28 KC_ENTER
29 )
30};
diff --git a/keyboards/jkdlab/binary_monkey/readme.md b/keyboards/jkdlab/binary_monkey/readme.md
new file mode 100644
index 000000000..7a787c76d
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/readme.md
@@ -0,0 +1,21 @@
1# Binary_Monkey
2
3![Binary_Monkey](https://i.imgur.com/0meBVKTh.png)
4
5It is 3-Key macropad, inspired by a monkey. 🐵
6
7* Keyboard Maintainer: [JKDLAB.](https://github.com/jkdlab) [yikolden](https://github.com/LDobac)
8* Hardware Supported: atmega32u4
9* Hardware Availability: [Gumroad](https://gumroad.com/jkdlab)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make jkdlab/binary_monkey:default
14
15If you want switch to bootloader, unplug the keyboard and plug it back while pressing right upper key(Key 1).
16
17Flashing example for this keyboard (You need to keyboard has in bootloader mode) :
18
19 make jkdlab/binary_monkey:default:flash
20
21See 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/jkdlab/binary_monkey/rules.mk b/keyboards/jkdlab/binary_monkey/rules.mk
new file mode 100644
index 000000000..a90eef1fc
--- /dev/null
+++ b/keyboards/jkdlab/binary_monkey/rules.mk
@@ -0,0 +1,22 @@
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 = lite # Virtual DIP switch configuration
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
21BLUETOOTH_ENABLE = no # Enable Bluetooth
22AUDIO_ENABLE = no # Audio output