summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjotix <47826561+jotix@users.noreply.github.com>2019-02-21 14:08:28 -0300
committerDrashna Jaelre <drashna@live.com>2019-02-21 09:08:28 -0800
commit0c607f8bf78a735466d0e761bc339393a522e2ee (patch)
treedd3b8893c0009c4b0b882ce44168d6ddbbe344f7
parentc1c5922aae7b60b7c7d13d3769350eed9dda17ab (diff)
[Keyboard] add jotanck keyboard (#5192)
* add jotanck keyboard * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/config.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * Update keyboards/jotanck/jotanck.h Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * requested changes * Update keyboards/handwired/jotanck/readme.md Co-Authored-By: jotix <47826561+jotix@users.noreply.github.com> * add backlight support * add default keymap image to readme * add default keymap image to readme
-rw-r--r--keyboards/handwired/jotanck/config.h37
-rw-r--r--keyboards/handwired/jotanck/jotanck.c6
-rw-r--r--keyboards/handwired/jotanck/jotanck.h17
-rw-r--r--keyboards/handwired/jotanck/keymaps/default/keymap.c115
-rw-r--r--keyboards/handwired/jotanck/readme.md38
-rw-r--r--keyboards/handwired/jotanck/rules.mk66
6 files changed, 279 insertions, 0 deletions
diff --git a/keyboards/handwired/jotanck/config.h b/keyboards/handwired/jotanck/config.h
new file mode 100644
index 0000000000..7e022eeb02
--- /dev/null
+++ b/keyboards/handwired/jotanck/config.h
@@ -0,0 +1,37 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Jotix
+#define PRODUCT Jotanck
+#define DESCRIPTION A Jotantastic compact ortholinear keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/* pro_micro pin-out */
+#define MATRIX_ROW_PINS { B4, B5, B6, B2 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, D3, D2, D1, D0, D4, C6 }
+#define UNUSED_PINS
+
+/* leds */
+#define QMK_LED E6
+#define BACKLIGHT_LEVELS 3
+#define BACKLIGHT_PIN B7
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
diff --git a/keyboards/handwired/jotanck/jotanck.c b/keyboards/handwired/jotanck/jotanck.c
new file mode 100644
index 0000000000..7744570b23
--- /dev/null
+++ b/keyboards/handwired/jotanck/jotanck.c
@@ -0,0 +1,6 @@
+#include "jotanck.h"
+
+void matrix_init_kb(void) {
+
+ matrix_init_user();
+}
diff --git a/keyboards/handwired/jotanck/jotanck.h b/keyboards/handwired/jotanck/jotanck.h
new file mode 100644
index 0000000000..e8dd93edaf
--- /dev/null
+++ b/keyboards/handwired/jotanck/jotanck.h
@@ -0,0 +1,17 @@
+#pragma once
+
+#include "quantum.h"
+
+
+#define LAYOUT_ortho_4x12( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+) \
+{ \
+ { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \
+ { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \
+ { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \
+ { k30, k31, k32, k33, k34, k35, k35, k37, k38, k39, k3a, k3b } \
+}
diff --git a/keyboards/handwired/jotanck/keymaps/default/keymap.c b/keyboards/handwired/jotanck/keymaps/default/keymap.c
new file mode 100644
index 0000000000..77c144890b
--- /dev/null
+++ b/keyboards/handwired/jotanck/keymaps/default/keymap.c
@@ -0,0 +1,115 @@
+// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
+// this is the style you want to emulate.
+
+#include QMK_KEYBOARD_H
+
+extern keymap_config_t keymap_config;
+
+// Each layer gets a name for readability, which is then used in the keymap matrix below.
+// The underscores don't mean anything - you can have a layer called STUFF or any other name.
+// Layer names don't all need to be of the same length, obviously, and you can also skip them
+// entirely and just use numbers.
+
+#define _QWERTY 0
+#define _LOWER 1
+#define _RAISE 2
+#define _ADJUST 3
+
+enum planck_keycodes {
+ BACKLIT = SAFE_RANGE
+};
+
+#define LOWER MO(_LOWER)
+#define RAISE MO(_RAISE)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+/* Qwerty
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | esc | Q | W | E | R | T | Y | U | I | O | P | bksp |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | tab | A | S | D | F | G | H | J | K | L | ; | ' |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | lshift | Z | X | C | V | B | N | M | , | . | / | enter |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * |backlit | lctrl | lgui | lalt | lower | space | space | raise | left | down | up | right |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+[_QWERTY] = LAYOUT_ortho_4x12 (
+ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ BACKLIT, KC_LCTL, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
+),
+
+/* Lower
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | | | | | | | | | | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+[_LOWER] = LAYOUT_ortho_4x12 (
+ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+
+/* Raise
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | del |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ * | | | | | | | | | home | home | pgdn | end |
+ * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+
+ */
+[_RAISE] = LAYOUT_ortho_4x12 (
+ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL,
+ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
+ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END
+),
+
+[_ADJUST] = LAYOUT_ortho_4x12 (
+ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
+),
+};
+
+uint32_t layer_state_set_user(uint32_t state) {
+ return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
+}
+
+void matrix_init_user(void) {
+}
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+
+ case BACKLIT:
+ if (record->event.pressed) {
+ register_code(KC_RSFT);
+ #ifdef BACKLIGHT_ENABLE
+ backlight_step();
+ #endif
+ } else {
+ unregister_code(KC_RSFT);
+ }
+ return false;
+ break;
+
+ default:
+ return true;
+
+ }
+}
diff --git a/keyboards/handwired/jotanck/readme.md b/keyboards/handwired/jotanck/readme.md
new file mode 100644
index 0000000000..41b0ea401e
--- /dev/null
+++ b/keyboards/handwired/jotanck/readme.md
@@ -0,0 +1,38 @@
+# Jotanck
+
+![Jotanck](https://i.imgur.com/bBfO4L2.jpg)
+
+A compact 40% (12x4) ortholinear keyboard kit inspired in the Planck made by jotix.
+
+Keyboard Maintainer: [jotix](https://github.com/jotix)
+Hardware Supported: Arduino Pro Micro
+Hardware Availability: [Mercado Libre](https://articulo.mercadolibre.com.ar/MLA-771696548-teclado-mecanico-handwired-black-switchs-pbt-keycaps-_JM)
+
+### Arduino Pro Micro Pinout
+
+| Rows | 0 | 1 | 2 | 3 |
+|-------------|----|----|----|----|
+| Arduino pin | 8 | 9 | 10 | 16 |
+| QMK pin | B4 | B5 | B6 | B2 |
+
+| Columns | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
+|-------------|----|----|----|----|----|----|-----|-----|----|----|----|----|
+| Arduino pin | A3 | A2 | A1 | A0 | 15 | 14 | TX0 | RXI | 2 | 3 | 4 | 5 |
+| QMK pin | F4 | F5 | F6 | F7 | B1 | B3 | D3 | D2 | D1 | D0 | D4 | C6 |
+
+| | QMK led | Backlight |
+|-------------|-----------|-----------|
+| Arduino pin | 7 | 6 |
+| QMK pin | E6 | D7 |
+
+### Compiling the Firmware
+
+Make example for this keyboard (after setting up your build environment):
+
+ make handwired/jotanck:default
+
+### The Defaukt Keymap
+
+![Default Keymap](https://i.imgur.com/Fh7g1AQ.jpg)
+
+See 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/handwired/jotanck/rules.mk b/keyboards/handwired/jotanck/rules.mk
new file mode 100644
index 0000000000..6c32634461
--- /dev/null
+++ b/keyboards/handwired/jotanck/rules.mk
@@ -0,0 +1,66 @@
+# MCU name
+MCU = atmega32u4
+
+# Processor frequency.
+# This will define a symbol, F_CPU, in all source code files equal to the
+# processor frequency in Hz. You can then use this symbol in your source code to
+# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
+# automatically to create a 32-bit value in your source code.
+#
+# This will be an integer division of F_USB below, as it is sourced by
+# F_USB after it has run through any CPU prescalers. Note that this value
+# does not *change* the processor frequency - it should merely be updated to
+# reflect the processor speed set externally so that the code can use accurate
+# software delays.
+F_CPU = 16000000
+
+#
+# LUFA specific
+#
+# Target architecture (see library "Board Types" documentation).
+ARCH = AVR8
+
+# Input clock frequency.
+# This will define a symbol, F_USB, in all source code files equal to the
+# input clock frequency (before any prescaling is performed) in Hz. This value may
+# differ from F_CPU if prescaling is used on the latter, and is required as the
+# raw input clock is fed directly to the PLL sections of the AVR for high speed
+# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
+# at the end, this will be done automatically to create a 32-bit value in your
+# source code.
+#
+# If no clock division is performed on the input clock inside the AVR (via the
+# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
+F_USB = $(F_CPU)
+
+# Bootloader
+# This definition is optional, and if your keyboard supports multiple bootloaders of
+# different sizes, comment this out, and the correct address will be loaded
+# automatically (+60). See bootloader.mk for all options.
+BOOTLOADER = caterina
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+# Build Options
+# change to "no" to disable the options, or define them in the Makefile in
+# the appropriate keymap folder that will get included automatically
+#
+
+BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = no # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = yes # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
+MIDI_ENABLE = no # MIDI controls
+AUDIO_ENABLE = no # Audio output on port C6
+UNICODE_ENABLE = no # Unicode
+BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
+RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.
+API_SYSEX_ENABLE = no
+
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+LAYOUTS = ortho_4x12