aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbakageta <amo@bakageta.com>2018-07-30 23:37:34 -0700
committerDrashna Jaelre <drashna@live.com>2018-07-30 23:37:34 -0700
commit76f3a10eecbc1c04237b3852a0f3384e681a3492 (patch)
treede3cf3c237f28fe89e1367b778c262107637f29a
parent98fa82ceeff2e93a7d65ccf719a2f43ec8c04e08 (diff)
downloadqmk_firmware-76f3a10eecbc1c04237b3852a0f3384e681a3492.tar.gz
qmk_firmware-76f3a10eecbc1c04237b3852a0f3384e681a3492.zip
Keyboard: Add support for bpiphany's HID Liberation Device (#3470)
* Keyboard: Added support for HID Liberation Device * Keymap: Custom (bakageta) layout for HID Liberation Device * Updated with requested changes
-rwxr-xr-xkeyboards/hid_liber/config.h170
-rwxr-xr-xkeyboards/hid_liber/hid_liber.c57
-rwxr-xr-xkeyboards/hid_liber/hid_liber.h75
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/config.h3
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/keymap.c89
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/readme.md58
-rwxr-xr-xkeyboards/hid_liber/keymaps/bakageta/rules.mk33
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/config.h1
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/keymap.c79
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/readme.md41
-rwxr-xr-xkeyboards/hid_liber/keymaps/default/rules.mk33
-rwxr-xr-xkeyboards/hid_liber/matrix.c269
-rwxr-xr-xkeyboards/hid_liber/readme.md15
-rwxr-xr-xkeyboards/hid_liber/rules.mk73
14 files changed, 996 insertions, 0 deletions
diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h
new file mode 100755
index 000000000..0817db001
--- /dev/null
+++ b/keyboards/hid_liber/config.h
@@ -0,0 +1,170 @@
1/* Copyright 2012 Jun Wako <wakojun@gmail.com>: Original Configuration
2 * Copyright 2018 bakageta <amo@bakageta.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18#ifndef CONFIG_H
19#define CONFIG_H
20
21#include "config_common.h"
22
23/* USB Device descriptor parameter */
24#define VENDOR_ID 0xFEED
25#define PRODUCT_ID 0xB919
26#define DEVICE_VER 0x0001
27#define MANUFACTURER "bpiphany"
28#define USBSTR_MANUFACTURER 'b', '\x00', 'p', '\x00', 'i', '\x00', 'p', '\x00', 'h', '\x00', 'a', '\x00', 'n', '\x00', 'y', '\x00'
29#define PRODUCT "HIDLiberation"
30#define USBSTR_PRODUCT 'H', '\x00', 'I', '\x00', 'D', '\x00', ' ', '\x00', 'L', '\x00', 'i', '\x00', 'b', '\x00', 'e', '\x00', 'r', '\x00', 'a', '\x00', 't', '\x00', 'i', '\x00', 'o', '\x00', 'n', '\x00'
31#define DESCRIPTION "HID Liberation powered by QMK"
32
33/* key matrix size */
34#define MATRIX_ROWS 18
35#define MATRIX_COLS 8
36
37// HID Liberation Device uses custom matrix code to accomodate a 74HC238 3 to 8 decoder on pins B1, B2 and B3.
38#define DIODE_DIRECTION CUSTOM_MATRIX
39
40// #define BACKLIGHT_PIN B7
41// #define BACKLIGHT_BREATHING
42// #define BACKLIGHT_LEVELS 3
43
44/* define if matrix has ghost */
45//#define MATRIX_HAS_GHOST
46
47/* Set 0 if debouncing isn't needed */
48#define DEBOUNCING_DELAY 5
49
50/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
51#define LOCKING_SUPPORT_ENABLE
52/* Locking resynchronize hack */
53#define LOCKING_RESYNC_ENABLE
54
55/*
56 * Force NKRO
57 *
58 * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved
59 * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the
60 * makefile for this to work.)
61 *
62 * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N)
63 * until the next keyboard reset.
64 *
65 * NKRO may prevent your keystrokes from being detected in the BIOS, but it is
66 * fully operational during normal computer usage.
67 *
68 * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N)
69 * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by
70 * bootmagic, NKRO mode will always be enabled until it is toggled again during a
71 * power-up.
72 *
73 */
74//#define FORCE_NKRO
75
76/*
77 * Magic Key Options
78 *
79 * Magic keys are hotkey commands that allow control over firmware functions of
80 * the keyboard. They are best used in combination with the HID Listen program,
81 * found here: https://www.pjrc.com/teensy/hid_listen.html
82 *
83 * The options below allow the magic key functionality to be changed. This is
84 * useful if your keyboard/keypad is missing keys and you want magic key support.
85 *
86 */
87
88/* key combination for magic key command */
89#define IS_COMMAND() ( \
90 keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
91)
92
93/* control how magic key switches layers */
94//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true
95//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true
96//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false
97
98/* override magic key keymap */
99//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS
100//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS
101//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM
102//#define MAGIC_KEY_HELP1 H
103//#define MAGIC_KEY_HELP2 SLASH
104//#define MAGIC_KEY_DEBUG D
105//#define MAGIC_KEY_DEBUG_MATRIX X
106//#define MAGIC_KEY_DEBUG_KBD K
107//#define MAGIC_KEY_DEBUG_MOUSE M
108//#define MAGIC_KEY_VERSION V
109//#define MAGIC_KEY_STATUS S
110//#define MAGIC_KEY_CONSOLE C
111//#define MAGIC_KEY_LAYER0_ALT1 ESC
112//#define MAGIC_KEY_LAYER0_ALT2 GRAVE
113//#define MAGIC_KEY_LAYER0 0
114//#define MAGIC_KEY_LAYER1 1
115//#define MAGIC_KEY_LAYER2 2
116//#define MAGIC_KEY_LAYER3 3
117//#define MAGIC_KEY_LAYER4 4
118//#define MAGIC_KEY_LAYER5 5
119//#define MAGIC_KEY_LAYER6 6
120//#define MAGIC_KEY_LAYER7 7
121//#define MAGIC_KEY_LAYER8 8
122//#define MAGIC_KEY_LAYER9 9
123//#define MAGIC_KEY_BOOTLOADER PAUSE
124//#define MAGIC_KEY_LOCK CAPS
125//#define MAGIC_KEY_EEPROM E
126//#define MAGIC_KEY_NKRO N
127//#define MAGIC_KEY_SLEEP_LED Z
128
129/*
130 * Feature disable options
131 * These options are also useful to firmware size reduction.
132 */
133
134/* disable debug print */
135//#define NO_DEBUG
136
137/* disable print */
138//#define NO_PRINT
139
140/* disable action features */
141//#define NO_ACTION_LAYER
142//#define NO_ACTION_TAPPING
143//#define NO_ACTION_ONESHOT
144//#define NO_ACTION_MACRO
145//#define NO_ACTION_FUNCTION
146
147/*
148 * MIDI options
149 */
150
151/* Prevent use of disabled MIDI features in the keymap */
152//#define MIDI_ENABLE_STRICT 1
153
154/* enable basic MIDI features:
155 - MIDI notes can be sent when in Music mode is on
156*/
157//#define MIDI_BASIC
158
159/* enable advanced MIDI features:
160 - MIDI notes can be added to the keymap
161 - Octave shift and transpose
162 - Virtual sustain, portamento, and modulation wheel
163 - etc.
164*/
165//#define MIDI_ADVANCED
166
167/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
168//#define MIDI_TONE_KEYCODE_OCTAVES 1
169
170#endif
diff --git a/keyboards/hid_liber/hid_liber.c b/keyboards/hid_liber/hid_liber.c
new file mode 100755
index 000000000..6517c9206
--- /dev/null
+++ b/keyboards/hid_liber/hid_liber.c
@@ -0,0 +1,57 @@
1/* Copyright 2012 Jun Wako <wakojun@gmail.com>: LED init
2 * Copyright 2017 Mathias Andersson <wraul@dbox.se>: Phantom config
3 * Copyright 2018 bakageta <amo@bakageta.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 2 of the License, or
8 * (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 <http://www.gnu.org/licenses/>.
17 */
18#include "hid_liber.h"
19
20void matrix_init_kb(void) {
21 // put your keyboard start-up code here
22 // runs once when the firmware starts up
23 led_init_ports();
24 matrix_init_user();
25}
26
27void matrix_scan_kb(void) {
28 // put your looping keyboard code here
29 // runs every cycle (a lot)
30
31 matrix_scan_user();
32}
33
34bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
35 // put your per-action keyboard code here
36 // runs for every action, just before processing by the firmware
37
38 return process_record_user(keycode, record);
39}
40
41void led_init_ports(void) {
42 DDRB |= (1<<5) | (1<<6); // OUT
43}
44
45void led_set_kb(uint8_t usb_led) {
46 if (usb_led & (1<<USB_LED_CAPS_LOCK))
47 PORTB &= ~(1<<5);
48 else
49 PORTB |= (1<<5);
50
51 if (usb_led & (1<<USB_LED_SCROLL_LOCK))
52 PORTB &= ~(1<<6);
53 else
54 PORTB |= (1<<6);
55
56 led_set_user(usb_led);
57}
diff --git a/keyboards/hid_liber/hid_liber.h b/keyboards/hid_liber/hid_liber.h
new file mode 100755
index 000000000..f36152b64
--- /dev/null
+++ b/keyboards/hid_liber/hid_liber.h
@@ -0,0 +1,75 @@
1/* Copyright 2011 Jun Wako <wakojun@gmail.com>: Original TMK layout
2 * Copyright 2018 bakageta <amo@bakageta.com>
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#ifndef HID_LIBER_H
18#define HID_LIBER_H
19
20#include "quantum.h"
21
22#define ___ KC_NO
23
24/* Tenkeyless keyboard default layout, ISO & ANSI (ISO is between Left Shift
25 * and Z, and the ANSI \ key above Return/Enter is used for the additional ISO
26 * switch in the ASD row next to enter. Use NUBS as keycode for the first and
27 * NUHS as the keycode for the second.
28 *
29 * ,---. ,---------------. ,---------------. ,---------------. ,-----------.
30 * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
31 * `---' `---------------' `---------------' `---------------' `-----------'
32 * ,-----------------------------------------------------------. ,-----------.
33 * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
34 * |-----------------------------------------------------------| |-----------|
35 * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
36 * |-----------------------------------------------------------| `-----------'
37 * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
38 * |-----------------------------------------------------------| ,---.
39 * |Shft|ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
40 * |-----------------------------------------------------------| ,-----------.
41 * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig|
42 * `-----------------------------------------------------------' `-----------'
43 */
44#define LAYOUT( \
45 KG1, KH7, KJ7, KJ6, KJ1, KO5, KL1, KA6, KA7, KD7, KD5, KD1, KD2, KB5, KB3, KO3, \
46 KG7, KG5, KH5, KJ5, KI5, KI7, KK7, KK5, KL5, KA5, KC5, KC7, KL7, KD6, KQ7, KN7, KM7, \
47 KG6, KG3, KH3, KJ3, KI3, KI6, KK6, KK3, KL3, KA3, KC3, KC6, KL6, KD4, KP7, KN5, KM5, \
48 KH6, KG4, KH4, KJ4, KI4, KI1, KK1, KK4, KL4, KA4, KC4, KC1, KD0, \
49 KF6, KH1, KG0, KH0, KJ0, KI0, KI2, KK2, KK0, KL0, KA0, KC2, KF4, KN1, \
50 KO7, KE6, KB1, KP1, KB2, KR4, KA2, KO0, KN2, KP2, KQ2 \
51) { \
52/* 0 1 2 3 4 5 6 7 */ \
53/* A */ { KA0 , ___ , KA2 , KA3 , KA4 , KA5 , KA6 , KA7 }, \
54/* B */ { ___ , KB1 , KB2 , KB3 , ___ , KB5 , ___ , ___ }, \
55/* C */ { ___ , KC1 , KC2 , KC3 , KC4 , KC5 , KC6 , KC7 }, \
56/* D */ { KD0 , KD1 , KD2 , ___ , KD4 , KD5 , KD6 , KD7 }, \
57/* E */ { ___ , ___ , ___ , ___ , ___ , ___ , KE6 , ___ }, \
58/* F */ { ___ , ___ , ___ , ___ , KF4 , ___ , KF6 , ___ }, \
59/* G */ { KG0 , KG1 , ___ , KG3 , KG4 , KG5 , KG6 , KG7 }, \
60/* H */ { KH0 , KH1 , ___ , KH3 , KH4 , KH5 , KH6 , KH7 }, \
61/* I */ { KI0 , KI1 , KI2 , KI3 , KI4 , KI5 , KI6 , KI7 }, \
62/* J */ { KJ0 , KJ1 , ___ , KJ3 , KJ4 , KJ5 , KJ6 , KJ7 }, \
63/* K */ { KK0 , KK1 , KK2 , KK3 , KK4 , KK5 , KK6 , KK7 }, \
64/* L */ { KL0 , KL1 , ___ , KL3 , KL4 , KL5 , KL6 , KL7 }, \
65/* M */ { ___ , ___ , ___ , ___ , ___ , KM5 , ___ , KM7 }, \
66/* N */ { ___ , KN1 , KN2 , ___ , ___ , KN5 , ___ , KN7 }, \
67/* O */ { KO0 , ___ , ___ , KO3 , ___ , KO5 , ___ , KO7 }, \
68/* P */ { ___ , KP1 , KP2 , ___ , ___ , ___ , ___ , KP7 }, \
69/* Q */ { ___ , ___ , KQ2 , ___ , ___ , ___ , ___ , KQ7 }, \
70/* R */ { ___ , ___ , ___ , ___ , KR4 , ___ , ___ , ___ } \
71}
72
73
74
75#endif
diff --git a/keyboards/hid_liber/keymaps/bakageta/config.h b/keyboards/hid_liber/keymaps/bakageta/config.h
new file mode 100755
index 000000000..b158e2d5a
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/config.h
@@ -0,0 +1,3 @@
1#pragma once
2
3#define PERMISSIVE_HOLD
diff --git a/keyboards/hid_liber/keymaps/bakageta/keymap.c b/keyboards/hid_liber/keymaps/bakageta/keymap.c
new file mode 100755
index 000000000..9754a70df
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/keymap.c
@@ -0,0 +1,89 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>: Phantom Layout
2 * Copyright 2018 bakageta <amo@bakageta.com>: HID Liberation layouts
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#include "hid_liber.h"
18
19// Helpful defines
20#define _______ KC_TRNS
21#define FN_CAPS LT(_FL, KC_CAPSLOCK)
22
23// Each layer gets a name for readability, which is then used in the keymap matrix below.
24// The underscores don't mean anything - you can have a layer called STUFF or any other name.
25// Layer names don't all need to be of the same length, obviously, and you can also skip them
26// entirely and just use numbers.
27
28#define _BL 0 // Base Layer
29#define _GL 1 // Gaming Layer
30#define _FL 2 // Function Layer
31
32const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
33 [_BL] = LAYOUT( \
34 KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, \
35 KC_GRV, 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_INS, KC_HOME, KC_PGUP, \
36 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_DEL, KC_END, KC_PGDN, \
37 FN_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, \
38 KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
39 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, TT(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
40 ),
41 [_GL] = LAYOUT( \
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
45 KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
46 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
47 _______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
48 ),
49 [_FL] = LAYOUT( \
50 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
51 _______, TO(_BL), TO(_GL), _______, _______, _______, _______, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \
52 _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \
53 _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PPLS, _______, _______, \
54 _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, _______, _______, \
55 _______, _______, _______, KC_P0, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______ \
56 ),
57};
58
59const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
60{
61 // MACRODOWN only works in this function
62 switch(id) {
63 case 0:
64 if (record->event.pressed) {
65 register_code(KC_RSFT);
66 } else {
67 unregister_code(KC_RSFT);
68 }
69 break;
70 }
71 return MACRO_NONE;
72};
73
74
75void matrix_init_user(void) {
76
77}
78
79void matrix_scan_user(void) {
80
81}
82
83bool process_record_user(uint16_t keycode, keyrecord_t *record) {
84 return true;
85}
86
87void led_set_user(uint8_t usb_led) {
88
89}
diff --git a/keyboards/hid_liber/keymaps/bakageta/readme.md b/keyboards/hid_liber/keymaps/bakageta/readme.md
new file mode 100755
index 000000000..2b13586c0
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/readme.md
@@ -0,0 +1,58 @@
1# bakageta's Keymap for the HID Liberation Device
2
3A personal keymap intended for the HID Liberation Device.
4
5See [keymap.c](keymap.c) for details.
6
7## Layers
8
9This keymap has a base layer with combined Fn/Caps, Fn replacing APP, and an otherwise standard ANSI layout. The gaming layer blocks LGUI, and reverts caps back to a regular key for games that bind something to it. The function layer adds media keys to the nav cluster and a virtual numpad, with 1 and 2 selecting between Base and Gaming respectively.
10
11### Layer 1: Base Layer
12 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
13 |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
14 `---' `---------------' `---------------' `---------------' `-----------'
15 ,-----------------------------------------------------------. ,-----------.
16 |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
17 |-----------------------------------------------------------| |-----------|
18 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
19 |-----------------------------------------------------------| '-----------'
20 |Fn/Cps| A| S| D| F| G| H| J| K| L| ;| '|Return |
21 |-----------------------------------------------------------| ,---.
22 |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
23 |-----------------------------------------------------------| ,-----------.
24 |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
25 `-----------------------------------------------------------' `-----------'
26
27### Layer 2: Gaming Layer
28 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
29 | | | | | | | | | | | | | | | | | | | | |
30 `---' `---------------' `---------------' `---------------' `-----------'
31 ,-----------------------------------------------------------. ,-----------.
32 | | | | | | | | | | | | | | | | | | |
33 |-----------------------------------------------------------| |-----------|
34 | | | | | | | | | | | | | | | | | | |
35 |-----------------------------------------------------------| '-----------'
36 | Caps | | | | | | | | | | | | |
37 |-----------------------------------------------------------| ,---.
38 | | | | | | | | | | | | | | |
39 |-----------------------------------------------------------| ,-----------.
40 | |XXX| | | | | | | | | | |
41 `-----------------------------------------------------------' `-----------'
42
43
44### Layer 3: Function Layer
45 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
46 | | | | | | | | | | | | | | | | | | | | |
47 `---' `---------------' `---------------' `---------------' `-----------'
48 ,-----------------------------------------------------------. ,-----------.
49 | | BL| GL| | | | | | | | | | | | |Vo-|Stp|Vo+|
50 |-----------------------------------------------------------| |-----------|
51 | | | | | | | | | | | | | | | |Prv|Ply|Nxt|
52 |-----------------------------------------------------------| '-----------'
53 | | | | | | | | | | | | | |
54 |-----------------------------------------------------------| ,---.
55 | | | | | | | | | | | | | | |
56 |-----------------------------------------------------------| ,-----------.
57 | | | | | | | | | | | | |
58 `-----------------------------------------------------------' `-----------'
diff --git a/keyboards/hid_liber/keymaps/bakageta/rules.mk b/keyboards/hid_liber/keymaps/bakageta/rules.mk
new file mode 100755
index 000000000..0f131bce9
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/bakageta/rules.mk
@@ -0,0 +1,33 @@
1# Copyright 2013 Jun Wako <wakojun@gmail.com>
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation, either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17# QMK Build Options
18# change to "no" to disable the options, or define them in the Makefile in
19# the appropriate keymap folder that will get included automatically
20#
21BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
22MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
23EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
24CONSOLE_ENABLE = yes # Console for debug(+400)
25COMMAND_ENABLE = yes # Commands for debug and configuration
26NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
27BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
28MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
29AUDIO_ENABLE = no # Audio output on port C6
30UNICODE_ENABLE = no # Unicode
31BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
32RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
33SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/hid_liber/keymaps/default/config.h b/keyboards/hid_liber/keymaps/default/config.h
new file mode 100755
index 000000000..7b9637ef9
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/config.h
@@ -0,0 +1 @@
#pragma once \ No newline at end of file
diff --git a/keyboards/hid_liber/keymaps/default/keymap.c b/keyboards/hid_liber/keymaps/default/keymap.c
new file mode 100755
index 000000000..337b4829d
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/keymap.c
@@ -0,0 +1,79 @@
1/* Copyright 2017 Mathias Andersson <wraul@dbox.se>: Phantom Layout
2 * Copyright 2018 bakageta <amo@bakageta.com>: HID Liberation layouts
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16 */
17#include "hid_liber.h"
18
19// Helpful defines
20#define _______ KC_TRNS
21
22// Each layer gets a name for readability, which is then used in the keymap matrix below.
23// The underscores don't mean anything - you can have a layer called STUFF or any other name.
24// Layer names don't all need to be of the same length, obviously, and you can also skip them
25// entirely and just use numbers.
26
27#define _BL 0 // Base Layer
28#define _FL 1 // Media Layer
29
30const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
31 [_BL] = LAYOUT( \
32 KC_ESC, 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_PSCR, KC_SLCK, KC_BRK, \
33 KC_GRV, 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_INS, KC_HOME, KC_PGUP, \
34 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_DEL, KC_END, KC_PGDN, \
35 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, \
36 KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \
37 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \
38 ),
39 [_FL] = LAYOUT( \
40 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
41 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_MSTP, KC_VOLU, \
42 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_MPLY, KC_MNXT, \
43 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
44 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
45 _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
46 ),
47};
48
49const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
50{
51 // MACRODOWN only works in this function
52 switch(id) {
53 case 0:
54 if (record->event.pressed) {
55 register_code(KC_RSFT);
56 } else {
57 unregister_code(KC_RSFT);
58 }
59 break;
60 }
61 return MACRO_NONE;
62};
63
64
65void matrix_init_user(void) {
66
67}
68
69void matrix_scan_user(void) {
70
71}
72
73bool process_record_user(uint16_t keycode, keyrecord_t *record) {
74 return true;
75}
76
77void led_set_user(uint8_t usb_led) {
78
79}
diff --git a/keyboards/hid_liber/keymaps/default/readme.md b/keyboards/hid_liber/keymaps/default/readme.md
new file mode 100755
index 000000000..963524389
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/readme.md
@@ -0,0 +1,41 @@
1# ANSI Keymap for the HID Liberation Device
2
3A basic keymap intended for the HID Liberation Device using the standard ANSI layout.
4
5See [keymap.c](keymap.c) for details.
6
7## Layers
8
9This keymap has two layers. To access the functions on the second layer, hold down `Fn` and press the corresponding key.
10
11### Layer 1: Base Layer
12 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
13 |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|
14 `---' `---------------' `---------------' `---------------' `-----------'
15 ,-----------------------------------------------------------. ,-----------.
16 |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU|
17 |-----------------------------------------------------------| |-----------|
18 |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD|
19 |-----------------------------------------------------------| '-----------'
20 |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return |
21 |-----------------------------------------------------------| ,---.
22 |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up |
23 |-----------------------------------------------------------| ,-----------.
24 |Ctl|Gui|Alt| Space |Alt|Gui|Fn |Ctl| |Lef|Dow|Rig|
25 `-----------------------------------------------------------' `-----------'
26
27### Layer 2: Media Layer
28 ,---. ,---------------. ,---------------. ,---------------. ,-----------.
29 | | | | | | | | | | | | | | | | | | | | |
30 `---' `---------------' `---------------' `---------------' `-----------'
31 ,-----------------------------------------------------------. ,-----------.
32 | | | | | | | | | | | | | | | |Vo-|Stp|Vo+|
33 |-----------------------------------------------------------| |-----------|
34 | | | | | | | | | | | | | | | |Prv|Ply|Nxt|
35 |-----------------------------------------------------------| '-----------'
36 | | | | | | | | | | | | | |
37 |-----------------------------------------------------------| ,---.
38 | | | | | | | | | | | | | | |
39 |-----------------------------------------------------------| ,-----------.
40 | | | | | | | | | | | | |
41 `-----------------------------------------------------------' `-----------'
diff --git a/keyboards/hid_liber/keymaps/default/rules.mk b/keyboards/hid_liber/keymaps/default/rules.mk
new file mode 100755
index 000000000..0f131bce9
--- /dev/null
+++ b/keyboards/hid_liber/keymaps/default/rules.mk
@@ -0,0 +1,33 @@
1# Copyright 2013 Jun Wako <wakojun@gmail.com>
2#
3# This program is free software: you can redistribute it and/or modify
4# it under the terms of the GNU General Public License as published by
5# the Free Software Foundation, either version 2 of the License, or
6# (at your option) any later version.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16
17# QMK Build Options
18# change to "no" to disable the options, or define them in the Makefile in
19# the appropriate keymap folder that will get included automatically
20#
21BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
22MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
23EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
24CONSOLE_ENABLE = yes # Console for debug(+400)
25COMMAND_ENABLE = yes # Commands for debug and configuration
26NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
27BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
28MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
29AUDIO_ENABLE = no # Audio output on port C6
30UNICODE_ENABLE = no # Unicode
31BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
32RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
33SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend \ No newline at end of file
diff --git a/keyboards/hid_liber/matrix.c b/keyboards/hid_liber/matrix.c
new file mode 100755
index 000000000..de154890d
--- /dev/null
+++ b/keyboards/hid_liber/matrix.c
@@ -0,0 +1,269 @@
1/* Copyright 2012 Jun Wako <wakojun@gmail.com>: TMK Matrix
2 * Copyright 2018 bakageta <amo@bakageta.com>
3 *
4 * This is heavily based on hid_liber/board.{c|h}.
5 * https://github.com/BathroomEpiphanies/AVR-Keyboard
6 *
7 * Copyright (c) 2012 Fredrik Atmer, Bathroom Epiphanies Inc
8 * http://bathroomepiphanies.com
9 *
10 * This program is free software: you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation, either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program. If not, see <http://www.gnu.org/licenses/>.
22 */
23
24#include <stdint.h>
25#include <stdbool.h>
26#if defined(__AVR__)
27#include <avr/io.h>
28#endif
29#include <util/delay.h>
30#include "wait.h"
31#include "print.h"
32#include "debug.h"
33#include "util.h"
34#include "matrix.h"
35#include "timer.h"
36
37
38#ifndef DEBOUNCE
39# define DEBOUNCE 5
40#endif
41static uint8_t debouncing = DEBOUNCE;
42
43// bit array of key state(1:on, 0:off)
44static matrix_row_t matrix[MATRIX_ROWS];
45static matrix_row_t matrix_debouncing[MATRIX_ROWS];
46
47
48#define _DDRA (uint8_t *const)&DDRA
49#define _DDRB (uint8_t *const)&DDRB
50#define _DDRC (uint8_t *const)&DDRC
51#define _DDRD (uint8_t *const)&DDRD
52#define _DDRE (uint8_t *const)&DDRE
53#define _DDRF (uint8_t *const)&DDRF
54
55#define _PINA (uint8_t *const)&PINA
56#define _PINB (uint8_t *const)&PINB
57#define _PINC (uint8_t *const)&PINC
58#define _PIND (uint8_t *const)&PIND
59#define _PINE (uint8_t *const)&PINE
60#define _PINF (uint8_t *const)&PINF
61
62#define _PORTA (uint8_t *const)&PORTA
63#define _PORTB (uint8_t *const)&PORTB
64#define _PORTC (uint8_t *const)&PORTC
65#define _PORTD (uint8_t *const)&PORTD
66#define _PORTE (uint8_t *const)&PORTE
67#define _PORTF (uint8_t *const)&PORTF
68
69#define _BIT0 0x01
70#define _BIT1 0x02
71#define _BIT2 0x04
72#define _BIT3 0x08
73#define _BIT4 0x10
74#define _BIT5 0x20
75#define _BIT6 0x40
76#define _BIT7 0x80
77
78/* Specifies the ports and pin numbers for the rows */
79static
80uint8_t *const row_ddr[MATRIX_ROWS] = {
81 _DDRB, _DDRB,
82 _DDRC, _DDRC,
83 _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, _DDRD,
84 _DDRF, _DDRF, _DDRF, _DDRF, _DDRF, _DDRF};
85
86static
87uint8_t *const row_port[MATRIX_ROWS] = {
88 _PORTB, _PORTB,
89 _PORTC, _PORTC,
90 _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTD,
91 _PORTF, _PORTF, _PORTF, _PORTF, _PORTF, _PORTF};
92
93static
94uint8_t *const row_pin[MATRIX_ROWS] = {
95 _PINB, _PINB,
96 _PINC, _PINC,
97 _PIND, _PIND, _PIND, _PIND, _PIND, _PIND, _PIND, _PIND,
98 _PINF, _PINF, _PINF, _PINF, _PINF, _PINF};
99
100static
101const uint8_t row_bit[MATRIX_ROWS] = {
102 _BIT4, _BIT7,
103 _BIT6, _BIT7,
104 _BIT0, _BIT1, _BIT2, _BIT3, _BIT4, _BIT5, _BIT6, _BIT7,
105 _BIT0, _BIT1, _BIT4, _BIT5, _BIT6, _BIT7};
106
107static
108const uint8_t mask = 0x0E;
109
110/* Specifies the ports and pin numbers for the columns */
111static
112const uint8_t col_bit[MATRIX_COLS] = { 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E};
113
114__attribute__ ((weak))
115void matrix_init_kb(void) {
116 matrix_init_user();
117}
118
119__attribute__ ((weak))
120void matrix_scan_kb(void) {
121 matrix_scan_user();
122}
123
124__attribute__ ((weak))
125void matrix_init_user(void) {
126}
127
128__attribute__ ((weak))
129void matrix_scan_user(void) {
130}
131
132static
133inline void pull_column(int col) {
134 PORTB = col_bit[col] | (PORTB & ~mask);
135}
136
137static
138inline void release_column(int col) {
139}
140
141/* PORTB is set as input with pull-up resistors
142 PORTC,D,E,F are set to high output */
143static
144void setup_io_pins(void) {
145 uint8_t row;
146 DDRB |= 0x0E;
147 PORTB &= ~0x0E;
148 for(row = 0; row < MATRIX_ROWS; row++) {
149 *row_ddr[row] &= ~row_bit[row];
150 *row_port[row] &= ~row_bit[row];
151 }
152}
153
154static
155void setup_leds(void) {
156 DDRB |= 0x60;
157 PORTB |= 0x60;
158}
159
160
161inline
162uint8_t matrix_rows(void)
163{
164 return MATRIX_ROWS;
165}
166
167inline
168uint8_t matrix_cols(void)
169{
170 return MATRIX_COLS;
171}
172
173void matrix_init(void)
174{
175 // To use PORTF disable JTAG with writing JTD bit twice within four cycles.
176 MCUCR |= (1<<JTD);
177 MCUCR |= (1<<JTD);
178
179 // initialize row and col
180 setup_io_pins();
181 setup_leds();
182
183 // initialize matrix state: all keys off
184 for (uint8_t i=0; i < MATRIX_ROWS; i++) {
185 matrix[i] = 0;
186 matrix_debouncing[i] = 0;
187 }
188
189 matrix_init_quantum();
190}
191
192uint8_t matrix_scan(void)
193{
194 for (uint8_t col = 0; col < MATRIX_COLS; col++) { // 0-7
195 pull_column(col); // output hi on theline
196 _delay_us(5); // without this wait it won't read stable value.
197 for (uint8_t row = 0; row < MATRIX_ROWS; row++) { // 0-17
198 bool prev_bit = matrix_debouncing[row] & (1<<col);
199 bool curr_bit = *row_pin[row] & row_bit[row];
200 if (prev_bit != curr_bit) {
201 matrix_debouncing[row] ^= ((matrix_row_t)1<<col);
202 if (debouncing) {
203 dprintf("bounce!: %02X\n", debouncing);
204 }
205 debouncing = DEBOUNCE;
206 }
207 }
208 release_column(col);
209 }
210
211 if (debouncing) {
212 if (--debouncing) {
213 _delay_ms(1);
214 } else {
215 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
216 matrix[i] = matrix_debouncing[i];
217 }
218 }
219 }
220
221 matrix_scan_quantum();
222 return 1;
223}
224
225bool matrix_is_modified(void)
226{
227 // NOTE: no longer used
228 return true;
229}
230
231inline
232bool matrix_has_ghost(void)
233{
234 return false;
235}
236
237inline
238bool matrix_is_on(uint8_t row, uint8_t col)
239{
240 return (matrix[row] & ((matrix_row_t)1<<col));
241}
242
243inline
244matrix_row_t matrix_get_row(uint8_t row)
245{
246 return matrix[row];
247}
248
249void matrix_print(void)
250{
251 print("\nr/c 01234567\n");
252 for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
253 phex(row); print(": ");
254 pbin_reverse(matrix_get_row(row));
255 print("\n");
256 }
257}
258
259uint8_t matrix_key_count(void)
260{
261 uint8_t count = 0;
262 for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
263 for (uint8_t j = 0; j < MATRIX_COLS; j++) {
264 if (matrix_is_on(i, j))
265 count++;
266 }
267 }
268 return count;
269}
diff --git a/keyboards/hid_liber/readme.md b/keyboards/hid_liber/readme.md
new file mode 100755
index 000000000..77ea1babb
--- /dev/null
+++ b/keyboards/hid_liber/readme.md
@@ -0,0 +1,15 @@
1HID Liberation Device
2=====================
3DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities.
4The PCB was engineered by bpiphany.
5
6## Wiki on Deskthority.net
7- [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions)
8- [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions)
9
10## Build
11Make example for this keyboard (after setting up your build environment):
12
13 make hid_liber:default
14
15See [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/hid_liber/rules.mk b/keyboards/hid_liber/rules.mk
new file mode 100755
index 000000000..f28a4c6ae
--- /dev/null
+++ b/keyboards/hid_liber/rules.mk
@@ -0,0 +1,73 @@
1# Project specific files
2SRC = matrix.c
3
4# MCU name
5#MCU = at90usb1287
6MCU = atmega32u4
7
8# Processor frequency.
9# This will define a symbol, F_CPU, in all source code files equal to the
10# processor frequency in Hz. You can then use this symbol in your source code to
11# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
12# automatically to create a 32-bit value in your source code.
13#
14# This will be an integer division of F_USB below, as it is sourced by
15# F_USB after it has run through any CPU prescalers. Note that this value
16# does not *change* the processor frequency - it should merely be updated to
17# reflect the processor speed set externally so that the code can use accurate
18# software delays.
19F_CPU = 16000000
20
21
22#
23# LUFA specific
24#
25# Target architecture (see library "Board Types" documentation).
26ARCH = AVR8
27
28# Input clock frequency.
29# This will define a symbol, F_USB, in all source code files equal to the
30# input clock frequency (before any prescaling is performed) in Hz. This value may
31# differ from F_CPU if prescaling is used on the latter, and is required as the
32# raw input clock is fed directly to the PLL sections of the AVR for high speed
33# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
34# at the end, this will be done automatically to create a 32-bit value in your
35# source code.
36#
37# If no clock division is performed on the input clock inside the AVR (via the
38# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
39F_USB = $(F_CPU)
40
41# Interrupt driven control endpoint task(+60)
42OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
43
44
45# Boot Section Size in *bytes*
46# Teensy halfKay 512
47# Teensy++ halfKay 1024
48# Atmel DFU loader 4096
49# LUFA bootloader 4096
50# USBaspLoader 2048
51OPT_DEFS += -DBOOTLOADER_SIZE=4096
52
53
54# Build Options
55# change yes to no to disable
56#
57BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000)
58MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
59EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
60CONSOLE_ENABLE = no # Console for debug(+400)
61COMMAND_ENABLE = yes # Commands for debug and configuration
62CUSTOM_MATRIX = yes # Custom matrix file
63# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
64SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
65# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
66NKRO_ENABLE = yes # USB Nkey Rollover
67BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
68RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
69MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config)
70UNICODE_ENABLE = no # Unicode
71BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
72AUDIO_ENABLE = no # Audio output on port C6
73FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches