aboutsummaryrefslogtreecommitdiff
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
parent3907ed034bec6730d8bff401ac632161540ea3cb (diff)
downloadqmk_firmware-45a4a0a7fc32f521ad6487c19201340b81aaad5c.tar.gz
qmk_firmware-45a4a0a7fc32f521ad6487c19201340b81aaad5c.zip
Keyboard: Adding initial luddite keyboard framework (#4029)
* Adding initial luddite keyboard framework * Use pragma and update readme * Remove duplicate macro definitions
-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 000000000..72666dda5
--- /dev/null
+++ b/keyboards/luddite/README.md
@@ -0,0 +1,18 @@
1# Luddite
2
3Luddite 60% keyboard with backlight and RGB underglow.
4
5* [The original TMK firmware](https://github.com/di0ib/tmk_keyboard/tree/master/keyboard/luddite)
6
7Keyboard Maintainer: QMK Community
8Hardware Supported: Luddite PCB
9Hardware Availability: [Luddite project on 40% Keyboards](http://www.40percent.club/search/label/luddite)
10
11Make example for this keyboard (after setting up your build environment):
12
13 make luddite:default
14
15See 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).
16
17First pass at adding support for the luddite keyboard. Compiles but completely
18untested. Intended to kick-start development.
diff --git a/keyboards/luddite/config.h b/keyboards/luddite/config.h
new file mode 100644
index 000000000..62ff72bb0
--- /dev/null
+++ b/keyboards/luddite/config.h
@@ -0,0 +1,48 @@
1#pragma once
2
3#include "config_common.h"
4
5/* USB Device descriptor parameter */
6#define VENDOR_ID 0xFEED
7#define PRODUCT_ID 0x0A0C
8#define DEVICE_VER 0x1001
9#define MANUFACTURER di0ib
10#define PRODUCT Luddite
11#define DESCRIPTION Luddite Keyboard
12
13/* key matrix size */
14#define MATRIX_ROWS 8
15#define MATRIX_COLS 8
16
17/* key matrix pins */
18#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4, C6, D7, E6 }
19#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2, B6 }
20#define UNUSED_PINS
21
22/* number of backlight levels */
23#define BACKLIGHT_PIN B5
24#ifdef BACKLIGHT_PIN
25#define BACKLIGHT_LEVELS 4
26#endif
27
28/* Set 0 if debouncing isn't needed */
29#define DEBOUNCING_DELAY 5
30
31/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
32#define LOCKING_SUPPORT_ENABLE
33
34/* Locking resynchronize hack */
35#define LOCKING_RESYNC_ENABLE
36
37/* key combination for command */
38#define IS_COMMAND() ( \
39 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
40)
41
42/* ws2812 RGB LED */
43#define RGB_DI_PIN B4
44#define RGBLIGHT_ANIMATIONS
45#define RGBLED_NUM 8 // Number of LEDs
46// #define RGBLIGHT_HUE_STEP 10
47// #define RGBLIGHT_SAT_STEP 17
48// #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 000000000..4d6ae0d52
--- /dev/null
+++ b/keyboards/luddite/keymaps/default/keymap.c
@@ -0,0 +1,32 @@
1#include QMK_KEYBOARD_H
2
3extern keymap_config_t keymap_config;
4
5// Each layer gets a name for readability, which is then used in the keymap matrix below.
6// The underscores don't mean anything - you can have a layer called STUFF or any other name.
7// Layer names don't all need to be of the same length, obviously, and you can also skip them
8// entirely and just use numbers.
9#define _BASE 0
10#define _FN1 1
11
12enum custom_keycodes {
13 QWERTY = SAFE_RANGE,
14};
15
16const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
17 [_BASE] = LAYOUT_60_ansi(
18 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, \
19 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, \
20 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, \
21 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \
22 KC_LCTL , KC_LGUI , KC_LALT , KC_SPC , KC_RALT , KC_RGUI , MO(_FN1) , KC_RCTL
23 ),
24
25 [_FN1] = LAYOUT_60_ansi(
26 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, \
27 RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
28 _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______,\
29 BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
30 KC_GRV, _______, _______, _______, _______, _______, _______, _______
31 )
32};
diff --git a/keyboards/luddite/luddite.c b/keyboards/luddite/luddite.c
new file mode 100644
index 000000000..3e720ad57
--- /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 000000000..1ba743e9e
--- /dev/null
+++ b/keyboards/luddite/luddite.h
@@ -0,0 +1,21 @@
1#pragma once
2
3#include "quantum.h"
4
5#define LAYOUT_60_ansi( \
6 K00, K01, K02, K03, K04, K05, K06, K07, K10, K11, K12, K13, K14, K15, \
7 K16, K17, K20, K21, K22, K23, K24, K25, K26, K27, K30, K31, K32, K33, \
8 K34, K35, K36, K37, K40, K41, K42, K43, K44, K45, K46, K47, K50, \
9 K51, K52, K53, K54, K55, K56, K57, K60, K61, K62, K63, K64, \
10 K65, K66, K67, K70, K71, K72, K73, K74\
11) { \
12 { K00, K01, K02, K03, K04, K05, K06, K07 }, \
13 { K10, K11, K12, K13, K14, K15, K16, K17 }, \
14 { K20, K21, K22, K23, K24, K25, K26, K27 }, \
15 { K30, K31, K32, K33, K34, K35, K36, K37 }, \
16 { K40, K41, K42, K43, K44, K45, K46, K47 }, \
17 { K50, K51, K52, K53, K54, K55, K56, K57 }, \
18 { K60, K61, K62, K63, K64, K65, K66, K67 }, \
19 { K70, K71, K72, K73, K74 }, \
20}
21
diff --git a/keyboards/luddite/rules.mk b/keyboards/luddite/rules.mk
new file mode 100644
index 000000000..2f7d847bf
--- /dev/null
+++ b/keyboards/luddite/rules.mk
@@ -0,0 +1,59 @@
1# MCU name
2MCU = atmega32u4
3
4# Processor frequency.
5# This will define a symbol, F_CPU, in all source code files equal to the
6# processor frequency in Hz. You can then use this symbol in your source code to
7# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
8# automatically to create a 32-bit value in your source code.
9#
10# This will be an integer division of F_USB below, as it is sourced by
11# F_USB after it has run through any CPU prescalers. Note that this value
12# does not *change* the processor frequency - it should merely be updated to
13# reflect the processor speed set externally so that the code can use accurate
14# software delays.
15F_CPU = 16000000
16
17#
18# LUFA specific
19#
20# Target architecture (see library "Board Types" documentation).
21ARCH = AVR8
22
23# Input clock frequency.
24# This will define a symbol, F_USB, in all source code files equal to the
25# input clock frequency (before any prescaling is performed) in Hz. This value may
26# differ from F_CPU if prescaling is used on the latter, and is required as the
27# raw input clock is fed directly to the PLL sections of the AVR for high speed
28# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
29# at the end, this will be done automatically to create a 32-bit value in your
30# source code.
31#
32# If no clock division is performed on the input clock inside the AVR (via the
33# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
34F_USB = $(F_CPU)
35
36# Bootloader
37# This definition is optional, and if your keyboard supports multiple bootloaders of
38# different sizes, comment this out, and the correct address will be loaded
39# automatically (+60). See bootloader.mk for all options.
40BOOTLOADER = caterina
41
42# Interrupt driven control endpoint task(+60)
43OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
44
45# Build Options
46# comment out to disable the options.
47#
48BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
49MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
50EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
51CONSOLE_ENABLE = no # Console for debug(+400)
52COMMAND_ENABLE = no # Commands for debug and configuration
53SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
54NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
55BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
56AUDIO_ENABLE = no
57RGBLIGHT_ENABLE = yes
58
59LAYOUTS = 60_ansi