diff options
| author | Toni <jeder@mail1a.de> | 2016-08-18 13:06:16 +0200 |
|---|---|---|
| committer | Toni <jeder@mail1a.de> | 2016-08-18 13:06:16 +0200 |
| commit | 387bd772e1a6f24be2239b910979c0a309425400 (patch) | |
| tree | 83c5a5646b832563fe3c1d45a5ee30254044608b | |
| parent | 8144ce8852f690d5772d80ed2b96ae4af201e266 (diff) | |
| download | qmk_firmware-387bd772e1a6f24be2239b910979c0a309425400.tar.gz qmk_firmware-387bd772e1a6f24be2239b910979c0a309425400.zip | |
initial commit for the AMJ60 PCB
| -rw-r--r-- | keyboards/amj60/Makefile | 70 | ||||
| -rw-r--r-- | keyboards/amj60/amj60.c | 30 | ||||
| -rw-r--r-- | keyboards/amj60/amj60.h | 153 | ||||
| -rw-r--r-- | keyboards/amj60/config.h | 94 | ||||
| -rw-r--r-- | keyboards/amj60/keymaps/iso_split_rshift/Makefile | 23 | ||||
| -rwxr-xr-x | keyboards/amj60/keymaps/iso_split_rshift/build.sh | 42 | ||||
| -rw-r--r-- | keyboards/amj60/keymaps/iso_split_rshift/keymap.c | 147 | ||||
| -rwxr-xr-x | keyboards/amj60/keymaps/iso_split_rshift/updatemerge.sh | 4 |
8 files changed, 563 insertions, 0 deletions
diff --git a/keyboards/amj60/Makefile b/keyboards/amj60/Makefile new file mode 100644 index 000000000..1f695aa4d --- /dev/null +++ b/keyboards/amj60/Makefile | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | |||
| 2 | # MCU name | ||
| 3 | #MCU = at90usb1287 | ||
| 4 | MCU = atmega32u4 | ||
| 5 | |||
| 6 | # Processor frequency. | ||
| 7 | # This will define a symbol, F_CPU, in all source code files equal to the | ||
| 8 | # processor frequency in Hz. You can then use this symbol in your source code to | ||
| 9 | # calculate timings. Do NOT tack on a 'UL' at the end, this will be done | ||
| 10 | # automatically to create a 32-bit value in your source code. | ||
| 11 | # | ||
| 12 | # This will be an integer division of F_USB below, as it is sourced by | ||
| 13 | # F_USB after it has run through any CPU prescalers. Note that this value | ||
| 14 | # does not *change* the processor frequency - it should merely be updated to | ||
| 15 | # reflect the processor speed set externally so that the code can use accurate | ||
| 16 | # software delays. | ||
| 17 | F_CPU = 16000000 | ||
| 18 | |||
| 19 | |||
| 20 | # | ||
| 21 | # LUFA specific | ||
| 22 | # | ||
| 23 | # Target architecture (see library "Board Types" documentation). | ||
| 24 | ARCH = AVR8 | ||
| 25 | |||
| 26 | # Input clock frequency. | ||
| 27 | # This will define a symbol, F_USB, in all source code files equal to the | ||
| 28 | # input clock frequency (before any prescaling is performed) in Hz. This value may | ||
| 29 | # differ from F_CPU if prescaling is used on the latter, and is required as the | ||
| 30 | # raw input clock is fed directly to the PLL sections of the AVR for high speed | ||
| 31 | # clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' | ||
| 32 | # at the end, this will be done automatically to create a 32-bit value in your | ||
| 33 | # source code. | ||
| 34 | # | ||
| 35 | # If no clock division is performed on the input clock inside the AVR (via the | ||
| 36 | # CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. | ||
| 37 | F_USB = $(F_CPU) | ||
| 38 | |||
| 39 | # Interrupt driven control endpoint task(+60) | ||
| 40 | OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | ||
| 41 | |||
| 42 | |||
| 43 | # Boot Section Size in *bytes* | ||
| 44 | # Teensy halfKay 512 | ||
| 45 | # Teensy++ halfKay 1024 | ||
| 46 | # Atmel DFU loader 4096 | ||
| 47 | # LUFA bootloader 4096 | ||
| 48 | # USBaspLoader 2048 | ||
| 49 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | ||
| 50 | |||
| 51 | |||
| 52 | # Build Options | ||
| 53 | # comment out to disable the options. | ||
| 54 | # | ||
| 55 | BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) | ||
| 56 | MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) | ||
| 57 | EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) | ||
| 58 | CONSOLE_ENABLE ?= yes # Console for debug(+400) | ||
| 59 | COMMAND_ENABLE ?= yes # Commands for debug and configuration | ||
| 60 | NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 61 | RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) | ||
| 62 | BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) | ||
| 63 | MIDI_ENABLE ?= no # MIDI controls | ||
| 64 | AUDIO_ENABLE ?= no | ||
| 65 | UNICODE_ENABLE ?= no # Unicode | ||
| 66 | BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 67 | |||
| 68 | ifndef QUANTUM_DIR | ||
| 69 | include ../../Makefile | ||
| 70 | endif | ||
diff --git a/keyboards/amj60/amj60.c b/keyboards/amj60/amj60.c new file mode 100644 index 000000000..993a5917d --- /dev/null +++ b/keyboards/amj60/amj60.c | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #include "amj60.h" | ||
| 2 | #include "led.h" | ||
| 3 | |||
| 4 | void matrix_init_kb(void) { | ||
| 5 | // put your keyboard start-up code here | ||
| 6 | // runs once when the firmware starts up | ||
| 7 | matrix_init_user(); | ||
| 8 | led_init_ports(); | ||
| 9 | }; | ||
| 10 | |||
| 11 | void matrix_scan_kb(void) { | ||
| 12 | // put your looping keyboard code here | ||
| 13 | // runs every cycle (a lot) | ||
| 14 | matrix_scan_user(); | ||
| 15 | }; | ||
| 16 | |||
| 17 | void led_init_ports(void) { | ||
| 18 | // * Set our LED pins as output | ||
| 19 | DDRB |= (1<<2); | ||
| 20 | } | ||
| 21 | |||
| 22 | void led_set_kb(uint8_t usb_led) { | ||
| 23 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | ||
| 24 | // Turn capslock on | ||
| 25 | PORTB &= ~(1<<2); | ||
| 26 | } else { | ||
| 27 | // Turn capslock off | ||
| 28 | PORTB |= (1<<2); | ||
| 29 | } | ||
| 30 | } | ||
diff --git a/keyboards/amj60/amj60.h b/keyboards/amj60/amj60.h new file mode 100644 index 000000000..f966a2ba0 --- /dev/null +++ b/keyboards/amj60/amj60.h | |||
| @@ -0,0 +1,153 @@ | |||
| 1 | #ifndef AMJ60_H | ||
| 2 | #define AMJ60_H | ||
| 3 | |||
| 4 | #include "quantum.h" | ||
| 5 | |||
| 6 | // readability | ||
| 7 | #define XXX KC_NO | ||
| 8 | |||
| 9 | /* AMJ60 layout to the best of my knowledge matrix layout | ||
| 10 | * ,-----------------------------------------------------------. | ||
| 11 | * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49| | ||
| 12 | * |-----------------------------------------------------------| | ||
| 13 | * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | | ||
| 14 | * |-----------------------------------------------------------| | ||
| 15 | * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | | ||
| 16 | * |-----------------------------------------------------------| | ||
| 17 | * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3c | 3d | | ||
| 18 | * |-----------------------------------------------------------| | ||
| 19 | * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | | ||
| 20 | * `-----------------------------------------------------------' | ||
| 21 | */ | ||
| 22 | #define KEYMAP( \ | ||
| 23 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ | ||
| 24 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 25 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 26 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ | ||
| 27 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 28 | ) \ | ||
| 29 | { \ | ||
| 30 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ | ||
| 31 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ | ||
| 32 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ | ||
| 33 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 34 | {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \ | ||
| 35 | } | ||
| 36 | |||
| 37 | /* | ||
| 38 | * ANSI | ||
| 39 | * ,-----------------------------------------------------------. | ||
| 40 | * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | | ||
| 41 | * |-----------------------------------------------------------| | ||
| 42 | * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | | ||
| 43 | * |-----------------------------------------------------------| | ||
| 44 | * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | | ||
| 45 | * |-----------------------------------------------------------| | ||
| 46 | * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | | ||
| 47 | * |-----------------------------------------------------------| | ||
| 48 | * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | | ||
| 49 | * `-----------------------------------------------------------' | ||
| 50 | */ | ||
| 51 | #define KEYMAP_ANSI( \ | ||
| 52 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 53 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 54 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ | ||
| 55 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ | ||
| 56 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 57 | ) \ | ||
| 58 | { \ | ||
| 59 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ | ||
| 60 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ | ||
| 61 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \ | ||
| 62 | {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, XXX, k3d}, \ | ||
| 63 | {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ | ||
| 64 | } | ||
| 65 | |||
| 66 | /* AMJ60 HHKB matrix layout | ||
| 67 | * ,------------------------------------------------------------. | ||
| 68 | * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 | | ||
| 69 | * |------------------------------------------------------------| | ||
| 70 | * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | | ||
| 71 | * |------------------------------------------------------------| | ||
| 72 | * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2d | | ||
| 73 | * |------------------------------------------------------------| | ||
| 74 | * | 30 | 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | 3c | | ||
| 75 | * |------------------------------------------------------------| | ||
| 76 | * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | | ||
| 77 | * `------------------------------------------------------------' | ||
| 78 | */ | ||
| 79 | |||
| 80 | #define KEYMAP_HHKB( \ | ||
| 81 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, \ | ||
| 82 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 83 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2d, \ | ||
| 84 | k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \ | ||
| 85 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 86 | ) \ | ||
| 87 | { \ | ||
| 88 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ | ||
| 89 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ | ||
| 90 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, XXX, k2d}, \ | ||
| 91 | {k30, XXX, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 92 | {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, k49, k4a, k4b, k4c, k4d} \ | ||
| 93 | } | ||
| 94 | |||
| 95 | /* ISO | ||
| 96 | * ,-----------------------------------------------------------. | ||
| 97 | * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | | ||
| 98 | * |-----------------------------------------------------------| | ||
| 99 | * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | | ||
| 100 | * |-----------------------------------------------------------| | ||
| 101 | * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|2d | | ||
| 102 | * |-----------------------------------------------------------| | ||
| 103 | * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | | ||
| 104 | * |-----------------------------------------------------------| | ||
| 105 | * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | | ||
| 106 | * `-----------------------------------------------------------' | ||
| 107 | */ | ||
| 108 | #define KEYMAP_ISO( \ | ||
| 109 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 110 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 111 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 112 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, \ | ||
| 113 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 114 | ) \ | ||
| 115 | { \ | ||
| 116 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ | ||
| 117 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ | ||
| 118 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ | ||
| 119 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, XXX}, \ | ||
| 120 | {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ | ||
| 121 | } | ||
| 122 | /* ISO w/ split right shift key matrix layout | ||
| 123 | * ,-----------------------------------------------------------. | ||
| 124 | * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d | | ||
| 125 | * |-----------------------------------------------------------| | ||
| 126 | * | 10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1a| 1b| 1c| 1d | | ||
| 127 | * |-----------------------------------------------------------| | ||
| 128 | * | 20 | 21| 22| 23| 24| 25| 26| 27| 28| 29| 2a| 2b| 2c|2d | | ||
| 129 | * |-----------------------------------------------------------| | ||
| 130 | * | 30 | 31| 32| 33| 34| 35| 36| 37| 38| 39| 3a| 3b| 3d | 3c | | ||
| 131 | * |-----------------------------------------------------------| | ||
| 132 | * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | | ||
| 133 | * `-----------------------------------------------------------' | ||
| 134 | */ | ||
| 135 | #define KEYMAP_ISO_SPLITRSHIFT( \ | ||
| 136 | k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, \ | ||
| 137 | k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, \ | ||
| 138 | k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \ | ||
| 139 | k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3c, \ | ||
| 140 | k40, k41, k42, k45, k4a, k4b, k4c, k4d \ | ||
| 141 | ) \ | ||
| 142 | { \ | ||
| 143 | {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ | ||
| 144 | {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d}, \ | ||
| 145 | {k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d}, \ | ||
| 146 | {k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d}, \ | ||
| 147 | {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ | ||
| 148 | } | ||
| 149 | |||
| 150 | void matrix_init_user(void); | ||
| 151 | void matrix_scan_user(void); | ||
| 152 | |||
| 153 | #endif | ||
diff --git a/keyboards/amj60/config.h b/keyboards/amj60/config.h new file mode 100644 index 000000000..d98e0e9f2 --- /dev/null +++ b/keyboards/amj60/config.h | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | /* | ||
| 2 | Copyright 2012 Jun Wako <wakojun@gmail.com> | ||
| 3 | |||
| 4 | This program is free software: you can redistribute it and/or modify | ||
| 5 | it under the terms of the GNU General Public License as published by | ||
| 6 | the Free Software Foundation, either version 2 of the License, or | ||
| 7 | (at your option) any later version. | ||
| 8 | |||
| 9 | This program is distributed in the hope that it will be useful, | ||
| 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 12 | GNU General Public License for more details. | ||
| 13 | |||
| 14 | You should have received a copy of the GNU General Public License | ||
| 15 | along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef CONFIG_H | ||
| 19 | #define CONFIG_H | ||
| 20 | |||
| 21 | #include "config_common.h" | ||
| 22 | |||
| 23 | /* USB Device descriptor parameter */ | ||
| 24 | #define VENDOR_ID 0xFEED | ||
| 25 | #define PRODUCT_ID 0x6066 | ||
| 26 | #define DEVICE_VER 0x0001 | ||
| 27 | #define MANUFACTURER Han Chen | ||
| 28 | #define PRODUCT AMJ60 | ||
| 29 | #define DESCRIPTION qmk port of AMJ60 PCB | ||
| 30 | |||
| 31 | /* key matrix size */ | ||
| 32 | #define MATRIX_ROWS 5 | ||
| 33 | #define MATRIX_COLS 14 | ||
| 34 | |||
| 35 | // ROWS: Top to bottom, COLS: Left to right | ||
| 36 | |||
| 37 | #define MATRIX_ROW_PINS { F7, F6, F5, F4, D5} | ||
| 38 | #define MATRIX_COL_PINS { F1, F0, E6, C7, C6, B0, D4, B1, B7, B5, B4, D7, D6, B3} | ||
| 39 | #define UNUSED_PINS | ||
| 40 | |||
| 41 | #define BACKLIGHT_PIN B6 | ||
| 42 | |||
| 43 | /* COL2ROW or ROW2COL */ | ||
| 44 | #define DIODE_DIRECTION COL2ROW | ||
| 45 | |||
| 46 | /* define if matrix has ghost */ | ||
| 47 | //#define MATRIX_HAS_GHOST | ||
| 48 | |||
| 49 | /* Set 0 if debouncing isn't needed */ | ||
| 50 | #define DEBOUNCING_DELAY 5 | ||
| 51 | |||
| 52 | /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ | ||
| 53 | #define LOCKING_SUPPORT_ENABLE | ||
| 54 | /* Locking resynchronize hack */ | ||
| 55 | #define LOCKING_RESYNC_ENABLE | ||
| 56 | |||
| 57 | /* key combination for command */ | ||
| 58 | #define IS_COMMAND() ( \ | ||
| 59 | keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ | ||
| 60 | ) | ||
| 61 | |||
| 62 | /* Backlight configuration | ||
| 63 | */ | ||
| 64 | #define BACKLIGHT_LEVELS 4 | ||
| 65 | |||
| 66 | /* Underlight configuration | ||
| 67 | */ | ||
| 68 | |||
| 69 | #define RGB_DI_PIN E2 | ||
| 70 | #define RGBLIGHT_TIMER | ||
| 71 | #define RGBLED_NUM 8 // Number of LEDs | ||
| 72 | #define RGBLIGHT_HUE_STEP 10 | ||
| 73 | #define RGBLIGHT_SAT_STEP 17 | ||
| 74 | #define RGBLIGHT_VAL_STEP 17 | ||
| 75 | |||
| 76 | /* | ||
| 77 | * Feature disable options | ||
| 78 | * These options are also useful to firmware size reduction. | ||
| 79 | */ | ||
| 80 | |||
| 81 | /* disable debug print */ | ||
| 82 | //#define NO_DEBUG | ||
| 83 | |||
| 84 | /* disable print */ | ||
| 85 | //#define NO_PRINT | ||
| 86 | |||
| 87 | /* disable action features */ | ||
| 88 | //#define NO_ACTION_LAYER | ||
| 89 | //#define NO_ACTION_TAPPING | ||
| 90 | //#define NO_ACTION_ONESHOT | ||
| 91 | //#define NO_ACTION_MACRO | ||
| 92 | //#define NO_ACTION_FUNCTION | ||
| 93 | |||
| 94 | #endif | ||
diff --git a/keyboards/amj60/keymaps/iso_split_rshift/Makefile b/keyboards/amj60/keymaps/iso_split_rshift/Makefile new file mode 100644 index 000000000..0d8416bbc --- /dev/null +++ b/keyboards/amj60/keymaps/iso_split_rshift/Makefile | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | # Build Options | ||
| 2 | # change to "no" to disable the options, or define them in the Makefile in | ||
| 3 | # the appropriate keymap folder that will get included automatically | ||
| 4 | # | ||
| 5 | BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) | ||
| 6 | MOUSEKEY_ENABLE = no # Mouse keys(+4700) | ||
| 7 | EXTRAKEY_ENABLE = no # Audio control and System control(+450) | ||
| 8 | CONSOLE_ENABLE = no # Console for debug(+400) | ||
| 9 | COMMAND_ENABLE = yes # Commands for debug and configuration | ||
| 10 | NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work | ||
| 11 | BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
| 12 | MIDI_ENABLE = no # MIDI controls | ||
| 13 | AUDIO_ENABLE = no # Audio output on port C6 | ||
| 14 | UNICODE_ENABLE = no # Unicode | ||
| 15 | BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID | ||
| 16 | RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. | ||
| 17 | |||
| 18 | # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE | ||
| 19 | SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend | ||
| 20 | |||
| 21 | ifndef QUANTUM_DIR | ||
| 22 | include ../../../../Makefile | ||
| 23 | endif | ||
diff --git a/keyboards/amj60/keymaps/iso_split_rshift/build.sh b/keyboards/amj60/keymaps/iso_split_rshift/build.sh new file mode 100755 index 000000000..6b4b4568f --- /dev/null +++ b/keyboards/amj60/keymaps/iso_split_rshift/build.sh | |||
| @@ -0,0 +1,42 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | # adjust for cpu | ||
| 3 | # -j 16 gave best result on a hyperthreaded quad core core i7 | ||
| 4 | |||
| 5 | LIMIT=10 | ||
| 6 | THREADS="-j 16" | ||
| 7 | KMAP=iso_split_rshift | ||
| 8 | |||
| 9 | echo "We need sudo later" | ||
| 10 | sudo ls 2>&1 /dev/null | ||
| 11 | |||
| 12 | function wait_bootloader { | ||
| 13 | echo "Waiting for Bootloader..." | ||
| 14 | local STARTTIME=$(date +"%s") | ||
| 15 | local REMIND=0 | ||
| 16 | local EXEC=dfu-programmer | ||
| 17 | local TARGET=atmega32u4 | ||
| 18 | while true | ||
| 19 | do | ||
| 20 | sudo $EXEC $TARGET get > /dev/null 2>&1 | ||
| 21 | [ $? -eq 0 ] && break | ||
| 22 | ENDTIME=$(date +"%s") | ||
| 23 | DURATION=$(($ENDTIME-$STARTTIME)) | ||
| 24 | if [ $REMIND -eq 0 -a $DURATION -gt $LIMIT ] | ||
| 25 | then | ||
| 26 | echo "Did you forget to press the reset button?" | ||
| 27 | REMIND=1 | ||
| 28 | fi | ||
| 29 | sleep 1 | ||
| 30 | done | ||
| 31 | } | ||
| 32 | make clean | ||
| 33 | make KEYMAP=${KMAP} ${THREADS} | ||
| 34 | if [[ $? -eq 0 ]] | ||
| 35 | then | ||
| 36 | echo "please trigger flashing!" | ||
| 37 | wait_bootloader | ||
| 38 | sudo make KEYMAP=${KMAP} dfu ${THREADS} | ||
| 39 | else | ||
| 40 | echo "make failed" | ||
| 41 | exit 77 | ||
| 42 | fi | ||
diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c new file mode 100644 index 000000000..60fb0bfb0 --- /dev/null +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | // This is the canonical layout file for the Quantum project. If you want to add another keyboard, | ||
| 2 | // this is the style you want to emulate. | ||
| 3 | |||
| 4 | #include "amj60.h" | ||
| 5 | |||
| 6 | // Each layer gets a name for readability, which is then used in the keymap matrix below. | ||
| 7 | // The underscores don't mean anything - you can have a layer called STUFF or any other name. | ||
| 8 | // Layer names don't all need to be of the same length, obviously, and you can also skip them | ||
| 9 | // entirely and just use numbers. | ||
| 10 | #define _DEF 0 | ||
| 11 | #define _SPC 1 | ||
| 12 | #define _TAB 2 | ||
| 13 | #define _SFX 3 | ||
| 14 | |||
| 15 | // dual-role shortcuts | ||
| 16 | #define TABDUAL LT(_TAB, KC_TAB) | ||
| 17 | #define CAPSDUAL CTL_T(KC_ESC) | ||
| 18 | #define SPACEDUAL LT(_SPC, KC_SPACE) | ||
| 19 | #define ENTERDUAL CTL_T(KC_ENT) | ||
| 20 | // arrow cluster duality bottom right corner | ||
| 21 | #define ARRLEFT ALT_T(KC_LEFT) | ||
| 22 | #define ARRDOWN GUI_T(KC_DOWN) | ||
| 23 | #define ARRUP SFT_T(KC_UP) | ||
| 24 | #define ARRRIGHT CTL_T(KC_RIGHT) | ||
| 25 | // german brackets | ||
| 26 | #define GER_CUR_L RALT(KC_7) // [ | ||
| 27 | #define GER_CUR_R RALT(KC_0) // ] | ||
| 28 | #define GER_PAR_L LSFT(KC_8) // ( | ||
| 29 | #define GER_PAR_R LSFT(KC_9) // ) | ||
| 30 | #define GER_ANG_L KC_NUBS // < | ||
| 31 | #define GER_ANG_R LSFT(KC_NUBS) // > | ||
| 32 | #define GER_BRC_L RALT(KC_8) // [ | ||
| 33 | #define GER_BRC_R RALT(KC_9) // ] | ||
| 34 | |||
| 35 | // increase readability | ||
| 36 | #define _______ KC_TRNS | ||
| 37 | #define XXXXXXX KC_NO | ||
| 38 | |||
| 39 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 40 | /* Keymap _DEF: Default Layer | ||
| 41 | * ,-----------------------------------------------------------. | ||
| 42 | * |Grv| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | | ||
| 43 | * |-----------------------------------------------------------| | ||
| 44 | * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | Tab is Fn1 | ||
| 45 | * |-----------------------------------------------------------| | ||
| 46 | * |Ctrl | A| S| D| F| G| H| J| K| L| ;| '| Return | | ||
| 47 | * |-----------------------------------------------------------| | ||
| 48 | * |Sft | < | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| RShift is UP | ||
| 49 | * |-----------------------------------------------------------| | ||
| 50 | * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is | ||
| 51 | * `-----------------------------------------------------------' LEFT DWN RIGHT | ||
| 52 | */ | ||
| 53 | [_DEF] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 54 | KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ | ||
| 55 | TABDUAL, 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, \ | ||
| 56 | CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ | ||
| 57 | KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, ARRUP, TG(_SFX), \ | ||
| 58 | KC_LCTL, KC_LGUI, KC_LALT, SPACEDUAL, KC_RALT, ARRLEFT, ARRDOWN, ARRRIGHT), | ||
| 59 | |||
| 60 | /* Keymap 1: F-and-vim Layer, modified with Space (by holding space) | ||
| 61 | * ,-----------------------------------------------------------. | ||
| 62 | * |PrSc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete| | ||
| 63 | * |-----------------------------------------------------------| | ||
| 64 | * | |Paus| Up| [ | ] | | | | ( | ) | | | | | | ||
| 65 | * |-----------------------------------------------------------| | ||
| 66 | * | |Lft|Dwn|Rgt| | |Left|Down|Right|Up| | | PLAY | | ||
| 67 | * |-----------------------------------------------------------| | ||
| 68 | * | | | | | < | > | |M0 | | | | | Vol+ | | | ||
| 69 | * |-----------------------------------------------------------| | ||
| 70 | * | | | | |Alt |Prev|Vol-|Next| | ||
| 71 | * `-----------------------------------------------------------' | ||
| 72 | */ | ||
| 73 | [_SPC] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 74 | KC_PSCR, 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, \ | ||
| 75 | _______, KC_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \ | ||
| 76 | _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ | ||
| 77 | _______, _______, _______, _______, GER_ANG_L, GER_ANG_R, KC_SPACE, M(0), _______, _______, _______, _______, KC_VOLU, _______, \ | ||
| 78 | _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT), | ||
| 79 | |||
| 80 | /* Keymap 2: Tab Layer w/ vim pageup, modified with Tab (by holding tab) | ||
| 81 | * ,-----------------------------------------------------------. | ||
| 82 | * |WAKE| | | | | | | | | | | | |Insert| TAB+GRC = WAKE | ||
| 83 | * |-----------------------------------------------------------| | ||
| 84 | * | | | | | | | | | { | } | | | | | | ||
| 85 | * |-----------------------------------------------------------| | ||
| 86 | * | | | | | | |Pos1|PgDn|PgUp|End| | |Retrn | | ||
| 87 | * |-----------------------------------------------------------| | ||
| 88 | * | | | | | | | |AF2| | | | | PgUp | | | ||
| 89 | * |-----------------------------------------------------------| | ||
| 90 | * | | | | |Alt |Pos1|PgDn|End | | ||
| 91 | * `-----------------------------------------------------------' | ||
| 92 | */ | ||
| 93 | [_TAB] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 94 | KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ | ||
| 95 | _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ | ||
| 96 | _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ | ||
| 97 | _______, _______, _______, _______, _______, _______, _______, M(1), _______, _______, _______, _______, KC_PGUP, _______, \ | ||
| 98 | _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), | ||
| 99 | |||
| 100 | /* Keymap 3: Split right shift Numpad toggle Layer (by tapping the split rshift key) | ||
| 101 | * ,-----------------------------------------------------------. | ||
| 102 | * |RSET| | | | | | | 7| 8| 9| | | |Backsp | | ||
| 103 | * |-----------------------------------------------------------| | ||
| 104 | * | | | | | | | | 4 | 5 | 6 | | | | \ | | ||
| 105 | * |-----------------------------------------------------------| | ||
| 106 | * | | L | L | | | | | 1 | 2 | 3 | | | Return | | ||
| 107 | * |-----------------------------------------------------------| | ||
| 108 | * | | | L | L | L | L | L | L | | 0 | | /| Up | | All "L"s represent | ||
| 109 | * |-----------------------------------------------------------| LED controlling | ||
| 110 | * |Ctrl|Win |Alt | |Alt |Left|Down|Right| | ||
| 111 | * `-----------------------------------------------------------' | ||
| 112 | */ | ||
| 113 | [_SFX] = KEYMAP_ISO_SPLITRSHIFT( | ||
| 114 | RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ | ||
| 115 | _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ | ||
| 116 | _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ | ||
| 117 | _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ | ||
| 118 | _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), | ||
| 119 | }; | ||
| 120 | |||
| 121 | enum function_id { | ||
| 122 | LAUNCH, | ||
| 123 | RGBLED_TOGGLE, | ||
| 124 | }; | ||
| 125 | |||
| 126 | const uint16_t PROGMEM fn_actions[] = { | ||
| 127 | [1] = ACTION_FUNCTION(LAUNCH), | ||
| 128 | [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), | ||
| 129 | }; | ||
| 130 | |||
| 131 | const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) | ||
| 132 | { | ||
| 133 | // MACRODOWN only works in this function | ||
| 134 | switch(id) { | ||
| 135 | case 0: | ||
| 136 | return (record->event.pressed ? | ||
| 137 | MACRO( D(RALT), T(SPC), U(RALT), END ) | ||
| 138 | :MACRO( END )); | ||
| 139 | break; | ||
| 140 | case 1: | ||
| 141 | return (record->event.pressed ? | ||
| 142 | MACRO( D(LALT), T(F2), U(LALT), END ) | ||
| 143 | :MACRO( END )); | ||
| 144 | break; | ||
| 145 | } | ||
| 146 | return MACRO_NONE; | ||
| 147 | }; | ||
diff --git a/keyboards/amj60/keymaps/iso_split_rshift/updatemerge.sh b/keyboards/amj60/keymaps/iso_split_rshift/updatemerge.sh new file mode 100755 index 000000000..da5457e19 --- /dev/null +++ b/keyboards/amj60/keymaps/iso_split_rshift/updatemerge.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/bash | ||
| 2 | git checkout amj60 # gets you on branch amj60 | ||
| 3 | git fetch origin # gets you up to date with origin | ||
| 4 | git merge origin/master | ||
