summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordbroqua <dbroqua@mousur.org>2016-12-20 18:43:06 +0100
committerdbroqua <dbroqua@mousur.org>2016-12-20 18:43:06 +0100
commitb7696fb3b0a38bd795cbda6d7629711c3564620c (patch)
tree834168796c640f28f1391930ea3522a29334d316
parente9f69ff46eb87eda30fa72e8e8eac2c69173989f (diff)
- Updated gh60 files
-rw-r--r--keyboards/gh60/gh60.h2
-rw-r--r--keyboards/gh60/keymaps/dbroqua_hhkb/Makefile112
-rw-r--r--keyboards/gh60/keymaps/dbroqua_hhkb/keymap.c124
3 files changed, 237 insertions, 1 deletions
diff --git a/keyboards/gh60/gh60.h b/keyboards/gh60/gh60.h
index 66bc2790d2..99ccf17574 100644
--- a/keyboards/gh60/gh60.h
+++ b/keyboards/gh60/gh60.h
@@ -72,4 +72,4 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); }
{ K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, K4A, K4B, K4C, K4D } \
}
-#endif
+#endif \ No newline at end of file
diff --git a/keyboards/gh60/keymaps/dbroqua_hhkb/Makefile b/keyboards/gh60/keymaps/dbroqua_hhkb/Makefile
new file mode 100644
index 0000000000..b9bbb669d7
--- /dev/null
+++ b/keyboards/gh60/keymaps/dbroqua_hhkb/Makefile
@@ -0,0 +1,112 @@
+#----------------------------------------------------------------------------
+# On command line:
+#
+# make all = Make software.
+#
+# make clean = Clean out built project files.
+#
+# make coff = Convert ELF to AVR COFF.
+#
+# make extcoff = Convert ELF to AVR Extended COFF.
+#
+# make program = Download the hex file to the device.
+# Please customize your programmer settings(PROGRAM_CMD)
+#
+# make teensy = Download the hex file to the device, using teensy_loader_cli.
+# (must have teensy_loader_cli installed).
+#
+# make dfu = Download the hex file to the device, using dfu-programmer (must
+# have dfu-programmer installed).
+#
+# make flip = Download the hex file to the device, using Atmel FLIP (must
+# have Atmel FLIP installed).
+#
+# make dfu-ee = Download the eeprom file to the device, using dfu-programmer
+# (must have dfu-programmer installed).
+#
+# make flip-ee = Download the eeprom file to the device, using Atmel FLIP
+# (must have Atmel FLIP installed).
+#
+# make debug = Start either simulavr or avarice as specified for debugging,
+# with avr-gdb or avr-insight as the front end for debugging.
+#
+# make filename.s = Just compile filename.c into the assembler code only.
+#
+# make filename.i = Create a preprocessed source file for use in submitting
+# bug reports to the GCC project.
+#
+# To rebuild project do "make clean" then "make all".
+#----------------------------------------------------------------------------
+
+# MCU name
+#MCU = at90usb1287
+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*
+# Teensy halfKay 512
+# Teensy++ halfKay 1024
+# Atmel DFU loader 4096
+# LUFA bootloader 4096
+# USBaspLoader 2048
+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 ?= yes # Console for debug(+400)
+# COMMAND_ENABLE ?= yes # Commands for debug and configuration
+KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key
+# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
+SLEEP_LED_ENABLE ?= yes # 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
+# MIDI_ENABLE ?= YES # MIDI controls
+# UNICODE_ENABLE ?= YES # Unicode
+# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID
+# RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif
+
diff --git a/keyboards/gh60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/gh60/keymaps/dbroqua_hhkb/keymap.c
new file mode 100644
index 0000000000..0c2e980d2f
--- /dev/null
+++ b/keyboards/gh60/keymaps/dbroqua_hhkb/keymap.c
@@ -0,0 +1,124 @@
+#include "gh60.h"
+#include "action_layer.h"
+
+#define _DEFAULT 0
+#define _FN 1
+#define _WASD 2
+
+//bool esc_led_on;
+
+enum planck_keycodes {
+ DEFAULT = SAFE_RANGE
+};
+
+// Fillers to make layering more clear
+#define ______ KC_TRNS
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+/* Qwerty gui/alt/space/alt/gui
+ * ,-----------------------------------------------------------------------------------------.
+ * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` |
+ * |-----------------------------------------------------------------------------------------+
+ * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp |
+ * |-----------------------------------------------------------------------------------------+
+ * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
+ * |-----------------------------------------------------------------------------------------+
+ * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
+ * |-----------------------------------------------------------------------------------------+
+ * |LGUI | LAlt | Space | RAlt |RGUI |
+ * `-----------------------------------------------------------------'
+ */
+ [_DEFAULT] = KEYMAP_HHKB( /* Basic QWERTY */
+ 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, \
+ 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, \
+ 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, \
+ 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), \
+ ______, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, ______, ______ \
+ ),
+
+/* FN Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del |
+ * |-----------------------------------------------------------------------------------------+
+ * | CAPS | | | | | | | | Psc | Slck| Paus| Up | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Vol-| Vol+| Mute| | | * | / | Home| PgUp| Left|Right| |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Prev| Play| Next| | | + | - | End |PgDn| Down| | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | Stop | |
+ * `-----------------------------------------------------------------'
+ */
+ [_FN] = KEYMAP_HHKB( /* Layer 1 */
+ ______, 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, \
+ KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
+ ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT,______, \
+ ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
+ ______, ______, ______, KC_FN1, KC_MSTP, ______, ______, ______ \
+ ),
+
+/* FN Layer
+ * ,-----------------------------------------------------------------------------------------.
+ * | | | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | Up | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | Left| Down|Right| | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | | | | | | | | | |
+ * |-----------------------------------------------------------------------------------------+
+ * | | | | | |
+ * `-----------------------------------------------------------------'
+ */
+ [_WASD] = KEYMAP_HHKB( /* Layer 1 */
+ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+ ______, ______, KC_UP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+ ______, KC_LEFT, KC_DOWN, KC_RGHT, ______, ______, ______, ______, ______, ______, ______, ______, ______, \
+ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,______, \
+ ______, ______, ______, ______, ______, ______, ______, ______ \
+ )
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+ // MACRODOWN only works in this function
+ return MACRO_NONE;
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay
+ [1] = ACTION_LAYER_TOGGLE(2), // toggle wasd overlay
+};
+
+//bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+// switch (keycode) {
+// case ESC_LED:
+// if (record->event.pressed) {
+// if (esc_led_on == true ){
+// gh60_esc_led_off();
+// }else{
+// gh60_esc_led_on();
+// }
+// esc_led_on = !esc_led_on;
+// }
+// return false;
+// break;
+// }
+// return true;
+//}
+
+void matrix_scan_user(void) {
+ uint32_t layer = layer_state;
+
+ if (layer & (1<<1)) {
+ gh60_fn_led_on();
+ } else {
+ gh60_fn_led_off();
+ }
+
+ if (layer & (1<<2)) {
+ gh60_wasd_leds_on();
+ } else {
+ gh60_wasd_leds_off();
+ }
+}; \ No newline at end of file