From f13f48a35e1a2b0851bb9967976f39f2e233f838 Mon Sep 17 00:00:00 2001 From: Jonathan Lucas Date: Sat, 16 Jul 2016 20:24:14 -0700 Subject: Added CMD60 keymap --- keyboards/handwired/CMD60/CMD60.c | 8 + keyboards/handwired/CMD60/CMD60.h | 20 +++ keyboards/handwired/CMD60/Makefile | 73 ++++++++++ keyboards/handwired/CMD60/README.md | 35 +++++ keyboards/handwired/CMD60/config.h | 162 +++++++++++++++++++++ keyboards/handwired/CMD60/keymaps/default/keymap.c | 66 +++++++++ 6 files changed, 364 insertions(+) create mode 100644 keyboards/handwired/CMD60/CMD60.c create mode 100644 keyboards/handwired/CMD60/CMD60.h create mode 100644 keyboards/handwired/CMD60/Makefile create mode 100644 keyboards/handwired/CMD60/README.md create mode 100644 keyboards/handwired/CMD60/config.h create mode 100644 keyboards/handwired/CMD60/keymaps/default/keymap.c (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/CMD60/CMD60.c b/keyboards/handwired/CMD60/CMD60.c new file mode 100644 index 000000000..799848e34 --- /dev/null +++ b/keyboards/handwired/CMD60/CMD60.c @@ -0,0 +1,8 @@ +#include "CMD60.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/handwired/CMD60/CMD60.h b/keyboards/handwired/CMD60/CMD60.h new file mode 100644 index 000000000..f90871fc7 --- /dev/null +++ b/keyboards/handwired/CMD60/CMD60.h @@ -0,0 +1,20 @@ +#ifndef CMD60_H +#define CMD60_H + +#include "quantum.h" + +#define KEYMAP( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, \ + K40, K41, K42, K45, K4A, K4B, K4C, K4D \ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO,K4A, K4B, K4C, K4D } \ +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/CMD60/Makefile b/keyboards/handwired/CMD60/Makefile new file mode 100644 index 000000000..711759917 --- /dev/null +++ b/keyboards/handwired/CMD60/Makefile @@ -0,0 +1,73 @@ + +# 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) + +# 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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + + diff --git a/keyboards/handwired/CMD60/README.md b/keyboards/handwired/CMD60/README.md new file mode 100644 index 000000000..83e371543 --- /dev/null +++ b/keyboards/handwired/CMD60/README.md @@ -0,0 +1,35 @@ +CMD60 keyboard firmware +====================== + +##CMD60 + +This layout has been designed to optimize use of the left-hand, and it focussed specifically on programmers who work +with text editors like SublimeText and Atom. It utilizes the power of Space_fn, and features a caps lock swap for Fn2 +and enter key on tap. These features allow you to keep your right hand on the mouse more and should enable you to +achieve a higher level of productivity if you take the time to learn its function layers. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/CMD60 folder. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use +the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/handwired/CMD60/config.h b/keyboards/handwired/CMD60/config.h new file mode 100644 index 000000000..5e28dc17b --- /dev/null +++ b/keyboards/handwired/CMD60/config.h @@ -0,0 +1,162 @@ +7/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER cmd +#define PRODUCT CMD60 +#define DESCRIPTION Advanced Programming Keeb Layout + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, D2, D3, C6, D7, B4, B5, B6 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/CMD60/keymaps/default/keymap.c b/keyboards/handwired/CMD60/keymaps/default/keymap.c new file mode 100644 index 000000000..9f9cbcd66 --- /dev/null +++ b/keyboards/handwired/CMD60/keymaps/default/keymap.c @@ -0,0 +1,66 @@ +#include "CMD60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( /* CMD60 - 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_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, \ + LT(3, KC_ENT), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, 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_NO, KC_NO, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, LT(2, KC_SPC), MO(3), MO(4), MO(5), TG(1) \ + ), + [1] = KEYMAP( /* CMD60 - GameMode */ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_RSFT, \ + KC_TRNS, KC_NO, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [2] = KEYMAP( /* CMD60 - Arrows */ + KC_GRV, 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_DEL, \ + KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSPC, KC_UP, KC_DEL, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [3] = KEYMAP( /* CMD60 - Functions */ + KC_GRV, 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_DEL, \ + KC_AUDIO_MUTE, KC_BSPC, KC_PGUP, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_PAUSE, KC_SLCK, KC_PSCREEN, \ + KC_TRNS, KC_HOME, KC_PGDN, KC_END, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_INSERT, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = KEYMAP( /* CMD60 - Mouse */ + KC_SYSTEM_SLEEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_UP, KC_MS_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_WH_UP, KC_MS_BTN3, KC_MS_WH_DOWN, KC_NO, KC_NO, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [5] = KEYMAP( /* CMD60 - Media */ + KC_SYSTEM_WAKE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_AUDIO_MUTE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_PREV_TRACK, KC_MEDIA_NEXT_TRACK, KC_MEDIA_PLAY_PAUSE, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WWW_BACK, KC_WWW_FORWARD, KC_NO, KC_NO, KC_WWW_REFRESH, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 2877b858d398b64787f679e7826cecce26dbb33f Mon Sep 17 00:00:00 2001 From: Jonathan Lucas Date: Sat, 16 Jul 2016 20:38:55 -0700 Subject: Fix erroneous character Must have been keeb testing :) --- keyboards/handwired/CMD60/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/CMD60/config.h b/keyboards/handwired/CMD60/config.h index 5e28dc17b..27eb400b8 100644 --- a/keyboards/handwired/CMD60/config.h +++ b/keyboards/handwired/CMD60/config.h @@ -1,4 +1,4 @@ -7/* +/* Copyright 2012 Jun Wako This program is free software: you can redistribute it and/or modify -- cgit v1.2.3 From 24e4e6dd18924295a0ce0cab653be2e63008f0af Mon Sep 17 00:00:00 2001 From: milestogo Date: Wed, 20 Jul 2016 21:12:00 -0700 Subject: adding traveller keyboard --- keyboards/handwired/traveller/Makefile | 89 ++++++ keyboards/handwired/traveller/config.h | 173 ++++++++++++ .../handwired/traveller/keymaps/default/keymap.c | 305 +++++++++++++++++++++ .../handwired/traveller/keymaps/default/readme.md | 2 + keyboards/handwired/traveller/readme.md | 35 +++ keyboards/handwired/traveller/traveller.c | 61 +++++ keyboards/handwired/traveller/traveller.h | 32 +++ 7 files changed, 697 insertions(+) create mode 100644 keyboards/handwired/traveller/Makefile create mode 100644 keyboards/handwired/traveller/config.h create mode 100644 keyboards/handwired/traveller/keymaps/default/keymap.c create mode 100644 keyboards/handwired/traveller/keymaps/default/readme.md create mode 100644 keyboards/handwired/traveller/readme.md create mode 100644 keyboards/handwired/traveller/traveller.c create mode 100644 keyboards/handwired/traveller/traveller.h (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/traveller/Makefile b/keyboards/handwired/traveller/Makefile new file mode 100644 index 000000000..12a4b71f4 --- /dev/null +++ b/keyboards/handwired/traveller/Makefile @@ -0,0 +1,89 @@ + +#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 + +# for avr upload +USB ?= /dev/cu.usbmodem1421 +# +# 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) + + +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else + OPT_DEFS += -DATREUS_ASTAR + OPT_DEFS += -DCATERINA_BOOTLOADER + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) +endif +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# MCU name + +# 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 +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +upload: build + $(ATREUS_UPLOAD_COMMAND) + diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h new file mode 100644 index 000000000..2b82da447 --- /dev/null +++ b/keyboards/handwired/traveller/config.h @@ -0,0 +1,173 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER You +#define PRODUCT traveller +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D3, D2 } + // no I can't say why this order seemed like a good idea +#define MATRIX_COL_PINS { B5, D6, B7, B6, F6, B1, B3, F7, B4, E6, D7, C6, D4 } +#define UNUSED_PINS + +// LED stuff +#define RGB_DI_PIN B2 +//#define RBLIGHT_TIMER +#define RGBLED_NUM 1 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c new file mode 100644 index 000000000..13d889ab8 --- /dev/null +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -0,0 +1,305 @@ +#include "traveller.h" +#include "mousekey.h" +#include "action_layer.h" + +// 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. +#define _QW 0 +#define _LW 1 +#define _HI 2 +#define _NAV 4 +#define _CUR 5 +#define _FKEYS 6 +#define _TRNS 8 + +// We do the same trick for functions +#define RGBLED_TOGGLE 10 +#define _HIOUT 15 +#define _LWOUT 16 +// Macros +#define MDL 4 +#define MDR 5 +#define MUR 6 +#define MUL 3 + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------. .-----------------------------------------. + * | NAV | ` ~ | W | E | R | T | | Y | U | I | O | - | = | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | S | D | F | G | | H | J | K | L | P | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + *|ctrl/esc| A | X | C | V | B |Ctrl /| N | M | , | . | ; | ' | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | Shift| Z | Del | GUI | Low | Bspc |/Enter| Spc | Hi | GUI | Alt | / |Shift | + * `------------------------------------------------------------------------------------------' + * + */ +[_QW] = KEYMAP( + F(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, + CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_DEL, KC_LGUI, MO(_LW), KC_BSPC, KC_ENTER, KC_SPC, MO(_HI), KC_RGUI, KC_RALT, KC_SLSH, KC_RSFT + ), + +/* LOW - numbers, missing or awkward programming keys + Doubled 1 key allows lazy reach with ring finger. + * ,-----------------------------------------. .-----------------------------------------. + * | FKeys| 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |Ctrl-alt-del| + * |------+------+------+------+------+------| +------+------+------+------+------+------| + * | Tab | 1 | ] | ( | ) | | | * | ( | ) | [ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Caps | [ | | { | } | ` | /| # | { | } | | ] | | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | Shift| | | | Low | |/ | | Hi | | | |Shift | + * `------------------------------------------------------------------------------------------' + * + */ + +[_LW] = KEYMAP( + F(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , + KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO, + KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + +/* HI - Punctuation, shell and +url ://@.com row on bottom, && is opposite || ^$ are in regex order: ^.*$ +Right hand nav keys work pretty well chorded with the Right hand Hi Key + * ,-----------------------------------------. .-----------------------------------------. + * |FKEYS | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | ! | & | "|" | $ | % | | Vol+| Mute| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * | CAPS | ^ | : | . | * | - | /| Vol-| Play | PgUp | Home | Up | End | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | | / | | | Low | |/ | | Hi | PgDn | Left| Down | Right | + * `------------------------------------------------------------------------------------------' + * + */ + +[_HI] = KEYMAP( + F(_FKEYS), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, + KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END, + KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, F(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT +), + +/* NAV - mouse & navigation +//gui left and right are line home/end, or fore & back in browser +// Mouse buttons are reversed for comfort - bigger stretch is to the right button. + + * ,-----------------------------------------. .-----------------------------------------. +* | NAV | | | Up | |Gui-> | | MwU | MS_UL| MS_U |MS_UR | |Ms Norm| +* |------+------+------+------+------+------| |------+------+------+------+------+--------| +* | |Gui<- | Left | Down |Right | C^E | | BTN3 | MS_L |MS Up | MS_R | |Ms Fast | +* |------+------+------+------+------+------|------|------+------+------+------+------+--------| +* | | C^A | GUI X| GUI C| GUI_V| |Enter/| MWD | M_DL |MS Dwn|MS_DR | Up |Ms Slow | +* |------+------+------+------+------+------+ // +------+------+------+------+------+------| +* | | GuiZ | | | Low | |/ButnR|ButnL | Hi | | Left | Down | Right | +* `------------------------------------------------------------------------------------------' +*/ + +[_NAV] = KEYMAP( + F(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, + KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, + KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, + KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT +), + +/* FKEYS - Funtion keys & mac stuff + * ,-----------------------------------------. .-----------------------------------------. + * | FKEYS| F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | Ctrl | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | F11 | F12 | F13 | F14 | F15 | Alt | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * |Qwerty| | | | | | /| | | | | | Del | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | . |RGBTog| . | | LO | Bspc |/ | | HI | | | | | + * `------------------------------------------------------------------------------------------' + * + */ + +[_FKEYS] = KEYMAP( + F(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , + F(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + KC_TRNS, F(RGBLED_TOGGLE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS +), + + +/* TRNS - skeleton for laters + * ,-----------------------------------------. .-----------------------------------------. + * | . | . | . | . | . | . | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | . | . | . | . | . | . | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------|------+------+------+------+------+------+------| + * | . | . | . | . | . | . | /| | | | . | ; | " | + * |------+------+------+------+------+------+ // +------+------+------+------+------+------| + * | . | . | . | GUI | LO | . |/ | Spc | HI | GUI | M0 | / |LSFT | + * `------------------------------------------------------------------------------------------' + * + */ + +[_TRNS] = { + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} + } + + +}; + + +const uint16_t PROGMEM fn_actions[] = { + [_QW] = ACTION_LAYER_ON(_QW,ON_RELEASE), // return to QWERTY layer + [_LW] = ACTION_LAYER_TAP_TOGGLE(_LW), // Turn on LW when holding, or tap 3 times to switch + [_HI] = ACTION_LAYER_TAP_TOGGLE(_HI), // Turn on LW when holding, or tap 3 times to switch + [_NAV] = ACTION_LAYER_TOGGLE(_NAV), + [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS), + [_LWOUT] = ACTION_LAYER_OFF(_LW,ON_RELEASE), + [_HIOUT] = ACTION_LAYER_OFF(_HI,ON_RELEASE), + + // Functions + [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE), + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + break; + + // from algernon's ErgoDox EZ layout, + case MUL: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_LEFT); + } + mousekey_send(); + break; + + case MUR: + if (record->event.pressed) { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_RIGHT); + } else { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_RIGHT); + } + mousekey_send(); + break; + + case MDL: + if (record->event.pressed) { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_LEFT); + } else { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_LEFT); + } + mousekey_send(); + break; + + case MDR: + if (record->event.pressed) { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_RIGHT); + } else { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_RIGHT); + } + mousekey_send(); + break; + + + } + return MACRO_NONE; +}; + + + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + } +} + + + +void LayerLEDSet(uint8_t layr) { + + switch (layr) { + case _QW: + rgblight_setrgb(0,20, 0); // dim green + break; + case _LW: + // deep purple + rgblight_setrgb(20,0,35); + break; + case _HI: + // light blue + rgblight_setrgb(0,20,20); + break; + case _NAV: + // Yellowy orange + rgblight_setrgb(25,20,0); // brighter + break; + case _FKEYS: + // RED + rgblight_setrgb(20,0,0); // brighter + break; + default: + rgblight_setrgb(20,2,20);//error + break; + } + + return; + +} + +void matrix_init_user(void) { +} + +// Bleah globals need to be initialized. +uint8_t old_layer=_QW; + +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + if (old_layer != layer) { + LayerLEDSet(layer); + old_layer=layer; + } +} + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + + diff --git a/keyboards/handwired/traveller/keymaps/default/readme.md b/keyboards/handwired/traveller/keymaps/default/readme.md new file mode 100644 index 000000000..7ddc40b3c --- /dev/null +++ b/keyboards/handwired/traveller/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for handwired/traveller +this is a kitchen sink build diff --git a/keyboards/handwired/traveller/readme.md b/keyboards/handwired/traveller/readme.md new file mode 100644 index 000000000..646844b1d --- /dev/null +++ b/keyboards/handwired/traveller/readme.md @@ -0,0 +1,35 @@ +traveler keyboard firmware +====================== + +## Traveller Specific Info ## +The traveller is a varient on the atreus keyboard. +Like the Atreus, it is designed to be a good compromise between size and ergonomics. + +key differences are +- an additional column for each pinky +- an RGB LED in the center to show the current layer +- more finger stagger, splay angle and contoured keycaps (F2 profile for space key). + +You can make your own traveller keyboard by using the openscad tools from the atreus repository, and adding a hole for the LED to shine through. + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent README.md](/README.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboard/traveler folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top README.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|] +``` +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/handwired/traveller/traveller.c b/keyboards/handwired/traveller/traveller.c new file mode 100644 index 000000000..9d2534130 --- /dev/null +++ b/keyboards/handwired/traveller/traveller.c @@ -0,0 +1,61 @@ +#include "traveller.h" + +__attribute__ ((weak)) +void matrix_init_user(void) { + // leave this function blank - it can be defined in a keymap file +}; + +__attribute__ ((weak)) +void matrix_scan_user(void) { + // leave this function blank - it can be defined in a keymap file +} + +__attribute__ ((weak)) +void process_action_user(keyrecord_t *record) { + // leave this function blank - it can be defined in a keymap file +} + +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + // leave this function blank - it can be defined in a keymap file +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + +#ifdef RGBLIGHT_ENABLE + rgblight_init(); + rgblight_mode(1); // solid, no timer + rgblight_setrgb(0,20,0);// dim green, happens to be same as _QW +#endif + +// Turn status LED on + DDRC |= (1<<7); + PORTC |= (1<<7); + + matrix_init_user(); +} + + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} + + diff --git a/keyboards/handwired/traveller/traveller.h b/keyboards/handwired/traveller/traveller.h new file mode 100644 index 000000000..972a1a94a --- /dev/null +++ b/keyboards/handwired/traveller/traveller.h @@ -0,0 +1,32 @@ +#ifndef TRAVELLER_H +#define TRAVELLER_H + +#include "quantum.h" +#include "led.h" + +#ifdef RGBLIGHT_ENABLE + #include "rgblight.h" +#endif +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif + + + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define KEYMAP( \ + k00, k01, k02, k03, k04, k05, k07, k08, k09, k0a, k0b, k0c, \ + k10, k11, k12, k13, k14, k15, k17, k18, k19, k1a, k1b, k1c, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, KC_NO, k07, k08, k09, k0a, k0b, k0c }, \ + { k10, k11, k12, k13, k14, k15, KC_NO, k17, k18, k19, k1a, k1b, k1c }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c } \ +} + +#endif -- cgit v1.2.3 From 959c48e146ec3c2192e8d261d78d27b80342ad30 Mon Sep 17 00:00:00 2001 From: di0ib Date: Sun, 14 Aug 2016 14:13:58 -1000 Subject: moved to handwired folder --- keyboards/handwired/minorca/Makefile | 71 ++++++++++++++++++ keyboards/handwired/minorca/config.h | 80 +++++++++++++++++++++ .../handwired/minorca/keymaps/default/Makefile | 25 +++++++ .../handwired/minorca/keymaps/default/config.h | 12 ++++ .../handwired/minorca/keymaps/default/keymap.c | 44 ++++++++++++ .../handwired/minorca/keymaps/default/readme.md | 5 ++ keyboards/handwired/minorca/keymaps/readme.md | 23 ++++++ keyboards/handwired/minorca/keymaps/rgb/Makefile | 25 +++++++ keyboards/handwired/minorca/keymaps/rgb/config.h | 20 ++++++ .../handwired/minorca/keymaps/rgb/example.jpg | Bin 0 -> 72737 bytes keyboards/handwired/minorca/keymaps/rgb/keymap.c | 65 +++++++++++++++++ keyboards/handwired/minorca/keymaps/rgb/readme.md | 25 +++++++ .../handwired/minorca/keymaps/rgb/wiring1.jpg | Bin 0 -> 119547 bytes .../handwired/minorca/keymaps/rgb/wiring2.jpg | Bin 0 -> 94987 bytes keyboards/handwired/minorca/minorca.c | 6 ++ keyboards/handwired/minorca/minorca.h | 6 ++ keyboards/handwired/minorca/readme.md | 33 +++++++++ 17 files changed, 440 insertions(+) create mode 100644 keyboards/handwired/minorca/Makefile create mode 100644 keyboards/handwired/minorca/config.h create mode 100644 keyboards/handwired/minorca/keymaps/default/Makefile create mode 100644 keyboards/handwired/minorca/keymaps/default/config.h create mode 100644 keyboards/handwired/minorca/keymaps/default/keymap.c create mode 100644 keyboards/handwired/minorca/keymaps/default/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/rgb/Makefile create mode 100644 keyboards/handwired/minorca/keymaps/rgb/config.h create mode 100644 keyboards/handwired/minorca/keymaps/rgb/example.jpg create mode 100644 keyboards/handwired/minorca/keymaps/rgb/keymap.c create mode 100644 keyboards/handwired/minorca/keymaps/rgb/readme.md create mode 100644 keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg create mode 100644 keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg create mode 100644 keyboards/handwired/minorca/minorca.c create mode 100644 keyboards/handwired/minorca/minorca.h create mode 100644 keyboards/handwired/minorca/readme.md (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/minorca/Makefile b/keyboards/handwired/minorca/Makefile new file mode 100644 index 000000000..155c1f9a2 --- /dev/null +++ b/keyboards/handwired/minorca/Makefile @@ -0,0 +1,71 @@ +# 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=512 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h new file mode 100644 index 000000000..4cdafcbd2 --- /dev/null +++ b/keyboards/handwired/minorca/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6660 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ME +#define PRODUCT MinOrca +#define DESCRIPTION Tiny Whale + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* MinOrca PCB default pin-out */ +#define MATRIX_COL_PINS { D4, D6, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define MATRIX_ROW_PINS { B0, B1, B2, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/minorca/keymaps/default/Makefile b/keyboards/handwired/minorca/keymaps/default/Makefile new file mode 100644 index 000000000..a573488a5 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../../Makefile +endif diff --git a/keyboards/handwired/minorca/keymaps/default/config.h b/keyboards/handwired/minorca/keymaps/default/config.h new file mode 100644 index 000000000..bf40376c1 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +#endif diff --git a/keyboards/handwired/minorca/keymaps/default/keymap.c b/keyboards/handwired/minorca/keymaps/default/keymap.c new file mode 100644 index 000000000..a55d578e4 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/keymap.c @@ -0,0 +1,44 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "minorca.h" +#include "action_layer.h" +#include "eeconfig.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. + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = { /* Base */ + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_ENT }, + {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_QUOT, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, KC_SPC, XXXXXXX, XXXXXXX, KC_SPC, XXXXXXX, KC_DOT, KC_SLSH, KC_NO } + }, + [1] = { /* First */ + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, + {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, XXXXXXX, KC_LGUI }, + {KC_LCTRL,XXXXXXX, KC_Z, KC_X, KC_C, KC_PGDN, KC_END, KC_L, KC_SCLN, KC_UP, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } + }, + [2] = { /* Second */ + {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, + {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, XXXXXXX, KC_ENT }, + {KC_CAPS, XXXXXXX, KC_LSFT, KC_RSFT, KC_PAUSE,KC_F10, KC_F11, KC_F12, KC_NO, KC_UP, KC_FN1, KC_FN0 }, + {KC_NO, XXXXXXX, KC_NO, KC_LALT, _______, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_DOWN, KC_RIGHT,KC_NO } + }, +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), // to First overlay + [1] = ACTION_LAYER_MOMENTARY(2), // to Second overlay + +}; \ No newline at end of file diff --git a/keyboards/handwired/minorca/keymaps/default/readme.md b/keyboards/handwired/minorca/keymaps/default/readme.md new file mode 100644 index 000000000..6ed31f82b --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# The Default Minorca Layout + +Copied from https://github.com/pancinteractive/qmk_firmware/blob/master/keyboard/minorca_mkV/keymaps/default/keymap.c + +It looks incomplete. \ No newline at end of file diff --git a/keyboards/handwired/minorca/keymaps/readme.md b/keyboards/handwired/minorca/keymaps/readme.md new file mode 100644 index 000000000..058923ba2 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/readme.md @@ -0,0 +1,23 @@ +# How to add your own keymap + +Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: + + _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] + +\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements + +and contain the following files: + +* `keymap.c` +* `readme.md` *recommended* +* `config.h` *optional*, found automatically when compiling +* `Makefile` *optional*, found automatically when compling + +When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: + + * **folder_name** description + +# List of Minorca keymaps + +* **default** default Minorca layout +* **rgb** layout with WS2812b control diff --git a/keyboards/handwired/minorca/keymaps/rgb/Makefile b/keyboards/handwired/minorca/keymaps/rgb/Makefile new file mode 100644 index 000000000..2b2af1335 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../../Makefile +endif diff --git a/keyboards/handwired/minorca/keymaps/rgb/config.h b/keyboards/handwired/minorca/keymaps/rgb/config.h new file mode 100644 index 000000000..deaac2e26 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/config.h @@ -0,0 +1,20 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* bootmagic salt key */ +#define BOOTMAGIC_KEY_SALT KC_ESC + +/* skip bootmagic and eeconfig */ +#define BOOTMAGIC_KEY_SKIP KC_SPACE + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D5 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 13 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#endif diff --git a/keyboards/handwired/minorca/keymaps/rgb/example.jpg b/keyboards/handwired/minorca/keymaps/rgb/example.jpg new file mode 100644 index 000000000..a04c8d37d Binary files /dev/null and b/keyboards/handwired/minorca/keymaps/rgb/example.jpg differ diff --git a/keyboards/handwired/minorca/keymaps/rgb/keymap.c b/keyboards/handwired/minorca/keymaps/rgb/keymap.c new file mode 100644 index 000000000..9002afbb8 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/keymap.c @@ -0,0 +1,65 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "minorca.h" +#include "action_layer.h" +#include "eeconfig.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 _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _TB 3 + +// Macro name shortcuts +#define QWERTY M(_QWERTY) +#define LOWER M(_LOWER) +#define RAISE M(_RAISE) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = { /* Qwerty */ + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {FUNC(0), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, XXXXXXX, KC_QUOT}, + {KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, FUNC(1)}, + {KC_LCTL, XXXXXXX, KC_LGUI, KC_LALT, FUNC(2), XXXXXXX, XXXXXXX, FUNC(3), XXXXXXX, KC_RALT, KC_APP, KC_RCTL} +}, + +[_RAISE] = { + {S(KC_GRV), S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), KC_BSPC}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUSE, KC_TRNS, KC_TRNS, KC_TRNS, S(KC_MINS), S(KC_EQL), S(KC_LBRC), XXXXXXX, S(KC_BSLS)}, + {KC_TRNS, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_ENT}, + {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_MNXT, KC_MUTE, KC_MPLY} +}, + +[_LOWER] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELETE}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_LBRC, XXXXXXX, KC_BSLS}, + {KC_TRNS, XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_PGUP, KC_ENT}, + {KC_TRNS, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_HOME, KC_PGDN, KC_END} +}, + +[_TB] = { /* Tab */ + {KC_ESC, KC_CALC, KC_WHOM, KC_MAIL, KC_MYCM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, KC_TRNS}, + {KC_TRNS, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_UP, KC_ENT}, + {BL_STEP, XXXXXXX, KC_TRNS, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, KC_TRNS, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT} +} +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_TAP_KEY(_TB, KC_TAB), + [1] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), + [2] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), + [3] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), +}; diff --git a/keyboards/handwired/minorca/keymaps/rgb/readme.md b/keyboards/handwired/minorca/keymaps/rgb/readme.md new file mode 100644 index 000000000..f50dfa546 --- /dev/null +++ b/keyboards/handwired/minorca/keymaps/rgb/readme.md @@ -0,0 +1,25 @@ +#RGB backlight for MinOrca + +![wiring](example.jpg) + +Example of adding WS2812b LEDs to a MinOrca. + +http://www.40percent.club/2016/08/tiny-whale.html + +The keymap is a work in progress. The RGB functions are accessed by holding down the TAB key. + +* Tab + Z Toggle on/off +* Tab + X Mode +* Tab + C Hue+ +* Tab + V Hue- +* Tab + B Saturation+ +* Tab + N Saturation- +* Tab + M Brightness+ +* Tab + , Brightness- + +Example wiring: + +WS2812 data pin is connected to D5 + +![wiring](wiring1.jpg) +![wiring closeup](wiring2.jpg) diff --git a/keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg b/keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg new file mode 100644 index 000000000..7dcbe80c5 Binary files /dev/null and b/keyboards/handwired/minorca/keymaps/rgb/wiring1.jpg differ diff --git a/keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg b/keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg new file mode 100644 index 000000000..fd91d3e1c Binary files /dev/null and b/keyboards/handwired/minorca/keymaps/rgb/wiring2.jpg differ diff --git a/keyboards/handwired/minorca/minorca.c b/keyboards/handwired/minorca/minorca.c new file mode 100644 index 000000000..24e72c2a5 --- /dev/null +++ b/keyboards/handwired/minorca/minorca.c @@ -0,0 +1,6 @@ +#include "minorca.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} \ No newline at end of file diff --git a/keyboards/handwired/minorca/minorca.h b/keyboards/handwired/minorca/minorca.h new file mode 100644 index 000000000..158e5b4c5 --- /dev/null +++ b/keyboards/handwired/minorca/minorca.h @@ -0,0 +1,6 @@ +#ifndef MINORCA_H +#define MINORCA_H + +#include "quantum.h" + +#endif diff --git a/keyboards/handwired/minorca/readme.md b/keyboards/handwired/minorca/readme.md new file mode 100644 index 000000000..93c767954 --- /dev/null +++ b/keyboards/handwired/minorca/readme.md @@ -0,0 +1,33 @@ +minorca keyboard firmware +====================== +Handwired 40% keyboard + +http://www.panc.co/blog/minorcasebright-information-page + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|] +``` +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. + +### Notable forks (which some of the keymap files are from) +- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) +- [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) +- [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) +- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) -- cgit v1.2.3 From 44441de8cad7255fd0637459ed39b89e34751b78 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 7 Aug 2016 17:04:39 +0300 Subject: Split keyboard makefiles into rules and Makefile --- keyboards/handwired/Makefile | 2 +- keyboards/handwired/onekey/Makefile | 66 ++----------------------------------- keyboards/handwired/rules.mk | 0 3 files changed, 3 insertions(+), 65 deletions(-) create mode 100644 keyboards/handwired/rules.mk (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/Makefile b/keyboards/handwired/Makefile index 57493a47c..4e2a6f00f 100644 --- a/keyboards/handwired/Makefile +++ b/keyboards/handwired/Makefile @@ -1,3 +1,3 @@ -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/onekey/Makefile b/keyboards/handwired/onekey/Makefile index c6d10856a..4e2a6f00f 100644 --- a/keyboards/handwired/onekey/Makefile +++ b/keyboards/handwired/onekey/Makefile @@ -1,65 +1,3 @@ - - -# 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) - -# 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 ?= no # 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 -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - -ifndef QUANTUM_DIR - include ../../../Makefile +ifndef MAKEFILE_INCLUDED + include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/rules.mk b/keyboards/handwired/rules.mk new file mode 100644 index 000000000..e69de29bb -- cgit v1.2.3 From 051017c3129a17a1f4c610f19067c60bf0a49da9 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 7 Aug 2016 18:38:03 +0300 Subject: Split subproject make files into Makefile and rules.mk --- keyboards/handwired/CMD60/Makefile | 74 +------------------------ keyboards/handwired/CMD60/rules.mk | 73 +++++++++++++++++++++++++ keyboards/handwired/fivethirteen/Makefile | 74 +------------------------ keyboards/handwired/fivethirteen/rules.mk | 73 +++++++++++++++++++++++++ keyboards/handwired/minorca/Makefile | 70 +----------------------- keyboards/handwired/minorca/rules.mk | 67 +++++++++++++++++++++++ keyboards/handwired/onekey/Makefile | 2 +- keyboards/handwired/onekey/rules.mk | 65 ++++++++++++++++++++++ keyboards/handwired/traveller/Makefile | 90 +------------------------------ keyboards/handwired/traveller/rules.mk | 89 ++++++++++++++++++++++++++++++ 10 files changed, 375 insertions(+), 302 deletions(-) create mode 100644 keyboards/handwired/CMD60/rules.mk create mode 100644 keyboards/handwired/fivethirteen/rules.mk create mode 100644 keyboards/handwired/minorca/rules.mk create mode 100644 keyboards/handwired/onekey/rules.mk create mode 100644 keyboards/handwired/traveller/rules.mk (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/CMD60/Makefile b/keyboards/handwired/CMD60/Makefile index 711759917..191c6bb66 100644 --- a/keyboards/handwired/CMD60/Makefile +++ b/keyboards/handwired/CMD60/Makefile @@ -1,73 +1,3 @@ - -# 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) - -# 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=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/handwired/CMD60/rules.mk b/keyboards/handwired/CMD60/rules.mk new file mode 100644 index 000000000..711759917 --- /dev/null +++ b/keyboards/handwired/CMD60/rules.mk @@ -0,0 +1,73 @@ + +# 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) + +# 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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + + diff --git a/keyboards/handwired/fivethirteen/Makefile b/keyboards/handwired/fivethirteen/Makefile index 711759917..191c6bb66 100644 --- a/keyboards/handwired/fivethirteen/Makefile +++ b/keyboards/handwired/fivethirteen/Makefile @@ -1,73 +1,3 @@ - -# 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) - -# 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=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk new file mode 100644 index 000000000..711759917 --- /dev/null +++ b/keyboards/handwired/fivethirteen/rules.mk @@ -0,0 +1,73 @@ + +# 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) + +# 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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + + diff --git a/keyboards/handwired/minorca/Makefile b/keyboards/handwired/minorca/Makefile index 155c1f9a2..191c6bb66 100644 --- a/keyboards/handwired/minorca/Makefile +++ b/keyboards/handwired/minorca/Makefile @@ -1,71 +1,3 @@ -# 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=512 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -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 ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk new file mode 100644 index 000000000..c51371a78 --- /dev/null +++ b/keyboards/handwired/minorca/rules.mk @@ -0,0 +1,67 @@ +# 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=512 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +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 ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/handwired/onekey/Makefile b/keyboards/handwired/onekey/Makefile index 4e2a6f00f..191c6bb66 100644 --- a/keyboards/handwired/onekey/Makefile +++ b/keyboards/handwired/onekey/Makefile @@ -1,3 +1,3 @@ ifndef MAKEFILE_INCLUDED - include ../../Makefile + include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk new file mode 100644 index 000000000..c6d10856a --- /dev/null +++ b/keyboards/handwired/onekey/rules.mk @@ -0,0 +1,65 @@ + + +# 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) + +# 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 ?= no # 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 +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/traveller/Makefile b/keyboards/handwired/traveller/Makefile index 12a4b71f4..191c6bb66 100644 --- a/keyboards/handwired/traveller/Makefile +++ b/keyboards/handwired/traveller/Makefile @@ -1,89 +1,3 @@ - -#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 - -# for avr upload -USB ?= /dev/cu.usbmodem1421 -# -# 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) - - -ifdef TEENSY2 - OPT_DEFS += -DATREUS_TEENSY2 - ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex -else - OPT_DEFS += -DATREUS_ASTAR - OPT_DEFS += -DCATERINA_BOOTLOADER - ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) -endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# MCU name - -# 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 -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 -RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - -upload: build - $(ATREUS_UPLOAD_COMMAND) - +endif \ No newline at end of file diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk new file mode 100644 index 000000000..12a4b71f4 --- /dev/null +++ b/keyboards/handwired/traveller/rules.mk @@ -0,0 +1,89 @@ + +#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 + +# for avr upload +USB ?= /dev/cu.usbmodem1421 +# +# 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) + + +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else + OPT_DEFS += -DATREUS_ASTAR + OPT_DEFS += -DCATERINA_BOOTLOADER + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) +endif +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# MCU name + +# 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 +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +upload: build + $(ATREUS_UPLOAD_COMMAND) + -- cgit v1.2.3 From 9c574b493c3d098d2c4f2475dfc1564a182acce0 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 13 Sep 2016 22:05:10 -0500 Subject: Changed Docs, Moved RetroRefit to Handwired --- keyboards/handwired/retro_refit/Makefile | 3 + keyboards/handwired/retro_refit/config.h | 123 +++++++++++++++++++++ .../handwired/retro_refit/keymaps/default/keymap.c | 33 ++++++ keyboards/handwired/retro_refit/readme.md | 60 ++++++++++ keyboards/handwired/retro_refit/retro_refit.c | 47 ++++++++ keyboards/handwired/retro_refit/retro_refit.h | 38 +++++++ keyboards/handwired/retro_refit/rules.mk | 68 ++++++++++++ 7 files changed, 372 insertions(+) create mode 100644 keyboards/handwired/retro_refit/Makefile create mode 100644 keyboards/handwired/retro_refit/config.h create mode 100644 keyboards/handwired/retro_refit/keymaps/default/keymap.c create mode 100644 keyboards/handwired/retro_refit/readme.md create mode 100644 keyboards/handwired/retro_refit/retro_refit.c create mode 100644 keyboards/handwired/retro_refit/retro_refit.h create mode 100644 keyboards/handwired/retro_refit/rules.mk (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/retro_refit/Makefile b/keyboards/handwired/retro_refit/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/retro_refit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h new file mode 100644 index 000000000..f2194e550 --- /dev/null +++ b/keyboards/handwired/retro_refit/config.h @@ -0,0 +1,123 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Nobody +#define PRODUCT retro_refit +#define DESCRIPTION Retro Refit + +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 8 + +// See note in retro_refit.h for an explanation of how this matrix is wired up +#define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* 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 + + +/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ +#define FORCE_NKRO + +/* + * Magic key options + * These options allow the magic key functionality to be changed. This is useful + * if your keyboard/keypad is missing keys and you want magic key support. + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* remap magic keys */ +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +#define MAGIC_KEY_LOCK BSLS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c new file mode 100644 index 000000000..405402d5e --- /dev/null +++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "retro_refit.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = + KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ + BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ + LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/handwired/retro_refit/readme.md b/keyboards/handwired/retro_refit/readme.md new file mode 100644 index 000000000..9f10edf9f --- /dev/null +++ b/keyboards/handwired/retro_refit/readme.md @@ -0,0 +1,60 @@ +retro_refit keyboard firmware +====================== + +## Keyboard Info + +The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop". + +http://imgur.com/a/08Fyj + +This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow". + +The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y. + +``` +#define KEYMAP( \ + K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ + K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ + K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ + K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ + K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ + K10, K06, K25, K07, K86, K85, K95, K90, K93 \ +) { \ +{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ +{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ +{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ +{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ +{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ +{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \ +{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \ +{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ +{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ +{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ +{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ +} +``` + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make default`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c new file mode 100644 index 000000000..3d610eba3 --- /dev/null +++ b/keyboards/handwired/retro_refit/retro_refit.c @@ -0,0 +1,47 @@ +#include "retro_refit.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS) + DDRD |= (1<<6); + PORTD |= (1<<6); + + matrix_init_user(); +}; + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (usb_led & (1< Date: Mon, 3 Oct 2016 08:59:50 +0000 Subject: moved folder, update readme --- keyboards/handwired/gamenum/Makefile | 73 ++++++++++ keyboards/handwired/gamenum/README.md | 92 ++++++++++++ keyboards/handwired/gamenum/config.h | 162 +++++++++++++++++++++ keyboards/handwired/gamenum/gamenum.c | 14 ++ keyboards/handwired/gamenum/gamenum.h | 21 +++ .../handwired/gamenum/keymaps/default/keymap.c | 68 +++++++++ 6 files changed, 430 insertions(+) create mode 100644 keyboards/handwired/gamenum/Makefile create mode 100644 keyboards/handwired/gamenum/README.md create mode 100644 keyboards/handwired/gamenum/config.h create mode 100644 keyboards/handwired/gamenum/gamenum.c create mode 100644 keyboards/handwired/gamenum/gamenum.h create mode 100644 keyboards/handwired/gamenum/keymaps/default/keymap.c (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile new file mode 100644 index 000000000..afb9372e1 --- /dev/null +++ b/keyboards/handwired/gamenum/Makefile @@ -0,0 +1,73 @@ + +# 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) + +# 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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md new file mode 100644 index 000000000..22f67ee61 --- /dev/null +++ b/keyboards/handwired/gamenum/README.md @@ -0,0 +1,92 @@ +GameNum firmware +====================== +## Board overview + +The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. +The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. +The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. + +The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. + +## Build conciderations + +Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. +Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. +The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. +'+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. + +Schematic of the build is coming soon. + +## Adding more layers + +Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. + +Next thing to do is to add the actual layer for the keymap. + +``` +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +) +``` + +This is the default layer for the gamenum. It's generally easiest to just copy this and change things as you see fit. Keep in mind that at least 1 button on the pad has to be used to switch to the next layer in the stack or you will be stuck in that layer FOREVER! D: +In the case of DEF this is key `KC_FN0`. Also keep in mind that the last layer that you add does not have a comma after its closing bracket but any other layer does! + +Which brings us nicely to the next part, the layer switching logic. Under the keymaps look for `PROGMEM fn_actions[]` this function handles the switching between layers, as you might have noticed every layer in the keymap has its own KC_FNx key. This is the key responsible for switching you from layer to layer. +The number that is at the end of the keycode corresponds with the code in the function. +`[0] = ACTION_LAYER_SET(HDN, ON_PRESS),` When `KC_FN0` is pressed the keyboard switches layer `HDN` on when the key is pressed down. Add an extra line for your layer here as well. + +Now for the LEDs, if you plan on adding extra LED's to the keyboard to indicate other layers you have to first define the pin that the LED will be using in `gamenum.c`. +Look for this piece of code: + +``` + DDRD |= (1<<4); + PORTD &= ~(1<<4); +``` + +Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes low + PORTD |= (1<<4); //PD4 goes high + } + break; +``` + +This is the code for the KC_FN1 button. Notice how we check against what key is pressed in the case and then set pin C6 low and pin D4 high. Adjust this as you see fit. + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/doc/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/handwired/gamenum folder. +Read the README.md for the qmk repository on how to set up your developer enviroment to build your firmware with. +Building firmware on Windows can be a bit of a hassle. Linux is a lot easier to use if you have some experience with it. A raspberry pi will already be able to build the firmware for you. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use AVRDudess to program your .hex file. + +### Default + +To build with the default keymap, simply run `make`. + +### Other Keymaps + +To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: + +``` +$ make keymap=[default|jack|] +``` + +Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h new file mode 100644 index 000000000..6af876ab7 --- /dev/null +++ b/keyboards/handwired/gamenum/config.h @@ -0,0 +1,162 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1234 +#define PRODUCT_ID 0x5678 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Seth-Senpai +#define PRODUCT GameNum +#define DESCRIPTION Numpad with gamelayers + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B6, B2, B3, B1, F7 } +#define MATRIX_COL_PINS { D7, E6, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN C6 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/gamenum/gamenum.c b/keyboards/handwired/gamenum/gamenum.c new file mode 100644 index 000000000..8048194bb --- /dev/null +++ b/keyboards/handwired/gamenum/gamenum.c @@ -0,0 +1,14 @@ +#include "gamenum.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + DDRC |= (1<<6); + PORTC &= ~(1<<6); + + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + matrix_init_user(); + +} diff --git a/keyboards/handwired/gamenum/gamenum.h b/keyboards/handwired/gamenum/gamenum.h new file mode 100644 index 000000000..ea633b9bf --- /dev/null +++ b/keyboards/handwired/gamenum/gamenum.h @@ -0,0 +1,21 @@ +#ifndef GAMENUM_H +#define GAMENUM_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, \ + k41, k42, k43 \ +) \ +{ \ + { k00, k01, k02, k03}, \ + { k10, k11, k12, k13}, \ + { k20, k21, k22, KC_NO}, \ + { k30, k31, k32, KC_NO}, \ + { KC_NO, k41, k42, k43} \ +} + +#endif diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c new file mode 100644 index 000000000..6950b741a --- /dev/null +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -0,0 +1,68 @@ +#include "gamenum.h" +#include "action_layer.h" +#include "eeconfig.h" + + +#define _______ KC_TRNS + +#define DEF 0 +#define HDN 1 +#define OSY 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[DEF] = KEYMAP( + KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + KC_7, KC_8, KC_9, KC_PLUS, \ + KC_4, KC_5, KC_6, \ + KC_1, KC_2, KC_3, \ + KC_0, KC_DOT, KC_ENT \ +), +[HDN] = KEYMAP( + KC_FN1, KC_1, KC_2, KC_3, \ + KC_Q, KC_W, KC_E, KC_R, \ + KC_A, KC_S, KC_D, \ + KC_Z, KC_X, KC_C, \ + KC_LSFT, KC_LALT, KC_SPC \ +), +[OSY] = KEYMAP( + KC_A, KC_Q, KC_1, KC_FN2, \ + KC_S, KC_W, KC_2, KC_LALT, \ + KC_D, KC_E, KC_3, \ + KC_F, KC_R, KC_4, \ + KC_SPC, KC_T, KC_TAB \ +) +}; + + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_SET(HDN, ON_PRESS), + [1] = ACTION_LAYER_SET(OSY, ON_PRESS), + [2] = ACTION_LAYER_SET(DEF, ON_PRESS), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_FN0: + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + break; + case KC_FN1: + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + break; + case KC_FN2: + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3 From 0f06e94d5d8a07d0d896bf2cc72058ae11d17450 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 09:07:37 +0000 Subject: update readme --- keyboards/handwired/gamenum/README.md | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md index 22f67ee61..9e22ff2fc 100644 --- a/keyboards/handwired/gamenum/README.md +++ b/keyboards/handwired/gamenum/README.md @@ -2,14 +2,14 @@ GameNum firmware ====================== ## Board overview -The GameNum was designed to facilitate the use of mechanical keys for gameing even when your packing space is limited. +The GameNum was designed to facilitate the use of mechanical keys for gaming even when your packing space is limited. It uses a standard numpad layout replacing the NumLock key with a layer toggle that allows you to cycle through the different layers. The standard layout features a default layer that acts as a standard numpad, a layer that was meant for simple WASD based games and a layer that was designed to be used for MOBA/RTS related games. The RTS layer is meant to be used rotating the device 90 degrees counterclockwise. The README.MD for this board is reasonably extensive and in-depth because the build is quite small and covers a lot of things that I feel that it would be a good starting point for getting into QMK. -## Build conciderations +## Build considerations Since the GameNum is handwired and uses 2 of its pins to toggle indicator lights there are some things to keep in mind. Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. @@ -20,7 +20,7 @@ Schematic of the build is coming soon. ## Adding more layers -Adding aditional layers is pretty straight foreward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. +Adding additional layers is pretty straight forward. Look in `keymaps/default/keymap.c` and find `#define OSY 2` add a new definition for the layer you are going to add. This can be named pretty much anything. Example: `#define NAMEHERE 3`. Keep in mind here that the number after the name should correspond with the number that the layer has in the stack of layers. Next thing to do is to add the actual layer for the keymap. @@ -50,9 +50,9 @@ Look for this piece of code: PORTD &= ~(1<<4); ``` -Copy it and change the letter after DDR and PORT to the letter of your pin. Change the 4 to the number of your pin. `DDRx |= (1<] ``` Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` + + -- cgit v1.2.3 From 0e2786e39602bdfcdb8aa567eaf769c700a1b3db Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Mon, 3 Oct 2016 18:27:52 +0000 Subject: updated readme with images --- keyboards/handwired/gamenum/README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/gamenum/README.md b/keyboards/handwired/gamenum/README.md index 9e22ff2fc..5b53004ef 100644 --- a/keyboards/handwired/gamenum/README.md +++ b/keyboards/handwired/gamenum/README.md @@ -16,7 +16,15 @@ Firmware was build for use with a Pro Micro based on a ATMEGA32u4 at 16mHz. The indicator LED's are normally assigned to `pin C6` and `pin D4`, C6 goes high when the first layer is used, D4 goes high when layer 2 is used. Both LED's are off when the default layer is enabled. '+' of the LED goes to the respective pins and can be joined together on the '-' into a resistor that runs to the ground pin of the pro micro. With a standard LED a resistor value of 100 ohm is fine, keep in mind that you cannot use high powered LEDS on these pins without ruining your pro micro. -Schematic of the build is coming soon. +## schematic of the switches and diodes + +![schematic overview](http://i.imgur.com/fleitoA.jpg) + +Keep in mind that the minus of the diodes should point towards the pro micros inputs. + +##LED hookup + +![led overview](http://i.imgur.com/U6m865n.jpg) ## Adding more layers -- cgit v1.2.3 From aac3ba61a5a82d051f5def03884877c5e44db4da Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Tue, 4 Oct 2016 07:52:13 +0000 Subject: added rules.mk --- keyboards/handwired/gamenum/rules.mk | 73 ++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 keyboards/handwired/gamenum/rules.mk (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/gamenum/rules.mk b/keyboards/handwired/gamenum/rules.mk new file mode 100644 index 000000000..afb9372e1 --- /dev/null +++ b/keyboards/handwired/gamenum/rules.mk @@ -0,0 +1,73 @@ + +# 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) + +# 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=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # 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 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../Makefile +endif + + -- cgit v1.2.3 From b7442999dff637696842f272edca870f8e2f64e4 Mon Sep 17 00:00:00 2001 From: SethSenpai Date: Tue, 4 Oct 2016 07:58:28 +0000 Subject: updated the wrong makefile like a dummy --- keyboards/handwired/gamenum/Makefile | 76 ++---------------------------------- 1 file changed, 3 insertions(+), 73 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/gamenum/Makefile b/keyboards/handwired/gamenum/Makefile index afb9372e1..191c6bb66 100644 --- a/keyboards/handwired/gamenum/Makefile +++ b/keyboards/handwired/gamenum/Makefile @@ -1,73 +1,3 @@ - -# 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) - -# 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=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # 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 -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../Makefile -endif - - +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3 From 3774a7fcdab5544fc787f4c200be05fcd417e31f Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 17 Nov 2016 17:42:14 -0500 Subject: rgb light through midi --- keyboards/handwired/minorca/keymaps/rgb/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/minorca/keymaps/rgb/config.h b/keyboards/handwired/minorca/keymaps/rgb/config.h index deaac2e26..43b3c5911 100644 --- a/keyboards/handwired/minorca/keymaps/rgb/config.h +++ b/keyboards/handwired/minorca/keymaps/rgb/config.h @@ -11,7 +11,7 @@ /* ws2812 RGB LED */ #define RGB_DI_PIN D5 -#define RGBLIGHT_TIMER +#define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 13 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -- cgit v1.2.3 From 8ee389c9b6e6757c228534b095e609d5a9501102 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 26 Nov 2016 13:11:40 +0700 Subject: My Promethium keyboard firmware --- keyboards/handwired/promethium/Makefile | 3 + keyboards/handwired/promethium/config.h | 164 +++++ .../handwired/promethium/keymaps/priyadi/Makefile | 28 + .../handwired/promethium/keymaps/priyadi/config.h | 17 + .../handwired/promethium/keymaps/priyadi/flash.sh | 3 + .../handwired/promethium/keymaps/priyadi/keymap.c | 725 +++++++++++++++++++++ .../handwired/promethium/keymaps/priyadi/readme.md | 0 keyboards/handwired/promethium/keymaps/readme.md | 22 + keyboards/handwired/promethium/promethium.c | 6 + keyboards/handwired/promethium/promethium.h | 99 +++ keyboards/handwired/promethium/readme.md | 12 + keyboards/handwired/promethium/rgbsps.c | 24 + keyboards/handwired/promethium/rgbsps.h | 4 + keyboards/handwired/promethium/rules.mk | 75 +++ 14 files changed, 1182 insertions(+) create mode 100644 keyboards/handwired/promethium/Makefile create mode 100644 keyboards/handwired/promethium/config.h create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/Makefile create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/config.h create mode 100755 keyboards/handwired/promethium/keymaps/priyadi/flash.sh create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/keymap.c create mode 100644 keyboards/handwired/promethium/keymaps/priyadi/readme.md create mode 100644 keyboards/handwired/promethium/keymaps/readme.md create mode 100644 keyboards/handwired/promethium/promethium.c create mode 100644 keyboards/handwired/promethium/promethium.h create mode 100644 keyboards/handwired/promethium/readme.md create mode 100644 keyboards/handwired/promethium/rgbsps.c create mode 100644 keyboards/handwired/promethium/rgbsps.h create mode 100644 keyboards/handwired/promethium/rules.mk (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/Makefile b/keyboards/handwired/promethium/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/promethium/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h new file mode 100644 index 000000000..5a2afe6ab --- /dev/null +++ b/keyboards/handwired/promethium/config.h @@ -0,0 +1,164 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6660 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Priyadi +#define PRODUCT Promethium Keyboard +#define DESCRIPTION Promethium Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* default pin-out */ +#define MATRIX_COL_PINS { B6, B7, D6, C7, F6, F7 } +#define MATRIX_ROW_PINS { D7, C6, D0, D1, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* 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) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* PS/2 mouse */ +#ifdef PS2_USE_BUSYWAIT +# define PS2_CLOCK_PORT PORTD +# define PS2_CLOCK_PIN PIND +# define PS2_CLOCK_DDR DDRD +# define PS2_CLOCK_BIT 1 +# define PS2_DATA_PORT PORTD +# define PS2_DATA_PIN PIND +# define PS2_DATA_DDR DDRD +# define PS2_DATA_BIT 2 +#endif + +/* PS/2 mouse interrupt version */ +#ifdef PS2_USE_INT +/* uses INT1 for clock line(ATMega32U4) */ +#define PS2_CLOCK_PORT PORTD +#define PS2_CLOCK_PIN PIND +#define PS2_CLOCK_DDR DDRD +#define PS2_CLOCK_BIT 3 +#define PS2_DATA_PORT PORTD +#define PS2_DATA_PIN PIND +#define PS2_DATA_DDR DDRD +#define PS2_DATA_BIT 2 + +#define PS2_INT_INIT() do { \ + EICRA |= ((1< | ( | ) | ' | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | _ | + | { | } | [ | ] | " | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_PUNC] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_GRV , + XXXXXXX, XXXXXXX, KC_BSLS, KC_MINS, KC_EQL, KC_LABK, KC_RABK, KC_LPRN, KC_RPRN, KC_QUOT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_LBRC, KC_RBRC, KC_DQUO, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Num + * ,-----------------------------------------------------------------------------------. + * | ^ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | @ | A | B | C | ( | ) | 4 | 5 | 6 | : |Enter | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | & | # | D | E | F | [ | ] | 1 | 2 | 3 | / | * | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | x | | | 0 | , | . | + | - | + * `-----------------------------------------------------------------------------------' + */ +[_NUM] = KEYMAP( + KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_ESC, KC_AT, S(KC_A), S(KC_B), S(KC_C), KC_LPRN, KC_RPRN, KC_4, KC_5, KC_6, KC_COLN, KC_ENT, + KC_AMPR, KC_HASH, S(KC_D), S(KC_E), S(KC_F), KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_SLSH, KC_ASTR, + _______, _______, _______, KC_X, _______, KC_SPC, KC_SPC, KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_MINS +), + +/* Func + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | | | PgUp | Up | PgDn | PgUp | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 |PrtSc | | Left | Down | Right| PgDn | Ins | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | | | | Home | End | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = KEYMAP( + XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_PGUP, KC_UP, KC_PGDN, KC_PGUP, KC_DEL, + XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8,KC_PSCREEN,XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_INS, + _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_END, XXXXXXX, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +/* Emoji + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_EMOJI] = KEYMAP( + X(HART2), X(CRY2),X(WEARY),X(EYERT),X(SMIRK), X(TJOY),X(RECYC),X(UNAMU),X(MUSIC),X(OKHND),X(PENSV), X(PHEW), + X(THMUP), X(PRAY),X(SMILE),X(SMIL2),X(FLUSH), X(GRIN),X(HEART), X(BYE), X(KISS),X(CELEB), X(COOL),X(NOEVS), + X(THMDN),X(SLEEP), X(CLAP), X(CRY), X(VIC),X(BHART), X(SUN),X(SMEYE), X(WINK), X(MOON),X(CONFU),X(NOEVH), + X(POO), X(EYES),X(HUNRD), _______,X(SKULL),X(HORNS), X(HALO), X(FEAR), _______,X(YUMMY),X(DISAP),X(NOEVK) +), + +/* GUI + * ,-----------------------------------------------------------------------------------. + * | | D1 | D2 | D3 | D4 | D5 | D6 | D7 | D8 | D9 | D10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |Linux | | Vol- | Mute | Vol+ | | | D- | | D+ | |Qwerty| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Win | | Prev | Play | Next | | | | | | |Colmak| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | OSX | | | | | BL- | BL+ | | | | |Workmn| + * `-----------------------------------------------------------------------------------' + */ +[_GUI] = KEYMAP( + _______, LGUI(KC_1),LGUI(KC_2),LGUI(KC_3),LGUI(KC_4),LGUI(KC_5),LGUI(KC_6),LGUI(KC_7),LGUI(KC_8),LGUI(KC_9),LGUI(KC_0), _______, + LINUX, _______, KC_VOLD, KC_MUTE, KC_VOLU,_______,_______,KC_WWW_BACK,_______,KC_WWW_FORWARD,_______, QWERTY, + WIN, _______, KC_MPRV, KC_MPLY, KC_MNXT, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, COLEMAK, + OSX, _______, _______, _______, _______, BL_DEC, BL_INC, _______, _______, RGB_VAI, RGB_VAD, WORKMAN +), + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_workman[][2] = SONG(DVORAK_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +float tone_linux[][2] = SONG(CAPS_LOCK_ON_SOUND); +float tone_windows[][2] = SONG(SCROLL_LOCK_ON_SOUND); +float tone_osx[][2] = SONG(NUM_LOCK_ON_SOUND); +float tone_click[][2] = SONG(MUSICAL_NOTE(_F3, 2)); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + #ifdef AUDIO_ENABLE + // faux clicky + if (record->event.pressed) PLAY_NOTE_ARRAY(tone_click, false, 0); + #endif + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case WORKMAN: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_workman, false, 0); + #endif + persistant_default_layer_set(1UL<<_WORKMAN); + } + return false; + break; + + + + case PUNC: + if (record->event.pressed) { + layer_on(_PUNC); + update_tri_layer(_PUNC, _EMOJI, _GUI); + if (IS_LAYER_ON(_GUI)) { + led_layer_gui(); + } else { + led_layer_punc();; + } + } else { + layer_off(_PUNC); + update_tri_layer(_PUNC, _EMOJI, _GUI); + if (IS_LAYER_ON(_EMOJI)) { + led_layer_emoji(); + } else { + led_layer_normal();; + } + } + return false; + break; + case EMOJI: + if (record->event.pressed) { + layer_on(_EMOJI); + update_tri_layer(_PUNC, _EMOJI, _GUI); + if (IS_LAYER_ON(_GUI)) { + led_layer_gui(); + } else { + led_layer_emoji();; + } + } else { + layer_off(_EMOJI); + update_tri_layer(_PUNC, _EMOJI, _GUI); + if (IS_LAYER_ON(_PUNC)) { + led_layer_punc(); + } else { + led_layer_normal();; + } + } + return false; + break; + case NUM: + if (record->event.pressed) { + layer_on(_NUM); + led_layer_num(); + } else { + layer_off(_NUM); + led_layer_normal(); + } + return false; + break; + case FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + led_layer_func(); + } else { + layer_off(_FUNC); + led_layer_normal(); + } + return false; + break; + + + case LINUX: + set_unicode_input_mode(UC_LNX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_linux, false, 0); + #endif + return false; + break; + case WIN: + set_unicode_input_mode(UC_WINC); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_windows, false, 0); + #endif + return false; + break; + case OSX: + set_unicode_input_mode(UC_OSX); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_osx, false, 0); + #endif + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + set_unicode_input_mode(UC_LNX); + led_init(); +} + +// void init_rgblight(void) { +// for (uint8_t i = 0; i < RGBLED_NUM; i++) { +// led[i].r = 255; +// led[i].g = 85; +// led[i].b = 0; +// } +// ws2812_setleds(led, RGBLED_NUM); +// } + + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +#endif \ No newline at end of file diff --git a/keyboards/handwired/promethium/keymaps/priyadi/readme.md b/keyboards/handwired/promethium/keymaps/priyadi/readme.md new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/handwired/promethium/keymaps/readme.md b/keyboards/handwired/promethium/keymaps/readme.md new file mode 100644 index 000000000..527691389 --- /dev/null +++ b/keyboards/handwired/promethium/keymaps/readme.md @@ -0,0 +1,22 @@ +# How to add your own keymap + +Folders can be named however you'd like (will be approved upon merging), or should follow the format with a preceding `_`: + + _[ISO 3166-1 alpha-2 code*]_[layout variant]_[layout name/author] + +\* See full list: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements + +and contain the following files: + +* `keymap.c` +* `readme.md` *recommended* +* `config.h` *optional*, found automatically when compiling +* `Makefile` *optional*, found automatically when compling + +When adding your keymap to this list, keep it organised alphabetically (select list, edit->sort lines), and use this format: + + * **folder_name** description + +# List of Promethium keymaps + + diff --git a/keyboards/handwired/promethium/promethium.c b/keyboards/handwired/promethium/promethium.c new file mode 100644 index 000000000..a0035cce1 --- /dev/null +++ b/keyboards/handwired/promethium/promethium.c @@ -0,0 +1,6 @@ +#include "promethium.h" + +void matrix_init_kb(void) { + + matrix_init_user(); +} \ No newline at end of file diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h new file mode 100644 index 000000000..fb0dc1683 --- /dev/null +++ b/keyboards/handwired/promethium/promethium.h @@ -0,0 +1,99 @@ +#ifndef PROMETHIUM_H +#define PROMETHIUM_H + +#include "quantum.h" + +#define KEYMAP( \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b, k4c \ +) \ +{ \ + {k11, k12, k13, k14, k15, k16}, \ + {k21, k22, k23, k24, k25, k26}, \ + {k31, k32, k33, k34, k35, k36}, \ + {k41, k42, k43, k44, k45, k46}, \ + {k17, k18, k19, k1a, k1b, k1c}, \ + {k27, k28, k29, k2a, k2b, k2c}, \ + {k37, k38, k39, k3a, k3b, k3c}, \ + {k47, k48, k49, k4a, k4b, k4c} \ +} + +enum led_sequence { + LED_IND_EMOJI, + LED_IND_NUM, + LED_IND_FUNC, + + LED_IND_BATTERY, + LED_IND_USB, + LED_IND_BLUETOOTH, + + LED_TAB, + LED_ESC, + LED_LSFT, + LED_LCTL, + + LED_LGUI, + LED_Z, + LED_A, + LED_Q, + + LED_W, + LED_S, + LED_X, + LED_LALT, + + LED_PUNC, + LED_C, + LED_D, + LED_E, + + LED_R, + LED_F, + LED_V, + LED_NUM, + + LED_LSPC, + LED_B, + LED_G, + LED_T, + + LED_TRACKPOINT1, + LED_TRACKPOINT2, + LED_TRACKPOINT3, + + LED_RSPC, + LED_N, + LED_HH, + LED_Y, + + LED_U, + LED_J, + LED_M, + LED_FUNC, + + LED_EMOJI, + LED_COMM, + LED_K, + LED_I, + + LED_O, + LED_L, + LED_DOT, + LED_RALT, + + LED_RGUI, + LED_SLSH, + LED_SCLN, + LED_P, + + LED_BKSP, + LED_ENT, + LED_RSFT, + LED_RCTL +}; + +#endif + + diff --git a/keyboards/handwired/promethium/readme.md b/keyboards/handwired/promethium/readme.md new file mode 100644 index 000000000..64e2c3a16 --- /dev/null +++ b/keyboards/handwired/promethium/readme.md @@ -0,0 +1,12 @@ +Promethium Keyboard Firmware +============================ +A handwired Planck based keyboard using the Adafruit Feather 32u4 Bluefruit LE controller. + +Features: + +* Single piece split form factor +* Vertical staggered +* Trackpoint +* Bluetooth LE *TBD* +* Battery +* Per switch RGB LED \ No newline at end of file diff --git a/keyboards/handwired/promethium/rgbsps.c b/keyboards/handwired/promethium/rgbsps.c new file mode 100644 index 000000000..ea922ec3f --- /dev/null +++ b/keyboards/handwired/promethium/rgbsps.c @@ -0,0 +1,24 @@ +#include "light_ws2812.h" +#include "rgbsps.h" + +struct cRGB led[RGBSPS_NUM]; + +void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b) { + led[index].r = r; + led[index].g = g; + led[index].b = b; +} + +void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b) { + for (uint16_t i = 0; i < RGBSPS_NUM; i++) { + rgbsps_set(i, r, g, b); + } +} + +void rgbsps_turnoff(void) { + rgbsps_setall(0, 0, 0); +} + +void rgbsps_send(void) { + ws2812_setleds(led, RGBSPS_NUM); +} \ No newline at end of file diff --git a/keyboards/handwired/promethium/rgbsps.h b/keyboards/handwired/promethium/rgbsps.h new file mode 100644 index 000000000..6da197f75 --- /dev/null +++ b/keyboards/handwired/promethium/rgbsps.h @@ -0,0 +1,4 @@ +void rgbsps_set(uint8_t index, uint8_t r, uint8_t g, uint8_t b); +void rgbsps_setall(uint8_t r, uint8_t g, uint8_t b); +void rgbsps_turnoff(void); +void rgbsps_send(void); \ No newline at end of file diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk new file mode 100644 index 000000000..835b13c4f --- /dev/null +++ b/keyboards/handwired/promethium/rules.mk @@ -0,0 +1,75 @@ + +# 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 = 8000000 + +# +# 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 +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # 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 +NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +UNICODEMAP_ENABLE = yes +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +PS2_MOUSE_ENABLE ?= yes +PS2_USE_INT ?= yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +include $(TMK_DIR)/protocol.mk +SRC += $(QUANTUM_DIR)/light_ws2812.c +SRC += rgbsps.c \ No newline at end of file -- cgit v1.2.3 From b5019bef055d3b3a90b8b42268b9ad874600782b Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 26 Nov 2016 13:44:50 +0700 Subject: change init delay to 2000ms --- keyboards/handwired/promethium/promethium.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index fb0dc1683..8f2a8c3be 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -3,6 +3,8 @@ #include "quantum.h" +#define PS2_INIT_DELAY 2000 + #define KEYMAP( \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ -- cgit v1.2.3 From 7f3c9c6a395a921d2914fc5cac1ac8f9441c33eb Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 26 Nov 2016 13:46:05 +0700 Subject: protocols.mk is already included in latest QMK --- keyboards/handwired/promethium/rules.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 835b13c4f..0842780cc 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -70,6 +70,5 @@ PS2_USE_INT ?= yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -include $(TMK_DIR)/protocol.mk SRC += $(QUANTUM_DIR)/light_ws2812.c SRC += rgbsps.c \ No newline at end of file -- cgit v1.2.3 From 0f39ab52192c0e34f0aea5ff6bb1fa2ded427b6e Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sat, 26 Nov 2016 13:47:03 +0700 Subject: remove ifdef on chip type --- keyboards/handwired/promethium/config.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index 5a2afe6ab..473af67d3 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -116,7 +116,6 @@ along with this program. If not, see . /* PS/2 mouse USART version */ #ifdef PS2_USE_USART -#if defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__) /* XCK for clock line and RXD for data line */ #define PS2_CLOCK_PORT PORTD #define PS2_CLOCK_PIN PIND @@ -158,7 +157,6 @@ along with this program. If not, see . #define PS2_USART_ERROR (UCSR1A & ((1< Date: Sun, 27 Nov 2016 00:40:31 +0700 Subject: update docs --- keyboards/handwired/promethium/readme.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/readme.md b/keyboards/handwired/promethium/readme.md index 64e2c3a16..e63d2f1ad 100644 --- a/keyboards/handwired/promethium/readme.md +++ b/keyboards/handwired/promethium/readme.md @@ -5,8 +5,9 @@ A handwired Planck based keyboard using the Adafruit Feather 32u4 Bluefruit LE c Features: * Single piece split form factor -* Vertical staggered +* Columnar stagger * Trackpoint * Bluetooth LE *TBD* * Battery -* Per switch RGB LED \ No newline at end of file +* Per switch RGB LED +* Proximity sensor for energy conservation *TBD* \ No newline at end of file -- cgit v1.2.3 From 75b18773bd9368ad53d7072d73a6280e053123a3 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 4 Dec 2016 14:51:27 +0700 Subject: fix RGB LED order --- keyboards/handwired/promethium/promethium.h | 108 ++++++++++++++-------------- 1 file changed, 54 insertions(+), 54 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/promethium.h b/keyboards/handwired/promethium/promethium.h index 8f2a8c3be..662eeab99 100644 --- a/keyboards/handwired/promethium/promethium.h +++ b/keyboards/handwired/promethium/promethium.h @@ -23,77 +23,77 @@ } enum led_sequence { - LED_IND_EMOJI, - LED_IND_NUM, - LED_IND_FUNC, - - LED_IND_BATTERY, - LED_IND_USB, LED_IND_BLUETOOTH, + LED_IND_USB, + LED_IND_BATTERY, - LED_TAB, - LED_ESC, - LED_LSFT, - LED_LCTL, - - LED_LGUI, - LED_Z, - LED_A, - LED_Q, + LED_IND_FUNC, + LED_IND_NUM, + LED_IND_EMOJI, - LED_W, - LED_S, - LED_X, - LED_LALT, + LED_BKSP, + LED_ENT, + LED_RSFT, + LED_RCTL, - LED_PUNC, - LED_C, - LED_D, - LED_E, + LED_RGUI, + LED_SLSH, + LED_SCLN, + LED_P, - LED_R, - LED_F, - LED_V, - LED_NUM, + LED_O, + LED_L, + LED_DOT, + LED_RALT, - LED_LSPC, - LED_B, - LED_G, - LED_T, + LED_EMOJI, + LED_COMM, + LED_K, + LED_I, - LED_TRACKPOINT1, - LED_TRACKPOINT2, - LED_TRACKPOINT3, + LED_U, + LED_J, + LED_M, + LED_FUNC, LED_RSPC, LED_N, LED_HH, LED_Y, - LED_U, - LED_J, - LED_M, - LED_FUNC, + LED_TRACKPOINT3, + LED_TRACKPOINT2, + LED_TRACKPOINT1, - LED_EMOJI, - LED_COMM, - LED_K, - LED_I, + LED_LSPC, + LED_B, + LED_G, + LED_T, - LED_O, - LED_L, - LED_DOT, - LED_RALT, + LED_R, + LED_F, + LED_V, + LED_NUM, - LED_RGUI, - LED_SLSH, - LED_SCLN, - LED_P, + LED_PUNC, + LED_C, + LED_D, + LED_E, - LED_BKSP, - LED_ENT, - LED_RSFT, - LED_RCTL + LED_W, + LED_S, + LED_X, + LED_LALT, + + LED_LGUI, + LED_Z, + LED_A, + LED_Q, + + LED_TAB, + LED_ESC, + LED_LSFT, + LED_LCTL, }; #endif -- cgit v1.2.3 From a8e5f6180585f46684d713976ad05d4d81b11ab1 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Sun, 4 Dec 2016 23:55:06 +0700 Subject: fix emoji LED indicators. --- .../handwired/promethium/keymaps/priyadi/keymap.c | 48 +++++++++++++--------- 1 file changed, 28 insertions(+), 20 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index b2da2f97b..3d34e9822 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -282,25 +282,25 @@ void led_layer_func(void) { rgbsps_set(LED_K, 15, 0, 15); rgbsps_set(LED_L, 15, 0, 15); - rgbsps_set(LED_U, 15, 0, 10); - rgbsps_set(LED_O, 15, 0, 10); - rgbsps_set(LED_COMM, 15, 0, 10); - rgbsps_set(LED_DOT, 15, 0, 10); - rgbsps_set(LED_SCLN, 15, 0, 10); - rgbsps_set(LED_P, 15, 0, 10); - - rgbsps_set(LED_Q, 10, 0, 15); - rgbsps_set(LED_W, 10, 0, 15); - rgbsps_set(LED_E, 10, 0, 15); - rgbsps_set(LED_R, 10, 0, 15); - rgbsps_set(LED_A, 10, 0, 15); - rgbsps_set(LED_S, 10, 0, 15); - rgbsps_set(LED_D, 10, 0, 15); - rgbsps_set(LED_F, 10, 0, 15); - rgbsps_set(LED_Z, 10, 0, 15); - rgbsps_set(LED_X, 10, 0, 15); - rgbsps_set(LED_C, 10, 0, 15); - rgbsps_set(LED_V, 10, 0, 15); + rgbsps_set(LED_U, 15, 0, 0); + rgbsps_set(LED_O, 15, 0, 0); + rgbsps_set(LED_COMM, 15, 0, 0); + rgbsps_set(LED_DOT, 15, 0, 0); + rgbsps_set(LED_SCLN, 15, 0, 0); + rgbsps_set(LED_P, 15, 0, 0); + + rgbsps_set(LED_Q, 0, 15, 0); + rgbsps_set(LED_W, 0, 15, 0); + rgbsps_set(LED_E, 0, 15, 0); + rgbsps_set(LED_R, 0, 15, 0); + rgbsps_set(LED_A, 0, 15, 0); + rgbsps_set(LED_S, 0, 15, 0); + rgbsps_set(LED_D, 0, 15, 0); + rgbsps_set(LED_F, 0, 15, 0); + rgbsps_set(LED_Z, 0, 15, 0); + rgbsps_set(LED_X, 0, 15, 0); + rgbsps_set(LED_C, 0, 15, 0); + rgbsps_set(LED_V, 0, 15, 0); rgbsps_send(); } @@ -361,7 +361,15 @@ void led_layer_num(void) { } void led_layer_emoji(void) { - rgbsps_setall(15, 15, 0); + for(uint8_t i = 0; i < COUNT(LED_ALNUM); i++) { + rgbsps_set(pgm_read_byte(&LED_ALNUM[i]), 15, 15, 0); + } + for(uint8_t i = 0; i < COUNT(LED_MODS); i++) { + rgbsps_set(pgm_read_byte(&LED_MODS[i]), 15, 15, 0); + } + for(uint8_t i = 0; i < COUNT(LED_FN); i++) { + rgbsps_set(pgm_read_byte(&LED_FN[i]), 15, 15, 0); + } rgbsps_set(LED_IND_FUNC, 0, 0, 0); rgbsps_set(LED_IND_NUM, 0, 0, 0); -- cgit v1.2.3 From 73073f270b55d939559e8cfd4a7d36e3510ba2f6 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 5 Dec 2016 01:15:04 +0700 Subject: Trackpoint initialization --- .../handwired/promethium/keymaps/priyadi/flash.sh | 1 + .../handwired/promethium/keymaps/priyadi/keymap.c | 110 ++++++++++++++++++++- 2 files changed, 110 insertions(+), 1 deletion(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh index fb81a54ee..14a3b4378 100755 --- a/keyboards/handwired/promethium/keymaps/priyadi/flash.sh +++ b/keyboards/handwired/promethium/keymaps/priyadi/flash.sh @@ -1,3 +1,4 @@ #!/bin/sh +sleep 10 avrdude -p m32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:../../../../../.build/handwired_promethium_priyadi.hex diff --git a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c index 3d34e9822..bf797a749 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/keymap.c +++ b/keyboards/handwired/promethium/keymaps/priyadi/keymap.c @@ -11,6 +11,8 @@ #include "process_unicode.h" #include "quantum.h" #include "rgbsps.h" +#include "ps2_mouse.h" +#include "ps2.h" #define COUNT(x) (sizeof (x) / sizeof (*(x))) // #define RGBLED_NUM 5 @@ -730,4 +732,110 @@ void shutdown_user() stop_all_notes(); } -#endif \ No newline at end of file +#endif + + +void ps2_mouse_init_user() { + // set TrackPoint sensitivity + PS2_MOUSE_SEND(0xE2, "set trackpoint sensitivity: 0xE2"); + PS2_MOUSE_SEND(0x81, "set trackpoint sensitivity: 0x81"); + PS2_MOUSE_SEND(0x4A, "set trackpoint sensitivity: 0x4A"); + PS2_MOUSE_SEND(0x60, "set trackpoint sensitivity: 0x60"); + + // set TrackPoint speed + // (transfer function upper plateau speed) + PS2_MOUSE_SEND(0xE2, "set trackpoint speed: 0xE2"); + PS2_MOUSE_SEND(0x81, "set trackpoint speed: 0x81"); + PS2_MOUSE_SEND(0x60, "set trackpoint speed: 0x60"); + PS2_MOUSE_SEND(0x90, "set trackpoint speed: 0x90"); + + // set TrackPoint Negative Inertia factor + PS2_MOUSE_SEND(0xE2, "set negative inertia factor: 0xE2"); + PS2_MOUSE_SEND(0x81, "set negative inertia factor: 0x81"); + PS2_MOUSE_SEND(0x4D, "set negative inertia factor: 0x4D"); + PS2_MOUSE_SEND(0x03, "set negative inertia factor: 0x03"); + + // disable up threshold (click) + PS2_MOUSE_SEND(0xE2, "set disable up threshold: 0xE2"); + PS2_MOUSE_SEND(0x47, "set disable up threshold: 0x47"); + PS2_MOUSE_SEND(0x2C, "set disable up threshold: 0x2C"); + PS2_MOUSE_SEND(0x01, "set disable up threshold: 0x01"); + + // enable TrackPoint Press to Select (PtS) + // print("ps2_mouse_init: send 0xE2: "); + // rcv = ps2_host_send(0xE2); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x47: "); + // rcv = ps2_host_send(0x47); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x2C: "); + // rcv = ps2_host_send(0x2C); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x00: "); + // rcv = ps2_host_send(0x00); + // phex(rcv); phex(ps2_error); print("\n"); + + // set TrackPoint Press to Select threshold + // print("ps2_mouse_init: send 0xE2: "); + // rcv = ps2_host_send(0xE2); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x81: "); + // rcv = ps2_host_send(0x81); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x5C: "); + // rcv = ps2_host_send(0x5C); + // phex(rcv); phex(ps2_error); print("\n"); + // // default PtS threshold is 0x08 + // print("ps2_mouse_init: send 0x04: "); + // rcv = ps2_host_send(0x04); + // phex(rcv); phex(ps2_error); print("\n"); + + // set TrackPoint Press to Select time constant (zTc) + // print("ps2_mouse_init: send 0xE2: "); + // rcv = ps2_host_send(0xE2); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x81: "); + // rcv = ps2_host_send(0x81); + // phex(rcv); phex(ps2_error); print("\n"); + // print("ps2_mouse_init: send 0x5E: "); + // rcv = ps2_host_send(0x5E); + // phex(rcv); phex(ps2_error); print("\n"); + // // default zTc is 0x26 + // print("ps2_mouse_init: send 0x45: "); + // rcv = ps2_host_send(0x45); + // phex(rcv); phex(ps2_error); print("\n"); + + /* + // set TrackPoint Press to Select Jenks Curvature (jkcur) + print("ps2_mouse_init: send 0xE2: "); + rcv = ps2_host_send(0xE2); + phex(rcv); phex(ps2_error); print("\n"); + print("ps2_mouse_init: send 0x81: "); + rcv = ps2_host_send(0x81); + phex(rcv); phex(ps2_error); print("\n"); + print("ps2_mouse_init: send 0x5D: "); + rcv = ps2_host_send(0x5D); + phex(rcv); phex(ps2_error); print("\n"); + // default jkcur is 0x87 + print("ps2_mouse_init: send 0x87: "); + rcv = ps2_host_send(0x87); + phex(rcv); phex(ps2_error); print("\n"); + */ + + /* + // set TrackPoint Minimum Drag (mindrag) + print("ps2_mouse_init: send 0xE2: "); + rcv = ps2_host_send(0xE2); + phex(rcv); phex(ps2_error); print("\n"); + print("ps2_mouse_init: send 0x81: "); + rcv = ps2_host_send(0x81); + phex(rcv); phex(ps2_error); print("\n"); + print("ps2_mouse_init: send 0x59: "); + rcv = ps2_host_send(0x59); + phex(rcv); phex(ps2_error); print("\n"); + // default PtS mindrag is 0x14 + print("ps2_mouse_init: send 0x14: "); + rcv = ps2_host_send(0x14); + phex(rcv); phex(ps2_error); print("\n"); + */ +} \ No newline at end of file -- cgit v1.2.3 From c7d11fd001cac4f0baeecdda79b7743e3695c77f Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 5 Dec 2016 02:15:38 +0700 Subject: Remove unnecessary build options --- keyboards/handwired/promethium/keymaps/priyadi/Makefile | 7 ++++--- keyboards/handwired/promethium/rules.mk | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'keyboards/handwired') diff --git a/keyboards/handwired/promethium/keymaps/priyadi/Makefile b/keyboards/handwired/promethium/keymaps/priyadi/Makefile index 2f6f27a73..46fdfa011 100644 --- a/keyboards/handwired/promethium/keymaps/priyadi/Makefile +++ b/keyboards/handwired/promethium/keymaps/priyadi/Makefile @@ -4,16 +4,17 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +COMMAND_ENABLE = no # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode +UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. PS2_MOUSE_ENABLE = yes diff --git a/keyboards/handwired/promethium/rules.mk b/keyboards/handwired/promethium/rules.mk index 0842780cc..891f523c2 100644 --- a/keyboards/handwired/promethium/rules.mk +++ b/keyboards/handwired/promethium/rules.mk @@ -61,7 +61,7 @@ BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality MIDI_ENABLE ?= no # MIDI controls AUDIO_ENABLE ?= no # Audio output on port C6 UNICODE_ENABLE ?= no # Unicode -UNICODEMAP_ENABLE = yes +UNICODEMAP_ENABLE ?= yes BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. PS2_MOUSE_ENABLE ?= yes -- cgit v1.2.3