aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2017-04-02 22:29:24 -0400
committerGitHub <noreply@github.com>2017-04-02 22:29:24 -0400
commitef4a7a0aa087658e006b25828daac8af8c7bee60 (patch)
tree45c9bd59012462d2e610b8e332a607a07f7dd9e9
parent1d8e3da2332e0ddfd095a6c274ef571ea91287cf (diff)
parent3e41cde9f99778ca30c03b97470c32780379db43 (diff)
downloadqmk_firmware-ef4a7a0aa087658e006b25828daac8af8c7bee60.tar.gz
qmk_firmware-ef4a7a0aa087658e006b25828daac8af8c7bee60.zip
Merge pull request #1196 from Dbroqua/master
GH60 - MX HHKB with 7U spacebar
-rw-r--r--keyboards/gh60/keymaps/dbroqua_7U/Makefile111
-rw-r--r--keyboards/gh60/keymaps/dbroqua_7U/keymap.c88
2 files changed, 199 insertions, 0 deletions
diff --git a/keyboards/gh60/keymaps/dbroqua_7U/Makefile b/keyboards/gh60/keymaps/dbroqua_7U/Makefile
new file mode 100644
index 000000000..da0f07d7d
--- /dev/null
+++ b/keyboards/gh60/keymaps/dbroqua_7U/Makefile
@@ -0,0 +1,111 @@
1#----------------------------------------------------------------------------
2# On command line:
3#
4# make all = Make software.
5#
6# make clean = Clean out built project files.
7#
8# make coff = Convert ELF to AVR COFF.
9#
10# make extcoff = Convert ELF to AVR Extended COFF.
11#
12# make program = Download the hex file to the device.
13# Please customize your programmer settings(PROGRAM_CMD)
14#
15# make teensy = Download the hex file to the device, using teensy_loader_cli.
16# (must have teensy_loader_cli installed).
17#
18# make dfu = Download the hex file to the device, using dfu-programmer (must
19# have dfu-programmer installed).
20#
21# make flip = Download the hex file to the device, using Atmel FLIP (must
22# have Atmel FLIP installed).
23#
24# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
25# (must have dfu-programmer installed).
26#
27# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
28# (must have Atmel FLIP installed).
29#
30# make debug = Start either simulavr or avarice as specified for debugging,
31# with avr-gdb or avr-insight as the front end for debugging.
32#
33# make filename.s = Just compile filename.c into the assembler code only.
34#
35# make filename.i = Create a preprocessed source file for use in submitting
36# bug reports to the GCC project.
37#
38# To rebuild project do "make clean" then "make all".
39#----------------------------------------------------------------------------
40
41# MCU name
42#MCU = at90usb1287
43MCU = atmega32u4
44
45# Processor frequency.
46# This will define a symbol, F_CPU, in all source code files equal to the
47# processor frequency in Hz. You can then use this symbol in your source code to
48# calculate timings. Do NOT tack on a 'UL' at the end, this will be done
49# automatically to create a 32-bit value in your source code.
50#
51# This will be an integer division of F_USB below, as it is sourced by
52# F_USB after it has run through any CPU prescalers. Note that this value
53# does not *change* the processor frequency - it should merely be updated to
54# reflect the processor speed set externally so that the code can use accurate
55# software delays.
56F_CPU = 16000000
57
58
59#
60# LUFA specific
61#
62# Target architecture (see library "Board Types" documentation).
63ARCH = AVR8
64
65# Input clock frequency.
66# This will define a symbol, F_USB, in all source code files equal to the
67# input clock frequency (before any prescaling is performed) in Hz. This value may
68# differ from F_CPU if prescaling is used on the latter, and is required as the
69# raw input clock is fed directly to the PLL sections of the AVR for high speed
70# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL'
71# at the end, this will be done automatically to create a 32-bit value in your
72# source code.
73#
74# If no clock division is performed on the input clock inside the AVR (via the
75# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU.
76F_USB = $(F_CPU)
77
78# Interrupt driven control endpoint task(+60)
79OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT
80
81
82# Boot Section Size in *bytes*
83# Teensy halfKay 512
84# Teensy++ halfKay 1024
85# Atmel DFU loader 4096
86# LUFA bootloader 4096
87# USBaspLoader 2048
88OPT_DEFS += -DBOOTLOADER_SIZE=4096
89
90
91# Build Options
92# comment out to disable the options.
93#
94BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000)
95MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700)
96EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450)
97# CONSOLE_ENABLE ?= yes # Console for debug(+400)
98# COMMAND_ENABLE ?= yes # Commands for debug and configuration
99KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
100# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
101SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend
102NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
103# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality
104# MIDI_ENABLE ?= YES # MIDI controls
105# UNICODE_ENABLE ?= YES # Unicode
106# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
107RGBLIGHT_ENABLE ?= no # Enable RGB Underglow
108
109ifndef QUANTUM_DIR
110 include ../../../../Makefile
111endif \ No newline at end of file
diff --git a/keyboards/gh60/keymaps/dbroqua_7U/keymap.c b/keyboards/gh60/keymaps/dbroqua_7U/keymap.c
new file mode 100644
index 000000000..bebfe5af5
--- /dev/null
+++ b/keyboards/gh60/keymaps/dbroqua_7U/keymap.c
@@ -0,0 +1,88 @@
1#include "gh60.h"
2#include "action_layer.h"
3
4#define _DEFAULT 0
5#define _FN 1
6
7int esc_led = 0;
8
9// Fillers to make layering more clear
10#define ______ KC_TRNS
11
12const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
13/* Qwerty gui/alt/space/alt/gui
14 * ,-----------------------------------------------------------------------------------------.
15 * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
16 * |-----------------------------------------------------------------------------------------+
17 * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
18 * |-----------------------------------------------------------------------------------------+
19 * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
20 * |-----------------------------------------------------------------------------------------+
21 * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
22 * |-----------------------------------------------------------------------------------------+
23 * |LGUI | LAlt | Space | RAlt |RGUI |
24 * `-----------------------------------------------------------------'
25 */
26 [_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */
27 KC_ESC, 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_BSLS, KC_GRV, \
28 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_BSPC, \
29 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_ENT, \
30 KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN), \
31 ______, KC_LGUI, KC_LALT, KC_SPC, ______, KC_RALT, KC_RGUI, ______ \
32 ),
33
34/* FN Layer
35 * ,-----------------------------------------------------------------------------------------.
36 * | Led | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
37 * |-----------------------------------------------------------------------------------------+
38 * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
39 * |-----------------------------------------------------------------------------------------+
40 * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
41 * |-----------------------------------------------------------------------------------------+
42 * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
43 * |-----------------------------------------------------------------------------------------+
44 * | | | | Stop | |
45 * `-----------------------------------------------------------------'
46 */
47 [_FN] = KEYMAP_HHKB( /* Layer 1 */
48 F(0), 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_INS, KC_DEL, \
49 KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
50 ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
51 ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
52 ______, ______, ______, ______, ______, KC_MSTP, ______, ______ \
53 )
54};
55
56const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
57{
58 // MACRODOWN only works in this function
59 return MACRO_NONE;
60};
61
62enum function_id {
63 LED_TOGGLE
64};
65
66const uint16_t PROGMEM fn_actions[] = {
67 [0] = ACTION_FUNCTION(LED_TOGGLE)
68};
69
70void esc_led_toggle(void) {
71 if (esc_led == 0){
72 esc_led = 1;
73 gh60_esc_led_on();
74 } else {
75 esc_led = 0;
76 gh60_esc_led_off();
77 }
78}
79
80void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
81 switch (id) {
82 case LED_TOGGLE:
83 if (record->event.pressed) {
84 esc_led_toggle();
85 }
86 break;
87 }
88} \ No newline at end of file