summaryrefslogtreecommitdiff
path: root/keyboards/zlant
diff options
context:
space:
mode:
authorFelipe Coury <felipe.coury@gmail.com>2018-05-23 00:53:11 -0300
committerDrashna Jaelre <drashna@live.com>2018-05-22 20:53:11 -0700
commit575b2a66df2d75fa6cf689912b0c1a0816f3fe66 (patch)
tree141f804997e4d01f20d45e450050830de00fa017 /keyboards/zlant
parent0026da1414a3660064f976f4fb47abee4b16ed45 (diff)
Adds Zlant keyboard support (#3028)
* Added Zlant support * Uses LAYOUT and identifies individual layers * Removed deprecated =? usage on rules.mk * Adds readme for Zlant keyboard and its default layout * Fixed LAYOUT constant * Minor zlant readme formatting fix
Diffstat (limited to 'keyboards/zlant')
-rwxr-xr-xkeyboards/zlant/config.h58
-rwxr-xr-xkeyboards/zlant/keymaps/default/keymap.c20
-rw-r--r--keyboards/zlant/keymaps/default/readme.md5
-rw-r--r--keyboards/zlant/readme.md17
-rwxr-xr-xkeyboards/zlant/rules.mk56
-rwxr-xr-xkeyboards/zlant/zlant.c1
-rwxr-xr-xkeyboards/zlant/zlant.h18
7 files changed, 175 insertions, 0 deletions
diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h
new file mode 100755
index 0000000000..456d225aa2
--- /dev/null
+++ b/keyboards/zlant/config.h
@@ -0,0 +1,58 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x6060
+#define DEVICE_VER 0x0001
+#define MANUFACTURER Matthew Cordier
+#define PRODUCT Zlant
+#define DESCRIPTION keyboard firmware for Zlant
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { B0, B1, D4, D5 }
+#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B7, D1, D2, D3, B3, B2 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* number of backlight levels */
+
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 0
+#endif
+
+/* 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
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+ keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/* prevent stuck modifiers */
+#define PREVENT_STUCK_MODIFIERS
+
+#define RGB_DI_PIN D6
+#ifdef RGB_DI_PIN
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 12
+#define RGBLIGHT_HUE_STEP 8
+#define RGBLIGHT_SAT_STEP 8
+#define RGBLIGHT_VAL_STEP 8
+#endif
+
+#endif
diff --git a/keyboards/zlant/keymaps/default/keymap.c b/keyboards/zlant/keymaps/default/keymap.c
new file mode 100755
index 0000000000..d586c841d8
--- /dev/null
+++ b/keyboards/zlant/keymaps/default/keymap.c
@@ -0,0 +1,20 @@
+#include QMK_KEYBOARD_H
+
+#define BASE 0
+#define FN 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [BASE] = LAYOUT(
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT,
+ RGB_HUI, RGB_HUD, KC_LGUI, KC_LALT, KC_LSFT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT),
+
+ [FN] = LAYOUT(
+ KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS,
+ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
+ KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PGUP, KC_HOME, KC_TRNS, KC_TRNS,
+ RGB_VAI, RGB_VAD, RESET, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_TRNS, KC_DEL)
+
+};
diff --git a/keyboards/zlant/keymaps/default/readme.md b/keyboards/zlant/keymaps/default/readme.md
new file mode 100644
index 0000000000..968702a16c
--- /dev/null
+++ b/keyboards/zlant/keymaps/default/readme.md
@@ -0,0 +1,5 @@
+![Zlant Layout Image](https://i.imgur.com/Siz8qsL.jpg)
+
+# Default Zlant Layout
+
+This is the default layout that comes flashed on the Zlant prototype.
diff --git a/keyboards/zlant/readme.md b/keyboards/zlant/readme.md
new file mode 100644
index 0000000000..0780cedeb1
--- /dev/null
+++ b/keyboards/zlant/readme.md
@@ -0,0 +1,17 @@
+# Zlant
+
+![Zlant](https://i.imgur.com/Siz8qsL.jpg)
+
+A compact 40% inspired by the Plank with a staggered layout instead.
+
+Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury)
+
+Hardware Supported: Zlant Prototype PCB
+
+Hardware Availability: Group buy soon
+
+Make example for this keyboard (after setting up your build environment):
+
+ make zlant:default
+
+See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information.
diff --git a/keyboards/zlant/rules.mk b/keyboards/zlant/rules.mk
new file mode 100755
index 0000000000..482f99b223
--- /dev/null
+++ b/keyboards/zlant/rules.mk
@@ -0,0 +1,56 @@
+# 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)
+
+# Interrupt driven control endpoint task(+60)
+OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
+
+
+# Boot Section Size in *bytes*
+OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+
+# Build Options
+# comment out to disable the options.
+#
+BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
+MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
+EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
+CONSOLE_ENABLE = no # Console for debug(+400)
+COMMAND_ENABLE = no # Commands for debug and configuration
+SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
+NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
+BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
diff --git a/keyboards/zlant/zlant.c b/keyboards/zlant/zlant.c
new file mode 100755
index 0000000000..b60e9425c7
--- /dev/null
+++ b/keyboards/zlant/zlant.c
@@ -0,0 +1 @@
+#include "zlant.h"
diff --git a/keyboards/zlant/zlant.h b/keyboards/zlant/zlant.h
new file mode 100755
index 0000000000..48c7b3f409
--- /dev/null
+++ b/keyboards/zlant/zlant.h
@@ -0,0 +1,18 @@
+#ifndef KB_H
+#define KB_H
+
+#include "quantum.h"
+
+#define LAYOUT( \
+ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, \
+ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \
+ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \
+ K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \
+) { \
+ { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011 }, \
+ { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111 }, \
+ { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211 }, \
+ { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \
+}
+
+#endif