summaryrefslogtreecommitdiffstats
path: root/keyboards/luddite
diff options
context:
space:
mode:
authorAndrew Kannan <andrew.kannan@klaviyo.com>2018-10-01 12:25:16 -0400
committerDrashna Jaelre <drashna@live.com>2018-10-01 09:25:16 -0700
commit45a4a0a7fc32f521ad6487c19201340b81aaad5c (patch)
tree3d568ab5ef55cc7d2311f87c6631187c6714f6b0 /keyboards/luddite
parent3907ed034bec6730d8bff401ac632161540ea3cb (diff)
Keyboard: Adding initial luddite keyboard framework (#4029)
* Adding initial luddite keyboard framework * Use pragma and update readme * Remove duplicate macro definitions
Diffstat (limited to 'keyboards/luddite')
-rw-r--r--keyboards/luddite/README.md18
-rw-r--r--keyboards/luddite/config.h48
-rw-r--r--keyboards/luddite/keymaps/default/keymap.c32
-rw-r--r--keyboards/luddite/luddite.c1
-rw-r--r--keyboards/luddite/luddite.h21
-rw-r--r--keyboards/luddite/rules.mk59
6 files changed, 179 insertions, 0 deletions
diff --git a/keyboards/luddite/README.md b/keyboards/luddite/README.md
new file mode 100644
index 0000000000..72666dda5f
--- /dev/null
+++ b/keyboards/luddite/README.md
@@ -0,0 +1,18 @@
+# Luddite
+
+Luddite 60% keyboard with backlight and RGB underglow.
+
+* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/luddite)
+
+Keyboard Maintainer: QMK Community
+Hardware Supported: Luddite PCB
+Hardware Availability: [Luddite project on 40% Keyboards](http://www.40percent.club/search/label/luddite)
+
+Make example for this keyboard (after setting up your build environment):
+
+ make luddite:default
+
+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).
+
+First pass at adding support for the luddite keyboard. Compiles but completely
+untested. Intended to kick-start development.
diff --git a/keyboards/luddite/config.h b/keyboards/luddite/config.h
new file mode 100644
index 0000000000..62ff72bb03
--- /dev/null
+++ b/keyboards/luddite/config.h
@@ -0,0 +1,48 @@
+#pragma once
+
+#include "config_common.h"
+
+/* USB Device descriptor parameter */
+#define VENDOR_ID 0xFEED
+#define PRODUCT_ID 0x0A0C
+#define DEVICE_VER 0x1001
+#define MANUFACTURER di0ib
+#define PRODUCT Luddite
+#define DESCRIPTION Luddite Keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 8
+#define MATRIX_COLS 8
+
+/* key matrix pins */
+#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6 }
+#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
+#define UNUSED_PINS
+
+/* number of backlight levels */
+#define BACKLIGHT_PIN B5
+#ifdef BACKLIGHT_PIN
+#define BACKLIGHT_LEVELS 4
+#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)) \
+)
+
+/* ws2812 RGB LED */
+#define RGB_DI_PIN B4
+#define RGBLIGHT_ANIMATIONS
+#define RGBLED_NUM 8 // Number of LEDs
+// #define RGBLIGHT_HUE_STEP 10
+// #define RGBLIGHT_SAT_STEP 17
+// #define RGBLIGHT_VAL_STEP 17
diff --git a/keyboards/luddite/keymaps/default/keymap.c b/keyboards/luddite/keymaps/default/keymap.c
new file mode 100644
index 0000000000..4d6ae0d524
--- /dev/null
+++ b/keyboards/luddite/keymaps/default/keymap.c
@@ -0,0 +1,32 @@
+#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 _BASE 0
+#define _FN1 1
+
+enum custom_keycodes {
+ QWERTY = SAFE_RANGE,
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_BASE] = LAYOUT_60_ansi(
+ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \
+ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \
+ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
+ KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , MO(_FN1) , KC_RCTL
+ ),
+
+ [_FN1] = LAYOUT_60_ansi(
+ KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, \
+ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
+ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ KC_GRV, _______, _______, _______, _______, _______, _______, _______
+ )
+};
diff --git a/keyboards/luddite/luddite.c b/keyboards/luddite/luddite.c
new file mode 100644
index 0000000000..3e720ad571
--- /dev/null
+++ b/keyboards/luddite/luddite.c
@@ -0,0 +1 @@
+#include "luddite.h"
diff --git a/keyboards/luddite/luddite.h b/keyboards/luddite/luddite.h
new file mode 100644
index 0000000000..1ba743e9e7
--- /dev/null
+++ b/keyboards/luddite/luddite.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "quantum.h"
+
+#define LAYOUT_60_ansi( \
+ K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \
+ K16, K17, K20, K21, K22, K23, K24, K25, K26, K27, K30, K31, K32, K33, \
+ K34, K35, K36, K37, K40, K41, K42, K43, K44, K45, K46, K47, K50, \
+ K51, K52, K53, K54, K55, K56, K57, K60, K61, K62, K63, K64, \
+ K65, K66, K67, K70, K71, K72, K73, K74\
+) { \
+ { K00, K01, K02, K03, K04, K05, K06, K07 }, \
+ { K10, K11, K12, K13, K14, K15, K16, K17 }, \
+ { K20, K21, K22, K23, K24, K25, K26, K27 }, \
+ { K30, K31, K32, K33, K34, K35, K36, K37 }, \
+ { K40, K41, K42, K43, K44, K45, K46, K47 }, \
+ { K50, K51, K52, K53, K54, K55, K56, K57 }, \
+ { K60, K61, K62, K63, K64, K65, K66, K67 }, \
+ { K70, K71, K72, K73, K74 }, \
+}
+
diff --git a/keyboards/luddite/rules.mk b/keyboards/luddite/rules.mk
new file mode 100644
index 0000000000..2f7d847bf0
--- /dev/null
+++ b/keyboards/luddite/rules.mk
@@ -0,0 +1,59 @@
+# 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
+# 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 = yes # Enable keyboard backlight functionality
+AUDIO_ENABLE = no
+RGBLIGHT_ENABLE = yes
+
+LAYOUTS = 60_ansi