diff options
244 files changed, 3622 insertions, 21395 deletions
@@ -85,6 +85,7 @@ The following shortcuts automatically add `LSFT()` to keycodes to get commonly u KC_RPRN ) KC_UNDS _ KC_PLUS + + KC_DQUO " KC_LCBR { KC_RCBR } KC_LABK < @@ -118,6 +119,56 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac * `LCAG_T(kc)` - is CtrlAltGui when held and *kc* when tapped * `MEH_T(kc)` - is like Hyper, but not as cool -- does not include the Cmd/Win key, so just sends Alt+Ctrl+Shift. +### Space Cadet Shift: The future, built in + +Steve Losh [described](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/) the Space Cadet Shift quite well. Essentially, you hit the left Shift on its own, and you get an opening parenthesis; hit the right Shift on its own, and you get the closing one. When hit with other keys, the Shift key keeps working as it always does. Yes, it's as cool as it sounds. + +To use it, use `KC_LSPO` (Left Shift, Parens Open) for your left Shift on your keymap, and `KC_RSPC` (Right Shift, Parens Close) for your right Shift. + +The only other thing you're going to want to do is create a `makefile.mk` in your keymap directory and set the following: + +``` +COMMAND_ENABLE = no # Commands for debug and configuration +``` + +This is just to keep the keyboard from going into command mode when you hold both Shift keys at the same time. + +### The Leader key: A new kind of modifier + +If you've ever used Vim, you know what a Leader key is. If not, you're about to discover a wonderful concept. :) Instead of hitting Alt+Shift+W for example (holding down three keys at the same time), what if you could hit a _sequence_ of keys instead? So you'd hit our special modifier (the Leader key), followed by W and then C (just a rapid succession of keys), and something would happen. + +That's what `KC_LEAD` does. Here's an example: + +1. Pick a key on your keyboard you want to use as the Leader key. Assign it the keycode `KC_LEAD`. This key would be dedicated just for this -- it's a single action key, can't be used for anything else. +2. Include the line `#define LEADER_TIMEOUT 300` somewhere in your keymap.c file, probably near the top. The 300 there is 300ms -- that's how long you have for the sequence of keys following the leader. You can tweak this value for comfort, of course. +3. Within your `matrix_scan_user` function, do something like this: + +``` +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY(KC_F) { + register_code(KC_S); + unregister_code(KC_S); + } + SEQ_TWO_KEYS(KC_A, KC_S) { + register_code(KC_H); + unregister_code(KC_H); + } + SEQ_THREE_KEYS(KC_A, KC_S, KC_D) { + register_code(KC_LGUI); + register_code(KC_S); + unregister_code(KC_S); + unregister_code(KC_LGUI); + } + } +} +``` + +As you can see, you have three function. you can use - `SEQ_ONE_KEY` for single-key sequences (Leader followed by just one key), and `SEQ_TWO_KEYS` and `SEQ_THREE_.EYS` for longer sequences. Each of these accepts one or more keycodes as arguments. This is an important point: You can use keycodes from **any layer on your keyboard**. That layer would need to be active for the leader macro to fire, obviously. + ### Temporarily setting the default layer `DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. @@ -258,9 +309,9 @@ if (timer_elapsed(key_timer) < 100) { } ``` -It's best to declare the `static uint16_t key_timer;` outside of the macro block (top of file, etc). +It's best to declare the `static uint16_t key_timer;` outside of the macro block (top of file, etc). -#### Example 1: Single-key copy/paste (hold to copy, tap to paste) +#### Example: Single-key copy/paste (hold to copy, tap to paste) With QMK, it's easy to make one key do two things, as long as one of those things is being a modifier. :) So if you want a key to act as Ctrl when held and send the letter R when tapped, that's easy: `CTL_T(KC_R)`. But what do you do when you want that key to send Ctrl-V (paste) when tapped, and Ctrl-C (copy) when held? @@ -276,7 +327,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case 0: { if (record->event.pressed) { key_timer = timer_read(); // if the key is being pressed, we start the timer. - } + } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). if (timer_elapsed(key_timer) > 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap. return MACRO( D(LCTL), T(C), U(LCTL), END ); @@ -294,52 +345,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) And then, to assign this macro to a key on your keyboard layout, you just use `M(0)` on the key you want to press for copy/paste. -#### Example 2: Space Cadet Shift (making it easy to send opening and closing parentheses) - -In the [Modern Space Cadet Keyboard](http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#shift-parentheses), one of cooler features is the Shift Parentheses. To quote Steve Losh: - - > When held while pressing other keys, act like Shift. - > When pressed and released on their own, type an opening or closing parenthesis (left and right shift respectively). - -``` -static uint16_t key_timer; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case 0: { - if (record->event.pressed) { - key_timer = timer_read(); // if the key is being pressed, we start the timer. - register_code(KC_LSFT); // we're now holding down Shift. - } else { // this means the key was just released, so we can figure out how long it was pressed for (tap or "held down"). - if (timer_elapsed(key_timer) < 150) { // 150 being 150ms, the threshhold we pick for counting something as a tap. - register_code(KC_9); // sending 9 while Shift is held down gives us an opening paren - unregister_code(KC_9); // now let's let go of that key - } - unregister_code(KC_LSFT); // let's release the Shift key now. - } - break; - } - case 1: { - if (record->event.pressed) { - key_timer = timer_read(); // Now we're doing the same thing, only for the right shift/close paren key - register_code(KC_RSFT); - } else { - if (timer_elapsed(key_timer) < 150) { - register_code(KC_0); - unregister_code(KC_0); - } - unregister_code(KC_RSFT); - } - break; - } - } - return MACRO_NONE; -}; -``` - -And then, to assign this macro to a key on your keyboard layout, you just use `M(0)` on the key you want to press for left shift/opening parens, and `M(1)` for right shift/closing parens. - ## Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: @@ -510,4 +515,4 @@ what things are (and likely aren't) too risky. - EEPROM has around a 100000 write cycle. You shouldn't rewrite the firmware repeatedly and continually; that'll burn the EEPROM eventually. - + diff --git a/keyboard/IIgs/Makefile b/keyboard/IIgs/Makefile deleted file mode 100644 index 3bf380e64b..0000000000 --- a/keyboard/IIgs/Makefile +++ /dev/null @@ -1,95 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = IIgs_Standard - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = at90usb162 # Teensy 1.0 -#MCU = atmega32u4 # Teensy 2.0 -#MCU = at90usb646 # Teensy++ 1.0 -MCU = at90usb1286 # Teensy++ 2.0 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Build Options -# comment out to disable the options. -# -MOUSEKEY_ENABLE = no # Mouse keys -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -EXTRAKEY_ENABLE = yes # Audio control and System control -#NKRO_ENABLE = yes # USB Nkey Rollover - - - -#---------------- Programming Options -------------------------- -PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex - - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/IIgs/README b/keyboard/IIgs/README deleted file mode 100644 index 820d771102..0000000000 --- a/keyboard/IIgs/README +++ /dev/null @@ -1,45 +0,0 @@ -Replaceable USB Controller for Apple IIgs/Standard(M0116)
-JeffreySung(nattyman@gmail.com)
-
-===============================
-
-Feature
--------
-- Replaceable keyboard controller for Apple IIgs(A9M0330)/Standard(M0116)
-- Teensy++ 2.0 required
-- Some signal bypass required
-- ADB keyboard doesn't use matrix for modifier keys. With virtual row for modifier keys,
- these keys are merged into key matrix using virtual row.
-
-History
-=======
-- 2012.09.17 First Release
-- 2012.09.17 CapsLock support
-- 2012.09.19 Power button added
-Build
-=====
-0. Just Type "Make" and return.
-
-Hardware
-========
-PJRC Teensy
------------
-0. The following ports should not be connected to board.
- From top view of Teensy++, from GND and counter clock wise.
- -7,26(in keyboard PCB, these pins are VDD,GND)
- -30,31(in Teensy++, these pins are Ref,GND respectively)
- -5,6(D2,D3 for bluetooth in future)
-1. Bypass #31 pin(from board) to E4(Teensy)
-2. Bypass #30 pin(from board) to F2(Teensy)
-3. Bypass #6 pin(from board) to A0(Teensy)
-4. Refer to documentation directory
-
-To Do
-=====
-0. When DEBOUNCE defined, there is a errors.
-1. Layer Change by toggling Clear Key
-2. Eject Key add. (following files should be modified.)
- common/keycode.h
- common/keyboard.c
-3. Use bluetooth
-EOF
diff --git a/keyboard/IIgs/config.h b/keyboard/IIgs/config.h deleted file mode 100644 index bc8bf75f94..0000000000 --- a/keyboard/IIgs/config.h +++ /dev/null @@ -1,63 +0,0 @@ -/*
-Copyright 2011 Jun Wako <wakojun@gmail.com>
-
-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 <http://www.gnu.org/licenses/>.
-*/
-
-#ifndef CONFIG_H
-#define CONFIG_H
-
-
-/* USB Device descriptor parameter */
-/* for Apple
-#define VENDOR_ID 0x05AC
-#define PRODUCT_ID 0xBEE0
-*/
-#define VENDOR_ID 0xFEED
-#define PRODUCT_ID 0xBEE0
-#define DEVICE_VER 0x0202
-#define MANUFACTURER t.m.k.
-#define PRODUCT Apple Desktop Bus Keyboard
-
-
-/* message strings */
-#define DESCRIPTION Apple M0116/A9M0660 keyboard firmware
-
-
-/* matrix size */
-#define MATRIX_ROWS 11 // last row is virtual for modifier
-#define MATRIX_COLS 8
-/* define if matrix has ghost */
-#define MATRIX_HAS_GHOST
-/* Set 0 if need no debouncing */
-#define DEBOUNCE 5
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
- keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \
- keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-/* layer switching */
-#define LAYER_SWITCH_DELAY 100
-#define LAYER_SEND_FN_TERM 300
-
-
-/* legacy keymap support */
-#define USE_LEGACY_KEYMAP
-
-
-#endif
diff --git a/keyboard/IIgs/doc/PIN_BYPASS.jpg b/keyboard/IIgs/doc/PIN_BYPASS.jpg Binary files differdeleted file mode 100644 index 2998f0c3f8..0000000000 --- a/keyboard/IIgs/doc/PIN_BYPASS.jpg +++ /dev/null diff --git a/keyboard/IIgs/doc/Teensy++_Mod.jpg b/keyboard/IIgs/doc/Teensy++_Mod.jpg Binary files differdeleted file mode 100644 index 146c1ab93c..0000000000 --- a/keyboard/IIgs/doc/Teensy++_Mod.jpg +++ /dev/null diff --git a/keyboard/IIgs/hid_listen.mac b/keyboard/IIgs/hid_listen.mac Binary files differdeleted file mode 100755 index 8758fdf886..0000000000 --- a/keyboard/IIgs/hid_listen.mac +++ /dev/null diff --git a/keyboard/IIgs/keymap.c b/keyboard/IIgs/keymap.c deleted file mode 100644 index cd33e223ac..0000000000 --- a/keyboard/IIgs/keymap.c +++ /dev/null @@ -1,142 +0,0 @@ -/*
-Copyright 2012 Jeffrey Sung <nattyman@gmail.com>
-
-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 <http://www.gnu.org/licenses/>.
-*/
-
-/*
- * Keymap for Apple IIgs/Standard Keyboard
- */
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/pgmspace.h>
-#include "keycode.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "keymap.h"
-
-
-// Convert physical keyboard layout to matrix array.
-// This is a macro to define keymap easily in keyboard layout form.
-#define KEYMAP( R10C5, \
- R3C7, R3C6, R3C5, R3C4, R3C3, R3C2, R3C1, R8C1, R8C0, R3C0, R0C0, R0C1, R0C2, R0C3, R4C4, R4C5, R4C6, R4C7, \
- R9C7, R9C6, R9C5, R9C4, R9C3, R9C2, R9C1, R9C0, R1C0, R1C1, R1C2, R1C3, R1C4, R2C4, R2C5, R2C6, R2C3, \
- R10C0,R7C7, R7C6, R7C5, R7C4, R7C3, R7C2, R7C1, R7C0, R0C4, R1C6, R1C7, R1C5, R2C0, R2C1, R2C2, R2C7, \
- R10C1,R6C7, R6C6, R6C5, R6C4, R6C3, R6C2, R6C1, R6C0, R0C5, R0C6, R4C0, R4C1, R4C2, \
- R10C4,R10C2,R10C3,R5C4, R5C7, R5C5, R5C6, R5C0, R5C2, R0C7, R5C1, R5C3, R4C3 \
-) { \
- { R0C0, R0C1, R0C2, R0C3, R0C4, R0C5, R0C6, R0C7 }, \
- { R1C0, R1C1, R1C2, R1C3, R1C4, R1C5, R1C6, R1C7 }, \
- { R2C0, R2C1, R2C2, R2C3, R2C4, R2C5, R2C6, R2C7 }, \
- { R3C0, R3C1, R3C2, R3C3, R3C4, R3C5, R3C6, R3C7 }, \
- { R4C0, R4C1, R4C2, R4C3, R4C4, R4C5, R4C6, R4C7 }, \
- { R5C0, R5C1, R5C2, R5C3, R5C4, R5C5, R5C6, R5C7 }, \
- { R6C0, R6C1, R6C2, R6C3, R6C4, R6C5, R6C6, R6C7 }, \
- { R7C0, R7C1, R7C2, R7C3, R7C4, R7C5, R7C6, R7C7 }, \
- { R8C0, R8C1, KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO }, \
- { R9C0, R9C1, R9C2, R9C3, R9C4, R9C5, R9C6, R9C7 }, \
- { R10C0,R10C1, R10C2, R10C3, R10C4,R10C5, KC_NO, KC_NO} \
-}
-
-#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))
-
-
-// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
-static const uint8_t PROGMEM fn_layer[] = {
- 0, // Fn0
- 1, // Fn1
- 2, // Fn2
- 3, // Fn3
- 4, // Fn4
- 0, // Fn5
- 3, // Fn6
- 3 // Fn7
-};
-
-// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.
-// See layer.c for details.
-static const uint8_t PROGMEM fn_keycode[] = {
- KC_NO, // Fn0
- KC_NO, // Fn1
- KC_SLSH, // Fn2
- KC_SCLN, // Fn3
- KC_SPC, // Fn4
- KC_NO, // Fn5
- KC_NO, // Fn6
- KC_NO // Fn7
-};
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
- /* Layer 0: Default Layer
- * ,-----------------------------------------------------------. ,---------------,
- * | POWER | | |
- * |-----------------------------------------------------------| |---------------|
- * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |FN0| = | / | * |
- * |-----------------------------------------------------------| |---------------|
- * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | | 7 | 8 | 9 | + |
- * |-----------------------------------------------------' | |---------------|
- * |Contro| A| S| D| F| G| H| J| K| L|Fn3| '|Return | | 4 | 5 | 6 | - |
- * |-----------------------------------------------------------| |---------------|
- * |Shift | Z| X| C| V| B| N| M| ,| .| / |Shift | | 1 | 2 | 3 | E |
- * |-----------------------------------------------------------| |-----------| N |
- * |CAPS|Alt |Gui |` |SPC |BSLS |LFT|RGT|DN|UP| | 0 | . | T |
- * `-----------------------------------------------------------' |---------------'
- */
- KEYMAP( KC_PWR,
- 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_FN1, KC_PEQL, KC_PSLS, KC_PAST, \
- 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_P7, KC_P8, KC_P9, KC_PPLS, \
- KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_ENT, KC_P4, KC_P5, KC_P6, KC_PMNS, \
- KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_P1, KC_P2, KC_P3, \
- KC_CAPS,KC_LALT,KC_LGUI,KC_GRV, KC_SPC, KC_BSLS,KC_LEFT,KC_RGHT,KC_DOWN,KC_UP, KC_P0, KC_PDOT, KC_PENT),
-
-
- /* Layer 1: Tenkey use Layer
- * ,-----------------------------------------------------------. ,---------------,
- * | POWER | | |
- * |-----------------------------------------------------------| |---------------|
- * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NLK| = | / | * |
- * |-----------------------------------------------------------| |---------------|
- * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | |INS| 8 |PGU|V+ |
- * |-----------------------------------------------------' | |---------------|
- * |Contro| A| S| D| F| G| H| J| K| L|Fn3| '|Return | |DEL|UP |PGD|V- |
- * |-----------------------------------------------------------| |---------------|
- * |Shift | Z| X| C| V| B| N| M| ,| .| / |Shift | |LFT|DN |RGT| E |
- * |-----------------------------------------------------------| |-----------| N |
- * |CAPS|Alt |Gui |` |SPC |BSLS |LFT|RGT|DN|UP| | 0 | . | T |
- * `-----------------------------------------------------------' `---------------'
- */
- KEYMAP( KC_PWR, \
- 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_FN1, KC_PEQL, KC_PSLS, KC_MUTE, \
- 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_INS, KC_P8, KC_PGUP, KC_VOLU, \
- KC_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,KC_ENT, KC_DEL, KC_UP, KC_PGDN, KC_VOLD, \
- KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_LEFT, KC_DOWN, KC_RIGHT, \
- KC_CAPS,KC_LALT,KC_LGUI,KC_GRV, KC_SPC, KC_BSLS,KC_LEFT,KC_RGHT,KC_DOWN,KC_UP, KC_P0, KC_PDOT, KC_PENT),
-};
-
-
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
-{
- return KEYCODE(layer, row, col);
-}
-
-uint8_t keymap_fn_layer(uint8_t index)
-{
- return pgm_read_byte(&fn_layer[index]);
-}
-
-uint8_t keymap_fn_keycode(uint8_t index)
-{
- return pgm_read_byte(&fn_keycode[index]);
-}
diff --git a/keyboard/IIgs/led.c b/keyboard/IIgs/led.c deleted file mode 100644 index f76545f0ba..0000000000 --- a/keyboard/IIgs/led.c +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ -} diff --git a/keyboard/IIgs/matrix.c b/keyboard/IIgs/matrix.c deleted file mode 100644 index 6ca55b7ea2..0000000000 --- a/keyboard/IIgs/matrix.c +++ /dev/null @@ -1,363 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "led.h" - - -#if (MATRIX_COLS > 16) -# error "MATRIX_COLS must not exceed 16" -#endif -#if (MATRIX_ROWS > 255) -# error "MATRIX_ROWS must not exceed 255" -#endif - - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -// matrix state buffer(1:on, 0:off) -#if (MATRIX_COLS <= 8) -static uint8_t *matrix; -static uint8_t *matrix_prev; -static uint8_t _matrix0[MATRIX_ROWS]; -static uint8_t _matrix1[MATRIX_ROWS]; -#else -static uint16_t *matrix; -static uint16_t *matrix_prev; -static uint16_t _matrix0[MATRIX_ROWS]; -static uint16_t _matrix1[MATRIX_ROWS]; -#endif - -#ifdef MATRIX_HAS_GHOST -static bool matrix_has_ghost_in_row(uint8_t row); -#endif -static uint8_t read_col(uint8_t row); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - // Input with pull-up(DDR:0, PORT:1) - // Column C1 ~ C7 (PortC0-6) - // Column C0(Port E1) - DDRC &= ~0b01111111; - PORTC |= 0b01111111; - DDRE &= ~0b00000010; - PORTE |= 0b00000010; - //DDRB &= ~0b00000100; - //PORTB |= 0b00000100; - // modifier B3/4,F4/5,E4 always input - // A0 - //DDRA |= 0b00000001; - //PORTA &= 0b00000001; - //DDRB |= 0b00011000; - //PORTB &= 0b00011000; - //DDRF |= ~0b00110000; - //PORTF &= 0b00110000; - //DDRB &= ~0b00011000; - //PORTB |= 0b00011000; - //DDRF &= ~0b00110000; - //PORTF |= 0b00110000; - //DDRE &= ~0b00010000; - //PORTE |= 0b00010000; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; - matrix = _matrix0; - matrix_prev = _matrix1; -} - -uint8_t matrix_scan(void) -{ - if (!debouncing) { - uint8_t *tmp = matrix_prev; - matrix_prev = matrix; - matrix = tmp; - } - - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - unselect_rows(); - select_row(i); - _delay_us(30); // without this wait read unstable value. - if ( i == ( MATRIX_ROWS - 1 ) ) { // CHECK CAPS LOCK - if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { // CAPS LOCK is ON on HOST - if ( ~read_col(i) & (1<< 4) ) { // CAPS LOCK is still DOWN ( 0bXXX1_XXXX) - matrix[i] = ~read_col(i) & 0b11101111; // change CAPS LOCK as released - } else { // CAPS LOCK in UP - matrix[i] = ~read_col(i) | 0b00010000; // send fake caps lock down - } - } else { // CAPS LOCK is OFF on HOST - if (matrix[i] != (uint8_t)~read_col(i)) { - matrix[i] = (uint8_t)~read_col(i); - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); print("\n"); - } - debouncing = DEBOUNCE; - } - } - } else { - if (matrix[i] != (uint8_t)~read_col(i)) { - matrix[i] = (uint8_t)~read_col(i); - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); print("\n"); - } - debouncing = DEBOUNCE; - } - } - } - unselect_rows(); - - if (debouncing) { - debouncing--; - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] != matrix_prev[i]) { - return true; - } - } - return false; -} - -inline -bool matrix_has_ghost(void) -{ -#ifdef MATRIX_HAS_GHOST - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix_has_ghost_in_row(i)) - return true; - } -#endif - return false; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ -// if ( row == ( MATRIX_ROWS - 1 ) && col == 4) { // CHECK CAPS LOCK -// if (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) { // CAPS LOCK is ON on HOST -// if ((matrix_prev[row] & 0b00010000) && (~matrix[row] & 0b00010000)) { -// debug("CapsLock Reverse:");debug_hex(matrix[row]); -// matrix[row] |= 0b00010000; -// matrix_prev[row] &= ~0b00010000; -// debug("->");debug_hex(matrix[row]);debug("\n"); -// } -// } -// } - return (matrix[row] & (1<<col)); -} - -inline -#if (MATRIX_COLS <= 8) -uint8_t matrix_get_row(uint8_t row) -#else -uint16_t matrix_get_row(uint8_t row) -#endif -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 01234567\n"); - for (uint8_t row = 0; row < matrix_rows(); row++) { - phex(row); print(": "); -#if (MATRIX_COLS <= 8) - pbin_reverse(matrix_get_row(row)); -#else - pbin_reverse16(matrix_get_row(row)); -#endif -#ifdef MATRIX_HAS_GHOST - if (matrix_has_ghost_in_row(row)) { - print(" <ghost"); - } -#endif - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { -#if (MATRIX_COLS <= 8) - count += bitpop(matrix[i]); -#else - count += bitpop16(matrix[i]); -#endif - } - return count; -} - -#ifdef MATRIX_HAS_GHOST -inline -static bool matrix_has_ghost_in_row(uint8_t row) -{ - // no ghost exists in case less than 2 keys on - if (((matrix[row] - 1) & matrix[row]) == 0) - return false; - - // ghost exists in case same state as other row - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - if (i != row && (matrix[i] & matrix[row]) == matrix[row]) - return true; - } - return false; -} -#endif - -inline -static uint8_t read_col(uint8_t row) -{ - // For normal : Column C1 ~ C7 (PortC0-6), C0(Port E1) - // For modifier : B3(CNTRL)/4(SHIFT),F4(CMD/GUI)/5(OPTION,ALT) - // Modifier would be copied to report->mods except E4(CAPSLOCK) - uint8_t tmp; - if ( row == 10 ) { - tmp = 0xC0; - tmp |= (PINB >> 3 ) & 0b00000011; // LEFT CTRL is 0bit in modifier (HID Spec) - // LEFT SHIFT is 1bit in modifier (HID Spec) - tmp |= (PINF >> 3 ) & 0b00000100; // LEFT ALT is 2bit in modifier (HID Spec) - tmp |= (PINF >> 1 ) & 0b00001000; // LEFT GUI is 3bit in modifier (HID Spec) - tmp |= (PINA << 4 ) & 0b00010000; // CAPSLOCK - tmp |= (PINB << 3 ) & 0b00100000; // POWER - } else { - tmp = 0x00; - tmp = (PINE >> 1)&0b00000001; - tmp |= PINC << 1 ; - } - return tmp; -} - -inline -static void unselect_rows(void) -{ - // Hi-Z(DDR:0, PORT:0) to unselect - // DDR : 1, output 0, input - DDRB &= ~0b00000011; // PB: 1,0 - PORTB &= ~0b00000011; - DDRD &= ~0b00010000; // PD: 4 - PORTD &= ~0b00010000; - DDRE &= ~0b11000000; // PE: 7,6 - PORTE &= ~0b11000000; - DDRF &= ~0b11000111; // PF: 7,6,2,1,0 - PORTF &= ~0b11000111; - // to unselect virtual row(modifier), set port to output with low - DDRA |= 0b00000001; // PA: 0 for CAPSLOCK - PORTA &= ~0b00000001; - DDRB |= 0b00011100; // PB: 3,4 for modifier(row10) - PORTB &= ~0b00011100; // PB: 2 for power - DDRF |= 0b00110000; // PF: 4,5 for modifier - PORTF &= ~0b00110000; -} - -inline -static void select_row(uint8_t row) -{ - // Output low(DDR:1, PORT:0) to select - // with row enable, column could send low to AVR when pressed - // row: 0 1 2 3 4 5 6 7 8 9 - // pin: PB1, PB0, PE7, PE6, PD4, PF2, PF0, PF1, PF6 PF7 - switch (row) { - case 0: - DDRB |= (1<<1); - PORTB &= ~(1<<1); - break; - case 1: - DDRB |= (1<<0); - PORTB &= ~(1<<0); - break; - case 2: - DDRE |= (1<<7); - PORTE &= ~(1<<7); - break; - case 3: - DDRE |= (1<<6); - PORTE &= ~(1<<6); - break; - case 4: - DDRD |= (1<<4); - PORTD &= ~(1<<4); - break; - case 5: - DDRF |= (1<<2); - PORTF &= ~(1<<2); - break; - case 6: - DDRF |= (1<<0); - PORTF &= ~(1<<0); - break; - case 7: - DDRF |= (1<<1); - PORTF &= ~(1<<1); - break; - case 8: - DDRF |= (1<<6); - PORTF &= ~(1<<6); - break; - case 9: - DDRF |= (1<<7); - PORTF &= ~(1<<7); - break; - case 10: - // modifier has no row enable - // to select virtual row, set port as input - DDRA &= ~0b00000001; - PORTA |= 0b00000001; - DDRB &= ~0b00011100; - PORTB |= 0b00011100; - DDRF &= ~0b00110000; - PORTF |= 0b00110000; - break; - - } -} diff --git a/keyboard/Bantam44/Bantam44.c b/keyboard/bantam44/Bantam44.c index ad91401eeb..ad91401eeb 100644 --- a/keyboard/Bantam44/Bantam44.c +++ b/keyboard/bantam44/Bantam44.c diff --git a/keyboard/Bantam44/Bantam44.h b/keyboard/bantam44/Bantam44.h index fa5b9df9e4..fa5b9df9e4 100644 --- a/keyboard/Bantam44/Bantam44.h +++ b/keyboard/bantam44/Bantam44.h diff --git a/keyboard/Bantam44/Makefile b/keyboard/bantam44/Makefile index e7dea9f602..e7dea9f602 100644 --- a/keyboard/Bantam44/Makefile +++ b/keyboard/bantam44/Makefile diff --git a/keyboard/Bantam44/README.md b/keyboard/bantam44/README.md index cd059a66c9..cd059a66c9 100644 --- a/keyboard/Bantam44/README.md +++ b/keyboard/bantam44/README.md diff --git a/keyboard/Bantam44/config.h b/keyboard/bantam44/config.h index a55f629990..a55f629990 100644 --- a/keyboard/Bantam44/config.h +++ b/keyboard/bantam44/config.h diff --git a/keyboard/Bantam44/keymaps/default.c b/keyboard/bantam44/keymaps/default.c index 17ade6241f..17ade6241f 100644 --- a/keyboard/Bantam44/keymaps/default.c +++ b/keyboard/bantam44/keymaps/default.c diff --git a/keyboard/ergodox_ez/ergodox_ez.h b/keyboard/ergodox_ez/ergodox_ez.h index 1e446baf6f..402abc167b 100644 --- a/keyboard/ergodox_ez/ergodox_ez.h +++ b/keyboard/ergodox_ez/ergodox_ez.h @@ -1,13 +1,9 @@ #ifndef ERGODOX_EZ_H #define ERGODOX_EZ_H -#include "matrix.h" -#include "keymap_common.h" -#include "backlight.h" -#include <stddef.h> +#include "quantum.h" #include <stdint.h> #include <stdbool.h> -#include <avr/io.h> #include "i2cmaster.h" #include <util/delay.h> diff --git a/keyboard/ergodox_ez/keymaps/erez_experimental/erez_experimental.hex b/keyboard/ergodox_ez/keymaps/erez_experimental/erez_experimental.hex index bdd707165f..5e010380c6 100644 --- a/keyboard/ergodox_ez/keymaps/erez_experimental/erez_experimental.hex +++ b/keyboard/ergodox_ez/keymaps/erez_experimental/erez_experimental.hex @@ -1,31 +1,31 @@ :100000000C945C020C94A0020C94A0020C94A0022C
:100010000C94A0020C94A0020C94A0020C94A002D8
-:100020000C94A0020C94A0020C94970C0C94690DF3
-:100030000C94D61B0C94A0020C94A0020C94A00269
+:100020000C94A0020C94A0020C945C0D0C942E0E67
+:100030000C946C1C0C94A0020C94A0020C94A002D2
:100040000C94A0020C94A0020C94A0020C94A002A8
-:100050000C94A0020C943D1C0C94A0020C94A002E1
+:100050000C94A0020C94D31C0C94A0020C94A0024B
:100060000C94A0020C94A0020C94A0020C94A00288
:100070000C94A0020C94A0020C94A0020C94A00278
:100080000C94A0020C94A0020C94A0020C94A00268
:100090000C94A0020C94A0020C94A0020C94A00258
-:1000A0000C94A0020C94A0020C94A002CE0DF00DB2
-:1000B000DB0EF00DDB0E320E550EDB0EAA0EBD0E62
-:1000C000CC11CC11FB11FB1146126812CF13CF13C8
-:1000D0007312CF131C131C13C013CF13CF13C913E8
-:1000E0002913291329132913291329132913291330
-:1000F0002913291329132913291329132913291320
-:100100003A1348134F13561360130000F0A100C8B0
-:1001100001C82E004C002A000030358100001E006E
+:1000A0000C94A0020C94A0020C94A002930EB50E26
+:1000B000A00FB50EA00FF70E1A0FA00F6F0F820F33
+:1000C0004E124E127D127D12C412E6123E143E14E0
+:1000D000F1123E14981398132F143E143E14381442
+:1000E000A513A513A513A513A513A513A513A51350
+:1000F000A513A513A513A513A513A513A513A51340
+:10010000B713C413CB13D213DC130000F0A100C843
+:1001100001C82E004C002A008450354100001E000A
:10012000140004001D7134004D001F001A00160059
-:100130001B00E104C1002000080007000600500079
+:100130001B00E104145020000800070006005000D6
:100140002C0021001500090019004F004A00220070
:1001500017000A00050000006574500001540000FB
:100160002F7F0000E3004F000154000030770000B3
:10017000E20023001C000B00110000002971240084
:1001800018000D74100052004B0025000C000E00EA
:10019000360051002800260012000F0037002F0003
-:1001A0002B81270013003382387130004E002D0060
-:1001B0003100347801302D81000001000100010080
+:1001A0002B41270013003342387130004E002D00E0
+:1001B0003100347885502D4100000100010001001C
:1001C0000100010000003A0001001E0023000100B0
:1001D00001003B0001001F002400010001003C0061
:1001E0000100200025004B0101003D00010021001D
@@ -74,1083 +74,1034 @@ :100490000175088101050819012905950575019166
:1004A000029501750391010507190029FF15002523
:1004B000FF950675088100C011241FBECFEFDAE05A
-:1004C000DEBFCDBF04B603FE24C08091F20190913F
-:1004D000F301A091F401B091F5018730904BA74052
-:1004E000B04BB9F41092F2011092F3011092F401A2
-:1004F0001092F50114BE84B7877F84BF88E10FB6E0
+:1004C000DEBFCDBF04B603FE24C08091F30190913E
+:1004D000F401A091F501B091F6018730904BA7404F
+:1004E000B04BB9F41092F3011092F4011092F5019F
+:1004F0001092F60114BE84B7877F84BF88E10FB6DF
:10050000F89480936000109260000FBEE0E0FFE37B
-:10051000099511E0A0E0B1E0EAEEF7E402C0059031
-:100520000D92A433B107D9F711E0A4E3B1E001C003
-:100530001D92A23FB107E1F70E94DF090C94F3235B
-:100540000C940000CF93DF93EC01662319F0613027
-:1005500079F031C08A818823C9F082E00E94561167
-:100560008D81982F907F71F080FD0CC086E21BC0BA
-:100570008A818823D9F082E00E9456118D81982FBC
-:10058000907F71F48D818F708D8315C08D81807FF8
-:1005900019F086E20E94071182E00E945D110BC0F3
-:1005A00080FDF0CF87E20E943F1005C08D81807FE3
-:1005B00099F387E2EFCF80E090E0DF91CF9108954B
-:1005C00008956091B1017091B2018091B301909151
-:1005D000B4010E943D1B56985E9825982D98269848
-:1005E0002E9827982F98813019F0823021F00895A5
-:1005F000259A2D9A0895269A2E9A08950C94E10230
-:1006000056985E9825982D9826982E9827982F987A
-:100610008FEF90E0909389008093880090938B00F7
-:1006200080938A0090938D0080938C00259A2D9A58
-:100630002FEF80E792E0215080409040E1F700C02A
-:100640000000269A2E9A2FEF80E792E021508040FA
-:100650009040E1F700C00000279A2F9A2FEF80E723
-:1006600092E0215080409040E1F700C000002598C2
-:100670002D982FEF80E792E0215080409040E1F7E5
-:1006800000C0000026982E982FEF80E792E02150BE
-:1006900080409040E1F700C0000027982F985698BE
-:1006A0005E9825982D9826982E9827982F9808952B
-:1006B00089EA8093800089E08093810024982C98B7
-:1006C0003F988AB18F748AB96E98479A8BB1806BC4
-:1006D0008BB9769A0E9400030C94E00280E280932A
-:1006E00000018091340181110EC00E94BD0381E0A0
-:1006F000809334012FEF83ED90E3215080409040B0
-:10070000E1F700C0000080E40E94C3038093000171
-:1007100081112EC00E94ED0380930001811128C039
-:100720000E94ED0380930001811122C08FE30E949B
-:10073000ED038093000181111BC00E94E50380E45A
-:100740000E94C30380930001811112C08CE00E94BB
-:10075000ED038093000181110BC00E94ED03809393
-:100760000001811105C08FE30E94ED038093000119
-:100770000E94E5038091000108951092B9008AE07B
-:100780008093B800089594EA9093BC009091BC00C7
-:1007900097FFFCCF9091B900987F983021F090316D
-:1007A00011F081E008958093BB0084E88093BC0041
-:1007B0008091BC0087FFFCCF8091B900887F883191
-:1007C00011F0803471F780E0089584E98093BC00D3
-:1007D0008091BC0084FDFCCF08958093BB0084E829
-:1007E0008093BC008091BC0087FFFCCF9091B90042
-:1007F000987F81E0983209F480E0089584E880933E
-:10080000BC008091BC0087FFFCCF8091BB000895A5
-:1008100080910001811115C080E40E94C303809380
-:10082000000181110CC082E10E94ED038093000160
-:10083000811105C08FEF0E94ED03809300010E949B
-:10084000E50384B1807F84B985B1807F85B98AB1A1
-:10085000837F8AB98BB1837F8BB93E984698089580
-:100860000E946E03809300010E94080480B38C7084
-:1008700080BB81B3836F81BBE4E4F1E0A6E3B1E028
-:1008800011921D9281E0E235F807D1F70C945803DC
-:10089000BF92CF92DF92EF92FF920F931F93CF936D
-:1008A000DF9380910001882379F0809135018F5F7B
-:1008B00080933501811108C00E946E03809300016E
-:1008C000811102C00E94000306E311E0C0E0D0E005
-:1008D000DD24D39482E0C82EEE24E394F12CC730BB
-:1008E00000F580910001811162C080E40E94C30381
-:1008F00080930001811112C082E10E94ED03809378
-:10090000000181110BC0C7010C2E01C0880F0A9491
-:10091000EAF780950E94ED03809300010E94E503B1
-:1009200046C0CA30A1F028F4C83059F0C93061F08F
-:1009300005C0CC3089F070F0CD3089F0209A28982D
-:1009400010C0219A29980DC0229A2A980AC0239A89
-:100950002B9807C0529A01C0539A5B9802C03E9AE6
-:100960004698E0EAEA95F1F78FB179995AC092E09A
-:1009700081708D25892B7C9B02C090E001C094E0A2
-:10098000892B7D9B02C090E001C098E0892B7E9B63
-:1009900002C090E001C090E1892B9FB19095991F12
-:1009A0009927991F9295990F907E892B0FC080915E
-:1009B000000181114BC080E40E94C30380930001B9
-:1009C000882389F1B12C0E94E5038B2DF8019081D9
-:1009D000981719F08083C09201010E9408042196A3
-:1009E0000F5F1F4FCE30D10509F079CF8091010103
-:1009F000882371F1815080930101882339F08FE9B8
-:100A00009FE00197F1F700C0000022C0A4E4B1E02C
-:100A1000E6E3F1E081918D9391E0E434F907D1F7B9
-:100A200017C090E0A5CF83E10E94ED038093000101
-:100A30008111C8CF81E40E94C3038093000181111A
-:100A4000C1CF0E94FE03B82EB094BDCF80E0BECFD0
-:100A50000E94FE0281E0DF91CF911F910F91FF90E4
-:100A6000EF90DF90CF90BF900895E82FF0E0EC5B1F
-:100A7000FE4F808108950895089596E0799FF001D2
-:100A8000112494E5899FE00DF11D1124E60FF11D5D
-:100A9000EE0FFF1FEE5EFE4F859194910895880F33
-:100AA000991F86579040FC01859194910895880F75
-:100AB000991F865F9E4FFC018591949108950F9335
-:100AC0001F93CF93DF93EC01811520E3920730F55C
-:100AD000811530E2930708F0B1C08B3B910588F493
-:100AE000883A910508F058C0853A910508F049C048
-:100AF0008430910508F043C08130910509F4C2C1EA
-:100B0000BEC18F3F910509F0D0F5803F910508F0F7
-:100B100092C0805E9109089790F1B1C1C11581E53D
-:100B2000D807A8F4C23090E5D90708F09FC0C115D6
-:100B300020E5D20709F486C008F092C0C11580E410
-:100B4000D80708F09CC18E011127106CDCC1C115BB
-:100B500090E8D90758F4C11520E7D20708F08BC1F7
-:100B6000C11530E6D30708F423C189C1C11580E956
-:100B7000D80708F084C18E011F70106AC4C18E01AD
-:100B8000C2C1853A910509F480C1863A910509F4FC
-:100B90007FC103E810E4B7C1883A910509F47BC12D
-:100BA000893A910509F47AC18A3A910509F479C123
-:100BB0008B3A910509F478C18C3A910509F477C113
-:100BC0008D3A910509F476C1803B910509F475C110
-:100BD0008E3A910509F474C18F3A910509F473C1F5
-:100BE000813B910509F472C1823B910509F471C101
-:100BF000833B910509F470C1843B910509F46FC1F1
-:100C0000853B910509F46EC1863B910509F46DC1E0
-:100C1000873B910509F46CC1883B910509F46BC1D0
-:100C2000893B910509F46AC18A3B910509F069C1C4
-:100C30000AE216E468C18C01106565C19F700E94CC
-:100C4000570562C10E9419149FEF24E33CE09150C4
-:100C500020403040E1F700C000000E94621C53C1F8
-:100C60008091D30181608093D3014DC10E940A1EFF
-:100C7000811102C00E94F01D0E94271E90E09093F7
-:100C8000F2018093F101C23080E5D80721F4809110
-:100C9000F101816086C0C43090E5D90721F48091CC
-:100CA000F10182607EC0C63020E5D20721F4809138
-:100CB000F101846076C0C83030E5D30719F4809123
-:100CC000F10127C0CA3080E5D80721F48091F101F5
-:100CD000806167C0CC3090E5D90721F48091F101A3
-:100CE00080625FC0CE3020E5D20721F48091F1010F
-:100CF000806457C0C03130E5D30721F48091F10101
-:100D000080684FC0C23180E5D80729F48091F10195
-:100D10008460886046C0C33090E5D90721F4809193
-:100D2000F1018E7F3EC0C53020E5D20721F48091CD
-:100D3000F1018D7F36C0C73030E5D30721F48091B3
-:100D4000F1018B7F2EC0C93080E5D80719F480915E
-:100D5000F10126C0CB3090E5D90721F48091F10153
-:100D60008F7E1FC0CD3020E5D20721F48091F101A4
-:100D70008F7D17C0CF3030E5D30721F48091F1018A
-:100D80008F7B0FC0C13180E5D80721F48091F1013C
-:100D90008F7707C0C331D04531F48091F1018B7F4B
-:100DA000877F8093F1018091F1010E942B1EABC0DF
-:100DB0008D2F99278F70992781309105E9F48E0145
-:100DC000037011279C0102C0220F331F0A95E2F71E
-:100DD00089011C68CE01E4E0880F991FEA95E1F7CC
-:100DE00088279370082B192BF3E0CC0FDD1FFA95A1
-:100DF000E1F7C076DD272CC08230910529F41C2F45
-:100E00000027016F106A7FC08330910561F4CE0125
-:100E10008370992701E010E002C0000F111F8A952E
-:100E2000E2F71C680EC084309105A9F4CE018370EE
-:100E3000992701E010E002C0000F111F8A95E2F728
-:100E40001A6863E0CC0FDD1F6A95E1F7C07ED770AA
-:100E50000C2B1D2B58C08530910529F41C2F002721
-:100E6000046F106A50C0069709F04DC0CF71DD279E
-:100E70001C2F002702C08E011F70106244C000E0CA
-:100E800010E041C001E010E03EC001E810E43BC0CA
-:100E900002E810E438C002EE14E435C009EE14E4B0
-:100EA00032C00AEE14E42FC005EB14E42CC006EBAC
-:100EB00014E429C007EB14E426C00CEC14E423C0AE
-:100EC0000DEC14E420C003E815E41DC00AE815E4A5
-:100ED0001AC002E915E417C004E915E414C001E2E0
-:100EE00016E411C003E216E40EC004E216E40BC0DF
-:100EF00005E216E408C006E216E405C007E216E4BF
-:100F000002C000E014E4C801DF91CF911F910F915E
-:100F1000089596E0799FF001112494E5899FE00DF2
-:100F2000F11D1124E60FF11DEE0FFF1FEE5EFE4FC7
-:100F300085919491803E9105E0F4803C910558F5AF
-:100F40008133910509F46FC048F48932910509F4A1
-:100F500063C08A32910509F46DC072C0893391056E
-:100F6000E9F082389105D1F08533910509F44DC03F
-:100F700067C0833E910581F138F4803E9105B9F058
-:100F8000823E9105D9F05CC0863E910561F1873EB5
-:100F90009105A1F155C00E944F0508952091F101DE
-:100FA00020FD02C021FF4CC080EE90E049C080913E
-:100FB000F10180FFF9CF89E390E042C08091F10117
-:100FC00082FF0EC08091F10184FF03C080E090E0B9
-:100FD00037C083EE90E034C08091F10182FFF2CF00
-:100FE00082EE90E02DC08091F10183FF0BC08091D3
-:100FF000F10184FDEBCF87EE90E022C08091F101FA
-:1010000083FFF5CF86EE90E01BC08091F10185FF54
-:1010100007C089E290E014C08091F10185FFF9CF0B
-:1010200085E390E00DC08091F10186FF07C08AE260
-:1010300090E006C08091F10186FFF9CF81E390E056
-:101040000E945F05089508950C9423088091620121
-:101050000895CF93DF9300D01F92CDB7DEB72091D4
-:10106000E801243019F523E029839B838A832093A8
-:10107000E9008FEF9091E800815095FD06C095ED55
-:101080009A95F1F700008111F5CF8091E80085FF76
-:101090000DC040E050E063E070E0CE0101960E9498
-:1010A0008A0A8091E8008E778093E8000F900F9075
-:1010B0000F90DF91CF910895CF93DF9300D01F92CF
-:1010C000CDB7DEB72091E801243021F522E0298355
-:1010D0009B838A8383E08093E9008FEF9091E800FF
-:1010E000815095FD06C095ED9A95F1F700008111AC
-:1010F000F5CF8091E80085FF0DC040E050E063E04F
-:1011000070E0CE0101960E948A0A8091E8008E77F5
-:101110008093E8000F900F900F90DF91CF9108958A
-:101120002091E8012430F1F422E02093E9002FEF30
-:101130003091E800215035FD06C035ED3A95F1F7C4
-:1011400000002111F5CF2091E80025FF0BC040E001
-:1011500050E065E070E00E948A0A8091E8008E7796
-:101160008093E8000895CF93DF93EC018091E8012C
-:10117000843009F046C090910C019923D9F09091E8
-:101180000D019923B9F08093E9008FEF9091E80069
-:10119000815095FD06C095E19A95F1F70000811107
-:1011A000F5CF8091E80085FF2CC040E050E060E181
-:1011B00070E017C081E08093E9008FEF9091E80024
-:1011C000815095FD06C095ED9A95F1F700008111CB
-:1011D000F5CF8091E80085FF14C040E050E068E062
-:1011E00070E0CE010E948A0A8091E8008E77809399
-:1011F000E80080E1FE01A2E5B1E001900D928A9540
-:10120000E1F7DF91CF9108958091E701811109C045
-:101210000E941C0C0E94790C8091E20084608093F3
-:10122000E20008951092E7010895089508950C943E
-:10123000D01B42E061EC81E00E94960B42E061EC41
-:1012400082E00E94960B42E061EC83E00E94960BE4
-:1012500042E161EC84E00C94960B8091EA018330CA
-:1012600009F455C030F4813071F0823009F48EC039
-:1012700008958A3009F47AC08B3009F460C089304F
-:1012800009F09CC020C08091E901813A09F096C024
-:101290008091E800877F8093E8008091ED01909134
-:1012A000EE01892B21F060E080E090E003C060E176
-:1012B00082E591E070E00E94D30A8091E8008B778C
-:1012C0008093E80008958091E901813209F076C0A9
-:1012D0008091ED019091EE01009719F0039709F0CC
-:1012E0006DC08091E800877F8093E8008091E800DE
-:1012F00082FD05C08091E8018111F8CF5FC0809127
-:10130000F100809362018091E8008B7753C0809157
-:10131000E901813A09F052C08091ED019091EE010E
-:10132000892B09F04BC08091E800877F8093E8000B
-:101330008091E80080FFFCCF80910C0136C0809145
-:10134000E9018132D9F58091ED019091EE01892B6F
-:10135000A9F58091E800877F8093E8000E94CB0B7D
-:101360008091EB0180930C010C9419148091E90198
-:10137000813221F58091E800877F8093E8000E9408
-:10138000CB0B8091EC018093630108958091E9017A
-:10139000813AA1F48091E800877F8093E8008091F2
-:1013A000E80080FFFCCF809163018093F100809181
-:1013B000E8008E778093E8000C94CB0B089584B7F7
-:1013C000877F84BF88E10FB6F89480936000109205
-:1013D00060000FBE90E080E80FB6F8948093610043
-:1013E000909361000FBE0E94650F0E941C0C0E942A
-:1013F000790C8091E20084608093E20078940E94EE
-:10140000F40E0E94670F82E091E00E94110F80911C
-:10141000E801853069F40E94901B8091E6018823E1
-:10142000B1F30E94BB1B882391F30E94740AEFCF93
-:101430000E946D0FECCF292F332723303105A9F0FF
-:101440006CF42130310509F442C02230310509F035
-:1014500043C08DE690E02EE333E042C021323105F7
-:10146000C9F02232310519F137C099278130910531
-:1014700041F08230910541F0892B71F5EAE3F3E008
-:1014800005C0E2E2F3E002C0EAE0F3E0849190E01C
-:101490009F0126C0643000F5E62FF0E0EE0FFF1F3D
-:1014A000EE5DFE4F2081318189E090E019C064300B
-:1014B00098F4E62FF0E0DF01AA0FBB1FA65EBE4F37
-:1014C0002D913C91EA5EFE4F808190E009C082E15F
-:1014D00090E02BEA33E004C080E090E020E030E0D0
-:1014E000FA0131832083089580E189BD82E189BDBD
-:1014F00009B400FEFDCF8091D8008F7D8093D80085
-:101500008091E00082608093E0008091E00081FDA6
-:10151000FCCF0895CF92DF92EF92FF920F931F932B
-:10152000CF93DF937C018B01EA010E94EC0B8111C8
-:1015300031C0209731F088819981081B190BE80E82
-:10154000F91EC12CD12C0115110519F18091E8006B
-:1015500085FD14C08091E8008E778093E800209785
-:1015600041F0888199818C0D9D1D9983888385E048
-:1015700011C00E94EC0B882331F30CC0F70181915C
-:101580007F018093F10001501109FFEFCF1ADF0AAC
-:10159000DACF80E0DF91CF911F910F91FF90EF9014
-:1015A000DF90CF9008952091EF013091F001261740
-:1015B000370748F06115710539F42091E8002E775E
-:1015C0002093E80001C0B901FC0120E0611571051C
-:1015D000B9F18091E801882309F440C0853009F40D
-:1015E0003FC08091E80083FD3DC08091E80082FF0C
-:1015F00006C08091E80082FF26C080E008958091B7
-:10160000E80080FFE3CF2091F3008091F20090E0AA
-:10161000922B6115710551F08830910538F42191B4
-:101620002093F100615071090196F3CF21E00897F2
-:1016300009F020E08091E8008E778093E800C6CF23
-:101640002111C7CFD6CF8091E801882339F08530AA
-:1016500039F08091E80083FFCCCF04C082E0089588
-:1016600083E0089581E008952091EF013091F00129
-:101670002617370748F06115710539F42091E80005
-:101680002E772093E80001C0B901FC0120E061152C
-:101690007105C1F18091E801882309F441C08530CA
-:1016A00009F440C08091E80083FD3EC08091E800CD
-:1016B00082FF06C08091E80082FF27C080E0089585
-:1016C0008091E80080FFE3CF2091F3008091F20049
-:1016D00090E0922B6115710559F08830910540F426
-:1016E00024912093F1003196615071090196F2CF57
-:1016F00021E0089709F020E08091E8008E77809340
-:10170000E800C5CF2111C6CFD5CF8091E80188234D
-:1017100039F0853039F08091E80083FFCBCF04C0E9
-:1017200082E0089583E0089581E00895982F97302E
-:1017300058F59093E900981739F07091EC002091DA
-:10174000ED005091F00003C0242F762F50E021FFD0
-:1017500019C03091EB003E7F3093EB003091ED00EB
-:101760003D7F3093ED003091EB0031603093EB0022
-:101770007093EC002093ED005093F0002091EE0068
-:1017800027FF07C09F5FD3CF8F708093E90081E070
-:10179000089580E008958091E90187FD05C080915A
-:1017A000E80080FF0EC012C08091E80082FD05C0F5
-:1017B0008091E8018111F8CF08958091E8008B773E
-:1017C00008C08091E8018111EACF08958091E80076
-:1017D0008E778093E80008958091E4009091E50071
-:1017E00045E62091EC0020FF21C02091E80020FD7B
-:1017F00021C02091E801222389F0253089F0209131
-:10180000EB0025FD0FC02091E4003091E500281782
-:10181000390739F3415041F0C901E3CF82E008951F
-:1018200083E0089581E0089584E008952091E80020
-:1018300022FFDFCF80E008950E948A0C0E94920C64
-:10184000E0EEF0E0808181608083E8EDF0E080816F
-:101850008F77808319BCA7EDB0E08C918E7F8C933D
-:1018600080818F7E80831092E70108950F931F93EC
-:10187000CF93DF930E948A0C0E94920CC8EDD0E0B7
-:1018800088818F77888388818068888388818F7D2D
-:10189000888319BC1092E8011092E4011092E601CD
-:1018A0001092E50100EE10E0F80180818B7F8083CB
-:1018B00088818160888342E060E080E00E94960B2E
-:1018C000E1EEF0E080818E7F8083E2EEF0E08081C7
-:1018D00081608083808188608083F80180818E7F31
-:1018E0008083888180618883DF91CF911F910F91E0
-:1018F0000895E8EDF0E080818F7E8083E7EDF0E0F1
-:1019000080818160808384E082BF81E08093E701F1
-:101910000C94360CE8EDF0E080818E7F808310928D
-:10192000E20008951092DA001092E10008951F92EB
-:101930000F920FB60F9211242F933F934F935F9303
-:101940006F937F938F939F93AF93BF93EF93FF9387
-:101950008091E10082FF0BC08091E20082FF07C00E
-:101960008091E1008B7F8093E1000E94F30E8091D3
-:10197000DA0080FF1FC08091D80080FF1BC08091DB
-:10198000DA008E7F8093DA008091D90080FF0DC04D
-:1019900080E189BD82E189BD09B400FEFDCF81E00F
-:1019A0008093E8010E94040905C019BC1092E80167
-:1019B0000E9412098091E10080FF19C08091E2002D
-:1019C00080FF15C08091E2008E7F8093E2008091BD
-:1019D000E20080618093E2008091D8008062809371
-:1019E000D80019BC85E08093E8010E941609809117
-:1019F000E10084FF30C08091E20084FF2CC080E1D0
-:101A000089BD82E189BD09B400FEFDCF8091D80077
-:101A10008F7D8093D8008091E1008F7E8093E100DC
-:101A20008091E2008F7E8093E2008091E2008160ED
-:101A30008093E2008091E401882311F084E007C0E4
-:101A40008091E30087FF02C083E001C081E08093C2
-:101A5000E8010E9417098091E10083FF29C080916D
-:101A6000E20083FF25C08091E100877F8093E10041
-:101A700082E08093E8011092E4018091E1008E7F82
-:101A80008093E1008091E2008E7F8093E20080915C
-:101A9000E20080618093E20042E060E080E00E942A
-:101AA000960B8091F00088608093F0000E941509E9
-:101AB000FF91EF91BF91AF919F918F917F916F9126
-:101AC0005F914F913F912F910F900FBE0F901F90FC
-:101AD00018951F920F920FB60F9211242F933F93D8
-:101AE0004F935F936F937F938F939F93AF93BF9326
-:101AF000CF93EF93FF93C091E900CF708091EC00FA
-:101B00001092E9008091F000877F8093F000789434
-:101B10000E94A50D1092E9008091F00088608093EA
-:101B2000F000C093E900FF91EF91CF91BF91AF9189
-:101B30009F918F917F916F915F914F913F912F91E5
-:101B40000F900FBE0F901F9018951F93CF93DF93A8
-:101B5000CDB7DEB7AA970FB6F894DEBF0FBECDBFE4
-:101B6000E9EEF1E08091F100819321E0E13FF2079D
-:101B7000C9F70E942D098091E80083FF1CC12091C4
-:101B8000E9013091EA01832F90E08A30910508F055
-:101B900012C1FC01EA5AFF4F0C94A323203881F0B4
-:101BA000223809F008C18091ED018F708093E9001F
-:101BB0008091EB0085FB882780F91092E90006C030
-:101BC0008091E5019091E601911182609091E80089
-:101BD000977F9093E8008093F1001092F100C5C0C8
-:101BE000822F8D7F09F0E7C0222319F0223061F0A7
-:101BF000E2C08091EB01813009F0DDC0333009F0A3
-:101C000080E08093E60128C08091EB01811124C01F
-:101C10002091ED012F7009F4CEC02093E90080914E
-:101C2000EB0080FF19C08091EB00333011F480622B
-:101C300011C080618093EB0081E090E0022E01C032
-:101C4000880F0A94EAF78093EA001092EA008091E4
-:101C5000EB0088608093EB001092E9008091E8002F
-:101C6000877F86C02111A7C01091EB011F7780915B
-:101C7000E3008078812B8093E3008091E800877FE8
-:101C80008093E8000E94CB0B8091E80080FFFCCF9E
-:101C90008091E30080688093E300112311F083E0DA
-:101CA00001C082E08093E80186C02058223008F00D
-:101CB00082C08091EB019091EC018C3D23E0920772
-:101CC00079F583E08A838AE289834FB7F894DE014D
-:101CD000139620E03EE051E2E32FF0E050935700EE
-:101CE000E49120FF03C0E295EF703F5FEF708E2F0D
-:101CF00090E0EA3010F0C79601C0C0968D939D9396
-:101D00002F5F243149F74FBF8091E800877F809390
-:101D1000E8006AE270E0CE0101960E94D30A14C086
-:101D2000AE014F5F5F4F6091ED010E941B0A00976B
-:101D300009F441C02091E800277F2093E800BC010E
-:101D400089819A810E94340B8091E8008B7780937F
-:101D5000E80031C0203879F58091E800877F8093D2
-:101D6000E8008091E4018093F1008091E8008E7793
-:101D70008093E8000E94CB0B1EC021111CC09091E3
-:101D8000EB019230C0F48091E800877F8093E800F7
-:101D90009093E4010E94CB0B8091E401811104C077
-:101DA0008091E30087FF02C084E001C081E080935E
-:101DB000E8010E9419098091E80083FF0AC0809120
-:101DC000E800877F8093E8008091EB008062809339
-:101DD000EB00AA960FB6F894DEBF0FBECDBFDF9121
-:101DE000CF911F9108950895CF938091E8018823A2
-:101DF000B1F08091E9008F709091EC0090FF02C0EB
-:101E000090E801C090E0C92FC82B1092E9008091A2
-:101E1000E80083FD0E94A50DCF70C093E900CF912B
-:101E2000089590936901809368010895E091680195
-:101E3000F0916901309721F00190F081E02D099433
-:101E400080E00895E0916801F0916901309721F0F8
-:101E50000280F381E02D09940895E0916801F091EA
-:101E60006901309721F00480F581E02D09940895EF
-:101E700020916601309167018217930771F090936A
-:101E8000670180936601E0916801F09169013097E4
-:101E900021F00680F781E02D0994089520916401D6
-:101EA000309165018217930771F0909365018093DB
-:101EB0006401E0916801F0916901309721F000849C
-:101EC000F185E02D0994089508950C94640F0E9403
-:101ED000FF1B0E9430040C94C51CCF92DF92EF923E
-:101EE000FF920F931F93CF93DF93CDB7DEB72B975E
-:101EF0000FB6F894DEBF0FBECDBF0E9448043BE68C
-:101F0000E32E31E0F32E00E010E0C02E802F0E947F
-:101F10003505F701D1907F01D826B1F40F5F1F4F2F
-:101F20000E30110591F78FEF89838A831B820E94FF
-:101F3000081C8160782F9D838C8349815A816B8135
-:101F40008D810E94101041C09091D30191FF04C077
-:101F50008B870E943B058B8520E030E04D2D50E0C3
-:101F6000922FBA01022E02C0759567950A94E2F786
-:101F700060FF25C02E83CF82EE24E394F12C02C0B3
-:101F8000EE0CFF1C9A95E2F790E08E219F2121E054
-:101F9000892B09F420E028870E94081C8160782F93
-:101FA0009A8789874E815F8168858A850E94101093
-:101FB000F801E559FE4F80818E25808306C02F5F92
-:101FC0003F4F2630310561F6A9CF0E94A91F10911D
-:101FD0006A010E94160F1817A1F00E94160F809335
-:101FE0006A012B960FB6F894DEBF0FBECDBFDF910E
-:101FF000CF911F910F91FF90EF90DF90CF900C94B5
-:1020000024082B960FB6F894DEBF0FBECDBFDF912C
-:10201000CF911F910F91FF90EF90DF90CF90089597
-:10202000CF93DF93CDB7DEB72B970FB6F894DEBF13
-:102030000FBECDBF4F83588769877A878B87DE01B4
-:10204000119686E0FD0111928A95E9F785E0FE017F
-:10205000379601900D928A95E1F749815A816B81FB
-:102060007C818D819E810E94E9162B960FB6F89493
-:10207000DEBF0FBECDBFDF91CF9108950895CF93FE
-:10208000C82F882309F4C1C0823859F40E94160F62
-:1020900081FDBBC089E30E94301A0E94071B89E3BF
-:1020A0000CC0833879F40E94160F80FDAEC083E522
-:1020B0000E94301A0E94071B83E50E94701ACF917C
-:1020C0000C94071B843859F40E94160F82FD9DC0A2
-:1020D00087E40E94301A0E94071B87E4EECF8CEF42
-:1020E0008C0F813A48F48C2F0E94D52181118DC02C
-:1020F0008C2F0E94301AE3CF80E28C0F883048F496
-:10210000C77081E001C0880FCA95EAF70E94B41A2F
-:10211000D6CF8BE58C0F833078F4C53A29F0C63AD8
-:1021200031F482E890E005C081E890E002C083E8E5
-:1021300090E0CF910C94380F88E58C0F833108F034
-:1021400064C0C83A39F1C93A41F1CA3A49F1CB3AC7
-:1021500051F1CC3A59F1CD3A61F1C03B69F1CE3A37
-:1021600071F1CF3A79F1C13B81F1C23B89F1C33BB7
-:1021700091F1C43B99F1C53BA1F1C63BA9F1C73B25
-:10218000B1F1C83BB9F1C93BC1F1CA3BC9F58AE21B
-:1021900092E038C082EE90E035C089EE90E032C027
-:1021A0008AEE90E02FC085EB90E02CC086EB90E0AB
-:1021B00029C087EB90E026C08CEC90E023C08DEC2A
-:1021C00090E020C083E891E01DC08AE891E01AC049
-:1021D00082E991E017C084E991E014C081E292E0C5
-:1021E00011C083E292E00EC084E292E00BC085E26F
-:1021F00092E008C086E292E005C087E292E002C069
-:1022000080E090E0CF910C944E0FCF9108958823F9
-:1022100009F44BC0823859F40E94160F81FF45C063
-:1022200089E30E94301A0E94071B89E30CC083389F
-:1022300071F40E94160F80FF38C083E50E94301AA7
-:102240000E94071B83E50E94701A0C94071B8438B8
-:1022500059F40E94160F82FF28C087E40E94301AAA
-:102260000E94071B87E4EFCF9CEF980F913A58F339
-:1022700090E2980F983050F4877091E001C0990F68
-:102280008A95EAF7892F0E94BA1ADFCF9BE5980F4B
-:10229000933020F480E090E00C94380F885A83311A
-:1022A00020F480E090E00C944E0F0895882321F0F4
-:1022B0000E94B41A0C94071B0895882321F00E94F1
-:1022C000BA1A0C94071B08958F929F92AF92BF92F7
-:1022D000CF92DF92EF92FF920F931F93CF93DF93F2
-:1022E00000D000D01F92CDB7DEB77C0185E0F701AA
-:1022F000DE01119601900D928A95E1F7F701D080E9
-:1023000011810281B580B2942FE0B2222381348101
-:10231000232B39F01F3F39F481E0FFEFDF1203C0B8
-:1023200003C081E001C080E080FD5DC20E94CB1946
-:10233000882319F082E00E940E1AC7010E943E1005
-:10234000D9821A8369817A81802F0E949119182F6E
-:10235000C92E0E9445190E94181801110E94D11A15
-:102360000E94291A882379F0002369F080E2810F06
-:10237000883048F082E00E940E1A0E94291ADD245B
-:10238000D394D82601C0D12CEC2DE295EF70F0E06B
-:10239000E05AFF4F0C94A3238C2D807F9C2D9F70BF
-:1023A000B92E882319F0B29490EFB922002389F056
-:1023B000BB2009F4DAC180E2810F883020F48B2D34
-:1023C0000E94B41A03C08B2D0E94C41A0E94071BDE
-:1023D000CCC1812F0E940711BB2009F4E0C1105E1F
-:1023E0008B2D183018F40E94BA1A02C00E94CA1A23
-:1023F0000E94071BD4C18C2D807F9C2D9F70A92E1D
-:10240000803219F0A29480EFA822112319F0113024
-:1024100049F132C0002391F0BB2091F181E0B81264
-:1024200004C08A2D0E94E41ABAC192E0B91228C0F1
-:102430000E94ED1A8A2D0E94981922C0BB2079F0C3
-:10244000E1E0BE1208C00E94B11A8A2109F4A7C1B6
-:102450000E949B1904C0F2E0BF1609F4A0C10E94BB
-:10246000ED1A12C0002329F081E08B1508F497C102
-:1024700007C0B11094C108C0002321F0B11075C18C
-:102480008A2DEFC0B11078C18A2DF1C02C2D269570
-:102490002695237030E02115310521F021303105DA
-:1024A00061F07DC1002321F0812F9C2D937002C02B
-:1024B00080E090E00E94380F72C1002321F0812F4C
-:1024C0009C2D937002C080E090E00E944E0F67C187
-:1024D000812F002319F00E94B11E02C00E94191F13
-:1024E0000E949E1F5CC18C2D837009F04FC00111AA
-:1024F00056C1212F229526952770220F220F812F5A
-:102500008F70882E912CA12CB12C022E04C0880C27
-:10251000991CAA1CBB1C0A94D2F714FF10C06FE0D0
-:1025200070E080E090E004C0660F771F881F991F5D
-:102530002A95D2F7609570958095909503C060E0DC
-:1025400070E0CB012C2D269526952370422F50E06C
-:102550004230510569F04330510589F068297929E5
-:102560008A299B294130510571F00E943D1817C1FD
-:10257000682979298A299B290E94571810C10E942D
-:102580003D18C501B4010E94231809C1002319F0A8
-:102590008C2D817001C08695882309F400C1212FFC
-:1025A000229526952770220F220F812F8F70882E5B
-:1025B000912CA12CB12C022E04C0880C991CAA1CB1
-:1025C000BB1C0A94D2F714FF10C06FE070E080E0EB
-:1025D00090E004C0660F771F881F991F2A95D2F7D5
-:1025E000609570958095909503C060E070E0CB0198
-:1025F0002C2D269526952370422F50E04230510510
-:1026000069F04330510589F0682979298A299B2985
-:102610004130510571F00E941119C1C06829792912
-:102620008A299B290E942B19BAC00E941119C50141
-:10263000B4010E94F718B3C0412F50E0FA01E05EE8
-:10264000F109E531F10508F08BC0E059FF4F0C941A
-:10265000A3231F708C2D8F71002331F00E949018DE
-:10266000812F0E9456119BC00E94B118812F0E9499
-:102670005D1195C0002339F0B11091C08C2D8F7180
-:102680000E94D6188CC091E09B1508F488C0F6CF44
-:10269000002339F08C2D8F710E94901880C0002388
-:1026A000C9F38C2D8F710E94B11879C0002329F0D5
-:1026B0008C2D8F710E947B1872C00E9471186FC0A0
-:1026C0000023C9F00E9495190E94BA1A0E94C719E6
-:1026D000843029F40E94071A8C2D8F7171C0E1E0BB
-:1026E000EB1508F480C01C2D1F71812F0E949018DB
-:1026F00063E0812F0EC00E9495190E94B41AF1E088
-:10270000FB15D0F40E94071A0E949B1964E08C2DDF
-:102710008F710F900F900F900F900F90DF91CF91CE
-:102720001F910F91FF90EF90DF90CF90BF90AF90EF
-:102730009F908F900C94F71981E00F900F900F905D
-:102740000F900F90DF91CF911F910F91FF90EF901D
-:10275000DF90CF90BF90AF909F908F900C940E1A07
-:10276000002339F0BB2009F495CF812F0E943F1040
-:1027700016C0BB2009F495CF812F0E9407110FC00E
-:102780004C2D4F70612FC7010E94A2020E94961724
-:1027900006C04C2D4F70612FC7010E943C05DD2003
-:1027A00011F10E94C71980FD1EC0F70112820E941C
-:1027B000C1190E949018C7010E9464110E94C1199A
-:1027C0000F900F900F900F900F90DF91CF911F916E
-:1027D0000F91FF90EF90DF90CF90BF90AF909F90C0
-:1027E0008F900C94B1180F900F900F900F900F9046
-:1027F000DF91CF911F910F91FF90EF90DF90CF90DD
-:10280000BF90AF909F908F9008950E94D11A0E9420
-:10281000E11A0E94A31A0E94071B0E944A200E94EC
-:102820009E1F80E090E00E94380F80E090E00C94C2
-:102830004E0F0E94C11A0C9405140E948619292F6C
-:1028400022952F7030E02C3031054CF42A303105C0
-:102850006CF42250310922303105B0F407C02C301D
-:10286000310571F02F30310559F00EC0803F31F045
-:1028700018F4803E48F402C0843F31F481E00895AA
-:1028800093FB882780F9089580E00895CF93DF9324
-:1028900000D000D01F92CDB7DEB70F900F900F90F1
-:1028A0000F900F90DF91CF910895CF93DF9300D0D9
-:1028B00000D000D0CDB7DEB726960FB6F894DEBFB5
-:1028C0000FBECDBFDF91CF9108951F93CF93DF93BC
-:1028D000C091790116E080917A01C81799F0D0E093
-:1028E0001C9FF0011D9FF00D1124E558FE4F408103
-:1028F000518162817381848195810E945514219652
-:10290000C770E9CFDF91CF911F9108954091AB013E
-:102910005091AC016091AD017091AE018091AF0119
-:102920009091B0010C945514CF938091B001829591
-:102930008F7009F05FC08091AD01882309F45AC0FF
-:1029400020917901A0917A016091AB017091AC0165
-:102950008091AE019091AF0131E06F3F09F030E01E
-:10296000B32FC6E02A1709F445C0009721F07F3F36
-:1029700021F44B2F03C041E001C040E030E040FDB6
-:1029800035C0C29FF001C39FF00D1124E558FE4FE2
-:10299000418174132BC04081641328C042814111CE
-:1029A00025C0438154814817590710F441505109FB
-:1029B000481B590B483C5105C8F48091B0018F70F9
-:1029C00080618093B00186E0829FF001839FF00DCB
-:1029D0001124E058FE4F80818F70806180838BEAE4
-:1029E00091E00E946411CF910C9465142F5F3F4FCA
-:1029F0002770B8CFCF910895CF92DF92EF92FF92D8
-:102A00000F931F93CF93DF93CDB7DEB762970FB6C7
-:102A1000F894DEBF0FBECDBF8C0185E0F801DE016A
-:102A20001D9601900D928A95E1F7D8014C9111966F
-:102A30005C91119712966C9112971396ED90FC9001
-:102A400014977091AB01E091AC012091AE013091EF
-:102A5000AF012115310531F0EF3F31F481E07F3FC7
-:102A600019F403C081E001C080E0B82FB170CB2E13
-:102A700080FD6CC1D090AD01DD2009F4F5C0F0916E
-:102A8000B001E216F30638F0C701821B930B883CB5
-:102A9000910548F09BC0209530952E0D3F1D283C98
-:102AA000310508F093C08F2F807F09F052C0E513E5
-:102AB00014C0741312C0D62E61110FC0FF70F061E4
-:102AC000F093B0010E9486148BEA91E00E94641199
-:102AD0008091B001F80185836CC1EF2831F05F3F30
-:102AE00031F481E04F3F19F403C081E001C080E080
-:102AF00080FD03C081E0862701C080E0F82FF170DF
-:102B0000FF2E80FF1CC08091790120917A0136E070
-:102B1000821709F428C190E0389FF001399FF00D29
-:102B20001124E558FE4F7181571306C07081471379
-:102B300003C07281671303C001968770E9CFD62E58
-:102B4000662309F436C18091B00181608093B001A1
-:102B500053C0E51308C0741306C0611104C0D80146
-:102B60001596FC93AEC04D875E878D859E856A8BDA
-:102B70000E941D146A89882329F1D62E662311F13B
-:102B80002091B001822F82958F7090E002970CF413
-:102B900060C08091AB019091AC0198878F831986BA
-:102BA000FB86EA862C87CE01079651C0E51731F1E6
-:102BB0004D875E878D859E856A8B0E941D146A896C
-:102BC00081112EC0C8010E946411A4C08F2F807F84
-:102BD00069F77E2DF98AE88A89890E9446148BEA72
-:102BE00091E00E946411EBEAF1E086E0DF011D92C2
-:102BF0008A95E9F70E948614D12CDBC07413D8CFD4
-:102C00006111D6CFD8011596FC93C8010E946411BA
-:102C1000EBEAF1E086E0DF011D928A95E9F7C9C091
-:102C2000D62E662379F22091B001822F82958F7083
-:102C300090E0029774F08091AB019091AC019A837F
-:102C400089831B82FD82EC822E83CE0101960E9435
-:102C5000641186E0F801ABEAB1E001900D928A952B
-:102C6000E1F70E9494146FC0E216F30628F0C70142
-:102C7000821B930B9C0104C0209530952E0D3F1DA7
-:102C8000283C310508F052C0D62E662309F49ACFAD
-:102C9000E5132CC074132AC08091B00180FD1DC0C3
-:102CA000982F92959F70C9F0D80115968C9315971F
-:102CB0009F3039F09F5F9295907F8F70892B15968A
-:102CC0008C93C8010E94641186E0F801ABEAB1E080
-:102CD00001900D928A95E1F736C086E0F801ABEAE3
-:102CE000B1E001900D928A95E1F763C04D875E8750
-:102CF0008D859E850E941D14882379F086E0F80159
-:102D0000ABEAB1E001900D928A95E1F70E9494142C
-:102D10000E948614DD24D3944CC08091B001816060
-:102D20008093B001C8010E94641143C07E2DF98ACE
-:102D3000E88A89890E944614EBEAF1E086E0DF0127
-:102D40001D928A95E9F70E94861433C0662309F420
-:102D500039CF4D875E878D859E850E941D148823FF
-:102D600009F430CFCBCF4D875E878D859E850E943D
-:102D70008619292F22952F7030E0223031052CF44E
-:102D80009F7041F0811106C00CC0243031052CF435
-:102D90009F7049F4805E883020F0C8010E94641161
-:102DA000CF2CDC2C06C0D80115969C91907F91F712
-:102DB000F8CF8D2D62960FB6F894DEBF0FBECDBF53
-:102DC000DF91CF911F910F91FF90EF90DF90CF9007
-:102DD00008951F93CF93DF93CDB7DEB72C970FB62F
-:102DE000F894DEBF0FBECDBF4F83588769877A87BF
-:102DF0008B879C87CE0107960E94FC148823C1F024
-:102E00002F8138858A859B85892B31F03F3F11F0D2
-:102E100080E003C02F3FE1F781E0811147C04F817F
-:102E2000588569857A858B859C850E9455143EC09E
-:102E300086E0FE013796DE01119601900D928A958B
-:102E4000E1F7FF81E8854A855B854115510531F041
-:102E5000EF3F31F481E0FF3F19F403C081E001C08E
-:102E600080E080FD23C020917A0130E0C901019605
-:102E7000877099276091790170E086179707F1F1C3
-:102E8000F983EA835D834C8396E0929FD001939F00
-:102E9000B00D1124A558BE4FFE01319601900D9240
-:102EA0009A95E1F780937A010E94651416E080916B
-:102EB000790190917A01891779F1189FC001112445
-:102EC00085589E4F0E94FC14882331F1E0917901CE
-:102ED0001E9FF0011124E558FE4F4081518162810F
-:102EE0007381848195810E9455148091790190E0CD
-:102EF00001968770992780937901D9CF0E94191480
-:102F000010927A0110927901EBEAF1E086E0DF019C
-:102F10001D928A95E9F7CACF2C960FB6F894DEBFBA
-:102F20000FBECDBFDF91CF911F910895EF92FF9219
-:102F30000F931F93CF93DF939C01009709F471C007
-:102F4000F12CEE24E394E9012196F9018491843770
-:102F500040F4843008F056C0813081F0823021F195
-:102F600060C0853709F449C0C0F19CE7980F9037DD
-:102F700008F057C08F770E94071146C089010E5F85
-:102F80001F4FFE01849190E2980F983050F48770A3
-:102F9000FE2D01C0FF0F8A95EAF78F2F0E94D41AE9
-:102FA00015C00E943F1014C089010E5F1F4FFE0123
-:102FB000849190E2980F983068F48770FE2D01C0DC
-:102FC000FF0F8A95EAF78F2F0E94DA1A0E94071BDB
-:102FD000E8011AC00E940711FBCF2E5F3F4FFE0190
-:102FE000C491CC2341F08FE99FE00197F1F700C035
-:102FF0000000C150F6CFE90107C0FE01F490E901DD
-:10300000229602C00E943F108F2D882341F0EFE9E5
-:10301000FFE03197F1F700C000008150F6CF9E012C
-:1030200092CFDF91CF911F910F91FF90EF90089574
-:1030300008956093B5017093B6018093B7019093A2
-:10304000B8010C9405140F931F930091B5011091D2
-:10305000B6012091B7013091B801062B172B282B10
-:10306000392B0093B5011093B6012093B70130932B
-:10307000B8011F910F910C9405140F931F930091A9
-:10308000B5011091B6012091B7013091B801062326
-:103090001723282339230093B5011093B6012093F9
-:1030A000B7013093B8011F910F910C9405140F9341
-:1030B0001F930091B5011091B6012091B701309195
-:1030C000B80106271727282739270093B501109341
-:1030D000B6012093B7013093B8011F910F910C9462
-:1030E00005141092B1011092B2011092B301109226
-:1030F000B4010C94051441E050E060E070E004C0BD
-:10310000440F551F661F771F8A95D2F74093B10170
-:103110005093B2016093B3017093B4010C94051401
-:1031200041E050E060E070E004C0440F551F661FAE
-:10313000771F8A95D2F78091B1019091B201A09149
-:10314000B301B091B401842B952BA62BB72B8093A0
-:10315000B1019093B201A093B301B093B4010C9468
-:10316000051441E050E060E070E004C0440F551FDA
-:10317000661F771F8A95D2F7409550956095709598
-:103180008091B1019091B201A091B301B091B401CD
-:1031900084239523A623B7238093B1019093B20192
-:1031A000A093B301B093B4010C94051441E050E036
-:1031B00060E070E004C0440F551F661F771F8A95BA
-:1031C000D2F78091B1019091B201A091B301B09179
-:1031D000B40184279527A627B7278093B101909340
-:1031E000B201A093B301B093B4010C9405140F93F2
-:1031F0001F930091B1011091B2012091B301309160
-:10320000B401062B172B282B392B0093B1011093F7
-:10321000B2012093B3013093B4011F910F910C942C
-:1032200005140F931F930091B1011091B2012091E9
-:10323000B3013091B40106231723282339230093C7
-:10324000B1011093B2012093B3013093B4011F91E7
-:103250000F910C9405140F931F930091B1011091DD
-:10326000B2012091B3013091B40106271727282716
-:1032700039270093B1011093B2012093B301309329
-:10328000B4011F910F910C9405140895CF92DF9211
-:10329000EF92FF920F931F93CF93DF93EC01C090B7
-:1032A000B501D090B601E090B701F090B8018091DF
-:1032B000B1019091B201A091B301B091B401C82ABB
-:1032C000D92AEA2AFB2A0FE110E0B701A601002E55
-:1032D00004C076956795579547950A94D2F740FDB7
-:1032E00005C00150110988F780E007C0BE01802F9A
-:1032F0000E9489070197A9F3802FDF91CF911F9139
-:103300000F91FF90EF90DF90CF900895CF93DF93D0
-:10331000EC010E944619BE010E948907DF91CF91FE
-:103320000895CB010E94861908958091BE010895E9
-:103330008093BE0108951092BE0108950E94081C5A
-:103340002091BC013091BD018217930750F00E947B
-:10335000081C2091BC013091BD01821B930B9C0184
-:103360000AC00E94081C2091BC013091BD0120952B
-:103370003095280F391F81E0283B3B4008F480E05E
-:1033800008958091BB0185958595859508958091D7
-:10339000BB01877008950E94081C2091B9013091EB
-:1033A000BA018217930768F00E94081C2091B901A6
-:1033B0003091BA01821B930B883B9B4078F480E0EC
-:1033C00014C00E94081C2091B9013091BA012095C7
-:1033D0003095280F391F283B3B4088F38091BB0173
-:1033E00082FB882780F991E089278170089598E011
-:1033F000899F90011124622B6093BB010E94901859
-:103400000E94081C9093BA018093B901089510920C
-:10341000BB011092BA011092B90108954091BB010D
-:10342000809584238093BB01982F977089F450E096
-:10343000282F332727FD30954217530749F08595EC
-:10344000859585950E94B1181092BA011092B90124
-:1034500008959091BB01977081E009F480E0089590
-:1034600090910C019923D9F090910D019923B9F015
-:10347000982F9695969596959F3088F5E0910E0138
-:10348000F0910F01E90FF11D877021E030E001C0DC
-:10349000220F8A95EAF78181822B818308954091DA
-:1034A0000E0150910F0120E030E09FEFFA01E20F92
-:1034B000F31F6281681799F09F3F19F4611101C0F1
-:1034C000922F2F5F3F4F2E30310581F79F3F39F00C
-:1034D000FA01E90FF11D97FDFA9582830895089589
-:1034E00090910C019923E1F090910D019923C1F085
-:1034F000982F9695969596959F3020F5E0910E0120
-:10350000F0910F01E90FF11D877021E030E001C05B
-:10351000220F8A95EAF72095818128232183089537
-:1035200040910E0150910F0120E030E0FA01E20FCE
-:10353000F31F9281981301C012822F5F3F4F2E30EC
-:103540003105A1F7089581E090E0E0910E01F0913E
-:103550000F01E80FF91F1082019680319105A9F73C
-:1035600008958091D20108959091D201982B909363
-:10357000D201089580959091D20198239093D20121
-:1035800008951092D20108959091D101982B9093B3
-:10359000D101089580959091D10198239093D10104
-:1035A00008951092D10108959091D001982B909395
-:1035B000D001089580959091D00198239093D001E7
-:1035C00008951092D00108958093BF010E94081CB5
-:1035D0009093BD018093BC0108951092BF01109299
-:1035E000BD011092BC01089540910E0150910F0150
-:1035F00020E030E080E0FA01E20FF31F91819111A9
-:103600008F5F2F5F3F4F2F303105A9F70895E0916D
-:103610000E01F0910F018091D2018083E0910E01A3
-:10362000F0910F0180819091D101892B8083E091ED
-:103630000E01F0910F0180819091D001892B808340
-:103640008091BF01882399F00E949E1981110E94E8
-:10365000ED1AE0910E01F0910F0180819091BF0170
-:10366000892B80830E94F41A81110E94ED1A8091A7
-:103670000E0190910F010C94220FCF92DF92EF92E6
-:10368000FF920F931F936C01EE24FF24C114D10409
-:10369000E104F10421F46B017C0180E001C080E1D0
-:1036A00033272F2D1E2D0D2D011511052105310557
-:1036B00019F0885F6801790197018601A4E03695C9
-:1036C000279517950795AA95D1F70115110521059D
-:1036D000310519F08C5F6801790197018601F2E0EC
-:1036E0003695279517950795FA95D1F70115110588
-:1036F0002105310519F08E5F68017901B701A60136
-:103700007695679557954795452B462B472B09F09E
-:103710008F5F1F910F91FF90EF90DF90CF900895F2
-:103720008091E801843021F11092D40120E488E1F5
-:1037300090E00FB6F894A895809360000FBE209398
-:10374000600080E00E94240883B7817F846083BF8B
-:1037500083B7816083BF7894889583B78E7F83BF5A
-:1037600088E10FB6F89480936000109260000FBE5D
-:10377000089508950895CF930E94B91B0E944804AC
-:103780000E94BA1BC0E08C2F0E943505811105C034
-:10379000CF5FCE30C1F780E001C081E0CF910895C6
-:1037A0000E9419140E94160F0C9424081F920F9265
-:1037B0000FB60F9211248F939F93AF93BF93809175
-:1037C000D401811113C08091D5019091D601A091AF
-:1037D000D701B091D8014196A11DB11D8093D501AB
-:1037E0009093D601A093D701B093D801BF91AF9128
-:1037F0009F918F910F900FBE0F901F90189582E0B0
-:1038000084BD93E095BD9AEF97BD80936E000895B7
-:103810002FB7F8948091D5019091D601A091D7014E
-:10382000B091D8012FBF0895CF92DF92EF92FF920F
-:103830000F931F932FB7F8944091D5015091D60163
-:103840006091D7017091D8012FBF6A017B01EE24EE
-:10385000FF248C0120E030E0C016D106E206F3061A
-:1038600010F441505109481B590BCA011F910F9187
-:10387000FF90EF90DF90CF9008951F920F920FB6B8
-:103880000F9211248F939F93AF93BF938091D50193
-:103890009091D601A091D701B091D8010196A11DB8
-:1038A000B11D8093D5019093D601A093D701B09319
-:1038B000D801BF91AF919F918F910F900FBE0F9044
-:1038C0001F9018950E941C0CF8942FEF87EA91E640
-:1038D000215080409040E1F700C0000087E090EB6D
-:1038E000DC018093F2019093F301A093F401B09373
-:1038F000F5012CE088E190E00FB6F894A89580934C
-:1039000060000FBE20936000FFCFEF92FF920F93F5
-:103910001F93CF93DF93E82EF12C8F2D0E94350556
-:10392000C0E0D0E0082F10E098010C2E02C03595C1
-:1039300027950A94E2F720FD05C02196C630D105EF
-:1039400099F709C06C2F7F2D80E00E943D05E81299
-:10395000F4CF81E005C0F3948EE0F812DECF80E072
-:10396000DF91CF911F910F91FF90EF900895CF932A
-:10397000C82F8CE20E94851C882321F08C2FCF91C8
-:103980000C94851C80E0CF910895CF930E940A1E6D
-:10399000811102C00E94F01DC5E6C15049F00E948D
-:1039A00048048FE39CE90197F1F700C00000F5CFD0
-:1039B00089E20E94B71C811111C18AE20E94B71CE2
-:1039C00081110E94F01D85E00E94B71C81110E94A8
-:1039D000621C0E94151E8093D30187E00E94B71CD1
-:1039E000882399F18BE10E94B71C882351F09091B4
-:1039F000D30191FB882780F921E0822780FB91F990
-:103A000022C08EE00E94B71C882351F09091D30110
-:103A100092FB882780F921E0822780FB92F913C06E
-:103A200080E10E94B71C9091D301882341F093FB61
-:103A3000882780F921E0822780FB93F904C0892F31
-:103A4000809580FB90F99093D3018091D3010E94DF
-:103A5000191E0E94271E8093F10180EE0E94B71C60
-:103A6000882341F08091F101982F909590FB80F987
-:103A70008093F10189E30E94B71C882359F090914B
-:103A8000F10191FB882780F921E0822780FB91F9E1
-:103A90009093F10182EE0E94B71C882359F0909117
-:103AA000F10192FB882780F921E0822780FB92F9BF
-:103AB0009093F10186EE0E94B71C882359F09091F3
-:103AC000F10193FB882780F921E0822780FB93F99D
-:103AD0009093F10183EE0E94B71C882359F09091D6
-:103AE000F10194FB882780F921E0822780FB94F97B
-:103AF0009093F10185E30E94B71C882359F09091BF
-:103B0000F10195FB882780F921E0822780FB95F958
-:103B10009093F10181E30E94B71C882359F09091A2
-:103B2000F10196FB882780F921E0822780FB96F936
-:103B30009093F10181E10E94B71C882359F0909184
-:103B4000F10197FB882780F921E0822780FB97F914
-:103B50009093F1018091F1010E942B1E8091F1015F
-:103B600087FB882780F980930D0187E20E94B71CAC
-:103B7000C82F8EE10E94B71C8111C2608FE10E94A4
-:103B8000B71C8111C46080E20E94B71C8111C8601B
-:103B900081E20E94B71C8111C06182E20E94B71CC1
-:103BA0008111C06283E20E94B71C8111C06484E26B
-:103BB0000E94B71C882311F0C06802C0CC2329F0F2
-:103BC0008C2F0E94221E6C2F03C00E941E1E682F85
-:103BD00070E080E090E0CF910C941918CF91089597
-:103BE0006DEE7EEF80E090E00E94DD2360E082E0F9
-:103BF00090E00E94CB2360E083E090E00E94CB2322
-:103C000060E084E090E00E94CB2360E085E090E0FB
-:103C10000C94CB2380E090E00E94C52321E08D3EF0
-:103C20009E4F09F020E0822F089582E090E00C94EE
-:103C3000BD23682F82E090E00C94CB2383E090E0DA
-:103C40000C94BD23682F83E090E00C94CB2384E098
-:103C500090E00C94BD23682F84E090E00C94CB237B
-:103C60008091DB0180FF0BC06091130185E0689FAC
-:103C7000B001112475956795759567952AC081FFE8
-:103C800009C06091130185E0689FB001112475950A
-:103C900067951FC082FF07C06091130185E0689F90
-:103CA000B001112416C04091DC014423C9F0609199
-:103CB0001201461788F72091130185E0289F900193
-:103CC0001124429FC001439F900D112470E00E9477
-:103CD0008F236038710540F46115710539F002C019
-:103CE00065E070E0862F08958FE7089581E00895DC
-:103CF0008091DB0180FF08C06091110170E0759533
-:103D000067957595679521C081FF06C06091110187
-:103D100070E07595679519C082FF04C0609111012C
-:103D200070E010C08091DC018823C1F06091100127
-:103D30008617A0F790911101989FC001112470E09F
-:103D40000E948F236038710528F46115710521F0F8
-:103D5000862F08958FE7089581E0089561E070E06F
-:103D6000F4CF803F21F40E94301E819504C0813F32
-:103D700029F40E94301E8093DF010895823F21F4D0
-:103D80000E94301E819504C0833F29F40E94301E9A
-:103D90008093DE010895893F19F40E94781E05C0C2
-:103DA0008A3F31F40E94781E81958093E001089546
-:103DB0008B3F21F40E94781E819504C08C3F29F42A
-:103DC0000E94781E8093E1010895843F21F4809140
-:103DD000DD01816017C0853F21F48091DD018260A3
-:103DE00011C0863F21F48091DD0184600BC0873FC4
-:103DF00021F48091DD01886005C0883F31F4809115
-:103E0000DD0180618093DD0108958D3F21F4809173
-:103E1000DB0181600BC08E3F21F48091DB01826069
-:103E200005C08F3F29F48091DB0184608093DB0122
-:103E30000895803F39F48091DF0187FF6CC01092B4
-:103E4000DF0169C0813F29F48091DF011816BCF3BE
-:103E500062C09091DE01823F29F497FF5CC010920E
-:103E6000DE0159C0833F19F41916CCF354C0893FC1
-:103E700041F48091E00118160CF04DC01092E00161
-:103E80004AC08A3F29F48091E00187FF44C0F6CF01
-:103E90008B3F39F48091E10187FF3DC01092E10131
-:103EA0003AC08C3F29F48091E1011816BCF333C06D
-:103EB000843F21F48091DD018E7F17C0853F21F47E
-:103EC0008091DD018D7F11C0863F21F48091DD015D
-:103ED0008B7F0BC0873F21F48091DD01877F05C078
-:103EE000883F31F48091DD018F7E8093DD0113C026
-:103EF0008D3F21F48091DB018E7F0BC08E3F21F43A
-:103F00008091DB018D7F05C08F3F29F48091DB011B
-:103F10008B7F8093DB018091DE0181110EC0809147
-:103F2000DF0181110AC08091E001811106C08091FA
-:103F3000E101811102C01092DC0108958DED91E044
-:103F40000E942D0F0E94081C9093DA018093D901E2
-:103F500008951F93CF93DF938091D9019091DA0157
-:103F60000E94141C4091DC01442321F02091140193
-:103F700030E006C0209115015AE0259F90011124E0
-:103F80008217930708F482C08091DE011091DF014F
-:103F9000D091E001C091E101811107C0111105C06C
-:103FA000D11103C0CC2309F471C04F3F19F04F5F0A
-:103FB0004093DC01181624F40E94301E8093DE0129
-:103FC0008091DE0187FF05C00E94301E819580939D
-:103FD000DE01111624F40E94301E8093DF018091CF
-:103FE000DF0187FF05C00E94301E81958093DF01AD
-:103FF0006091DE01662339F11091DF01112319F17F
-:10400000772767FD7095872F972F0E94A02223E3C3
-:1040100033E343E35FE30E9404230E946D22609335
-:10402000DE01612F772767FD7095872F972F0E94FC
-:10403000A02223E333E343E35FE30E9404230E94CF
-:104040006D226093DF011D1624F40E94781E809378
-:10405000E0018091E00187FF05C00E94781E8195F4
-:104060008093E0011C1624F40E94781E8093E101E5
-:104070008091E10187FF05C00E94781E81958093A1
-:10408000E101DF91CF911F910C949E1FDF91CF91A1
-:104090001F910895EDEDF1E085E0DF011D928A9515
-:1040A000E9F71092DC011092DB010895833081F171
-:1040B00028F4813059F08230D1F00895853009F428
-:1040C00049C0B8F1863009F456C008952091150111
-:1040D000862F90E0820F911D8F3F910520F4620F93
-:1040E0006093150108958FEF809315010895209135
-:1040F0001401862F90E0820F911D8F3F910520F4CF
-:10410000620F6093140108958FEF80931401089556
-:1041100020911301862F90E0820F911D8F3F910512
-:1041200020F4620F6093130108958FEF80931301C1
-:10413000089520911201862F90E0820F911D8F3FEC
-:10414000910520F4620F6093120108958FEF809320
-:104150001201089520911101862F90E0820F911D88
-:104160008F3F910520F4620F6093110108958FEF46
-:1041700080931101089520911001862F90E0820F05
-:10418000911D8F3F910520F4620F609310010895F7
-:104190008FEF809310010895833011F128F481305E
-:1041A00049F0823091F00895853081F120F1863018
-:1041B000C1F1089580911501681720F4861B809342
-:1041C0001501089510921501089580911401681742
-:1041D00020F4861B80931401089510921401089511
-:1041E00080911301681720F4861B809313010895B2
-:1041F00010921301089580911201681720F4861B14
-:104200008093120108951092120108958091110176
-:10421000681720F4861B80931101089510921101F4
-:10422000089580911001681720F4861B8093100177
-:1042300008951092100108958B3109F46AC008F5B1
-:104240008E3009F470C070F4873009F452C018F44D
-:104250008630B9F134C0883009F4A1C08B3009F43C
-:104260009EC02DC0813109F479C020F4803109F459
-:1042700064C025C0863109F492C0893109F48FC029
-:104280001EC0853309F483C060F4873209F47FC00F
-:1042900020F48E3108F06DC012C0893209F477C065
-:1042A0000EC0833438F48A3308F061C0883309F4CF
-:1042B00076C005C0833409F46AC0883461F080E0B8
-:1042C00008958091D301817F8E7F8093D30181E017
-:1042D0008093E30108950E9419142FEF83ED90E37A
-:1042E000215080409040E1F700C000000E94621C15
-:1042F00056C09091D301892F8095817080FB90F9F1
-:1043000019F09660986027C0997F977F9093D301AA
-:1043100046C09091D30191FB882780F921E0822744
-:1043200080FB91F913C09091D30192FB882780F90B
-:1043300021E0822780FB92F909C09091D30193FB81
-:10434000882780F921E0822780FB93F99093D3019D
-:10435000882329F191609093D30108950E94191444
-:1043600080910D0191E0892780930D0118C027EC01
-:1043700001C023EE280F61E070E080E090E004C00F
-:10438000660F771F881F991F2A95D2F704C061E036
-:1043900070E080E090E00E9419180E94191481E0FA
-:1043A000089580E0089580E00895CF93C82F80910C
-:1043B000E301813079F018F08230D1F184C0A0910E
-:1043C0000E01B0910F018C91813169F0823209F0B8
-:1043D0007CC009C0A0910E01B0910F018C91813178
-:1043E00011F0823249F48C2F0E94D12181111DC01D
-:1043F0008C2F0E941C211AC08C2F0E94D321811166
-:1044000014C0C43179F048F4CB3079F0C03109F0F0
-:1044100060C082E08093E30108C0C93219F0C8335C
-:1044200021F057C01092E30154C081E0817053C065
-:10443000C93289F118F5C43171F1A8F4C73009F017
-:1044400046C08AE08093150194E19093140193E0B3
-:10445000909313018093120188E08093110188E208
-:104460008093100134C0CE51C63088F5EC2FF0E0B7
-:10447000E65DFE4F80818093E20129C0CE34E9F0F1
-:1044800020F4CB3421F56AE013C0C13579F0C23590
-:10449000F1F461E00DC08091E201882319F01092DF
-:1044A000E20115C081E08093E30115C061E006C020
-:1044B0008091E2010E9456200AC06AE08091E201E8
-:1044C0000E94CC2004C01092E30180E004C081E08F
-:1044D00002C080E0ABCFCF91089504D06894B111B1
-:1044E0008DC0089570D088F09F5790F0B92F99270C
-:1044F000B751A0F0D1F0660F771F881F991F1AF0EF
-:10450000BA95C9F712C0B13081F077D0B1E0089503
-:1045100074C0672F782F8827B85F39F0B93FCCF384
-:10452000869577956795B395D9F73EF490958095E4
-:10453000709561957F4F8F4F9F4F0895E89409C004
-:1045400097FB3EF490958095709561957F4F8F4FC6
-:104550009F4F9923A9F0F92F96E9BB279395F695DC
-:10456000879577956795B795F111F8CFFAF4BB0F5A
-:1045700011F460FF1BC06F5F7F4F8F4F9F4F16C0BE
-:10458000882311F096E911C0772321F09EE8872F48
-:10459000762F05C0662371F096E8862F70E060E004
-:1045A0002AF09A95660F771F881FDAF7880F96957D
-:1045B000879597F9089557FD9058440F551F59F066
-:1045C0005F3F71F04795880F97FB991F61F09F3F00
-:1045D00079F087950895121613061406551FF2CF29
-:1045E0004695F1DF08C0161617061806991FF1CF79
-:1045F00086957105610508940895E894BB276627A0
-:104600007727CB0197F908950BD078C069D028F0AF
-:104610006ED018F0952309F05AC05FC01124EECF78
-:10462000CADFA0F3959FD1F3950F50E0551F629F0D
-:10463000F001729FBB27F00DB11D639FAA27F00DFB
-:10464000B11DAA1F649F6627B00DA11D661F829F22
-:104650002227B00DA11D621F739FB00DA11D621F07
-:10466000839FA00D611D221F749F3327A00D611D24
-:10467000231F849F600D211D822F762F6A2F112406
-:104680009F5750408AF0E1F088234AF0EE0FFF1F59
-:10469000BB1F661F771F881F91505040A9F79E3F90
-:1046A000510570F014C0AACF5F3FECF3983EDCF3E5
-:1046B000869577956795B795F795E7959F5FC1F7CD
-:1046C000FE2B880F911D9695879597F9089597F978
-:1046D0009F6780E870E060E008959FEF80EC0895A8
-:1046E00000240A94161617061806090608950024D1
-:1046F0000A9412161306140605060895092E03944B
-:10470000000C11F4882352F0BB0F40F4BF2B11F4BE
-:1047100060FF04C06F5F7F4F8F4F9F4F089597FBDF
-:10472000072E16F4009407D077FD09D00E94A92324
-:1047300007FC05D03EF4909581959F4F08957095A4
-:1047400061957F4F0895EE0FFF1F0590F491E02DC6
-:104750000994AA1BBB1B51E107C0AA1FBB1FA617C8
-:10476000B70710F0A61BB70B881F991F5A95A9F71A
-:1047700080959095BC01CD010895F999FECF92BD29
-:1047800081BDF89A992780B50895A8E1B0E042E08C
-:1047900050E00C94E523262FF999FECF92BD81BD00
-:1047A000F89A019700B4021639F01FBA20BD0FB66F
-:1047B000F894FA9AF99A0FBE08950196272F0E944D
-:1047C000CC230C94CB23DC01CB01FC01F999FECF67
-:1047D00006C0F2BDE1BDF89A319600B40D92415089
-:0A47E0005040B8F70895F894FFCF99
-:1047EA0020022608B30890085C0829080101C001C4
-:1047FA0028080A03140A3F4D363979042C04F603B3
-:10480A00BD035003690382039B03010203040506E7
-:04481A000708090082
+:10051000099511E0A0E0B1E0E4EEF4E402C005903A
+:100520000D92AA32B107D9F711E0AAE2B1E001C0F9
+:100530001D92A33FB107E1F70E94A40A0C94702218
+:100540000C94000080E090E0089508956091B4015B
+:100550007091B5018091B6019091B7010E94DA1BAC
+:1005600056985E9825982D9826982E9827982F981B
+:10057000813029F0823029F4269A2E9A02C0259AD9
+:100580002D9A80915401882309F450C08091520122
+:10059000909153010E94AA1C8D3291400CF446C0E8
+:1005A000109254010E946C0580914C0190914D0174
+:1005B0004A97C1F480914E0190914F01892B91F49B
+:1005C0008091500190915101892B61F482EE0E943B
+:1005D000FA108DE30E94FA108DE30E94B71182EEAB
+:1005E0000E94B71180914C0190914D014297F1F416
+:1005F00080914E0190914F01892BC1F4809150015F
+:1006000090915101892B91F480EE0E94FA1081EEB5
+:100610000E94FA1082E10E94FA1082E10E94B71152
+:1006200081EE0E94B71180EE0C94B71108950C94DE
+:10063000A60256985E9825982D9826982E98279869
+:100640002F988FEF90E0909389008093880090938B
+:100650008B0080938A0090938D0080938C00259A64
+:100660002D9A2FEF80E792E0215080409040E1F7F3
+:1006700000C00000269A2E9A2FEF80E792E02150CA
+:1006800080409040E1F700C00000279A2F9A2FEF9A
+:1006900080E792E0215080409040E1F700C00000E8
+:1006A00025982D982FEF80E792E0215080409040D0
+:1006B000E1F700C0000026982E982FEF80E792E027
+:1006C000215080409040E1F700C0000027982F980B
+:1006D00056985E9825982D9826982E9827982F98AA
+:1006E000089589EA8093800089E0809381002498AE
+:1006F0002C983F988AB18F748AB96E98479A8BB1BB
+:10070000806B8BB9769A0E9419030C94A50280E243
+:100710008093000180912A0181110EC00E94D603AE
+:1007200081E080932A012FEF83ED90E321508040F8
+:100730009040E1F700C0000080E40E94DC03809359
+:10074000000181112EC00E940604809300018111D6
+:1007500028C00E94060480930001811122C08FE30B
+:100760000E9406048093000181111BC00E94FE03B9
+:1007700080E40E94DC0380930001811112C08CE0B0
+:100780000E9406048093000181110BC00E940604A0
+:1007900080930001811105C08FE30E9406048093BD
+:1007A00000010E94FE038091000108951092B9009B
+:1007B0008AE08093B800089594EA9093BC009091E9
+:1007C000BC0097FFFCCF9091B900987F983021F042
+:1007D000903111F081E008958093BB0084E880930C
+:1007E000BC008091BC0087FFFCCF8091B900887F5E
+:1007F000883111F0803471F780E0089584E98093A6
+:10080000BC008091BC0084FDFCCF08958093BB00A8
+:1008100084E88093BC008091BC0087FFFCCF90915E
+:10082000B900987F81E0983209F480E0089584E867
+:100830008093BC008091BC0087FFFCCF8091BB00FF
+:10084000089580910001811115C080E40E94DC03AD
+:100850008093000181110CC082E10E940604809304
+:100860000001811105C08FEF0E94060480930001F2
+:100870000E94FE0384B1807F84B985B1807F85B9F1
+:100880008AB1837F8AB98BB1837F8BB93E984698B2
+:1008900008950E948703809300010E94210480B381
+:1008A0008C7080BB81B3836F81BBEAE3F1E0ACE283
+:1008B000B1E011921D9281E0E834F807D1F70C9471
+:1008C0007103BF92CF92DF92EF92FF920F931F932B
+:1008D000CF93DF9380910001882379F080912B01E1
+:1008E0008F5F80932B01811108C00E948703809342
+:1008F0000001811102C00E9419030CE211E0C0E066
+:10090000D0E0DD24D39482E0C82EEE24E394F12CD1
+:10091000C73000F580910001811162C080E40E941F
+:10092000DC0380930001811112C082E10E94060461
+:100930008093000181110BC0C7010C2E01C0880FEC
+:100940000A94EAF780950E940604809300010E94B1
+:10095000FE0346C0CA30A1F028F4C83059F0C930AF
+:1009600061F005C0CC3089F070F0CD3089F0209A6C
+:10097000289810C0219A29980DC0229A2A980AC056
+:10098000239A2B9807C0529A01C0539A5B9802C0D1
+:100990003E9A4698E0EAEA95F1F78FB179995AC004
+:1009A00092E081708D25892B7C9B02C090E001C074
+:1009B00094E0892B7D9B02C090E001C098E0892BD8
+:1009C0007E9B02C090E001C090E1892B9FB1909581
+:1009D000991F9927991F9295990F907E892B0FC087
+:1009E0008091000181114BC080E40E94DC03809360
+:1009F0000001882389F1B12C0E94FE038B2DF801A0
+:100A00009081981719F08083C09201010E942104FF
+:100A100021960F5F1F4FCE30D10509F079CF80911D
+:100A20000101882371F1815080930101882339F0FD
+:100A30008FE99FE00197F1F700C0000022C0AAE310
+:100A4000B1E0ECE2F1E081918D9391E0EA33F907B6
+:100A5000D1F717C090E0A5CF83E10E9406048093F0
+:100A600000018111C8CF81E40E94DC038093000162
+:100A70008111C1CF0E941704B82EB094BDCF80E081
+:100A8000BECF0E94170381E0DF91CF911F910F919C
+:100A9000FF90EF90DF90CF90BF900895E82FF0E0A7
+:100AA000E65CFE4F8081089508951F93CF93DF93F6
+:100AB000CAE3D1E010E0899190E00E94CE1B180FAC
+:100AC00081E0C834D807B9F7812FDF91CF911F910A
+:100AD000089581E00895089508950F931F93CF938B
+:100AE000DF93EC0108811981C8010E94D719B80170
+:100AF0000E94FC058C018A818823C9F180915401F0
+:100B000081111EC0043180E5180789F50E946B052C
+:100B100081E0809354010E949E1C90935301809326
+:100B2000520110924B0110924D0110924C01109203
+:100B30004F0110924E01109251011092500155C078
+:100B400080915201909153010E94AA1C883C91050A
+:100B500070F480914B01E82FF0E0EE0FFF1FE45B93
+:100B6000FE4F118300838F5F80934B013EC004389A
+:100B700080E5180721F005381045A1F02AC08A81C8
+:100B8000882321F01092480182E012C08091480130
+:100B9000811106C086E20E94FA1086E20E94B71117
+:100BA00082E014C08A81882331F01092490180E2EA
+:100BB0000E9406121AC080914901811106C087E285
+:100BC0000E94FA1087E20E94B71180E20E940D1283
+:100BD0000CC081E08093480180934901CE01DF91F0
+:100BE000CF911F910F910C94690580E0DF91CF9117
+:100BF0001F910F910895089596E0799FF0011124B7
+:100C000094E5899FE00DF11D1124E60FF11DEE0F13
+:100C1000FF1FEE5EFE4F859194910895880F991FF6
+:100C200086579040FC01859194910895880F991FF3
+:100C3000865F9E4FFC018591949108950F931F93B9
+:100C4000CF93DF93EC01811520E3920740F58115E6
+:100C500030E2930708F0C4C08B3B910588F4883AD2
+:100C6000910508F06BC0853A910508F05CC08430AE
+:100C7000910508F056C08130910509F4C8C1C4C17E
+:100C80008F3F910511F008F04CC0803F910508F0AE
+:100C9000A4C0805E9109089708F443C0B5C1C13073
+:100CA00080E5D80709F4A4C020F5C0312FE4D207AD
+:100CB00070F4C11530E4D30708F096C0C11581E384
+:100CC000D80708F0A1C18E011127106CE1C1C11530
+:100CD000D04509F099C10E94AA143FEF84E39CE03B
+:100CE000315080409040E1F700C000000E94F81CA5
+:100CF000CFC1C11527E5D20758F4C03131E5D3077C
+:100D000008F01EC1C43180E5D80708F477C07CC163
+:100D1000CE0190578115904108F076C18E011F7069
+:100D200071C18E01B5C1853A910509F473C1863A46
+:100D3000910509F472C103E810E4AAC1883A91054B
+:100D400009F46EC1893A910509F46DC18A3A910599
+:100D500009F46CC18B3A910509F46BC18C3A910589
+:100D600009F46AC18D3A910509F469C1803B910586
+:100D700009F468C18E3A910509F467C18F3A91056B
+:100D800009F466C1813B910509F465C1823B910577
+:100D900009F464C1833B910509F463C1843B910567
+:100DA00009F462C1853B910509F461C1863B910557
+:100DB00009F460C1873B910509F45FC1883B910547
+:100DC00009F45EC1893B910509F45DC18A3B910537
+:100DD00009F05CC10AE216E45BC18C01106558C1E0
+:100DE0009F700E94160655C18E011F70106A50C177
+:100DF0008091D60181608093D6014AC10E949E1ED7
+:100E0000811102C00E94841E0E94BB1E90E090933C
+:100E1000F3018093F201C23020E5D20721F48091E2
+:100E2000F201816086C0C43030E5D30721F480919F
+:100E3000F20182607EC0C63080E5D80721F480913F
+:100E4000F201846076C0C83090E5D90719F480912A
+:100E5000F20127C0CA3020E5D20721F48091F201C7
+:100E6000806167C0CC3030E5D30721F48091F20176
+:100E700080625FC0CE3080E5D80721F48091F20116
+:100E8000806457C0C03190E5D90721F48091F20108
+:100E900080684FC0C23120E5D20729F48091F20169
+:100EA0008460886046C0C33030E5D30721F4809168
+:100EB000F2018E7F3EC0C53080E5D80721F48091D5
+:100EC000F2018D7F36C0C73090E5D90721F48091BB
+:100ED000F2018B7F2EC0C93020E5D20719F4809132
+:100EE000F20126C0CB3030E5D30721F48091F20126
+:100EF0008F7E1FC0CD3080E5D80721F48091F201AC
+:100F00008F7D17C0CF3090E5D90721F48091F20191
+:100F10008F7B0FC0C13120E5D20721F48091F2010F
+:100F20008F7707C0C331D04531F48091F2018B7FB8
+:100F3000877F8093F2018091F2010E94BF1EA8C0BA
+:100F40008D2F99278F70992781309105E9F48E01B3
+:100F5000037011279C0102C0220F331F0A95E2F78C
+:100F600089011C68CE01E4E0880F991FEA95E1F73A
+:100F700088279370082B192BF3E0CC0FDD1FFA950F
+:100F8000E1F7C076DD272CC08230910529F41C2FB3
+:100F90000027016F106A7CC08330910561F4CE0197
+:100FA0008370992701E010E002C0000F111F8A959D
+:100FB000E2F71C680EC084309105A9F4CE0183705D
+:100FC000992701E010E002C0000F111F8A95E2F797
+:100FD0001A6863E0CC0FDD1F6A95E1F7C07ED77019
+:100FE0000C2B1D2B55C08530910529F41C2F002793
+:100FF000046F106A4DC0069709F04AC0CF71DD2713
+:101000001C2F0027106244C000E010E041C001E046
+:1010100010E03EC001E810E43BC002E810E438C034
+:1010200002EE14E435C009EE14E432C00AEE14E412
+:101030002FC005EB14E42CC006EB14E429C007EB29
+:1010400014E426C00CEC14E423C00DEC14E420C01E
+:1010500003E815E41DC00AE815E41AC002E915E426
+:1010600017C004E915E414C001E216E411C003E25C
+:1010700016E40EC004E216E40BC005E216E408C054
+:1010800006E216E405C007E216E402C000E014E43C
+:10109000C801DF91CF911F910F91089596E0799F3C
+:1010A000F001112494E5899FE00DF11D1124E60F54
+:1010B000F11DEE0FFF1FEE5EFE4F85919491803E75
+:1010C0009105E0F4803C910558F58133910509F4D0
+:1010D0006FC048F48932910509F463C08A329105E2
+:1010E00009F46DC072C089339105E9F08238910529
+:1010F000D1F08533910509F44DC067C0833E910559
+:1011000081F138F4803E9105B9F0823E9105D9F025
+:101110005CC0863E910561F1873E9105A1F155C005
+:101120000E940E0608952091F20120FD02C021FFC9
+:101130004CC080EE90E049C08091F20180FFF9CF71
+:1011400089E390E042C08091F20182FF0EC080915D
+:10115000F20184FF03C080E090E037C083EE90E0AE
+:1011600034C08091F20182FFF2CF82EE90E02DC078
+:101170008091F20183FF0BC08091F20184FDEBCFDF
+:1011800087EE90E022C08091F20183FFF5CF86EEDA
+:1011900090E01BC08091F20185FF07C089E290E0DA
+:1011A00014C08091F20185FFF9CF85E390E00DC076
+:1011B0008091F20186FF07C08AE290E006C080912C
+:1011C000F20186FFF9CF81E390E00E941E060895A8
+:1011D00008950C94E808809165010895CF93DF93FA
+:1011E00000D01F92CDB7DEB72091E901243019F568
+:1011F00023E029839B838A832093E9008FEF9091DA
+:10120000E800815095FD06C095ED9A95F1F7000034
+:101210008111F5CF8091E80085FF0DC040E050E0DE
+:1012200063E070E0CE0101960E944F0B8091E800D0
+:101230008E778093E8000F900F900F90DF91CF9101
+:101240000895CF93DF9300D01F92CDB7DEB72091E2
+:10125000E901243021F522E029839B838A8383E0FE
+:101260008093E9008FEF9091E800815095FD06C0D2
+:1012700095ED9A95F1F700008111F5CF8091E80086
+:1012800085FF0DC040E050E063E070E0CE010196C4
+:101290000E944F0B8091E8008E778093E8000F90BA
+:1012A0000F900F90DF91CF9108952091E9012430A4
+:1012B000F1F422E02093E9002FEF3091E800215073
+:1012C00035FD06C035ED3A95F1F700002111F5CF57
+:1012D0002091E80025FF0BC040E050E065E070E0A1
+:1012E0000E944F0B8091E8008E778093E80008956C
+:1012F000CF93DF93EC018091E901843009F046C07F
+:1013000090910C019923D9F090910D019923B9F096
+:101310008093E9008FEF9091E800815095FD06C021
+:1013200095E19A95F1F700008111F5CF8091E800E1
+:1013300085FF2CC040E050E060E170E017C081E024
+:101340008093E9008FEF9091E800815095FD06C0F1
+:1013500095ED9A95F1F700008111F5CF8091E800A5
+:1013600085FF14C040E050E068E070E0CE010E94CC
+:101370004F0B8091E8008E778093E80080E1FE01BA
+:10138000A5E5B1E001900D928A95E1F7DF91CF914B
+:1013900008958091E801811109C00E94E10C0E942A
+:1013A0003E0D8091E20084608093E20008951092E7
+:1013B000E8010895089508950C94661C42E061ECDC
+:1013C00081E00E945B0C42E061EC82E00E945B0CD9
+:1013D00042E061EC83E00E945B0C42E161EC84E05E
+:1013E0000C945B0C8091EB01833009F455C030F410
+:1013F000813071F0823009F48EC008958A3009F48A
+:101400007AC08B3009F460C0893009F09CC020C0DC
+:101410008091EA01813A09F096C08091E800877FC7
+:101420008093E8008091EE019091EF01892B21F0EB
+:1014300060E080E090E003C060E185E591E070E06D
+:101440000E94980B8091E8008B778093E8000895C4
+:101450008091EA01813209F076C08091EE0190918D
+:10146000EF01009719F0039709F06DC08091E80033
+:10147000877F8093E8008091E80082FD05C080911D
+:10148000E9018111F8CF5FC08091F100809365017F
+:101490008091E8008B7753C08091EA01813A09F08E
+:1014A00052C08091EE019091EF01892B09F04BC061
+:1014B0008091E800877F8093E8008091E80080FFBA
+:1014C000FCCF80910C0136C08091EA018132D9F5C0
+:1014D0008091EE019091EF01892BA9F58091E800B0
+:1014E000877F8093E8000E94900C8091EC018093AC
+:1014F0000C010C94AA148091EA01813221F58091AB
+:10150000E800877F8093E8000E94900C8091ED01B5
+:101510008093660108958091EA01813AA1F4809157
+:10152000E800877F8093E8008091E80080FFFCCF8F
+:10153000809166018093F1008091E8008E7780931E
+:10154000E8000C94900C089584B7877F84BF88E1ED
+:101550000FB6F89480936000109260000FBE90E088
+:1015600080E80FB6F89480936100909361000FBEFD
+:101570000E942A100E94E10C0E943E0D8091E20020
+:1015800084608093E20078940E94B90F0E942C102E
+:1015900082E091E00E94D60F8091E901853069F4E4
+:1015A0000E942D1C8091E7018823B1F30E94581CF2
+:1015B000882391F30E94390BEFCF0E943210ECCFB9
+:1015C000292F332723303105A9F06CF42130310560
+:1015D00009F442C02230310509F043C08DE690E0A5
+:1015E0002EE333E042C021323105C9F02232310509
+:1015F00019F137C099278130910541F0823091056A
+:1016000041F0892B71F5EAE3F3E005C0E2E2F3E093
+:1016100002C0EAE0F3E0849190E09F0126C06430CC
+:1016200000F5E62FF0E0EE0FFF1FEE5DFE4F20818C
+:10163000318189E090E019C0643098F4E62FF0E041
+:10164000DF01AA0FBB1FA65EBE4F2D913C91EA5E43
+:10165000FE4F808190E009C082E190E02BEA33E008
+:1016600004C080E090E020E030E0FA013183208384
+:10167000089580E189BD82E189BD09B400FEFDCFF6
+:101680008091D8008F7D8093D8008091E0008260A7
+:101690008093E0008091E00081FDFCCF0895CF921F
+:1016A000DF92EF92FF920F931F93CF93DF937C0112
+:1016B0008B01EA010E94B10C811131C0209731F0F9
+:1016C00088819981081B190BE80EF91EC12CD12CB9
+:1016D0000115110519F18091E80085FD14C0809174
+:1016E000E8008E778093E800209741F08881998107
+:1016F0008C0D9D1D9983888385E011C00E94B10CDB
+:10170000882331F30CC0F70181917F018093F100B0
+:1017100001501109FFEFCF1ADF0ADACF80E0DF9125
+:10172000CF911F910F91FF90EF90DF90CF90089590
+:101730002091F0013091F1012617370748F061152B
+:10174000710539F42091E8002E772093E80001C05C
+:10175000B901FC0120E061157105B9F18091E90141
+:10176000882309F440C0853009F43FC08091E80027
+:1017700083FD3DC08091E80082FF06C08091E800B3
+:1017800082FF26C080E008958091E80080FFE3CFCB
+:101790002091F3008091F20090E0922B6115710589
+:1017A00051F08830910538F421912093F100615077
+:1017B00071090196F3CF21E0089709F020E08091AC
+:1017C000E8008E778093E800C6CF2111C7CFD6CF2F
+:1017D0008091E901882339F0853039F08091E80063
+:1017E00083FFCCCF04C082E0089583E0089581E0B8
+:1017F00008952091F0013091F1012617370748F044
+:101800006115710539F42091E8002E772093E800E6
+:1018100001C0B901FC0120E061157105C1F18091A1
+:10182000E901882309F441C0853009F440C0809162
+:10183000E80083FD3EC08091E80082FF06C08091F1
+:10184000E80082FF27C080E008958091E80080FFD3
+:10185000E3CF2091F3008091F20090E0922B61158C
+:10186000710559F08830910540F424912093F100DE
+:101870003196615071090196F2CF21E0089709F085
+:1018800020E08091E8008E778093E800C5CF211199
+:10189000C6CFD5CF8091E901882339F0853039F062
+:1018A0008091E80083FFCBCF04C082E0089583E0FD
+:1018B000089581E00895982F973058F59093E900A6
+:1018C000981739F07091EC002091ED005091F000E4
+:1018D00003C0242F762F50E021FF19C03091EB0078
+:1018E0003E7F3093EB003091ED003D7F3093ED0073
+:1018F0003091EB0031603093EB007093EC0020935B
+:10190000ED005093F0002091EE0027FF07C09F5F8D
+:10191000D3CF8F708093E90081E0089580E008952F
+:101920008091EA0187FD05C08091E80080FF0EC02C
+:1019300012C08091E80082FD05C08091E90181110B
+:10194000F8CF08958091E8008B7708C08091E90175
+:101950008111EACF08958091E8008E778093E800A6
+:1019600008958091E4009091E50045E62091EC0017
+:1019700020FF21C02091E80020FD21C02091E90135
+:10198000222389F0253089F02091EB0025FD0FC03E
+:101990002091E4003091E5002817390739F34150D0
+:1019A00041F0C901E3CF82E0089583E0089581E02A
+:1019B000089584E008952091E80022FFDFCF80E0C1
+:1019C00008950E944F0D0E94570DE0EEF0E08081D7
+:1019D00081608083E8EDF0E080818F77808319BC9F
+:1019E000A7EDB0E08C918E7F8C9380818F7E808379
+:1019F0001092E80108950F931F93CF93DF930E94F5
+:101A00004F0D0E94570DC8EDD0E088818F778883F5
+:101A100088818068888388818F7D888319BC109233
+:101A2000E9011092E5011092E7011092E60100EE43
+:101A300010E0F80180818B7F8083888181608883BA
+:101A400042E060E080E00E945B0CE1EEF0E080812B
+:101A50008E7F8083E2EEF0E08081816080838081F0
+:101A600088608083F80180818E7F80838881806197
+:101A70008883DF91CF911F910F910895E8EDF0E0F9
+:101A800080818F7E8083E7EDF0E0808181608083BC
+:101A900084E082BF81E08093E8010C94FB0CE8EDC8
+:101AA000F0E080818E7F80831092E2000895109292
+:101AB000DA001092E10008951F920F920FB60F9274
+:101AC00011242F933F934F935F936F937F938F9343
+:101AD0009F93AF93BF93EF93FF938091E10082FFB9
+:101AE0000BC08091E20082FF07C08091E1008B7FF4
+:101AF0008093E1000E94B80F8091DA0080FF1FC040
+:101B00008091D80080FF1BC08091DA008E7F809387
+:101B1000DA008091D90080FF0DC080E189BD82E1AB
+:101B200089BD09B400FEFDCF81E08093E9010E94E8
+:101B3000C90905C019BC1092E9010E94D70980911A
+:101B4000E10080FF19C08091E20080FF15C0809104
+:101B5000E2008E7F8093E2008091E20080618093BA
+:101B6000E2008091D80080628093D80019BC85E0A3
+:101B70008093E9010E94DB098091E10084FF30C07D
+:101B80008091E20084FF2CC080E189BD82E189BDA3
+:101B900009B400FEFDCF8091D8008F7D8093D800DE
+:101BA0008091E1008F7E8093E1008091E2008F7E42
+:101BB0008093E2008091E20081608093E200809156
+:101BC000E501882311F084E007C08091E30087FFDE
+:101BD00002C083E001C081E08093E9010E94DC093A
+:101BE0008091E10083FF29C08091E20083FF25C03E
+:101BF0008091E100877F8093E10082E08093E9019A
+:101C00001092E5018091E1008E7F8093E100809148
+:101C1000E2008E7F8093E2008091E20080618093F9
+:101C2000E20042E060E080E00E945B0C8091F00006
+:101C300088608093F0000E94DA09FF91EF91BF91D4
+:101C4000AF919F918F917F916F915F914F913F9154
+:101C50002F910F900FBE0F901F9018951F920F920B
+:101C60000FB60F9211242F933F934F935F936F936F
+:101C70007F938F939F93AF93BF93CF93EF93FF93F4
+:101C8000C091E900CF708091EC001092E900809142
+:101C9000F000877F8093F00078940E946A0E109283
+:101CA000E9008091F00088608093F000C093E90023
+:101CB000FF91EF91CF91BF91AF919F918F917F91C4
+:101CC0006F915F914F913F912F910F900FBE0F90A9
+:101CD0001F9018951F93CF93DF93CDB7DEB7AA97C8
+:101CE0000FB6F894DEBF0FBECDBFEAEEF1E08091F3
+:101CF000F100819321E0E23FF207C9F70E94F20967
+:101D00008091E80083FF1CC12091EA013091EB0132
+:101D1000832F90E08A30910508F012C1FC01EA5A45
+:101D2000FF4F0C942022203881F0223809F008C19E
+:101D30008091EE018F708093E9008091EB0085FB2C
+:101D4000882780F91092E90006C08091E601909101
+:101D5000E701911182609091E800977F9093E800ED
+:101D60008093F1001092F100C5C0822F8D7F09F0A1
+:101D7000E7C0222319F0223061F0E2C08091EC012B
+:101D8000813009F0DDC0333009F080E08093E70155
+:101D900028C08091EC01811124C02091EE012F70A8
+:101DA00009F4CEC02093E9008091EB0080FF19C0B8
+:101DB0008091EB00333011F4806211C08061809318
+:101DC000EB0081E090E0022E01C0880F0A94EAF750
+:101DD0008093EA001092EA008091EB008860809383
+:101DE000EB001092E9008091E800877F86C0211106
+:101DF000A7C01091EC011F778091E3008078812BC0
+:101E00008093E3008091E800877F8093E8000E9440
+:101E1000900C8091E80080FFFCCF8091E300806807
+:101E20008093E300112311F083E001C082E08093EE
+:101E3000E90186C02058223008F082C08091EC0170
+:101E40009091ED018C3D23E0920779F583E08A8340
+:101E50008AE289834FB7F894DE01139620E03EE0D2
+:101E600051E2E32FF0E050935700E49120FF03C0CC
+:101E7000E295EF703F5FEF708E2F90E0EA3010F048
+:101E8000C79601C0C0968D939D932F5F243149F76B
+:101E90004FBF8091E800877F8093E8006AE270E09E
+:101EA000CE0101960E94980B14C0AE014F5F5F4FA8
+:101EB0006091EE010E94E00A009709F441C0209170
+:101EC000E800277F2093E800BC0189819A810E9465
+:101ED000F90B8091E8008B778093E80031C02038BF
+:101EE00079F58091E800877F8093E8008091E50193
+:101EF0008093F1008091E8008E778093E8000E9443
+:101F0000900C1EC021111CC09091EC019230C0F4C5
+:101F10008091E800877F8093E8009093E5010E941C
+:101F2000900C8091E501811104C08091E30087FF4E
+:101F300002C084E001C081E08093E9010E94DE09D3
+:101F40008091E80083FF0AC08091E800877F80933A
+:101F5000E8008091EB0080628093EB00AA960FB6B8
+:101F6000F894DEBF0FBECDBFDF91CF911F910895D2
+:101F70000895CF938091E9018823B1F08091E90021
+:101F80008F709091EC0090FF02C090E801C090E04B
+:101F9000C92FC82B1092E9008091E80083FD0E94B0
+:101FA0006A0ECF70C093E900CF91089590936C01B1
+:101FB00080936B010895E0916B01F0916C01309773
+:101FC00021F00190F081E02D099480E00895E091E6
+:101FD0006B01F0916C01309721F00280F381E02DCC
+:101FE00009940895E0916B01F0916C01309721F014
+:101FF0000480F581E02D09940895209169013091C4
+:102000006A018217930771F090936A0180936901C6
+:10201000E0916B01F0916C01309721F00680F7811F
+:10202000E02D09940895209167013091680182178D
+:10203000930771F09093680180936701E0916B01C1
+:10204000F0916C01309721F00084F185E02D099426
+:10205000089508950C9429100E94951C0E9449042B
+:102060000C94591D9F92AF92BF92CF92DF92EF9244
+:10207000FF920F931F93CF93DF9300D000D000D037
+:10208000CDB7DEB70E9461048CE7E82E81E0F82E20
+:102090000DE010E0CC24C394D12C902E802F0E9410
+:1020A0004E05F701B2907F01B826A1F40150110945
+:1020B000A0F78FEF89838A831B820E949E1C816018
+:1020C000782F9D838C8349815A816B818D810E94F9
+:1020D000CC1031C09091D60191FF04C08E830E9434
+:1020E00054058E8125E030E0A601022E01C0440F88
+:1020F0000A94EAF7A42E4B21D1F029839A828A21EF
+:1021000091E009F490E09B830E949E1C8160782FEF
+:102110009D838C8349815A816B818D810E94CC1073
+:10212000F801E259FE4F80818A25808304C0215046
+:102130003109D0F6BBCF0E943D2010916D010E9465
+:10214000DB0F1817B9F00E94DB0F80936D01269604
+:102150000FB6F894DEBF0FBECDBFDF91CF911F91B8
+:102160000F91FF90EF90DF90CF90BF90AF909F9036
+:102170000C94E90826960FB6F894DEBF0FBECDBFCB
+:10218000DF91CF911F910F91FF90EF90DF90CF9053
+:10219000BF90AF909F900895CF93DF93CDB7DEB7F8
+:1021A0002B970FB6F894DEBF0FBECDBF4F83588775
+:1021B00069877A878B87DE01119686E0FD0111928F
+:1021C0008A95E9F785E0FE01379601900D928A9590
+:1021D000E1F749815A816B817C818D819E810E94CA
+:1021E0007A172B960FB6F894DEBF0FBECDBFDF91E6
+:1021F000CF910895882309F4B9C0823859F40E9418
+:10220000DB0F81FDB3C089E30E94C11A0E94981BB5
+:1022100089E30CC0833871F40E94DB0F80FDA6C0F7
+:1022200083E50E94C11A0E94981B83E50E94011B4E
+:102230000C94981B843859F40E94DB0F82FD96C0E1
+:1022400087E40E94C11A0E94981B87E4EFCF9CEF9D
+:10225000980F913A18F40E94C11AEACF90E2980FB1
+:10226000983050F4877091E001C0990F8A95EAF791
+:10227000892F0E94451BDCCF9BE5980F933070F4AB
+:10228000853A29F0863A31F482E890E005C081E889
+:1022900090E002C083E890E00C94FD0F98E5980F61
+:1022A000933108F063C0883A39F1893A41F18A3AAA
+:1022B00049F18B3A51F18C3A59F18D3A61F1803BF9
+:1022C00069F18E3A71F18F3A79F1813B81F1823B6C
+:1022D00089F1833B91F1843B99F1853BA1F1863BE8
+:1022E000A9F1873BB1F1883BB9F1893BC1F18A3B48
+:1022F000C9F58AE292E038C082EE90E035C089EEFE
+:1023000090E032C08AEE90E02FC085EB90E02CC0C8
+:1023100086EB90E029C087EB90E026C08CEC90E043
+:1023200023C08DEC90E020C083E891E01DC08AE8D6
+:1023300091E01AC082E991E017C084E991E014C0ED
+:1023400081E292E011C083E292E00EC084E292E06A
+:102350000BC085E292E008C086E292E005C087E209
+:1023600092E002C080E090E00C941310089588235E
+:1023700009F44BC0823859F40E94DB0F81FF45C03D
+:1023800089E30E94C11A0E94981B89E30CC083381C
+:1023900071F40E94DB0F80FF38C083E50E94C11AF0
+:1023A0000E94981B83E50E94011B0C94981B8438A3
+:1023B00059F40E94DB0F82FF28C087E40E94C11AF3
+:1023C0000E94981B87E4EFCF9CEF980F913A58F347
+:1023D00090E2980F983050F4877091E001C0990F07
+:1023E0008A95EAF7892F0E944B1BDFCF9BE5980F58
+:1023F000933020F480E090E00C94FD0F885A8331F4
+:1024000020F480E090E00C9413100895882321F0CC
+:102410000E94451B0C94981B0895882321F00E946C
+:102420004B1B0C94981B08958F929F92AF92BF9272
+:10243000CF92DF92EF92FF920F931F93CF93DF9390
+:102440004C01A62EC72FFC01E280D581D295DF700A
+:102450000E945C1A882319F082E00E949F1AE11002
+:102460000E94621B0E94BA1A882379F0EE2069F05C
+:1024700080E28A0D883048F082E00E949F1A0E9414
+:10248000BA1ABB24B394B82601C0B12CEC2FE29544
+:10249000EF70F0E0E05AFF4F0C9420228C2F807FE9
+:1024A0001C2F1F70882311F01295107FEE2089F0E9
+:1024B000112309F4C9C180E28A0D883020F4812FEC
+:1024C0000E94451B03C0812F0E94551B0E94981B30
+:1024D000BBC18A2D0E94B711112309F4CFC180E23C
+:1024E0008A0D883020F4812F0E944B1B03C0812F5E
+:1024F0000E945B1B0E94981BC1C18C2F807F1C2FE8
+:102500001F70803211F01295107FAA2021F0F1E0A7
+:10251000AF1639F12FC0EE2091F0DD2309F41DC173
+:10252000D13021F4812F0E94751BA8C1D23009F04F
+:1025300014C10E947E1B812F0E94291A0EC1DD2327
+:1025400069F0D13041F40E94421B812309F496C105
+:102550000E942C1A03C0D23009F490C10E947E1B45
+:1025600002C1EE2021F0D23008F088C1F6C0D111AE
+:1025700085C1F9C0EE2021F0DD2309F4EEC064C16D
+:10258000DD2309F4F0C067C12C2F26952695237012
+:1025900030E02115310521F02130310561F06EC1A7
+:1025A000EE2021F08A2D9C2F937002C080E090E0F5
+:1025B0000E94FD0F63C1EE2021F08A2D9C2F9370A5
+:1025C00002C080E090E00E94131058C18A2DEE20D6
+:1025D00019F00E94451F02C00E94AD1F0E943220C8
+:1025E0004DC18C2F837009F04EC0E11047C12A2DD8
+:1025F000229526952770220F220F8A2D8F70C82EC4
+:10260000D12CE12CF12C022E04C0CC0CDD1CEE1CD4
+:10261000FF1C0A94D2F7A4FE10C06FE070E080E0C7
+:1026200090E004C0660F771F881F991F2A95D2F784
+:10263000609570958095909503C060E070E0CB0147
+:102640002C2F26952695237030E02230310569F035
+:102650002330310589F06C297D298E299F2921306D
+:10266000310571F00E94CE1809C16C297D298E298F
+:102670009F290E94E81802C10E94CE18C701B60126
+:102680000E94B418FBC0EE2019F08C2F817001C09D
+:102690008695882309F4F2C02A2D22952695277065
+:1026A000220F220F8A2D8F70C82ED12CE12CF12CF5
+:1026B000022E04C0CC0CDD1CEE1CFF1C0A94D2F7C9
+:1026C000A4FE10C06FE070E080E090E004C0660FF0
+:1026D000771F881F991F2A95D2F76095709580956E
+:1026E000909503C060E070E0CB012C2F26952695D5
+:1026F000237030E02230310569F02330310589F054
+:102700006C297D298E299F292130310571F00E9485
+:10271000A219B4C06C297D298E299F290E94BC1959
+:10272000ADC00E94A219C701B6010E948819A6C0B7
+:102730000A2D10E0F801E05EF109E531F10508F03D
+:102740007EC0E059FF4F0C9420221A2D1F708C2F51
+:102750008F71EE2031F00E942119812F0E94061204
+:102760008DC00E944219812F0E940D1287C0EE2059
+:1027700039F0D11183C08C2F8F710E9467197EC0F0
+:10278000D23008F07BC0F7CFEE2039F08C2F8F715C
+:102790000E94211973C0EE20C9F38C2F8F710E9403
+:1027A00042196CC0EE2029F08C2F8F710E940C19F9
+:1027B00065C00E94021962C0EE20B9F00E94261A7C
+:1027C0000E944B1B0E94581A843029F40E94981AC8
+:1027D0008C2F8F7164C0D23008F06FC0CF718C2FF6
+:1027E0000E94211963E08C2F0DC00E94261A0E94BE
+:1027F000451BD230A8F00E94981A0E942C1A64E05F
+:102800008C2F8F71DF91CF911F910F91FF90EF90DF
+:10281000DF90CF90BF90AF909F908F900C94881ACC
+:1028200081E0DF91CF911F910F91FF90EF90DF90AA
+:10283000CF90BF90AF909F908F900C949F1AEE20F6
+:1028400039F0DD2309F4A2CF8A2D0E94FA1016C0B8
+:10285000DD2309F4A2CF8A2D0E94B7110FC04C2F9F
+:102860004F706A2DC4010E94A2020E94271806C060
+:102870004C2F4F706A2DC4010E94FB05BB20E9F06C
+:102880000E94581A80FD19C0F40112820E94521A47
+:102890000E942119C4010E946A140E94521ADF91F9
+:1028A000CF911F910F91FF90EF90DF90CF90BF904D
+:1028B000AF909F908F900C944219DF91CF911F9110
+:1028C0000F91FF90EF90DF90CF90BF90AF909F90CF
+:1028D0008F9008950F931F93CF93DF93EC0128817E
+:1028E00039818B819C81892B31F03F3F11F080E051
+:1028F00003C02F3FE1F781E0811113C0CE010E9498
+:102900006D05882371F0688179818A810E94221A7D
+:102910008C010E94D6190E94A918B801CE010E940C
+:102920001412DF91CF911F910F9108950E94621BA5
+:102930000E94721B0E94341B0E94981B0E94DE2082
+:102940000E94322080E090E00E94FD0F80E090E045
+:102950000C9413100E94521B0C9496140E94171A88
+:10296000292F22952F7030E02C3031054CF42A307D
+:1029700031056CF42250310922303105B0F407C022
+:102980002C30310571F02F30310559F00EC0803FE9
+:1029900031F018F4803E48F402C0843F31F481E005
+:1029A000089593FB882780F9089580E00895CF93D8
+:1029B000DF9300D000D01F92CDB7DEB70F900F90FD
+:1029C0000F900F900F90DF91CF910895CF93DF93E9
+:1029D00000D000D000D0CDB7DEB726960FB6F89461
+:1029E000DEBF0FBECDBFDF91CF9108951F93CF9370
+:1029F000DF93C0917C0116E080917D01C81799F0AA
+:102A0000D0E01C9FF0011D9FF00D1124E258FE4FF5
+:102A10004081518162817381848195810E94E61495
+:102A20002196C770E9CFDF91CF911F910895409112
+:102A3000AE015091AF016091B0017091B1018091F0
+:102A4000B2019091B3010C94E614CF938091B3013D
+:102A500082958F7009F05FC08091B001882309F4DE
+:102A60005AC020917C01A0917D016091AE017091CE
+:102A7000AF018091B1019091B20131E06F3F09F057
+:102A800030E0B32FC6E02A1709F445C0009721F0C3
+:102A90007F3F21F44B2F03C041E001C040E030E014
+:102AA00040FD35C0C29FF001C39FF00D1124E258D4
+:102AB000FE4F418174132BC04081641328C04281B2
+:102AC000411125C0438154814817590710F44150E2
+:102AD0005109481B590B483C5105C8F48091B3017A
+:102AE0008F7080618093B30186E0829FF001839FA5
+:102AF000F00D1124ED57FE4F80818F70806180832F
+:102B00008EEA91E00E946A14CF910C94F6142F5F24
+:102B10003F4F2770B8CFCF910895CF92DF92EF92B9
+:102B2000FF920F931F93CF93DF93CDB7DEB76297DA
+:102B30000FB6F894DEBF0FBECDBF8C0185E0F80163
+:102B4000DE011D9601900D928A95E1F7D8014C9116
+:102B500011965C91119712966C9112971396ED90C5
+:102B6000FC9014977091AE01E091AF012091B101FA
+:102B70003091B2012115310531F0EF3F31F481E0A0
+:102B80007F3F19F403C081E001C080E0B82FB1702D
+:102B9000CB2E80FD6CC1D090B001DD2009F4F5C0D2
+:102BA000F091B301E216F30638F0C701821B930BD4
+:102BB000883C910548F09BC0209530952E0D3F1D17
+:102BC000283C310508F093C08F2F807F09F052C058
+:102BD000E51314C0741312C0D62E61110FC0FF701C
+:102BE000F061F093B3010E9417158EEA91E00E9404
+:102BF0006A148091B301F80185836CC1EF2831F02C
+:102C00005F3F31F481E04F3F19F403C081E001C020
+:102C100080E080FD03C081E0862701C080E0F82FBE
+:102C2000F170FF2E80FF1CC080917C0120917D01FE
+:102C300036E0821709F428C190E0389FF001399FEF
+:102C4000F00D1124E258FE4F7181571306C07081B8
+:102C5000471303C07281671303C001968770E9CFE1
+:102C6000D62E662309F436C18091B301816080932A
+:102C7000B30153C0E51308C0741306C0611104C04A
+:102C8000D8011596FC93AEC04D875E878D859E85D5
+:102C90006A8B0E94AE146A89882329F1D62E662396
+:102CA00011F12091B301822F82958F7090E00297ED
+:102CB0000CF460C08091AE019091AF0198878F8332
+:102CC0001986FB86EA862C87CE01079651C0E51748
+:102CD00031F14D875E878D859E856A8B0E94AE148B
+:102CE0006A8981112EC0C8010E946A14A4C08F2F66
+:102CF000807F69F77E2DF98AE88A89890E94D71436
+:102D00008EEA91E00E946A14EEEAF1E086E0DF01CB
+:102D10001D928A95E9F70E941715D12CDBC0741318
+:102D2000D8CF6111D6CFD8011596FC93C8010E9467
+:102D30006A14EEEAF1E086E0DF011D928A95E9F778
+:102D4000C9C0D62E662379F22091B301822F8295D5
+:102D50008F7090E0029774F08091AE019091AF0176
+:102D60009A8389831B82FD82EC822E83CE01019699
+:102D70000E946A1486E0F801AEEAB1E001900D927B
+:102D80008A95E1F70E9425156FC0E216F30628F038
+:102D9000C701821B930B9C0104C0209530952E0D1A
+:102DA0003F1D283C310508F052C0D62E662309F499
+:102DB0009ACFE5132CC074132AC08091B30180FD13
+:102DC0001DC0982F92959F70C9F0D80115968C93CD
+:102DD00015979F3039F09F5F9295907F8F70892B68
+:102DE00015968C93C8010E946A1486E0F801AEEA39
+:102DF000B1E001900D928A95E1F736C086E0F801C6
+:102E0000AEEAB1E001900D928A95E1F763C04D877B
+:102E10005E878D859E850E94AE14882379F086E0BA
+:102E2000F801AEEAB1E001900D928A95E1F70E94B7
+:102E300025150E941715DD24D3944CC08091B30151
+:102E400081608093B301C8010E946A1443C07E2D43
+:102E5000F98AE88A89890E94D714EEEAF1E086E0CF
+:102E6000DF011D928A95E9F70E94171533C066238A
+:102E700009F439CF4D875E878D859E850E94AE14FB
+:102E8000882309F430CFCBCF4D875E878D859E8513
+:102E90000E94171A292F22952F7030E02230310519
+:102EA0002CF49F7041F0811106C00CC02430310514
+:102EB0002CF49F7049F4805E883020F0C8010E9495
+:102EC0006A14CF2CDC2C06C0D80115969C91907FFB
+:102ED00091F7F8CF8D2D62960FB6F894DEBF0FBE36
+:102EE000CDBFDF91CF911F910F91FF90EF90DF90B9
+:102EF000CF9008951F93CF93DF93CDB7DEB72C9774
+:102F00000FB6F894DEBF0FBECDBF4F8358876987D9
+:102F10007A878B879C87CE0107960E948D15882320
+:102F2000C1F02F8138858A859B85892B31F03F3F01
+:102F300011F080E003C02F3FE1F781E0811147C02D
+:102F40004F81588569857A858B859C850E94E6141A
+:102F50003EC086E0FE013796DE01119601900D928B
+:102F60008A95E1F7FF81E8854A855B854115510522
+:102F700031F0EF3F31F481E0FF3F19F403C081E00D
+:102F800001C080E080FD23C020917D0130E0C901B7
+:102F900001968770992760917C0170E086179707EA
+:102FA000F1F1F983EA835D834C8396E0929FD0012F
+:102FB000939FB00D1124A258BE4FFE01319601908F
+:102FC0000D929A95E1F780937D010E94F61416E028
+:102FD00080917C0190917D01891779F1189FC00142
+:102FE000112482589E4F0E948D15882331F1E09163
+:102FF0007C011E9FF0011124E258FE4F4081518157
+:1030000062817381848195810E94E61480917C01A4
+:1030100090E001968770992780937C01D9CF0E9418
+:10302000AA1410927D0110927C01EEEAF1E086E094
+:10303000DF011D928A95E9F7CACF2C960FB6F89456
+:10304000DEBF0FBECDBFDF91CF911F910895EF92EC
+:10305000FF920F931F93CF93DF939C01009709F486
+:1030600071C0F12CEE24E394E9012196F9018491D9
+:10307000843740F4843008F056C0813081F08230CB
+:1030800021F160C0853709F449C0C0F19CE7980F71
+:10309000903708F057C08F770E94B71146C089015A
+:1030A0000E5F1F4FFE01849190E2980F983050F40C
+:1030B0008770FE2D01C0FF0F8A95EAF78F2F0E94BF
+:1030C000651B15C00E94FA1014C089010E5F1F4FC6
+:1030D000FE01849190E2980F983068F48770FE2D7D
+:1030E00001C0FF0F8A95EAF78F2F0E946B1B0E9489
+:1030F000981BE8011AC00E94B711FBCF2E5F3F4F0B
+:10310000FE01C491CC2341F08FE99FE00197F1F7D4
+:1031100000C00000C150F6CFE90107C0FE01F490E5
+:10312000E901229602C00E94FA108F2D882341F0F7
+:10313000EFE9FFE03197F1F700C000008150F6CFD2
+:103140009E0192CFDF91CF911F910F91FF90EF9051
+:10315000089508956093B8017093B9018093BA01FE
+:103160009093BB010C9496140F931F930091B80198
+:103170001091B9012091BA013091BB01062B172B98
+:10318000282B392B0093B8011093B9012093BA0171
+:103190003093BB011F910F910C9496140F931F93C2
+:1031A0000091B8011091B9012091BA013091BB0191
+:1031B00006231723282339230093B8011093B9015C
+:1031C0002093BA013093BB011F910F910C94961478
+:1031D0000F931F930091B8011091B9012091BA018A
+:1031E0003091BB0106271727282739270093B801FC
+:1031F0001093B9012093BA013093BB011F910F9135
+:103200000C9496141092B4011092B5011092B6016C
+:103210001092B7010C94961441E050E060E070E029
+:1032200004C0440F551F661F771F8A95D2F740933D
+:10323000B4015093B5016093B6017093B7010C943B
+:10324000961441E050E060E070E004C0440F551F68
+:10325000661F771F8A95D2F78091B4019091B501CE
+:10326000A091B601B091B701842B952BA62BB72B5B
+:103270008093B4019093B501A093B601B093B701C8
+:103280000C94961441E050E060E070E004C0440FFC
+:10329000551F661F771F8A95D2F740955095609508
+:1032A00070958091B4019091B501A091B601B09153
+:1032B000B70184239523A623B7238093B401909369
+:1032C000B501A093B601B093B7010C94961441E0F8
+:1032D00050E060E070E004C0440F551F661F771F88
+:1032E0008A95D2F78091B4019091B501A091B60171
+:1032F000B091B70184279527A627B7278093B401FB
+:103300009093B501A093B601B093B7010C949614B5
+:103310000F931F930091B4011091B5012091B60154
+:103320003091B701062B172B282B392B0093B401B2
+:103330001093B5012093B6013093B7011F910F91FF
+:103340000C9496140F931F930091B4011091B50142
+:103350002091B6013091B701062317232823392382
+:103360000093B4011093B5012093B6013093B701D7
+:103370001F910F910C9496140F931F930091B40119
+:103380001091B5012091B6013091B701062717279A
+:10339000282739270093B4011093B5012093B60173
+:1033A0003093B7011F910F910C9496140895CF920A
+:1033B000DF92EF92FF920F931F93CF93DF93EC0175
+:1033C000C090B801D090B901E090BA01F090BB0173
+:1033D0008091B4019091B501A091B601B091B7016F
+:1033E000C82AD92AEA2AFB2A0FE110E0B701A60170
+:1033F000002E04C076956795579547950A94D2F7A5
+:1034000040FD05C00150110988F780E007C0BE01EA
+:10341000802F0E944E080197A9F3802FDF91CF9152
+:103420001F910F91FF90EF90DF90CF900895CF9371
+:10343000DF93EC010E94D719BE010E944E08DF9174
+:10344000CF910895CB010E94171A08958091C10170
+:1034500008958093C10108951092C10108950E94BA
+:103460009E1C2091BF013091C0018217930750F03C
+:103470000E949E1C2091BF013091C001821B930BC2
+:103480009C010AC00E949E1C2091BF013091C00186
+:1034900020953095280F391F81E0283B3B4008F4E8
+:1034A00080E008958091BE01859585958595089564
+:1034B0008091BE01877008950E949E1C2091BC01DE
+:1034C0003091BD018217930768F00E949E1C2091E5
+:1034D000BC013091BD01821B930B883B9B4078F46B
+:1034E00080E014C00E949E1C2091BC013091BD015F
+:1034F00020953095280F391F283B3B4088F3809159
+:10350000BE0182FB882780F991E0892781700895A8
+:1035100098E0899F90011124622B6093BE010E9464
+:1035200021190E949E1C9093BD018093BC010895B7
+:103530001092BE011092BD011092BC0108954091FD
+:10354000BE01809584238093BE01982F977089F4E3
+:1035500050E0282F332727FD30954217530749F0B5
+:103560008595859585950E9442191092BD0110920E
+:10357000BC0108959091BE01977081E009F480E04C
+:10358000089590910C019923D9F090910D01992300
+:10359000B9F0982F9695969596959F3088F5E0917D
+:1035A0000E01F0910F01E90FF11D877021E030E06D
+:1035B00001C0220F8A95EAF78181822B81830895C9
+:1035C00040910E0150910F0120E030E09FEFFA0191
+:1035D000E20FF31F6281681799F09F3F19F46111A0
+:1035E00001C0922F2F5F3F4F2E30310581F79F3F53
+:1035F00039F0FA01E90FF11D97FDFA9582830895DC
+:10360000089590910C019923E1F090910D01992377
+:10361000C1F0982F9695969596959F3020F5E0915C
+:103620000E01F0910F01E90FF11D877021E030E0EC
+:1036300001C0220F8A95EAF72095818128232183F2
+:10364000089540910E0150910F0120E030E0FA0101
+:10365000E20FF31F9281981301C012822F5F3F4F38
+:103660002E303105A1F7089581E090E0E0910E0140
+:10367000F0910F01E80FF91F10820196803191053A
+:10368000A9F708958091D50108959091D501982BBF
+:103690009093D501089580959091D50198239093AA
+:1036A000D50108951092D50108959091D401982BD9
+:1036B0009093D401089580959091D401982390938C
+:1036C000D40108951092D40108959091D301982BBC
+:1036D0009093D301089580959091D301982390936E
+:1036E000D30108951092D30108958093C2010E94DE
+:1036F0009E1C9093C0018093BF0108951092C20157
+:103700001092C0011092BF01089540910E01509196
+:103710000F0120E030E080E0FA01E20FF31F918119
+:1037200091118F5F2F5F3F4F2F303105A9F708951B
+:10373000E0910E01F0910F018091D5018083E0911D
+:103740000E01F0910F0180819091D401892B80832B
+:10375000E0910E01F0910F0180819091D301892BAE
+:1037600080838091C201882399F00E942F1A8111D1
+:103770000E947E1BE0910E01F0910F0180819091DB
+:10378000C201892B80830E94851B81110E947E1BB0
+:1037900080910E0190910F010C94E70F40E000978B
+:1037A00039F09C0121503109822393234F5FF7CFD9
+:1037B000842F0895CF92DF92EF92FF920F931F9381
+:1037C0006C01EE24FF24C114D104E104F10421F4BE
+:1037D0006B017C0180E001C080E133272F2D1E2D7D
+:1037E0000D2D011511052105310519F0885F6801BE
+:1037F000790197018601A4E03695279517950795DD
+:10380000AA95D1F7011511052105310519F08C5F35
+:103810006801790197018601F2E0369527951795A1
+:103820000795FA95D1F7011511052105310519F014
+:103830008E5F68017901B701A60176956795579566
+:103840004795452B462B472B09F08F5F1F910F9112
+:10385000FF90EF90DF90CF9008958091E901843040
+:1038600021F11092D70120E488E190E00FB6F8949E
+:10387000A895809360000FBE2093600080E00E94B6
+:10388000E90883B7817F846083BF83B7816083BF8A
+:103890007894889583B78E7F83BF88E10FB6F894BC
+:1038A00080936000109260000FBE089508950895FF
+:1038B0000E94561C0E9461040E94571C0E945505DC
+:1038C00091E0811101C090E0892F08950E94AA140F
+:1038D0000E94DB0F0C94E9081F920F920FB60F9213
+:1038E00011248F939F93AF93BF938091D701811140
+:1038F00013C08091D8019091D901A091DA01B091C3
+:10390000DB014196A11DB11D8093D8019093D9018F
+:10391000A093DA01B093DB01BF91AF919F918F919A
+:103920000F900FBE0F901F90189582E084BD93E01A
+:1039300095BD9AEF97BD80936E0008952FB7F894C8
+:103940008091D8019091D901A091DA01B091DB0169
+:103950002FBF0895CF92DF92EF92FF920F931F93A4
+:103960002FB7F8944091D8015091D9016091DA01B4
+:103970007091DB012FBF6A017B01EE24FF248C01D3
+:1039800020E030E0C016D106E206F30610F4415004
+:103990005109481B590BCA011F910F91FF90EF90DD
+:1039A000DF90CF9008951F920F920FB60F921124BF
+:1039B0008F939F93AF93BF938091D8019091D9013A
+:1039C000A091DA01B091DB010196A11DB11D809398
+:1039D000D8019093D901A093DA01B093DB01BF9194
+:1039E000AF919F918F910F900FBE0F901F901895E0
+:1039F0000E94E10CF8942FEF87EA91E62150804075
+:103A00009040E1F700C0000087E090EBDC0180937C
+:103A1000F3019093F401A093F501B093F6012CE02B
+:103A200088E190E00FB6F894A895809360000FBEEF
+:103A300020936000FFCFEF92FF920F931F93CF93DD
+:103A4000DF93E82E8DE0F82E8F2D0E944E05C5E005
+:103A5000D0E0082F10E098010C2E02C03595279574
+:103A60000A94E2F720FF09C06C2F7F2D80E00E94AE
+:103A7000FC05E81202C081E007C0219760F7FA94C4
+:103A80008FEFF812E1CF80E0DF91CF911F910F917E
+:103A9000FF90EF900895CF93C82F8CE20E941B1DDA
+:103AA000882321F08C2FCF910C941B1D80E0CF91A7
+:103AB0000895CF930E949E1E811102C00E94841E11
+:103AC000C5E6C15049F00E9461048FE39CE901976B
+:103AD000F1F700C00000F5CF89E20E944B1D811173
+:103AE00011C18AE20E944B1D81110E94841E85E053
+:103AF0000E944B1D81110E94F81C0E94A91E8093F8
+:103B0000D60187E00E944B1D882399F18BE10E942A
+:103B10004B1D882351F09091D60191FB882780F9A5
+:103B200021E0822780FB91F922C08EE00E944B1D8C
+:103B3000882351F09091D60192FB882780F921E0EB
+:103B4000822780FB92F913C080E10E944B1D909167
+:103B5000D601882341F093FB882780F921E0822752
+:103B600080FB93F904C0892F809580FB90F9909396
+:103B7000D6018091D6010E94AD1E0E94BB1E80938B
+:103B8000F20180EE0E944B1D882341F08091F201EA
+:103B9000982F909590FB80F98093F20189E30E9421
+:103BA0004B1D882359F09091F20191FB882780F9F1
+:103BB00021E0822780FB91F99093F20182EE0E942E
+:103BC0004B1D882359F09091F20192FB882780F9D0
+:103BD00021E0822780FB92F99093F20186EE0E9409
+:103BE0004B1D882359F09091F20193FB882780F9AF
+:103BF00021E0822780FB93F99093F20183EE0E94EB
+:103C00004B1D882359F09091F20194FB882780F98D
+:103C100021E0822780FB94F99093F20185E30E94D2
+:103C20004B1D882359F09091F20195FB882780F96C
+:103C300021E0822780FB95F99093F20181E30E94B5
+:103C40004B1D882359F09091F20196FB882780F94B
+:103C500021E0822780FB96F99093F20181E10E9496
+:103C60004B1D882359F09091F20197FB882780F92A
+:103C700021E0822780FB97F99093F2018091F20175
+:103C80000E94BF1E8091F20187FB882780F98093F4
+:103C90000D0187E20E944B1DC82F8EE10E944B1D33
+:103CA0008111C2608FE10E944B1D8111C46080E2CE
+:103CB0000E944B1D8111C86081E20E944B1D811141
+:103CC000C06182E20E944B1D8111C06283E20E94AA
+:103CD0004B1D8111C06484E20E944B1D882311F0AA
+:103CE000C06802C0CC2329F08C2F0E94B61E6C2F16
+:103CF00003C00E94B21E682F70E080E090E0CF9178
+:103D00000C94AA18CF9108956DEE7EEF80E090E0BC
+:103D10000E945A2260E082E090E00E94482260E027
+:103D200083E090E00E94482260E084E090E00E94FE
+:103D3000482260E085E090E00C94482280E090E02A
+:103D40000E94422221E08D3E9E4F09F020E0822F0A
+:103D5000089582E090E00C943A22682F82E090E08F
+:103D60000C94482283E090E00C943A22682F83E080
+:103D700090E00C94482284E090E00C943A22682F62
+:103D800084E090E00C9448228091DE0180FF0BC01B
+:103D90006091130185E0689FB001112475956795C6
+:103DA000759567952AC081FF09C06091130185E070
+:103DB000689FB0011124759567951FC082FF07C0E9
+:103DC0006091130185E0689FB001112416C04091F5
+:103DD000DF014423C9F060911201461788F7209152
+:103DE000130185E0289F90011124429FC001439F49
+:103DF000900D112470E00E940C226038710540F48F
+:103E00006115710539F002C065E070E0862F0895F4
+:103E10008FE7089581E008958091DE0180FF08C05A
+:103E20006091110170E0759567957595679521C052
+:103E300081FF06C06091110170E07595679519C00A
+:103E400082FF04C06091110170E010C08091DF0119
+:103E50008823C1F0609110018617A0F7909111019D
+:103E6000989FC001112470E00E940C2260387105F7
+:103E700028F46115710521F0862F08958FE70895C4
+:103E800081E0089561E070E0F4CF803F21F40E946A
+:103E9000C41E819504C0813F29F40E94C41E8093F2
+:103EA000E2010895823F21F40E94C41E819504C05E
+:103EB000833F29F40E94C41E8093E1010895893F45
+:103EC00019F40E940C1F05C08A3F31F40E940C1F98
+:103ED00081958093E30108958B3F21F40E940C1F8C
+:103EE000819504C08C3F29F40E940C1F8093E4014B
+:103EF0000895843F21F48091E001816017C0853FDF
+:103F000021F48091E001826011C0863F21F480910C
+:103F1000E00184600BC0873F21F48091E00188605C
+:103F200005C0883F31F48091E00180618093E00119
+:103F300008958D3F21F48091DE0181600BC08E3F9A
+:103F400021F48091DE01826005C08F3F29F48091C9
+:103F5000DE0184608093DE010895803F39F4809112
+:103F6000E20187FF6CC01092E20169C0813F29F431
+:103F70008091E2011816BCF362C09091E101823F8A
+:103F800029F497FF5CC01092E10159C0833F19F4F6
+:103F90001916CCF354C0893F41F48091E3011816FF
+:103FA0000CF04DC01092E3014AC08A3F29F4809181
+:103FB000E30187FF44C0F6CF8B3F39F48091E401E1
+:103FC00087FF3DC01092E4013AC08C3F29F48091F4
+:103FD000E4011816BCF333C0843F21F48091E00162
+:103FE0008E7F17C0853F21F48091E0018D7F11C045
+:103FF000863F21F48091E0018B7F0BC0873F21F445
+:104000008091E001877F05C0883F31F48091E00115
+:104010008F7E8093E00113C08D3F21F48091DE01FB
+:104020008E7F0BC08E3F21F48091DE018D7F05C015
+:104030008F3F29F48091DE018B7F8093DE01809198
+:10404000E10181110EC08091E20181110AC08091CD
+:10405000E301811106C08091E401811102C0109238
+:10406000DF01089580EE91E00E94F20F0E949E1CF5
+:104070009093DD018093DC0108951F93CF93DF932C
+:104080008091DC019091DD010E94AA1C4091DF012A
+:10409000442321F02091140130E006C02091150145
+:1040A0005AE0259F900111248217930708F482C0DB
+:1040B0008091E1011091E201D091E301C091E4010E
+:1040C000811107C0111105C0D11103C0CC2309F41F
+:1040D00071C04F3F19F04F5F4093DF01181624F471
+:1040E0000E94C41E8093E1018091E10187FF05C019
+:1040F0000E94C41E81958093E101111624F40E9450
+:10410000C41E8093E2018091E20187FF05C00E94F6
+:10411000C41E81958093E2016091E101662339F12B
+:104120001091E201112319F1772767FD7095872F10
+:10413000972F0E941D2123E333E343E35FE30E94B3
+:1041400081210E94EA206093E101612F772767FDBA
+:104150007095872F972F0E941D2123E333E343E3BC
+:104160005FE30E9481210E94EA206093E2011D1614
+:1041700024F40E940C1F8093E3018091E30187FFE8
+:1041800005C00E940C1F81958093E3011C1624F446
+:104190000E940C1F8093E4018091E40187FF05C019
+:1041A0000E940C1F81958093E401DF91CF911F91B4
+:1041B0000C943220DF91CF911F910895E0EEF1E051
+:1041C00085E0DF011D928A95E9F71092DF011092D8
+:1041D000DE01089504D06894B1118DC0089570D0A7
+:1041E00088F09F5790F0B92F9927B751A0F0D1F0E0
+:1041F000660F771F881F991F1AF0BA95C9F712C06A
+:10420000B13081F077D0B1E0089574C0672F782F76
+:104210008827B85F39F0B93FCCF3869577956795D5
+:10422000B395D9F73EF490958095709561957F4F41
+:104230008F4F9F4F0895E89409C097FB3EF49095E7
+:104240008095709561957F4F8F4F9F4F9923A9F06F
+:10425000F92F96E9BB279395F695879577956795FE
+:10426000B795F111F8CFFAF4BB0F11F460FF1BC042
+:104270006F5F7F4F8F4F9F4F16C0882311F096E9D5
+:1042800011C0772321F09EE8872F762F05C0662383
+:1042900071F096E8862F70E060E02AF09A95660F3C
+:1042A000771F881FDAF7880F9695879597F90895F5
+:1042B00057FD9058440F551F59F05F3F71F04795D7
+:1042C000880F97FB991F61F09F3F79F087950895BC
+:1042D000121613061406551FF2CF4695F1DF08C0DB
+:1042E000161617061806991FF1CF869571056105F8
+:1042F00008940895E894BB2766277727CB0197F9A0
+:1043000008950BD078C069D028F06ED018F09523AE
+:1043100009F05AC05FC01124EECFCADFA0F3959F09
+:10432000D1F3950F50E0551F629FF001729FBB279C
+:10433000F00DB11D639FAA27F00DB11DAA1F649F48
+:104340006627B00DA11D661F829F2227B00DA11DFB
+:10435000621F739FB00DA11D621F839FA00D611D81
+:10436000221F749F3327A00D611D231F849F600DA2
+:10437000211D822F762F6A2F11249F5750408AF0DB
+:10438000E1F088234AF0EE0FFF1FBB1F661F771F67
+:10439000881F91505040A9F79E3F510570F014C0FE
+:1043A000AACF5F3FECF3983EDCF38695779567954F
+:1043B000B795F795E7959F5FC1F7FE2B880F911D85
+:1043C0009695879597F9089597F99F6780E870E02B
+:1043D00060E008959FEF80EC089500240A9416167B
+:1043E000170618060906089500240A9412161306E3
+:1043F000140605060895092E0394000C11F4882371
+:1044000052F0BB0F40F4BF2B11F460FF04C06F5F8C
+:104410007F4F8F4F9F4F089597FB072E16F4009400
+:1044200007D077FD09D00E94262207FC05D03EF474
+:10443000909581959F4F0895709561957F4F089550
+:10444000EE0FFF1F0590F491E02D0994AA1BBB1BF2
+:1044500051E107C0AA1FBB1FA617B70710F0A61B84
+:10446000B70B881F991F5A95A9F780959095BC01A5
+:10447000CD010895F999FECF92BD81BDF89A992793
+:1044800080B50895A8E1B0E042E050E00C946222CB
+:10449000262FF999FECF92BD81BDF89A019700B4FD
+:1044A000021639F01FBA20BD0FB6F894FA9AF99A9D
+:1044B0000FBE08950196272F0E9449220C9448228E
+:1044C000DC01CB01FC01F999FECF06C0F2BDE1BDD4
+:1044D000F89A319600B40D9241505040B8F70895C3
+:0444E000F894FFCF7E
+:1044E4002002EB08780955092109EE080101C301EE
+:1044F40028080A03140A3F4D363979042C04F603BC
+:0A450400BD035003690382039B030B
:00000001FF
diff --git a/keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c b/keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c index f4e4f92e01..93d1c84bc5 100644 --- a/keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c +++ b/keyboard/ergodox_ez/keymaps/erez_experimental/keymap.c @@ -7,8 +7,7 @@ #define SYMB 1 // symbols #define MDIA 2 // media keys -#define LSFTO M(0) // Left shift, open parens when tapped -#define RSFTC M(1) // Right shift, close parens when tapped +#define LEADER_TIMEOUT 300 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer @@ -27,28 +26,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | App | LGui | | Alt |Ctrl/Esc| * ,------|------|------| |------+--------+------. - * | | L1 | Home | | PgUp | | | - * | Space| Tap/ |------| |------| Tab/L1 |Enter | - * | |Toggle| End | | PgDn | | | + * | | | Home | | PgUp | | | + * | Space|Leader|------| |------| Tab/L1 |Enter | + * | | | End | | PgDn | | | * `--------------------' `----------------------' */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - LSFTO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_HOME, - KC_SPC,KC_FN1,KC_END, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_LBRC), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_LEAD,KC_END, // right hand KC_RGHT, KC_6,KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(SYMB), KC_Y,KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H,ALT_T(KC_J),KC_K, KC_L, LT(MDIA,KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), RSFTC, + MEH_T(KC_RBRC),KC_N,KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, LT(SYMB,KC_MINS), KC_LALT, CTL_T(KC_ESC), KC_PGUP, @@ -149,48 +148,7 @@ static uint16_t key_timer; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case 0: - if (record->event.pressed) { - register_mods(MOD_BIT(KC_LSFT)); - if (record->tap.count && !record->tap.interrupted) { - register_code(KC_9); - } - else { - record->tap.count = 0; - } - } - else { - if (record->tap.count) { - unregister_code(KC_9); - } - else { - } - unregister_mods(MOD_BIT(KC_LSFT)); - } - break; - - case 1: - if (record->event.pressed) { - register_mods(MOD_BIT(KC_LSFT)); - if (record->tap.count && !record->tap.interrupted) { - register_code(KC_0); - } - else { - record->tap.count = 0; - } - } - else { - if (record->tap.count) { - unregister_code(KC_0); - } - else { - } - unregister_mods(MOD_BIT(KC_LSFT)); - } - break; - } - return MACRO_NONE; + return MACRO_NONE; }; // Runs just one time when the keyboard initializes. @@ -198,28 +156,48 @@ void matrix_init_user(void) { }; +LEADER_EXTERNS(); + // Runs constantly in the background, in a loop. void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); + uint8_t layer = biton32(layer_state); - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } -}; + LEADER_DICTIONARY() { + leading = false; + leader_end(); + SEQ_ONE_KEY(KC_W) { + register_code(KC_LALT); + register_code(KC_F4); + unregister_code(KC_F4); + unregister_code(KC_LALT); + } + SEQ_ONE_KEY(KC_O) { + register_code(KC_LCTL); + register_code(KC_LSFT); + register_code(KC_O); + unregister_code(KC_O); + unregister_code(KC_LSFT); + unregister_code(KC_LCTL); + } + } +} diff --git a/keyboard/ergodox_ez/keymaps/erez_experimental/makefile.mk b/keyboard/ergodox_ez/keymaps/erez_experimental/makefile.mk index 4c3a314ed6..faca18b543 100644 --- a/keyboard/ergodox_ez/keymaps/erez_experimental/makefile.mk +++ b/keyboard/ergodox_ez/keymaps/erez_experimental/makefile.mk @@ -2,4 +2,4 @@ # for your own particular keymap SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboard/ergodox_ez/keymaps/erez_experimental/readme.md b/keyboard/ergodox_ez/keymaps/erez_experimental/readme.md index a9c572390a..66acfa187b 100644 --- a/keyboard/ergodox_ez/keymaps/erez_experimental/readme.md +++ b/keyboard/ergodox_ez/keymaps/erez_experimental/readme.md @@ -4,6 +4,12 @@ This is my personal layout which I use to test out ideas which may or may not ma Changelog: +## May 24, 2016: + +* Implements Leader key example + * Leader, W sends Alt-F4 + * Leader, O sends Ctrl-shift-o (a shortcut I use in FrontApp) + ## May 8, 2016: * Makes bottom-right key send minus/underscore when tapped, L1 temporary toggle when held diff --git a/keyboard/ergodox_ez/keymaps/supercoder/README.md b/keyboard/ergodox_ez/keymaps/supercoder/README.md new file mode 100644 index 0000000000..ad531b3da7 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/README.md @@ -0,0 +1,29 @@ +SuperCoder 2000 layout for the ErgoDox +================================================== + +![SuperCoder 2000](images/supercoder_2000.jpg) + +Ever found yourself in need of entering binary codes rapidly? Ever wanted to use +all ten fingers to do so? Ever felt your SuperCoder 2000 too limiting, by only +having three buttons? We heard you! With this layout for the ErgoDox EZ, you +will be able to tap in binary at an unparalleled speed and accuracy! Efficiency +never seen before! + +Behold the Ultimate SuperCoder 2000 layout! + +![SuperCoder layout](images/layout.png) + +### To use it... + +To use this piece of top quality engineering, you can either +[download the hex file][hex] we have prepared for you, or you can compile it on +your own: + + [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex + +``` +$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ cd qmk_firmware/keyboard/ergodox_ez +$ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder +$ make KEYMAP=supercoder +``` diff --git a/keyboard/ergodox_ez/keymaps/supercoder/config_user.h b/keyboard/ergodox_ez/keymaps/supercoder/config_user.h new file mode 100644 index 0000000000..8da1383726 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/config_user.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H 1 + +#include "config.h" + +#undef LOCKING_SUPPORT_ENABLE +#undef LOCKING_RESYNC_ENABLE + +#endif diff --git a/keyboard/ergodox_ez/keymaps/supercoder/images/layout.png b/keyboard/ergodox_ez/keymaps/supercoder/images/layout.png Binary files differnew file mode 100644 index 0000000000..c72958c6e7 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/images/layout.png diff --git a/keyboard/ergodox_ez/keymaps/supercoder/images/supercoder_2000.jpg b/keyboard/ergodox_ez/keymaps/supercoder/images/supercoder_2000.jpg Binary files differnew file mode 100644 index 0000000000..d690eaf020 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/images/supercoder_2000.jpg diff --git a/keyboard/ergodox_ez/keymaps/supercoder/keymap.c b/keyboard/ergodox_ez/keymaps/supercoder/keymap.c new file mode 100644 index 0000000000..ca21d30fd2 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/keymap.c @@ -0,0 +1,75 @@ +/* + * SuperCoder 2000 layout + */ + +#include "ergodox_ez.h" + +/* Layers */ + +#define SC2K 0 // default layer + +/* The Keymap */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Keymap 0: Base Layer + * + * ,-----------------------------------------------------. ,-----------------------------------------------------. + * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| + * | 0 | 0 | 0 | 0 | 0 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | 1 | 1 | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | 0 | 0 | 0 | 0 | 0 | 0 |------| |------| 1 | 1 | 1 | 1 | 1 | 1 | + * |-----------+------+------+------+------+------| 0 | | 1 |------+------+------+------+------+-----------| + * | 0 | 0 | 0 | 0 | 0 | 0 | | | | 1 | 1 | 1 | 1 | 1 | 1 | + * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' + * | 0 | 0 | 0 | 0 | 0 | | 1 | 1 | 1 | 1 | 1 | + * `-----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | DONE | DONE | | DONE | DONE | + * ,------|------|------| |------+------+------. + * | | | DONE | | DONE | | | + * | DONE | DONE |------| |------| DONE | DONE | + * | | | DONE | | DONE | | | + * `--------------------' `--------------------' + */ +[SC2K] = KEYMAP( + // left hand + KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 +,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 +,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 +,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 +,KC_0 ,KC_0 ,KC_0 ,KC_0 ,KC_0 + + ,KC_ENT ,KC_ENT + ,KC_ENT + ,KC_ENT ,KC_ENT ,KC_ENT + + // right hand + ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 + ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 + ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 + ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 + ,KC_1 ,KC_1 ,KC_1 ,KC_1 ,KC_1 + + ,KC_ENT ,KC_ENT + ,KC_ENT + ,KC_ENT ,KC_ENT ,KC_ENT + ), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { +} diff --git a/keyboard/ergodox_ez/keymaps/supercoder/makefile.mk b/keyboard/ergodox_ez/keymaps/supercoder/makefile.mk new file mode 100644 index 0000000000..41a195d9c0 --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/makefile.mk @@ -0,0 +1,6 @@ +BOOTMAGIC_ENABLE=no +COMMAND_ENABLE=no +SLEEP_LED_ENABLE=no +UNICODE_ENABLE=no +MOUSEKEY_ENABLE=no +EXTRAKEY_ENABLE=no diff --git a/keyboard/ergodox_ez/keymaps/supercoder/supercoder.hex b/keyboard/ergodox_ez/keymaps/supercoder/supercoder.hex new file mode 100644 index 0000000000..4a1e2fbede --- /dev/null +++ b/keyboard/ergodox_ez/keymaps/supercoder/supercoder.hex @@ -0,0 +1,846 @@ +:100000000C9456010C949D010C949D010C949D013F
+:100010000C949D010C949D010C949D010C949D01E8
+:100020000C949D010C949D010C94D90B0C94AB0C79
+:100030000C941D190C949D010C949D010C949D0130
+:100040000C949D010C949D010C949D010C949D01B8
+:100050000C949D010C9485190C949D010C949D01A8
+:100060000C949D010C949D010C949D010C949D0198
+:100070000C949D010C949D010C949D010C949D0188
+:100080000C949D010C949D010C949D010C949D0178
+:100090000C949D010C949D010C949D010C949D0168
+:1000A0000C949D010C949D010C949D01180D3A0D2A
+:1000B000280E3A0D280E7F0DA20D280EF70D0A0E00
+:1000C00071107110A010A010FC11FC11FC11FC119A
+:1000D000D610FC1186118611ED11FC11FC11F611E0
+:1000E00093119311931193119311931193119311F0
+:1000F00093119311931193119311931193119311E0
+:10010000A511B211B911C011CA112700270027008B
+:1001100027002700000027002700270027002700CE
+:100120002800270027002700270027002800270095
+:100130002700270027002700280027002700270086
+:10014000270027002800270027002700270000009D
+:1001500028002700270000002700000028001E00BC
+:100160001E0000001E00000028001E001E001E00D1
+:100170001E00000028001E001E001E001E001E00A3
+:1001800028001E001E001E001E001E0028001E006B
+:100190001E001E001E001E0028001E001E001E0065
+:1001A0001E001E0028001E001E001E001E001E0055
+:1001B000000016034500720067006F0044006F00E6
+:1001C0007800200045005A00000016034500720028
+:1001D00067006F0044006F007800200045005A005F
+:1001E00000000403090409023B00020100A0FA090F
+:1001F0000400000103010100092111010001223F57
+:10020000000705810308000A09040100010300003A
+:1002100000092111010001223900070582031000A5
+:10022000011201100100000008EDFE07130100019A
+:1002300002000105010906A101050719E029E715DA
+:100240000025019508750181020508190129059508
+:1002500005750191029501750391010507190029A2
+:100260007715002501957875018102C00501090601
+:10027000A101050719E029E7150025019508750179
+:100280008102950175088101050819012905950567
+:10029000750191029501750391010507190029FF68
+:1002A000150025FF950675088100C00011241FBEAA
+:1002B000CFEFDAE0DEBFCDBF04B603FE27C08091EA
+:1002C000CA019091CB01A091CC01B091CD018730B2
+:1002D000904BA740B04BD1F41092CA011092CB01C1
+:1002E0001092CC011092CD0114BE84B7877F84BFD9
+:1002F0000FB6F894A89580916000886180936000A3
+:10030000109260000FBEE0E0FFE3099511E0A0E06D
+:10031000B1E0E6EBF4E302C005900D92A031B10725
+:10032000D9F721E0A0E1B1E001C01D92AA3CB207DB
+:10033000E1F70E941D090C94591A0C94000080E00A
+:1003400090E00895089508950C94A30156985E983E
+:1003500025982D9826982E9827982F988FEF90E023
+:10036000909389008093880090938B0080938A00FB
+:1003700090938D0080938C00259A2D9A2FEF80E723
+:1003800092E0215080409040E1F700C00000269AA2
+:100390002E9A2FEF80E792E0215080409040E1F7C5
+:1003A00000C00000279A2F9A2FEF80E792E021509B
+:1003B00080409040E1F700C0000025982D982FEF75
+:1003C00080E792E0215080409040E1F700C00000BB
+:1003D00026982E982FEF80E792E0215080409040A1
+:1003E000E1F700C0000027982F9856985E9825984E
+:1003F0002D9826982E9827982F98089589EA80930B
+:10040000800089E08093810024982C983F988AB1DD
+:100410008F748AB96E98479A8BB1806B8BB9769A34
+:100420000E94A6010C94A20180E2809300018091B9
+:10043000100181110EC00E94630281E080931001BF
+:100440002FEF83ED90E3215080409040E1F700C012
+:10045000000080E40E9469028093000181112EC097
+:100460000E94930280930001811128C00E94930290
+:1004700080930001811122C08FE30E949302809338
+:10048000000181111BC00E948B0280E40E9469025E
+:1004900080930001811112C08CE00E94930280932E
+:1004A000000181110BC00E94930280930001811111
+:1004B00005C08FE30E949302809300010E948B028B
+:1004C0008091000108951092B9008AE08093B800ED
+:1004D000089594EA9093BC009091BC0097FFFCCFE4
+:1004E0009091B900987F983021F0903111F081E01F
+:1004F00008958093BB0084E88093BC008091BC0089
+:1005000087FFFCCF8091B900887F883111F080345B
+:1005100071F780E0089584E98093BC008091BC006D
+:1005200084FDFCCF08958093BB0084E88093BC00D9
+:100530008091BC0087FFFCCF9091B900987F81E04B
+:10054000983209F480E0089584E88093BC0080919B
+:10055000BC0087FFFCCF8091BB0008958091000113
+:10056000811115C080E40E9469028093000181110D
+:100570000CC082E10E94930280930001811105C0AA
+:100580008FEF0E949302809300010E948B0284B13E
+:10059000807F84B985B1807F85B98AB1837F8AB92C
+:1005A0008BB1837F8BB93E98469808950E941402C0
+:1005B000809300010E94AE0280B38C7080BB81B337
+:1005C000836F81BBA2E1B1E0E0E2F1E08EE08E0F4B
+:1005D00011921D928E13FCCF0C94FE01BF92CF920C
+:1005E000DF92EF92FF920F931F93CF93DF9380914F
+:1005F0000001882379F0809111018F5F80931101B0
+:10060000811108C00E94140280930001811102C070
+:100610000E94A60102E111E0C0E0D0E0DD24D39405
+:1006200082E0C82EEE24E394F12CC730D10500F50A
+:1006300080910001811164C080E40E94690280936E
+:100640000001811112C082E10E9493028093000197
+:1006500081110BC0C7010C2E01C0880F0A94EAF764
+:1006600080950E949302809300010E948B0248C0F3
+:10067000CA30A1F028F4C83059F0C93061F005C083
+:10068000CC3089F070F0CD3089F0209A289810C0D5
+:10069000219A29980DC0229A2A980AC0239A2B9849
+:1006A00007C0529A01C0539A5B9802C03E9A46987E
+:1006B00090EA9A95F1F79FB1799902C082E001C062
+:1006C00080E091709D25982B7C9902C084E001C048
+:1006D00080E0892B7D9902C038E001C030E0832B97
+:1006E0007E9902C020E101C020E0822B9FB190954D
+:1006F000991F9927991F9295990F907E892B0FC06A
+:1007000080910001811149C080E40E9469028093B8
+:100710000001882379F1B12C0E948B028B2DF80106
+:100720009081981719F08083C09201010E94AE0257
+:1007300021960F5F1F4FCE30D10509F076CF809103
+:100740000101882361F1815080930101882339F0F0
+:100750008FE99FE00197F1F700C0000020C0A0E200
+:10076000B1E0E2E1F1E0CF01825F91919D938E13C0
+:10077000FCCF15C083E10E94930280930001811198
+:10078000CACF81E40E946902809300018111C3CF26
+:100790000E94A402B82EB094BFCF80E0C0CF0E94C8
+:1007A000A40181E0DF91CF911F910F91FF90EF9015
+:1007B000DF90CF90BF900895E82FF0E0E05EFE4F0D
+:1007C0008081089508950F931F93CF93DF93C0E224
+:1007D000D1E010E00C2F025F899190E00E94CF18C9
+:1007E000180F0C13F9CF812FDF91CF911F910F912B
+:1007F000089581E0089508950F931F93CF93DF9399
+:100800008C01FC01C081D181CE010E945417BE0130
+:100810000E949F04EC01F8018281882309F44AC0F8
+:100820008091390181111FC0C431F0E5DF0709F063
+:1008300051C00E94FB0381E0809339010E944F194F
+:100840009093380180933701109230011092320159
+:10085000109231011092340110923301109236013E
+:100860001092350165C080913701909138010E9446
+:100870005B19883C910570F480913001E82FF0E01D
+:10088000EE0FFF1FEF5CFE4FD183C0838F5F80931D
+:1008900030014EC0C43880E5D80721F0C538D045B6
+:1008A00001F13AC0F8018281882341F010922E01B3
+:1008B00082E01EC0C438E0E5DE0759F580912E01C4
+:1008C000811106C086E20E94700F86E20E94041029
+:1008D00082E01CC0C438F0E5DF0741F3C538D045DD
+:1008E000D9F4F8018281882331F010922F0180E23F
+:1008F0000E942C101DC080912F01811106C087E23B
+:100900000E94700F87E20E94041080E20E94331060
+:100910000FC0C538D04529F381E080932E01809324
+:100920002F01C801DF91CF911F910F910C94F90312
+:1009300080E0DF91CF911F910F910895089596E087
+:10094000799FF001112494E5899FE00DF11D112498
+:10095000E60FF11DEE0FFF1FE65FFE4F85919491AC
+:100960000895880F991FFC01E657F04085919491F6
+:100970000895880F991FFC01E65FFE4F85919491C1
+:1009800008950F931F93CF93DF93EC01811590434C
+:1009900050F5C11580E2D80708F0C3C0CB3BD105A4
+:1009A00090F4C83AD10508F06AC0C53AD10508F0FC
+:1009B0005BC0C430D10508F0D0C1219709F0CAC18D
+:1009C00001E010E00AC2CF3FD10511F008F0C5C127
+:1009D000C03FD10508F0A2C0CE01805E9109089702
+:1009E00008F4BBC1B7C1C13090E5D90709F4A2C072
+:1009F00020F5C0318FE4D80770F4C11590E4D90711
+:100A000008F094C0C11521E3D20708F0A3C1DD2787
+:100A10008E01106CE2C1C115D04509F09BC10E9446
+:100A20005B128FEF94E32CE0815090402040E1F77F
+:100A300000C000000E94AA19D0C1C11597E5D907CE
+:100A400058F4C03121E5D20708F01CC1C43180E55B
+:100A5000D80708F475C07EC1CE019057811590412A
+:100A600008F078C1DF7073C1C53AD10509F477C1C8
+:100A7000C63AD10509F076C102E810E4AEC1C83A21
+:100A8000D10509F472C1C93AD10509F471C1CA3A54
+:100A9000D10509F470C1CB3AD10509F46FC1CC3A44
+:100AA000D10509F46EC1CD3AD10509F46DC1C03B41
+:100AB000D10509F46CC1CE3AD10509F46BC1CF3A26
+:100AC000D10509F46AC1C13BD10509F469C1C23B32
+:100AD000D10509F468C1C33BD10509F467C1C43B22
+:100AE000D10509F466C1C53BD10509F465C1C63B12
+:100AF000D10509F464C1C73BD10509F463C1C83B02
+:100B0000D10509F462C1C93BD10509F461C1CA3BF1
+:100B1000D10509F460C100E014E45FC18E011065E5
+:100B20005CC1CE019F700E94B90458C1DF708E0174
+:100B3000106A53C18091B60181608093B6014DC1A6
+:100B40000E94011A811102C00E94E7190E94141A22
+:100B500090E09093CA018093C901C23080E5D80724
+:100B600021F48091C901816086C0C43090E5D90725
+:100B700021F48091C90182607EC0C63020E5D20791
+:100B800021F48091C901846076C0C83080E5D8071F
+:100B900019F48091C90127C0CA3090E5D90721F422
+:100BA0008091C901806167C0CC3020E5D20721F473
+:100BB0008091C90180625FC0CE3080E5D80721F402
+:100BC0008091C901806457C0C03190E5D90721F4F4
+:100BD0008091C90180684FC0C23120E5D20729F455
+:100BE0008091C9018460886046C0C33080E5D80721
+:100BF00021F48091C9018E7F3EC0C53090E5D907B0
+:100C000021F48091C9018D7F36C0C73020E5D2071D
+:100C100021F48091C9018B7F2EC0C93080E5D807AF
+:100C200019F48091C90126C0CB3090E5D90721F491
+:100C30008091C9018F7E1FC0CD3020E5D20721F4FD
+:100C40008091C9018F7D17C0CF3080E5D80721F48E
+:100C50008091C9018F7B0FC0C13190E5D90721F484
+:100C60008091C9018F7707C0C331D04531F480919D
+:100C7000C9018B7F877F8093C9018091C9010E9440
+:100C8000181AABC08D2F99278F7099278130910545
+:100C9000D9F49E012370332702C0880F991F2A952B
+:100CA000E2F79C688E0144E0000F111F4A95E1F7BE
+:100CB00000271370802B912B53E0CC0FDD1F5A952A
+:100CC000E1F7C076DD272FC08230910531F4DC2FAB
+:100CD000CC278E01016F106A80C08330910569F4C2
+:100CE000CE018370992701E010E002C0000F111FB0
+:100CF0008A95E2F7C8019C680FC084309105B9F469
+:100D0000CE018370992701E010E002C0000F111F8F
+:100D10008A95E2F7C8019A6823E0CC0FDD1F2A9577
+:100D2000E1F7C07ED7708C010C2B1D2B56C085308F
+:100D3000910531F4DC2FCC278E01046F106A4DC071
+:100D4000069709F04AC0CF71DD27DC2FCC278E0132
+:100D5000106243C000E010E040C08E013EC001E8D8
+:100D600010E43BC003E810E438C002EE14E435C0E0
+:100D700009EE14E432C00AEE14E42FC005EB14E4CB
+:100D80002CC006EB14E429C007EB14E426C00CECDD
+:100D900014E423C00DEC14E420C003E815E41DC0E6
+:100DA0000AE815E41AC002E915E417C004E915E4DD
+:100DB00014C001E216E411C003E216E40EC004E21E
+:100DC00016E40BC005E216E408C006E216E405C00E
+:100DD00007E216E402C00AE216E4C801DF91CF91EF
+:100DE0001F910F91089596E0799FF001112494E5E9
+:100DF000899FE00DF11D1124E60FF11DEE0FFF1F7D
+:100E0000E65FFE4F85919491803E9105E0F4803C31
+:100E1000910558F58133910509F46FC048F4893282
+:100E2000910509F463C08A32910509F46DC072C05E
+:100E300089339105E9F082389105D1F08533910528
+:100E400009F44DC067C0833E910581F138F4803EBE
+:100E50009105B9F0823E9105D9F05CC0863E9105BE
+:100E600061F1873E9105A1F155C00E94B10408953A
+:100E70002091C90120FD02C021FF4CC080EE90E00E
+:100E800049C08091C90180FFF9CF89E390E042C059
+:100E90008091C90182FF0EC08091C90184FF03C007
+:100EA00080E090E037C083EE90E034C08091C901CB
+:100EB00082FFF2CF82EE90E02DC08091C90183FFC6
+:100EC0000BC08091C90184FDEBCF87EE90E022C07A
+:100ED0008091C90183FFF5CF86EE90E01BC0809121
+:100EE000C90185FF07C089E290E014C08091C90163
+:100EF00085FFF9CF85E390E00DC08091C90186FFA1
+:100F000007C08AE290E006C08091C90186FFF9CF50
+:100F100081E390E00E94C104089508950C948D0728
+:100F200080914A0108950895CF93DF9300D01F92D6
+:100F3000CDB7DEB72091C001243021F523E029830D
+:100F40009B838A8381E08093E9008FEF9091E80092
+:100F5000815095FD06C095ED9A95F1F7000081113D
+:100F6000F5CF8091E80085FF0DC040E050E063E0E0
+:100F700070E0CE0101960E94C9098091E8008E7749
+:100F80008093E8000F900F900F90DF91CF9108951C
+:100F9000CF93DF9300D01F92CDB7DEB72091C00171
+:100FA000243021F522E029839B838A8381E080938A
+:100FB000E9008FEF9091E800815095FD06C095ED16
+:100FC0009A95F1F700008111F5CF8091E80085FF37
+:100FD0000DC040E050E063E070E0CE0101960E9459
+:100FE000C9098091E8008E778093E8000F900F90F8
+:100FF0000F90DF91CF910895CF93DF932091C0019F
+:10100000243009F048C0EC0180910C018823E1F004
+:1010100080910D018823C1F082E08093E9008FEF79
+:101020009091E800815095FD06C095E19A95F1F701
+:1010300000008111F5CF8091E80085FF2CC040E0D1
+:1010400050E060E170E017C081E08093E9008FEF2D
+:101050009091E800815095FD06C095ED9A95F1F7C5
+:1010600000008111F5CF8091E80085FF14C040E0B9
+:1010700050E068E070E0CE010E94C9098091E8006C
+:101080008E778093E80080E1FE01AAE3B1E0019051
+:101090000D928A95E1F7DF91CF9108958091BF017C
+:1010A000811109C00E945E0B0E94BB0B8091E2007F
+:1010B00084608093E20008951092BF01089508951E
+:1010C00008950C94171942E061EC81E00E94D80A5F
+:1010D00042E161EC82E00C94D80A8091C201833035
+:1010E00009F453C030F4813071F0823009F48CC0BF
+:1010F00008958A3009F478C08B3009F45EC08930D5
+:1011000009F09AC020C08091C101813A09F094C0D1
+:101110008091E800877F8093E8008091C5019091DD
+:10112000C601892B21F460E18AE391E003C060E00D
+:1011300080E090E070E00E94140A8091E8008B77D4
+:101140008093E80008958091C101813209F074C054
+:101150008091C5019091C601029708F06DC0809101
+:10116000E800877F8093E8008091E80082FD05C059
+:101170008091C0018111F8CF5FC08091F100809310
+:101180004A018091E8008B7753C08091C101813A78
+:1011900009F052C08091C5019091C601892B09F0D8
+:1011A0004BC08091E800877F8093E8008091E80041
+:1011B00080FFFCCF80910C0136C08091C10181324B
+:1011C000D9F58091C5019091C601892BA9F580912F
+:1011D000E800877F8093E8000E940D0B8091C30197
+:1011E00080930C010C945B128091C101813221F536
+:1011F0008091E800877F8093E8000E940D0B80912A
+:10120000C40180934B0108958091C101813AA1F4FA
+:101210008091E800877F8093E8008091E80080FF5C
+:10122000FCCF80914B018093F1008091E8008E7794
+:101230008093E8000C940D0B089584B7877F84BFDA
+:101240000FB6F894A8958091600088618093600043
+:10125000109260000FBE90E080E80FB6F894809383
+:101260006100909361000FBE0E94A50E0E945E0B6C
+:101270000E94BB0B8091E20084608093E20078942E
+:101280000E94410E0E94A70E82E091E00E945C0E37
+:101290008091C001853069F40E94DB188091BE0105
+:1012A0008823B1F30E940919882391F30E94B3099E
+:1012B000EFCF0E94AD0EECCF292F3327233031051D
+:1012C000C9F064F42130310581F02230310509F094
+:1012D00042C08BE390E026EE31E041C0213231057F
+:1012E000F1F02232310549F136C082E190E021E28D
+:1012F00032E035C099278130910541F08230910567
+:1013000041F0892B41F5E2EEF1E005C0EAECF1E0B5
+:1013100002C0E2EBF1E0849190E09F0120C06623DF
+:1013200039F06130C1F489E090E021E132E017C08A
+:1013300089E090E028EF31E012C0662339F0613097
+:1013400051F489E390E023E332E009C08FE390E0B9
+:101350002CE632E004C080E090E020E030E0FA01CA
+:1013600031832083089580E189BD82E189BD09B47C
+:1013700000FEFDCF8091D8008F7D8093D8008091B2
+:10138000E00082608093E0008091E00081FDFCCF6E
+:101390000895CF92DF92EF92FF920F931F93CF9316
+:1013A000DF93EC018B016A010E942C0B811133C089
+:1013B000C114D10439F0F60180819181081B190B09
+:1013C000C80FD91FE12CF12C0115110519F18091DD
+:1013D000E80085FD16C08091E8008E778093E800D4
+:1013E000C114D10449F0F60180819181E80EF91E03
+:1013F000F182E08285E00FC00E942C0B882321F34C
+:101400000AC089918093F10001501109FFEFEF1A92
+:10141000FF0ADACF80E0DF91CF911F910F91FF900B
+:10142000EF90DF90CF9008952091C7013091C801CF
+:101430002617370748F06115710539F42091E80047
+:101440002E772093E80001C0B90140E061157105D5
+:10145000A9F12091C001222309F443C0253009F4E9
+:1014600042C02091E80023FD40C02091E80022FD09
+:1014700032C02091E80020FFE9CF4091F300209195
+:10148000F20030E0342BFC01CF016115710559F0F9
+:101490002830310540F481918093F1006150710949
+:1014A0002F5F3F4FF1CF41E02830310509F040E098
+:1014B0002091E8002E772093E800C8CF4111C9CFD2
+:1014C0000AC08091C001882361F0853061F080916D
+:1014D000E80083FD0AC08091E80082FFF2CF80E03F
+:1014E000089582E0089583E0089581E008952091B1
+:1014F000C7013091C8012617370748F061157105FB
+:1015000039F42091E8002E772093E80001C0B9015A
+:10151000FC0120E06115710591F18091C0018823E3
+:1015200009F440C0853009F43FC08091E80083FD94
+:101530003DC08091E80082FD2FC08091E80080FFCF
+:10154000E9CF2091F3008091F20090E0922B611599
+:10155000710559F08830910540F424912093F100F1
+:101560003196615071090196F2CF21E0089709F098
+:1015700020E08091E8008E778093E800CBCF2111A6
+:10158000CCCF0AC08091C001882361F0853061F022
+:101590008091E80083FD0AC08091E80082FFF2CFCD
+:1015A00080E0089582E0089583E0089581E0089541
+:1015B000982F973058F59093E900981739F070916B
+:1015C000EC002091ED005091F00003C0242F762F05
+:1015D00050E021FF19C03091EB003E7F3093EB00CB
+:1015E0003091ED003D7F3093ED003091EB003160A4
+:1015F0003093EB007093EC002093ED005093F000DB
+:101600002091EE0027FF07C09F5FD3CF8F7080939C
+:10161000E90081E0089580E008958091C10187FF8D
+:1016200011C08091E80082FD05C08091C001811148
+:10163000F8CF11C08091E8008B770BC08091C0017A
+:10164000882349F08091E80080FFF8CF8091E8007E
+:101650008E778093E80008952091E4003091E500B2
+:1016600095E64091EC00842F817040FF22C080916C
+:10167000E80080FD1CC08091C001882391F0853076
+:1016800091F08091EB0085FD10C04091E4005091F5
+:10169000E5004217530729F39A01915011F784E0AE
+:1016A000089582E0089583E0089581E0089580E040
+:1016B00008954091E80042FFDECF08950E94CC0BD0
+:1016C0000E94D40BE0EEF0E0808181608083E8ED41
+:1016D000F0E080818F77808319BCA7EDB0E08C911A
+:1016E0008E7F8C9380818F7E80831092BF010895BE
+:1016F0000F931F93CF93DF930E94CC0B0E94D40BC8
+:10170000C8EDD0E088818F7788838881806888835E
+:1017100088818F7D888319BC1092C0011092BC0112
+:101720001092BE011092BD0100EE10E0F801808120
+:101730008B7F808388818160888342E060E080E0E5
+:101740000E94D80AE1EEF0E080818E7F8083E2EE95
+:10175000F0E0808181608083808188608083F801EF
+:1017600080818E7F8083888180618883DF91CF91A3
+:101770001F910F910895E8EDF0E080818F7E8083C6
+:10178000E7EDF0E080818160808384E082BF81E0CA
+:101790008093BF010C94780BE8EDF0E080818E7FA0
+:1017A00080831092E20008951092DA001092E10016
+:1017B00008951F920F920FB60F9211242F933F930B
+:1017C0004F935F936F937F938F939F93AF93BF9349
+:1017D000EF93FF938091E10082FF0BC08091E200C4
+:1017E00082FF07C08091E1008B7F8093E1000E941F
+:1017F000400E8091DA0080FF1FC08091D80080FFEA
+:101800001BC08091DA008E7F8093DA008091D9002E
+:1018100080FF0DC080E189BD82E189BD09B400FE71
+:10182000FDCF81E08093C0010E944E0805C019BC25
+:101830001092C0010E945C088091E10080FF19C0F5
+:101840008091E20080FF15C08091E2008E7F80933E
+:10185000E2008091E20080618093E2008091D800F4
+:1018600080628093D80019BC85E08093C0010E94FB
+:1018700060088091E10084FF30C08091E20084FF25
+:101880002CC080E189BD82E189BD09B400FEFDCF95
+:101890008091D8008F7D8093D8008091E1008F7E69
+:1018A0008093E1008091E2008F7E8093E20080913E
+:1018B000E20081608093E2008091BC01882311F0F6
+:1018C00084E007C08091E30087FD02C081E001C091
+:1018D00083E08093C0010E9461088091E10083FF52
+:1018E00029C08091E20083FF25C08091E100877FBD
+:1018F0008093E10082E08093C0011092BC0180914E
+:10190000E1008E7F8093E1008091E2008E7F8093E2
+:10191000E2008091E20080618093E20042E060E0BA
+:1019200080E00E94D80A8091F00088608093F000E7
+:101930000E945F08FF91EF91BF91AF919F918F91AE
+:101940007F916F915F914F913F912F910F900FBEBB
+:101950000F901F9018951F920F920FB60F9211249F
+:101960002F933F934F935F936F937F938F939F93A7
+:10197000AF93BF93CF93DF93EF93FF93C091E900B1
+:10198000CF708091EC00D82FD17080FDD0E81092FC
+:10199000E9008091F000877F8093F00078940E94A6
+:1019A000EF0C1092E9008091F00088608093F000C5
+:1019B000CD2BCF70C093E900FF91EF91DF91CF91D4
+:1019C000BF91AF919F918F917F916F915F914F9157
+:1019D0003F912F910F900FBE0F901F9018951F935E
+:1019E000CF93DF93CDB7DEB7AA970FB6F894DEBFDB
+:1019F0000FBECDBFE1ECF1E088E08E0F9091F100D9
+:101A000091938E13FBCF0E946D088091E80083FFB5
+:101A10001FC18091C1019091C201492F50E04A300D
+:101A2000510508F015C1FA01EA5AFF4F0C941D1A2E
+:101A3000803881F0823809F00BC18091C5018F7028
+:101A40008093E9008091EB0085FB882780F9109254
+:101A5000E90006C08091BD019091BE0191118260A4
+:101A60009091E800977F9093E8008093F1001092A6
+:101A7000F100C8C0282F2D7F09F0EAC0882319F093
+:101A8000823061F0E5C08091C301813009F0E0C08F
+:101A9000933009F080E08093BE012BC08091C30198
+:101AA000811127C08091C5018F7009F4D1C0809346
+:101AB000E9002091EB0020FF1CC0933021F48091BD
+:101AC000EB00806214C09091EB0090619093EB006A
+:101AD00021E030E0A90102C0440F551F8A95E2F7CA
+:101AE0004093EA001092EA008091EB0088608093B6
+:101AF000EB001092E9008091E800877F86C0811199
+:101B0000A7C01091C3011F778091E3008078812BDB
+:101B10008093E3008091E800877F8093E8000E9433
+:101B20000D0B8091E80080FFFCCF8091E30080687E
+:101B30008093E300111102C082E001C083E0809332
+:101B4000C00186C08058823008F082C08091C301F5
+:101B50009091C4018C3D53E0950779F583E08A8329
+:101B60008AE289834FB7F894DE01139620E03EE0C5
+:101B700051E2E32FF0E050935700E49120FF03C0BF
+:101B8000E295EF703F5FEF708E2F90E0EA3010F03B
+:101B9000C79601C0C0968D939D932F5F243149F75E
+:101BA0004FBF8091E800877F8093E8006AE270E091
+:101BB000CE0101960E94140A14C0AE014F5F5F4F20
+:101BC0006091C5010E945C09BC01892B09F440C0E9
+:101BD0009091E800977F9093E80089819A810E9414
+:101BE000770A8091E8008B778093E80031C08038D5
+:101BF00079F58091E800877F8093E8008091BC01AF
+:101C00008093F1008091E8008E778093E8000E9435
+:101C10000D0B1EC081111CC09091C3019230C0F405
+:101C20008091E800877F8093E8009093BC010E9438
+:101C30000D0B8091BC01811106C08091E30087FDEE
+:101C400002C081E001C084E08093C0010E9463086B
+:101C50008091E80083FF0AC08091E800877F80932D
+:101C6000E8008091EB0080628093EB00AA960FB6AB
+:101C7000F894DEBF0FBECDBFDF91CF911F910895C5
+:101C80000895CF938091C0018823A1F0C091E9000D
+:101C9000CF709091EC00892F817090FD80E8C82B67
+:101CA0001092E9008091E80083FD0E94EF0CCF7054
+:101CB000C093E900CF910895909351018093500112
+:101CC0000895E0915001F0915101309721F0019079
+:101CD000F081E02D099480E00895E0915001F091A9
+:101CE0005101309721F00280F381E02D099408958D
+:101CF00020914E0130914F018217930771F090931C
+:101D00004F0180934E01E0915001F09151013097C5
+:101D100021F00680F781E02D0994089520914C016F
+:101D200030914D018217930771F090934D0180938C
+:101D30004C01E0915001F0915101309721F0008465
+:101D4000F185E02D0994089508950C94A40E0E9445
+:101D500046190E94D6020C94CC199F92AF92BF9262
+:101D6000CF92DF92EF92FF920F931F93CF93DF9367
+:101D700000D000D000D0CDB7DEB70E94EE020DE05B
+:101D800010E0AA24A394B12C902E802F0E94DC0393
+:101D900098012D5A3E4F6901F901F080F826A1F40F
+:101DA0000150110988F78FEF89838A831B820E9473
+:101DB0004F198160782F9D838C8349815A816B8173
+:101DC0008D810E94420F2FC09091B60191FF04C0F7
+:101DD0008E830E94E2038E8125E030E0A501022E71
+:101DE00001C0440F0A94EAF7E42E4F21C1F0298381
+:101DF0009A828E2191E009F490E09B830E944F1912
+:101E00008160782F9D838C8349815A816B818D817C
+:101E10000E94420FF6018081E826E08204C0215032
+:101E20003109E0F6BDCF109152010E94610E1817E2
+:101E3000B9F00E94610E8093520126960FB6F89475
+:101E4000DEBF0FBECDBFDF91CF911F910F91FF90ED
+:101E5000EF90DF90CF90BF90AF909F900C948E0743
+:101E600026960FB6F894DEBF0FBECDBFDF91CF919F
+:101E70001F910F91FF90EF90DF90CF90BF90AF90A8
+:101E80009F900895CF93DF93CDB7DEB72B970FB612
+:101E9000F894DEBF0FBECDBF4F83588769877A871E
+:101EA0008B87DE01119686E0FD0111928A95E9F794
+:101EB00085E0FE01379601900D928A95E1F7498100
+:101EC0005A816B817C818D819E810E94F9142B96B1
+:101ED0000FB6F894DEBF0FBECDBFDF91CF9108954E
+:101EE000882309F490C09CEF980F913A18F40E944F
+:101EF000D3170DC090E2980F983058F4877091E096
+:101F000001C0990F8A95EAF7892F0E9459180C94FD
+:101F1000A0189BE5980F933070F4853A29F0863A23
+:101F200031F083E890E005C081E890E002C082E8EB
+:101F300090E00C94780E98E5980F933108F063C008
+:101F4000883A39F1893A41F18A3A49F18B3A51F1AB
+:101F50008C3A59F18D3A61F1803B69F18E3A71F119
+:101F60008F3A79F1813B81F1823B89F1833B91F199
+:101F7000843B99F1853BA1F1863BA9F1873BB1F107
+:101F8000883BB9F1893BC1F18A3BC9F180E090E01F
+:101F900038C082EE90E035C089EE90E032C08AEE23
+:101FA00090E02FC085EB90E02CC086EB90E029C03C
+:101FB00087EB90E026C08CEC90E023C08DEC90E0A5
+:101FC00020C083E891E01DC08AE891E01AC082E950
+:101FD00091E017C084E991E014C081E292E011C061
+:101FE00083E292E00EC084E292E00BC085E292E0D0
+:101FF00008C086E292E005C087E292E002C08AE271
+:1020000092E00C948E0E0895882329F19CEF980F8E
+:10201000913A18F40E9415180DC090E2980F98306C
+:1020200058F4877091E001C0990F8A95EAF7892FDB
+:102030000E945F180C94A0189BE5980F933020F431
+:1020400080E090E00C94780E885A833120F480E090
+:1020500090E00C948E0E0895882321F00E94591868
+:102060000C94A0180895882321F00E945F180C9406
+:10207000A01808957F928F929F92AF92BF92CF92B5
+:10208000DF92EF92FF920F931F93CF93DF931F92F4
+:10209000CDB7DEB77C01C62E772EFC0115811295D7
+:1020A0001F70028101110E9476180E94CC178823AC
+:1020B00079F0002369F080E28C0D883048F082E0EE
+:1020C0000E94B5170E94CC1791E0D82ED92601C0E6
+:1020D000D12CE72DE295EF70F0E0E05AFF4F0C9421
+:1020E0001D1A872D807F172D1F70882311F01295E0
+:1020F000107F002389F0112309F465C180E28C0D63
+:10210000883020F4812F0E94591803C0812F0E942B
+:1021100069180E94A01857C18C2D0E940410112329
+:1021200009F46AC180E28C0D883020F4812F0E946E
+:102130005F1803C0812F0E946F180E94A0185CC115
+:10214000972D907F872D8F70903211F08295807F30
+:10215000CC2021F0F1E0CF16B1F01EC0002349F0F1
+:10216000112309F4E9C0113009F0E6C00E94891872
+:1021700043C1112319F0113009F43EC189830E9433
+:102180008C188981DFC0002321F0123008F034C19F
+:10219000D3C0111131C1D6C0002321F0112309F49D
+:1021A000CBC011C1112309F4CDC013C1872D837099
+:1021B00009F052C0011120C18C2D8295869587703F
+:1021C000880F880F9C2D9F70892E912CA12CB12CEB
+:1021D000082E04C0880C991CAA1CBB1C0A94D2F7B8
+:1021E000C4FE14C00FE010E020E030E0B901A80107
+:1021F00004C0440F551F661F771F8A95D2F7CB0185
+:10220000BA01609570958095909503C060E070E08C
+:10221000CB01272D26952695237030E022303105FD
+:1022200069F02330310589F0682979298A299B29A9
+:102230002130310571F00E944116DEC068297929EC
+:102240008A299B290E945D16D7C00E944116C501AC
+:10225000B4010E942516D0C0002319F0872D81708B
+:1022600001C08695882309F4C7C08C2D8295869578
+:102270008770880F880F9C2D9F70892E912CA12C20
+:10228000B12C082E04C0880C991CAA1CBB1C0A94F3
+:10229000D2F7C4FE14C00FE010E020E030E0B90136
+:1022A000A80104C0440F551F661F771F8A95D2F7F7
+:1022B000CB01BA01609570958095909503C060E060
+:1022C00070E0CB01272D269526952370422F50E0F4
+:1022D0004230510569F04330510589F06829792968
+:1022E0008A299B294130510571F00E941B1784C037
+:1022F000682979298A299B290E9437177DC00E9465
+:102300001B17C501B4010E94FF1676C08C2D90E00A
+:10231000FC01E05EF109E531F10508F050C0E0593B
+:10232000FF4F0C941D1A1C2D1F70872D8F710023D9
+:1023300031F00E949816812F0E942C105DC00E94DF
+:10234000B916812F0E94331057C0002339F01111A4
+:1023500053C0872D8F710E94DE164EC0123008F0D8
+:102360004BC0F7CF002339F0872D8F710E9498164C
+:1023700043C00023C9F3872D8F710E94B9163CC05A
+:10238000002329F0872D8F710E94831635C00E948B
+:10239000791632C0002351F0172D1F71812F0E9432
+:1023A000981663E0812F0E94AC1726C081E00E943E
+:1023B000B517123008F182E00E94B5171DC0002346
+:1023C00031F0112389F28C2D0E94700F15C011235A
+:1023D00091F28C2D0E9404100FC0472D4F706C2D70
+:1023E000C7010E949F010E949D1506C0472D4F7096
+:1023F0006C2DC7010E949E04DD20F9F00E94A817F1
+:1024000080FD1BC0F70112820E94A2170E9498163D
+:10241000C7010E942C120E94A2170F90DF91CF914A
+:102420001F910F91FF90EF90DF90CF90BF90AF90F2
+:102430009F908F907F900C94B9160F90DF91CF9161
+:102440001F910F91FF90EF90DF90CF90BF90AF90D2
+:102450009F908F907F9008950F931F93CF93DF935A
+:10246000EC01888199812B813C81232BB9F09F3F1E
+:1024700011F48F3F99F0CE010E94FC03882371F084
+:10248000688179818A810E949E178C010E9453176E
+:102490000E941A16B801CE010E943A10DF91CF9126
+:1024A0001F910F9108950E9476180E9486180E942D
+:1024B0004B180C94A0180E9466180C9453120E949A
+:1024C0009317292F22952F7030E02C3031054CF4D2
+:1024D0002A3031056CF42250310922303105A8F43C
+:1024E00007C02C30310569F02F30310551F00DC097
+:1024F000803F69F018F4803E40F409C0843F29F41D
+:1025000006C093FB882780F9089580E0089581E054
+:102510000895CF93DF9300D000D01F92CDB7DEB7E0
+:102520000F900F900F900F900F90DF91CF91089523
+:10253000CF93DF9300D000D000D0CDB7DEB7269682
+:102540000FB6F894DEBF0FBECDBFDF91CF910895D7
+:102550001F93CF93DF93C091610116E080916201D8
+:10256000C81799F0D0E01C9FF0011D9FF00D1124B9
+:10257000ED59FE4F40815181628173818481958143
+:102580000E9498122196C770E9CFDF91CF911F91D9
+:10259000089540919301509194016091950170913B
+:1025A000960180919701909198010C9498128091D6
+:1025B000980182958F7009F054C08091950188230D
+:1025C00009F44FC080916101A09162016091930173
+:1025D000709194014091960150919701B6E08A174D
+:1025E00009F43FC090E041155105C1F17F3F11F45E
+:1025F0006F3FA1F1B89FF001B99FF00D1124ED5983
+:10260000FE4F218172132AC02081621327C02281CC
+:10261000211124C0238134812417350710F421505F
+:102620003109241B350B283C3105C0F42091980159
+:102630002F7020612093980126E0289FF001299FA8
+:10264000F00D1124E859FE4F80818F7080618083E6
+:1026500083E991E00E942C120C94A81201968770D5
+:10266000BECF0895CF92DF92EF92FF920F931F9308
+:10267000CF93DF93CDB7DEB762970FB6F894DEBF86
+:102680000FBECDBF8C0185E0F801DE011D960190E3
+:102690000D928A95E1F7D8014C9111965C911197B2
+:1026A00012966C9112971396CD90DC9014973091FE
+:1026B00093017091940180919601909197010097F8
+:1026C00009F46BC17F3F19F43F3F09F466C1E09004
+:1026D0009501EE2009F4C0C020919801C816D906D2
+:1026E00028F0F601E81BF90BCF0104C08095909506
+:1026F0008C0D9D1DFF24F394883C910578F0F12CFE
+:10270000207F09F0C6C07C2DD98AC88A89890E9499
+:10271000891283E991E00E942C12B1C0822F807F40
+:1027200009F046C0751314C0341312C0611110C0F3
+:102730002F702061209398010E94C91283E991E0D3
+:102740000E942C1280919801D80115968C932EC06E
+:10275000CD2819F15F3F11F44F3FF9F0F62E6111CA
+:102760001CC0809161012091620136E0821709F45A
+:102770005AC090E0389FF001399FF00D1124ED59B7
+:10278000FE4F7181571306C07081471303C07281D9
+:10279000711103C001968770E9CFF62E662309F404
+:1027A00018C180919801816080939801F12C11C12A
+:1027B000751308C0341306C0611104C080919801DC
+:1027C000D801C3C04D875E878D859E856A8B0E9428
+:1027D0005F126A898823E1F16623D1F12091980183
+:1027E000822F82958F7090E0029774F08091930110
+:1027F0009091940198878F831986DB86CA862C87EF
+:10280000CE0107960E942C1286E0F801A3E9B1E000
+:1028100001900D928A95E1F70E94D7120E94C91289
+:10282000FF24F394D6C04D875E878D859E850E94D8
+:102830009317292F22952F7030E0223031050CF0AC
+:10284000BCC09F7009F0B6C0805E883008F4C1C07B
+:10285000C8010E942C12E4CFC816D90608F453C050
+:10286000F601E81BF90BCF01883C910508F450C034
+:10287000F12C7C2DD98AC88A89890E948912E3E9C2
+:10288000F1E086E0DF011D928A95E9F70E94C91206
+:10289000A0C0751314C0341312C0611110C0809110
+:1028A0009801F8018583C8010E942C1286E0E3E9B3
+:1028B000F1E0DF011D928A95E9F7FE2C8AC04D8771
+:1028C0005E878D859E856A8B0E945F126A89882348
+:1028D00009F4BECF662309F4BBCF20919801822F63
+:1028E00082958F7090E002970CF48ECF80919301C7
+:1028F000909194019A8389831B82DD82CC822E83FE
+:10290000CE0101967FCF809590958C0D9D1DACCF0B
+:10291000F62E662309F49CCF75132EC034132CC0F9
+:102920002091980120FD1FC0822F82958F70D9F0D1
+:10293000D80115962C9315978F3049F08F5F982FFB
+:102940009295907F822F8F70892B15968C93C8015A
+:102950000E942C1286E0F801A3E9B1E001900D92EB
+:102960008A95E1F793CF86E0F801A3E9B1E0019001
+:102970000D928A95E1F72DC04D875E878D859E85E6
+:102980000E945F12811140CF8091980181608093F5
+:102990009801C8010E942C121CC0662309F458CF6C
+:1029A0004D875E878D859E850E945F12882309F47E
+:1029B0004FCF2ACF811148CF0CC0243031050CF005
+:1029C00047CF9F7009F440CFF8019581907F09F0BF
+:1029D0003BCF8F2D62960FB6F894DEBF0FBECDBFF2
+:1029E000DF91CF911F910F91FF90EF90DF90CF90EB
+:1029F00008951F93CF93DF93CDB7DEB72C970FB613
+:102A0000F894DEBF0FBECDBF4F83588769877A87A2
+:102A10008B879C87CE0107960E943213882369F02A
+:102A20008F8198852A853B85232BF1F19F3F09F003
+:102A300063C08F3F09F060C037C086E0FE01379663
+:102A4000DE01119601900D928A95E1F76F817885EC
+:102A5000EA85FB85309741F17F3F11F46F3F21F10B
+:102A60002091620130E0C901019687709927409159
+:102A7000610150E08417950709F447C069837A83A0
+:102A8000FD83EC8396E0929FD001939FB00D1124BB
+:102A9000AD59BE4FFE01319601900D929A95E1F726
+:102AA000809362010E94A81216E0809161019091CA
+:102AB00062018917C1F1189FC00111248D599E4FE1
+:102AC0000E943213882379F1E09161011E9FF00189
+:102AD0001124ED59FE4F40815181628173818481BF
+:102AE00095810E9498128091610190E00196877013
+:102AF000992780936101D9CF4F81588569857A855F
+:102B00008B859C850E949812CFCF0E945B121092F9
+:102B1000620110926101E3E9F1E086E0DF011D92BC
+:102B20008A95E9F7C1CF2C960FB6F894DEBF0FBE99
+:102B3000CDBFDF91CF911F910895EF92FF920F9338
+:102B40001F93CF93DF938C01892B09F46CC0F12C78
+:102B5000EE24E394E8012196F8018491843740F44F
+:102B6000843008F051C0813081F0823019F15BC0AF
+:102B7000853709F444C0A8F19CE7980F903708F016
+:102B800052C08F770E94041041C00E5F1F4FFE019C
+:102B9000C49180E28C0F883048F4C7708E2D01C03C
+:102BA000880FCA95EAF70E94791814C08C2F0E94EA
+:102BB000700F2DC00E5F1F4FFE01C49180E28C0F7D
+:102BC000883058F4C7708E2D01C0880FCA95EAF777
+:102BD0000E947F180E94A0181AC08C2F0E94041017
+:102BE00016C00E5F1F4FFE01C491CC2381F08FE908
+:102BF0009FE00197F1F700C00000C150F6CF0E5FD3
+:102C00001F4FFE01F49003C00E94700F8E018F2DA4
+:102C1000882309F49FCFEFE9FFE03197F1F700C077
+:102C200000008150F5CFDF91CF911F910F91FF9060
+:102C3000EF900895089560939D0170939E01809395
+:102C40009F019093A0010C9453120F931F93009136
+:102C50009D0110919E0120919F013091A001DC0106
+:102C6000CB01802B912BA22BB32B80939D019093B2
+:102C70009E01A0939F01B093A0011F910F910C940E
+:102C800053120F931F9300919D0110919E0120916B
+:102C90009F013091A001DC01CB0180239123A2236D
+:102CA000B32380939D0190939E01A0939F01B093C5
+:102CB000A0011F910F910C9453120F931F93009139
+:102CC0009D0110919E0120919F013091A001DC0196
+:102CD000CB0180279127A227B32780939D01909352
+:102CE0009E01A0939F01B093A0011F910F910C949E
+:102CF00053121092990110929A0110929B01109216
+:102D00009C010C94531241E050E060E070E004C07C
+:102D1000440F551F661F771F8A95D2F7409399017C
+:102D200050939A0160939B0170939C010C945312F1
+:102D300041E050E060E070E004C0440F551F661FA2
+:102D4000771F8A95D2F78091990190919A01A0916D
+:102D50009B01B0919C01482B592B6A2B7B2B4093F4
+:102D6000990150939A0160939B0170939C010C947C
+:102D7000531241E050E060E070E004C0440F551F82
+:102D8000661F771F8A95D2F740955095609570958C
+:102D90008091990190919A01A0919B01B0919C0121
+:102DA000482359236A237B234093990150939A0126
+:102DB00060939B0170939C010C94531241E050E08E
+:102DC00060E070E004C0440F551F661F771F8A95AE
+:102DD000D2F78091990190919A01A0919B01B091B5
+:102DE0009C01482759276A277B27409399015093D4
+:102DF0009A0160939B0170939C010C9453120F9362
+:102E00001F930091990110919A0120919B0130919B
+:102E10009C01DC01CB01802B912BA22BB32B809347
+:102E2000990190939A01A0939B01B0939C011F91EB
+:102E30000F910C9453120F931F93009199011091CD
+:102E40009A0120919B0130919C01DC01CB018023F0
+:102E50009123A223B3238093990190939A01A09385
+:102E60009B01B0939C011F910F910C9453120F93EF
+:102E70001F930091990110919A0120919B0130912B
+:102E80009C01DC01CB0180279127A227B3278093E7
+:102E9000990190939A01A0939B01B0939C011F917B
+:102EA0000F910C9453120895CF92DF92EF92FF92FC
+:102EB0000F931F93CF93DF938C01C0909D01D0900F
+:102EC0009E01E0909F01F090A00180919901909166
+:102ED0009A01A0919B01B0919C01C82AD92AEA2AA3
+:102EE000FB2ACFE1D0E0D701C6010C2E04C0B69575
+:102EF000A795979587950A94D2F780FF06C0B801E9
+:102F00008C2F0E94F306019721F4219760F780E04F
+:102F100001C08C2FDF91CF911F910F91FF90EF9007
+:102F2000DF90CF900895CF93DF93EC010E94541768
+:102F3000BE010E94F306DF91CF910895CB010E945C
+:102F4000931708958091A10185958595859508959C
+:102F50008091A1018770089598E0899F90011124C4
+:102F6000262B2093A1010C9498162091A101809505
+:102F700082238093A101982F977069F430E0482F45
+:102F8000082E000C550B2417350729F085958595DB
+:102F900085950C94B91608959091A101977081E0E0
+:102FA00009F480E0089590910C01992321F090910B
+:102FB0000D01911109C020910E0130910F01F9010D
+:102FC00032969FEF40E01FC0982F96959695969564
+:102FD0009F3050F5E0910E01F0910F01E90FF11DC6
+:102FE000877021E030E0A90102C0440F551F8A9587
+:102FF000E2F7CA019181892B818308959F3F39F0BF
+:103000004F5F4E3041F051915813F8CF0DC0511120
+:10301000F7CF942FF5CF9F3F39F0F901E90FF11D5C
+:1030200097FDFA9582830895089590910C01992354
+:1030300021F090910D01911109C020910E01309164
+:103040000F01F9013296205F3F4F1FC0982F9695D0
+:10305000969596959F30F0F4E0910E01F0910F0156
+:10306000E90FF11D877021E030E0A90102C0440F93
+:10307000551F8A95E2F7CA01809591818923818342
+:1030800008953196E217F30729F090819813F9CF4C
+:103090001082F7CF089581E090E0E0910E01F09169
+:1030A0000F01E80FF91F1082019680319105A9F7F1
+:1030B00008959091B501892B8093B501089580956D
+:1030C0009091B50189238093B50108951092B501BF
+:1030D00008959091B401892B8093B401089580954F
+:1030E0009091B40189238093B40108951092B401A2
+:1030F00008959091B301892B8093B3010895809531
+:103100009091B30189238093B30108951092B30184
+:1031100008958093A20108951092A20108958091CC
+:103120000E0190910F01FC0131969C01205F3F4FF1
+:1031300080E0919191118F5FE217F307D1F7089525
+:10314000E0910E01F0910F018091B5018083E09133
+:103150000E01F0910F0190818091B401892B808341
+:10316000E0910E01F0910F0190818091B301892BC4
+:1031700080838091A201882361F0E0910E01F0919B
+:103180000F019081892B80830E948F1881111092EA
+:10319000A20180910E0190910F010C946D0E20E020
+:1031A000009739F0AC0141505109842395232F5FDA
+:1031B000F7CF822F08958091C001843039F11092A9
+:1031C000B70120E488E190E00FB6F894A8958093C9
+:1031D00060000FBE2093600080E00E948E0783B7DE
+:1031E000817F846083BF83B7816083BF7894889533
+:1031F00083B78E7F83BF0FB6F894A8958091600047
+:10320000886180936000109260000FBE0895089559
+:1032100008950E9407190E94EE020E9408190E9458
+:10322000E30391E0811101C090E0892F08950E948D
+:103230005B120E94610E0C948E071F920F920FB6C4
+:103240000F9211248F939F93AF93BF938091B701F7
+:10325000811113C08091B8019091B901A091BA0178
+:10326000B091BB014196A11DB11D8093B80190930F
+:10327000B901A093BA01B093BB01BF91AF919F91E7
+:103280008F910F900FBE0F901F90189582E084BD14
+:1032900093E095BD9AEF97BD80936E0008952FB788
+:1032A000F8948091B8019091B901A091BA01B091C0
+:1032B000BB012FBF0895CF92DF92EF92FF920F9341
+:1032C0001F932FB7F8944091B8015091B9016091C4
+:1032D000BA017091BB012FBF6A017B01EE24FF246C
+:1032E0008C0120E030E0C016D106E206F30610F4AF
+:1032F000415051099A01281B390BC9011F910F91A7
+:10330000FF90EF90DF90CF9008951F920F920FB62D
+:103310000F9211248F939F93AF93BF938091B80125
+:103320009091B901A091BA01B091BB010196A11D84
+:10333000B11D8093B8019093B901A093BA01B093E5
+:10334000BB01BF91AF919F918F910F900FBE0F90D6
+:103350001F9018950E945E0BF8942FEF87EA91E674
+:10336000215080409040E1F700C0000087E090EBE2
+:10337000DC018093CA019093CB01A093CC01B09360
+:10338000CD019CE088E10FB6F894A8958093600089
+:103390000FBE90936000FFCF0E94011A811102C0FE
+:1033A0000E94E7190E940C1A8093B6010E94141A19
+:1033B0008093C90187FB882780F980930D010E94C3
+:1033C000101A682F70E080E090E00C941B166DEEF0
+:1033D0007EEF80E090E00E94431A60E082E090E09F
+:1033E0000E94311A60E083E090E00E94311A60E0B0
+:1033F00084E090E00E94311A60E085E090E00C9457
+:10340000311A80E090E00E942B1A21E08D3E9E4F01
+:1034100009F020E0822F089582E090E00C94231AB6
+:1034200083E090E00C94231A84E090E00C94231A3B
+:10343000682F84E090E00C94311AEE0FFF1F059086
+:10344000F491E02D0994F999FECF92BD81BDF89ACF
+:10345000992780B50895A8E1B0E042E050E00C94CF
+:103460004B1A262FF999FECF92BD81BDF89A01978C
+:1034700000B4021639F01FBA20BD0FB6F894FA9ABC
+:10348000F99A0FBE08950196272F0E94321A0C94C4
+:10349000311ADC01CB01FC01F999FECF06C0F2BD67
+:1034A000E1BDF89A319600B40D9241505040B8F702
+:0634B0000895F894FFCF1F
+:1034B60020029007FC079307C80794070101A301A0
+:00000001FF
diff --git a/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c b/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c index e9963886be..3444152bc3 100644 --- a/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c +++ b/keyboard/ergodox_ez/keymaps/zweihander-osx/keymap.c @@ -6,19 +6,26 @@ #define SYMB 1 // symbols #define MDIA 2 // media keys +#define SGWK 0 // "sagewick", ⌘S ⌘⇥ +#define SGWF 1 // "sagewick freshly", ⌘S ⌘⇥ ⌘R +#define BBED 2 // BBEdit +#define TMNL 3 // Terminal +#define SAFA 4 // Safari +#define ALFRED_LEAD_TIME 100 // time, in milliseconds, to let Alfred come to the fore and accept keyboard input + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | ← | | → | 6 | 7 | 8 | 9 | 0 | - | + * | = | 1 | 2 | 3 | 4 | 5 | L1 | | L1 | 6 | 7 | 8 | 9 | 0 | - | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | ⌦ | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * | ⌦ | Q | W | E | R | T | ~L1 | | ~L1 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | ⌫ | A | S | D | F | G |------| |------| H | J | K | L |; / L2| ' / L⌘ | * |--------+------+------+------+------+------| L⌘ | | L⌘ |------+------+------+------+------+--------| * | L⇧ | Z | X | C | V | B | | | | N | M | , | . | / / ⌃| R⇧ | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | L⌃ | L⌥ | L⌘ | ← | → | | ↑ | ↓ | [ | ] | ~L1 | + * | L⌃ | L⌥ | L⌘ | ← | → | | ↑ | ↓ | [ | ] | | * `----------------------------------' `----------------------------------' * ,-------------. ,---------------. * | `~ | '" | | ⎋ | ⌫ | @@ -32,8 +39,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, TG(SYMB), + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LGUI, KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT, @@ -41,11 +48,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGUP, KC_SPC,KC_BSPC,KC_LALT, // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + KC_LGUI, KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_SPC , KC_ESC, KC_BSPC, KC_PGDN, KC_LCTL, KC_TAB, KC_ENT @@ -55,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | [ | ] | { | } | | | | | / | 7 | 8 | 9 | * | F12 | + * | | [ | ] | { | } | " | | | | / | 7 | 8 | 9 | * | F12 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | < | > | ( | ) | |------| |------| - | 4 | 5 | 6 | + | | + * | | < | > | ( | ) | ' |------| |------| - | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | & | 1 | 2 | 3 | = | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -75,8 +82,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [SYMB] = KEYMAP( // left hand KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_TRNS,KC_TRNS, - KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_TRNS, + KC_TRNS,KC_LBRC,KC_RBRC,KC_LCBR,KC_RCBR,KC_DQUO,KC_TRNS, + KC_TRNS,KC_LABK,KC_RABK,KC_LPRN,KC_RPRN,KC_QUOT, 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, @@ -95,20 +102,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | ⌥⇧⇥ | ⌥⇥ | Power | + * | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | PgUp | | | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | | + * | | | | PgUp |⌘S⌘⇥⌘R| Term | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | Home | PgDn | End | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ | + * | | |Safari| PgDn | | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | |L⇧+Spc| Spc | ⏮ | ⏭ | | | + * | | | | | |BBEdit| | | |L⇧+Spc| Spc | ⏮ | ⏭ | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | Home | | End | | | * | | |------| |------| ⌘C | ⌘V | * | | | | | ⌘X | | | * `--------------------' `--------------------' @@ -116,15 +123,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // MEDIA AND MOUSE [MDIA] = KEYMAP( KC_TRNS, KC_F14 , KC_F15 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, /* F14 dims screen, F15 brightens */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END , KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, M(SGWF), M(TMNL), KC_TRNS, + KC_TRNS, KC_TRNS, M(SAFA), KC_PGDN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(BBED), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, + KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), LALT(LSFT(KC_TAB)), LALT(KC_TAB), KC_PWR, + LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), KC_TRNS, KC_TRNS, KC_PWR, KC_TRNS, LGUI(KC_RBRC), LGUI(LALT(KC_UP)), KC_UP , LGUI(LALT(KC_DOWN)), KC_TRNS, KC_TRNS, LGUI(KC_LBRC), KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_MPLY, KC_TRNS, LSFT(KC_SPC), KC_SPC , KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, @@ -139,23 +146,62 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; -// action_get_macro() is unused — remove the “#if 0” and “#endif” lines to reenable -#if 0 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; + case SGWK: + if (record->event.pressed) { + return MACRO( + I(10), + D(LGUI), T(S), U(LGUI), + D(LGUI), T(TAB), U(LGUI), + END); + } + break; + case SGWF: + if (record->event.pressed) { + return MACRO( + I(10), + D(LGUI), T(S), U(LGUI), + D(LGUI), T(TAB), U(LGUI), + D(LGUI), T(R), U(LGUI), + END); + } + break; + case BBED: + if (record->event.pressed) { + return MACRO( + I(10), + D(LALT), T(SPC), U(LALT), W(ALFRED_LEAD_TIME), + T(B), T(B), T(E), T(D), T(I), T(T), + T(ENT), + END); + } + break; + case TMNL: + if (record->event.pressed) { + return MACRO( + I(10), + D(LALT), T(SPC), U(LALT), W(ALFRED_LEAD_TIME), + T(T), T(E), T(R), T(M), T(I), T(N), T(A), T(L), + T(ENT), + END); + } + break; + case SAFA: + if (record->event.pressed) { + return MACRO( + I(10), + D(LALT), T(SPC), U(LALT), W(ALFRED_LEAD_TIME), + T(S), T(A), T(F), T(A), T(R), T(I), + T(ENT), + END); + } + break; } return MACRO_NONE; }; -#endif // Runs just one time when the keyboard initializes. void matrix_init_user(void) { diff --git a/keyboard/ergodox_ez/keymaps/zweihander-osx/zweihander-osx.hex b/keyboard/ergodox_ez/keymaps/zweihander-osx/zweihander-osx.hex index b76c3ec8e8..599d581fe4 100644 --- a/keyboard/ergodox_ez/keymaps/zweihander-osx/zweihander-osx.hex +++ b/keyboard/ergodox_ez/keymaps/zweihander-osx/zweihander-osx.hex @@ -1,1152 +1,1172 @@ -:100000000C9465020C94A9020C94A9020C94A90208
-:100010000C94A9020C94A9020C94A9020C94A902B4
-:100020000C94A9020C94A9020C94720C0C94440D2B
-:100030000C94A9020C94A9020C94A9020C94A90294
-:100040000C94A9020C940E220C94A9020C94A902FF
-:100050000C94A9020C949D1B0C94A9020C94A90267
-:100060000C94A9020C94A9020C94A9020C94A90264
-:100070000C94A9020C94A9020C94A9020C94A90254
-:100080000C94A9020C94A9020C94A9020C94A90244
-:100090000C94A9020C94A9020C94A9020C94A90234
-:1000A0000C94A9020C94A9020C94A902B10DD30DD1
-:1000B000C10ED30DC10E180E3B0EC10E900EA30E35
-:1000C0008F118F11CC11CC110F124D1266146614C2
-:1000D00066126614671367133A1466146614511493
-:1000E0000000F0A12E004C002A00E100E00000001A
-:1000F0001E00140004001D00E200E2001F001A00B0
-:1001000016001B00E3002A0020000800070006007C
-:1001100050002C0021001500090019004F004B0071
-:10012000220017000A0005000000350050000154AD
-:100130000000E300000034004F0001540000E30021
-:100140000000290023001C000B00110000002A0001
-:10015000240018000D00100052004E0025000C0075
-:100160000E00360051002800260012000F00370054
-:100170002F002B0027001300338238713000E0007D
-:100180002D0031003478E500C100000001000100BD
-:1001900001000100010000003A001E0220022202BC
-:1001A000010001003B001F022102230201000100A7
-:1001B0003C002F0226022F00010001003D0030020A
-:1001C00027023000010001003E00310235003502F7
-:1001D000000001000100010000000100000001001A
-:1001E0000100010000000100000001003F00380094
-:1001F0002D002402000001004000240021001E0008
-:1002000027004A004100250022001F00370001009E
-:100210004200260023002000500001004300250278
-:100220002E022E004F004D00440045000100010049
-:1002300001000000010001000100010001000000B8
-:100240006900010001000100010001006A000100D5
-:100250004A0001000100010001004B004E000100B6
-:1002600001000100010001004D000100010001003A
-:100270000100010001000100000001000100010077
-:10028000000001000000010014080100000001004E
-:10029000000001001A0830082F082C02000001009D
-:1002A000350A520C50002C00A900010035085200FC
-:1002B0005100AC00AA0001002B06510C4F00AB000E
-:1002C000A80001002B040100010001000100010051
-:1002D000A5000100AE00010001000000160345006A
-:1002E000720067006F0044006F0078002000450036
-:1002F0005A00000016034500720067006F004400BA
-:100300006F007800200045005A0000000403090433
-:1003100009026D00040100A0FA09040000010301B4
-:100320000100092111010001223F00070581030896
-:10033000000A090401000103010200092111010062
-:1003400001224D000705820308000A09040200018A
-:100350000300000009211101000122360007058376
-:100360000308000A09040300010300000009211129
-:100370000100012239000705840310000112011059
-:100380000100000008EDFE07130100010200010555
-:10039000010906A101050719E029E71500250195C6
-:1003A0000875018102050819012905950575019156
-:1003B000029501750391010507190029771500259C
-:1003C00001957875018102C005010980A1018502AE
-:1003D00016010026B7001A01002AB7007510950112
-:1003E0008100C0050C0901A1018503160100269CAE
-:1003F000021A01002A9C02751095018100C00501B6
-:100400000902A1010901A100050919012905150029
-:10041000250195057501810295017503810105018D
-:10042000093009311581257F950275088106093843
-:100430001581257F950175088106050C0A3802157E
-:1004400081257F950175088106C0C005010906A1B7
-:1004500001050719E029E7150025019508750181B7
-:100460000295017508810105081901290595057591
-:100470000191029501750391010507190029FF15E6
-:100480000025FF950675088100C0000000000000EF
-:100490000000000000010204060A0F17202C3A4A4F
-:1004A0005D71879DB3C7DAE9F5FCFFFCF5E9DAC7B2
-:1004B000B39D87715D4A3A2C20170F0A060402018A
-:1004C0000000000000000000000011241FBECFEF5C
-:1004D000DAE0DEBFCDBF04B603FE24C08091EE019A
-:1004E0009091EF01A091F001B091F1018730904B14
-:1004F000A740B04BB9F41092EE011092EF011092A8
-:10050000F0011092F10114BE84B7877F84BF88E1A7
-:100510000FB6F89480936000109260000FBEE0E088
-:10052000FFE3099511E0A0E0B1E0EAEAF7E402C0D8
-:1005300005900D92A433B107D9F711E0A4E3B1E01F
-:1005400001C01D92AE3EB107E1F70E94B6090C94BE
-:10055000D3230C94000061110BC0FC01828188231D
-:1005600021F085EE0E94231003C085EE0E94EB105F
-:1005700080E090E0089508956091B1017091B2011A
-:100580008091B3019091B4010E94C91A56985E9867
-:1005900025982D9826982E9827982F98813019F015
-:1005A000823021F00895259A2D9A0895269A2E9A40
-:1005B00008950C94BC0256985E9825982D9826981C
-:1005C0002E9827982F988FEF90E090938900809332
-:1005D000880090938B0080938A0090938D00809385
-:1005E0008C00259A2D9A2FEF80E792E021508040D1
-:1005F0009040E1F700C00000269A2E9A2FEF80E786
-:1006000092E0215080409040E1F700C00000279A1E
-:100610002F9A2FEF80E792E0215080409040E1F741
-:1006200000C0000025982D982FEF80E792E0215020
-:1006300080409040E1F700C0000026982E982FEFF0
-:1006400080E792E0215080409040E1F700C0000038
-:1006500027982F9856985E9825982D9826982E982A
-:1006600027982F98089589EA8093800089E08093E5
-:10067000810024982C983F988AB18F748AB96E981B
-:10068000479A8BB1806B8BB9769A0E94DB020C94EF
-:10069000BB0280E2809300018091340181110EC081
-:1006A0000E94980381E0809334012FEF83ED90E363
-:1006B000215080409040E1F700C0000080E40E949B
-:1006C0009E038093000181112EC00E94C803809375
-:1006D0000001811128C00E94C8038093000181118C
-:1006E00022C08FE30E94C8038093000181111BC0C8
-:1006F0000E94C00380E40E949E0380930001811148
-:1007000012C08CE00E94C8038093000181110BC0CD
-:100710000E94C80380930001811105C08FE30E94ED
-:10072000C803809300010E94C003809100010895D6
-:100730001092B9008AE08093B800089594EA9093EB
-:10074000BC009091BC0097FFFCCF9091B900987FBE
-:10075000983021F0903111F081E008958093BB0032
-:1007600084E88093BC008091BC0087FFFCCF80911F
-:10077000B900887F883111F0803471F780E00895E6
-:1007800084E98093BC008091BC0084FDFCCF089577
-:100790008093BB0084E88093BC008091BC0087FFFD
-:1007A000FCCF9091B900987F81E0983209F480E005
-:1007B000089584E88093BC008091BC0087FFFCCF43
-:1007C0008091BB00089580910001811115C080E4E3
-:1007D0000E949E038093000181110CC082E10E945F
-:1007E000C80380930001811105C08FEF0E94C803E8
-:1007F000809300010E94C00384B1807F84B985B1D9
-:10080000807F85B98AB1837F8AB98BB1837F8BB9A9
-:100810003E98469808950E944903809300010E94E3
-:10082000E30380B38C7080BB81B3836F81BBA6E38D
-:10083000B1E0E4E4F1E08EE08E0F11921D928E1390
-:10084000FCCF0C943303BF92CF92DF92EF92FF92D2
-:100850000F931F93CF93DF9380910001882379F04A
-:10086000809135018F5F80933501811108C00E940E
-:10087000490380930001811102C00E94DB0206E35C
-:1008800011E0C0E0D0E0DD24D39482E0C82EEE2455
-:10089000E394F12CC730D10500F58091000181115E
-:1008A00064C080E40E949E0380930001811112C005
-:1008B00082E10E94C8038093000181110BC0C7012F
-:1008C0000C2E01C0880F0A94EAF780950E94C80395
-:1008D000809300010E94C00348C0CA30A1F028F4F0
-:1008E000C83059F0C93061F005C0CC3089F070F0E3
-:1008F000CD3089F0209A289810C0219A29980DC0EF
-:10090000229A2A980AC0239A2B9807C0529A01C0AB
-:10091000539A5B9802C03E9A469890EA9A95F1F7EE
-:100920009FB1799902C082E001C080E091709D255D
-:10093000982B7C9902C084E001C080E0892B7D99CE
-:1009400002C038E001C030E0832B7E9902C020E174
-:1009500001C020E0822B9FB19095991F9927991F84
-:100960009295990F907E892B0FC080910001811183
-:1009700049C080E40E949E0380930001882379F19E
-:10098000B12C0E94C0038B2DF8019081981719F0AB
-:100990008083C09201010E94E30321960F5F1F4FE5
-:1009A000CE30D10509F076CF80910101882361F125
-:1009B000815080930101882339F08FE99FE00197EE
-:1009C000F1F700C0000020C0A4E4B1E0E6E3F1E0EC
-:1009D000CF01825F91919D938E13FCCF15C083E16F
-:1009E0000E94C803809300018111CACF81E40E9454
-:1009F0009E03809300018111C3CF0E94D903B82EBA
-:100A0000B094BFCF80E0C0CF0E94D90281E0DF91D7
-:100A1000CF911F910F91FF90EF90DF90CF90BF90FB
-:100A20000895E82FF0E0EC5BFE4F80810895089573
-:100A3000089596E0799FF001112494E5899FE00DD7
-:100A4000F11D1124E60FF11DEE0FFF1FEC51FF4FBA
-:100A5000859194910895880F991FFC01E05AF04008
-:100A6000859194910895880F991FFC01E052FF4FE2
-:100A70008591949108950F931F93CF93DF93EC0189
-:100A80008115904350F5C11580E2D80708F0B3C036
-:100A9000CB3BD10590F4C83AD10508F05AC0C53A0D
-:100AA000D10508F04BC0C430D10508F0BBC1219777
-:100AB00009F0B5C101E010E0F5C1CF3FD10511F05B
-:100AC00008F0B0C1C03FD10508F092C0CE01805EF1
-:100AD0009109089708F4A6C1A2C1C11591E5D907EB
-:100AE000A8F4C23020E5D20708F09EC0C11580E509
-:100AF000D80709F485C008F091C0C11520E4D207D9
-:100B000008F08DC1DD278E01106CCCC1C11580E8C5
-:100B1000D80758F4C11590E7D90708F07CC1C11572
-:100B200020E6D20708F422C17AC1C11580E9D807AE
-:100B300008F075C1DF708E01106AB4C1C53AD105E5
-:100B400009F472C1C63AD10509F071C102E810E496
-:100B5000A9C1C83AD10509F46DC1C93AD10509F452
-:100B60006CC1CA3AD10509F46BC1CB3AD10509F47D
-:100B70006AC1CC3AD10509F469C1CD3AD10509F46D
-:100B800068C1C03BD10509F467C1CE3AD10509F46B
-:100B900066C1CF3AD10509F465C1C13BD10509F45D
-:100BA00064C1C23BD10509F463C1C33BD10509F45B
-:100BB00062C1C43BD10509F461C1C53BD10509F44B
-:100BC00060C1C63BD10509F45FC1C73BD10509F43B
-:100BD0005EC1C83BD10509F45DC1C93BD10509F42B
-:100BE0005CC1CA3BD10509F45BC100E014E45AC101
-:100BF0008E01106557C1CE019F700E94330553C10D
-:100C00000E948A149FEF24E38CE0915020408040A2
-:100C1000E1F700C000000E94C21B44C18091CD01D9
-:100C200081608093CD013EC10E946B1D811102C085
-:100C30000E94511D0E94881D90E09093EE018093C8
-:100C4000ED01C23090E5D90721F48091ED0181607A
-:100C500086C0C43020E5D20721F48091ED01826086
-:100C60007EC0C63080E5D80721F48091ED01846014
-:100C700076C0C83090E5D90719F48091ED0127C0FE
-:100C8000CA3020E5D20721F48091ED01806167C070
-:100C9000CC3080E5D80721F48091ED0180625FC0FF
-:100CA000CE3090E5D90721F48091ED01806457C0E2
-:100CB000C03120E5D20721F48091ED0180684FC05A
-:100CC000C23180E5D80729F48091ED018460886005
-:100CD00046C0C33090E5D90721F48091ED018E7FA5
-:100CE0003EC0C53020E5D20721F48091ED018D7F13
-:100CF00036C0C73080E5D80721F48091ED018B7FA5
-:100D00002EC0C93090E5D90719F48091ED0126C0B5
-:100D1000CB3020E5D20721F48091ED018F7E1FC0FA
-:100D2000CD3080E5D80721F48091ED018F7D17C08B
-:100D3000CF3090E5D90721F48091ED018F7B0FC072
-:100D4000C13120E5D20721F48091ED018F7707C0F2
-:100D5000C331D04531F48091ED018B7F877F809343
-:100D6000ED018091ED010E948C1D9CC08D2F992773
-:100D70008F70992781309105D9F49E012370332714
-:100D800002C0880F991F2A95E2F79C688E0144E003
-:100D9000000F111F4A95E1F700271370802B912B4C
-:100DA00053E0CC0FDD1F5A95E1F7C076DD272FC049
-:100DB0008230910531F4DC2FCC278E01016F106A4F
-:100DC00071C08330910569F4CE018370992701E0E9
-:100DD00010E002C0000F111F8A95E2F7C8019C685D
-:100DE0000FC0049709F05EC0CE018370992701E01F
-:100DF00010E002C0000F111F8A95E2F7C8019A683F
-:100E000023E0CC0FDD1F2A95E1F7C07ED7708C015F
-:100E10000C2B1D2B47C0DF708E01106243C000E019
-:100E200010E040C08E013EC001E810E43BC003E882
-:100E300010E438C002EE14E435C009EE14E432C008
-:100E40000AEE14E42FC005EB14E42CC006EB14E406
-:100E500029C007EB14E426C00CEC14E423C00DEC0D
-:100E600014E420C003E815E41DC00AE815E41AC024
-:100E700002E915E417C004E915E414C001E216E420
-:100E800011C003E216E40EC004E216E40BC005E252
-:100E900016E408C006E216E405C007E216E402C044
-:100EA0000AE216E4C801DF91CF911F910F910895D6
-:100EB00096E0799FF001112494E5899FE00DF11DE2
-:100EC0001124E60FF11DEE0FFF1FEC51FF4F85912E
-:100ED0009491803E9105E0F4803C910558F5813372
-:100EE000910509F46FC048F48932910509F463C093
-:100EF0008A32910509F46DC072C089339105E9F019
-:100F000082389105D1F08533910509F44DC067C051
-:100F1000833E910581F138F4803E9105B9F0823E1F
-:100F20009105D9F05CC0863E910561F1873E91053F
-:100F3000A1F155C00E942B0508952091ED0120FDDF
-:100F400002C021FF4CC080EE90E049C08091ED01CD
-:100F500080FFF9CF89E390E042C08091ED0182FFEC
-:100F60000EC08091ED0184FF03C080E090E037C0A7
-:100F700083EE90E034C08091ED0182FFF2CF82EEEB
-:100F800090E02DC08091ED0183FF0BC08091ED01B9
-:100F900084FDEBCF87EE90E022C08091ED0183FFCE
-:100FA000F5CF86EE90E01BC08091ED0185FF07C074
-:100FB00089E290E014C08091ED0185FFF9CF85E3CF
-:100FC00090E00DC08091ED0186FF07C08AE290E0BD
-:100FD00006C08091ED0186FFF9CF81E390E00E9489
-:100FE0003B05089508950C94F207809162010895DD
-:100FF000CF93DF9300D01F92CDB7DEB79C018091D5
-:10100000E401843019F593E099833B832A8390931C
-:10101000E9008FEF9091E800815095FD06C095EDB5
-:101020009A95F1F700008111F5CF8091E80085FFD6
-:101030000DC040E050E063E070E0CE0101960E94F8
-:10104000620A8091E8008E778093E8000F900F90FD
-:101050000F90DF91CF910895CF93DF9300D01F922F
-:10106000CDB7DEB72091E401243021F522E02983B9
-:101070009B838A8383E08093E9008FEF9091E8005F
-:10108000815095FD06C095ED9A95F1F7000081110C
-:10109000F5CF8091E80085FF0DC040E050E063E0AF
-:1010A00070E0CE0101960E94620A8091E8008E777E
-:1010B0008093E8000F900F900F90DF91CF910895EB
-:1010C0002091E4012430F1F422E02093E9002FEF95
-:1010D0003091E800215035FD06C035ED3A95F1F725
-:1010E00000002111F5CF2091E80025FF0BC040E062
-:1010F00050E065E070E00E94620A8091E8008E771F
-:101100008093E8000895CF93DF93EC019091E40180
-:10111000943009F046C080910C018823D9F0809169
-:101120000D018823B9F09093E9008FEF9091E800CA
-:10113000815095FD06C095E19A95F1F70000811167
-:10114000F5CF8091E80085FF2CC040E050E060E1E1
-:1011500070E017C081E08093E9008FEF9091E80084
-:10116000815095FD06C095ED9A95F1F7000081112B
-:10117000F5CF8091E80085FF14C040E050E068E0C2
-:1011800070E0CE010E94620A8091E8008E77809321
-:10119000E80080E1FE01A2E5B1E001900D928A95A0
-:1011A000E1F7DF91CF9108958091E301811109C0AA
-:1011B0000E94F70B0E94540C8091E200846080939F
-:1011C000E20008951092E301089508950C94FB2124
-:1011D0000E94581B0E9401220E94FA0E0C94F307F1
-:1011E00042E061EC81E00E94710B42E061EC82E040
-:1011F0000E94710B42E061EC83E00E94710B42E1BE
-:1012000061EC84E00C94710B8091E601833009F469
-:1012100055C030F4813071F0823009F48EC00895E9
-:101220008A3009F47AC08B3009F460C0893009F043
-:101230009CC020C08091E501813A09F096C0809160
-:10124000E800877F8093E8008091E9019091EA01AE
-:10125000892B21F460E182E591E003C060E080E049
-:1012600090E070E00E94AD0A8091E8008B77809357
-:10127000E80008958091E501813209F076C08091FF
-:10128000E9019091EA01009719F0039709F06DC008
-:101290008091E800877F8093E8008091E80082FDDC
-:1012A00005C08091E4018111F8CF5FC08091F10009
-:1012B000809362018091E8008B7753C08091E501B3
-:1012C000813A09F052C08091E9019091EA01892B9D
-:1012D00009F04BC08091E800877F8093E8008091FF
-:1012E000E80080FFFCCF80910C0136C08091E501C1
-:1012F0008132D9F58091E9019091EA01892BA9F514
-:101300008091E800877F8093E8000E94A60B80917F
-:10131000E70180930C010C948A148091E5018132DD
-:1013200021F58091E800877F8093E8000E94A60B5A
-:101330008091E8018093630108958091E501813AED
-:10134000A1F48091E800877F8093E8008091E80015
-:1013500080FFFCCF809163018093F1008091E800D1
-:101360008E778093E8000C94A60B089584B7877F4E
-:1013700084BF88E10FB6F8948093600010926000FB
-:101380000FBE90E080E80FB6F894809361009093D0
-:1013900061000FBE0E94490F0E94F70B0E94540C7F
-:1013A0008091E20084608093E20078940E94DA0EDB
-:1013B0000E944B0F82E091E00E94F50E0E94E9210D
-:1013C0008091E401853069F40E94191B8091E2014B
-:1013D0008823B1F30E94441B882391F30E944C0A96
-:1013E000EFCF0E94510FECCF292F33272330310547
-:1013F000C9F064F42130310581F02230310509F063
-:1014000043C08DE690E020E133E042C02132310557
-:10141000F1F02232310541F137C082E190E02DE751
-:1014200033E036C099278130910541F08230910533
-:1014300041F0892B49F5ECE0F3E005C0E4EFF2E080
-:1014400002C0ECEDF2E0849190E09F0121C0643095
-:10145000D8F4E62FF0E0EE0FFF1FEE5DFE4F208187
-:10146000318189E090E014C0643070F470E0FB01D9
-:10147000EE0FFF1FE65EFE4F20813181FB01EA5E29
-:10148000FE4F808190E004C080E090E020E030E0FA
-:10149000FA0131832083089580E189BD82E189BD0D
-:1014A00009B400FEFDCF8091D8008F7D8093D800D5
-:1014B0008091E00082608093E0008091E00081FDF7
-:1014C000FCCF0895CF92DF92EF92FF920F931F937C
-:1014D000CF93DF93EC018B016A010E94C50B811150
-:1014E00033C0C114D10439F0F60180819181081B09
-:1014F000190BC80FD91FE12CF12C0115110519F199
-:101500008091E80085FD16C08091E8008E77809379
-:10151000E800C114D10449F0F60180819181E80E00
-:10152000F91EF182E08285E00FC00E94C50B88237E
-:1015300021F30AC089918093F10001501109FFEF56
-:10154000EF1AFF0ADACF80E0DF91CF911F910F9160
-:10155000FF90EF90DF90CF9008952091EB013091B4
-:10156000EC012617370748F06115710539F4209111
-:10157000E8002E772093E80001C0B90140E0611532
-:101580007105A9F12091E401222309F443C025301B
-:1015900009F442C02091E80023FD40C02091E800FA
-:1015A00022FD32C02091E80020FFE9CF4091F300F6
-:1015B0002091F20030E0342BFC01CF016115710560
-:1015C00059F02830310540F481918093F100615049
-:1015D00071092F5F3F4FF1CF41E02830310509F00D
-:1015E00040E02091E8002E772093E800C8CF411119
-:1015F000C9CF0AC08091E401882361F0853061F091
-:101600008091E80083FD0AC08091E80082FFF2CF5C
-:1016100080E0089582E0089583E0089581E00895D0
-:101620002091EB013091EC012617370748F0611546
-:10163000710539F42091E8002E772093E80001C06D
-:10164000B901FC0120E06115710591F18091E4017F
-:10165000882309F440C0853009F43FC08091E80038
-:1016600083FD3DC08091E80082FD2FC08091E8009D
-:1016700080FFE9CF2091F3008091F20090E0922B5F
-:101680006115710559F08830910540F4249120933B
-:10169000F1003196615071090196F2CF21E008976F
-:1016A00009F020E08091E8008E778093E800CBCFAE
-:1016B0002111CCCF0AC08091E401882361F08530EC
-:1016C00061F08091E80083FD0AC08091E80082FF0C
-:1016D000F2CF80E0089582E0089583E0089581E0EC
-:1016E0000895982F973058F59093E900981739F09E
-:1016F0007091EC002091ED005091F00003C0242F78
-:10170000762F50E021FF19C03091EB003E7F3093DF
-:10171000EB003091ED003D7F3093ED003091EB0018
-:1017200031603093EB007093EC002093ED00509308
-:10173000F0002091EE0027FF07C09F5FD3CF8F708E
-:101740008093E90081E0089580E008958091E501AB
-:1017500087FF11C08091E80082FD05C08091E401FF
-:101760008111F8CF11C08091E8008B770BC0809178
-:10177000E401882349F08091E80080FFF8CF809150
-:10178000E8008E778093E80008952091E40030917E
-:10179000E50095E64091EC00842F817040FF22C067
-:1017A0008091E80080FD1CC08091E401882391F0C5
-:1017B000853091F08091EB0085FD10C04091E400F0
-:1017C0005091E5004217530729F39A01915011F700
-:1017D00084E0089582E0089583E0089581E008950B
-:1017E00080E008954091E80042FFDECF08950E9416
-:1017F000650C0E946D0CE0EEF0E0808181608083DA
-:10180000E8EDF0E080818F77808319BCA7EDB0E030
-:101810008C918E7F8C9380818F7E80831092E301E8
-:1018200008950F931F93CF93DF930E94650C0E943E
-:101830006D0CC8EDD0E088818F77888388818068BF
-:10184000888388818F7D888319BC1092E40110926F
-:10185000E0011092E2011092E10100EE10E0F801C7
-:1018600080818B7F808388818160888342E060E013
-:1018700080E00E94710BE1EEF0E080818E7F80833A
-:10188000E2EEF0E0808181608083808188608083E7
-:10189000F80180818E7F8083888180618883DF91D9
-:1018A000CF911F910F910895E8EDF0E080818F7E38
-:1018B0008083E7EDF0E080818160808384E082BFF7
-:1018C00081E08093E3010C94110CE8EDF0E080815D
-:1018D0008E7F80831092E20008951092DA001092B9
-:1018E000E10008951F920F920FB60F9211242F93CB
-:1018F0003F934F935F936F937F938F939F93AF9398
-:10190000BF93EF93FF938091E10082FF0BC0809122
-:10191000E20082FF07C08091E1008B7F8093E100AD
-:101920000E94D90E8091DA0080FF1FC08091D800FC
-:1019300080FF1BC08091DA008E7F8093DA00809157
-:10194000D90080FF0DC080E189BD82E189BD09B465
-:1019500000FEFDCF81E08093E4010E94D40805C021
-:1019600019BC1092E4010E94E2088091E10080FF1E
-:1019700019C08091E20080FF15C08091E2008E7F47
-:101980008093E2008091E20080618093E200809188
-:10199000D80080628093D80019BC85E08093E40170
-:1019A0000E94E6088091E10084FF30C08091E2004F
-:1019B00084FF2CC080E189BD82E189BD09B400FEAD
-:1019C000FDCF8091D8008F7D8093D8008091E10079
-:1019D0008F7E8093E1008091E2008F7E8093E20011
-:1019E0008091E20081608093E2008091E001882391
-:1019F00011F084E007C08091E30087FD02C081E020
-:101A000001C083E08093E4010E94E8088091E10036
-:101A100083FF29C08091E20083FF25C08091E1000F
-:101A2000877F8093E10082E08093E4011092E001DF
-:101A30008091E1008E7F8093E1008091E2008E7FB3
-:101A40008093E2008091E20080618093E20042E0B6
-:101A500060E080E00E94710B8091F00088608093CC
-:101A6000F0000E94E508FF91EF91BF91AF919F9127
-:101A70008F917F916F915F914F913F912F910F9037
-:101A80000FBE0F901F9018951F920F920FB60F92D6
-:101A900011242F933F934F935F936F937F938F9373
-:101AA0009F93AF93BF93CF93DF93EF93FF93C09137
-:101AB000E900CF708091EC00D82FD17080FDD0E884
-:101AC0001092E9008091F000877F8093F000789475
-:101AD0000E94880D1092E9008091F0008860809348
-:101AE000F000CD2BCF70C093E900FF91EF91DF9113
-:101AF000CF91BF91AF919F918F917F916F915F91A6
-:101B00004F913F912F910F900FBE0F901F901895FE
-:101B10001F93CF93DF93CDB7DEB7AA970FB6F89494
-:101B2000DEBF0FBECDBFE5EEF1E088E08E0F9091F5
-:101B3000F10091938E13FBCF0E9404098091E8007D
-:101B400083FF1FC18091E5019091E601492F50E08C
-:101B50004A30510508F015C1FA01EA5AFF4F0C94BA
-:101B60008323803881F0823809F00BC18091E9012C
-:101B70008F708093E9008091EB0085FB882780F9C6
-:101B80001092E90006C08091E1019091E20191116B
-:101B900082609091E800977F9093E8008093F10035
-:101BA0001092F100C8C0282F2D7F09F0EAC08823C9
-:101BB00019F0823061F0E5C08091E701813009F0D1
-:101BC000E0C0933009F080E08093E2012BC0809167
-:101BD000E701811127C08091E9018F7009F4D1C01C
-:101BE0008093E9002091EB0020FF1CC0933021F48A
-:101BF0008091EB00806214C09091EB009061909313
-:101C0000EB0021E030E0A90102C0440F551F8A9586
-:101C1000E2F74093EA001092EA008091EB008860BE
-:101C20008093EB001092E9008091E800877F86C0E6
-:101C30008111A7C01091E7011F778091E3008078A0
-:101C4000812B8093E3008091E800877F8093E800F8
-:101C50000E94A60B8091E80080FFFCCF8091E300FA
-:101C600080688093E300111102C082E001C083E02C
-:101C70008093E40186C08058823008F082C0809151
-:101C8000E7019091E8018C3D53E0950779F583E0F9
-:101C90008A838AE289834FB7F894DE01139620E0A5
-:101CA0003EE051E2E32FF0E050935700E49120FF33
-:101CB00003C0E295EF703F5FEF708E2F90E0EA3047
-:101CC00010F0C79601C0C0968D939D932F5F24316D
-:101CD00049F74FBF8091E800877F8093E8006AE270
-:101CE00070E0CE0101960E94AD0A14C0AE014F5FB4
-:101CF0005F4F6091E9010E94F409BC01892B09F44E
-:101D000040C09091E800977F9093E80089819A8184
-:101D10000E94100B8091E8008B778093E80031C01F
-:101D2000803879F58091E800877F8093E800809182
-:101D3000E0018093F1008091E8008E778093E800C5
-:101D40000E94A60B1EC081111CC09091E701923029
-:101D5000C0F48091E800877F8093E8009093E001D1
-:101D60000E94A60B8091E001811106C08091E300E2
-:101D700087FD02C081E001C084E08093E4010E94FD
-:101D8000F0088091E80083FF0AC08091E800877F17
-:101D90008093E8008091EB0080628093EB00AA962C
-:101DA0000FB6F894DEBF0FBECDBFDF91CF911F916C
-:101DB00008950895CF938091E4018823A1F0C09104
-:101DC000E900CF709091EC00892F817090FD80E840
-:101DD000C82B1092E9008091E80083FD0E94880DD5
-:101DE000CF70C093E900CF910895909369018093DB
-:101DF00068010895E0916801F0916901309721F040
-:101E00000190F081E02D099480E00895E09168014F
-:101E1000F0916901309721F00280F381E02D09945F
-:101E20000895E0916801F0916901309721F00480F4
-:101E3000F581E02D099408952091660130916701A4
-:101E40008217930771F09093670180936601E09188
-:101E50006801F0916901309721F00680F781E02D4B
-:101E600009940895209164013091650182179307C8
-:101E700071F09093650180936401E0916801F091A5
-:101E80006901309721F00084F185E02D09940895CF
-:101E900008950C94480F0E945E1B0E940B040C9442
-:101EA000241CCF92DF92EF92FF920F931F93CF9358
-:101EB000DF93CDB7DEB72B970FB6F894DEBF0FBE1A
-:101EC000CDBF0E9423048BE6C82E81E0D82E00E00F
-:101ED00010E0E02E802F0E941105F60141916F0164
-:101EE000F42EF826B1F40F5F1F4F0E30110589F75D
-:101EF0008FEF89838A831B820E94671B8160782F02
-:101F00009D838C8349815A816B818D810E94F40F5E
-:101F100040C09091CD0191FF04C08B870E941705AE
-:101F20008B8520E030E04F2D50E0922FBA01022E39
-:101F300002C0759567950A94E2F760FF24C02E836E
-:101F4000EF8221E030E0690102C0CC0CDD1C9A95E3
-:101F5000E2F790E08C219D21892B09F420E028876D
-:101F60000E94671B8160782F9A8789874E815F81E5
-:101F700068858A850E94F40FF801E559FE4F80813B
-:101F8000C826C08206C02F5F3F4F2630310569F654
-:101F9000AACF0E940B1F10916A010E94FA0E181717
-:101FA000A1F00E94FA0E80936A012B960FB6F89466
-:101FB000DEBF0FBECDBFDF91CF911F910F91FF907C
-:101FC000EF90DF90CF900C94F3072B960FB6F89418
-:101FD000DEBF0FBECDBFDF91CF911F910F91FF905C
-:101FE000EF90DF90CF900895CF93DF93CDB7DEB71A
-:101FF0002B970FB6F894DEBF0FBECDBF4F83588727
-:1020000069877A878B87DE01119686E0FD01119240
-:102010008A95E9F785E0FE01379601900D928A9541
-:10202000E1F749815A816B817C818D819E810E947B
-:1020300024172B960FB6F894DEBF0FBECDBFDF91ED
-:10204000CF9108950895CF93882309F4C2C0C82F73
-:10205000823859F40E94FA0E81FDBBC089E30E94C8
-:10206000CD190E949A1A89E30CC0833879F40E9432
-:10207000FA0E80FDAEC083E50E94CD190E949A1A27
-:1020800083E50E940F1ACF910C949A1A843859F460
-:102090000E94FA0E82FD9DC087E40E94CD190E9425
-:1020A0009A1A87E4EECF8CEF8C0F813A48F48C2F8C
-:1020B0000E944E2181118DC08C2F0E94CD19E3CF3B
-:1020C00080E28C0F883048F4C77081E001C0880F2F
-:1020D000CA95EAF70E94531AD6CF8BE58C0F83304E
-:1020E00078F4C53A29F0C63A31F083E890E005C0AB
-:1020F00081E890E002C082E890E0CF910C941C0F40
-:1021000088E58C0F833108F064C0C83A39F1C93AC8
-:1021100041F1CA3A49F1CB3A51F1CC3A59F1CD3AB1
-:1021200061F1C03B69F1CE3A71F1CF3A79F1C13B2F
-:1021300081F1C23B89F1C33B91F1C43B99F1C53BAD
-:10214000A1F1C63BA9F1C73BB1F1C83BB9F1C93B0D
-:10215000C1F1CA3BC9F180E090E038C082EE90E066
-:1021600035C089EE90E032C08AEE90E02FC085EB5A
-:1021700090E02CC086EB90E029C087EB90E026C071
-:102180008CEC90E023C08DEC90E020C083E891E0DF
-:102190001DC08AE891E01AC082E991E017C084E985
-:1021A00091E014C081E292E011C083E292E00EC09F
-:1021B00084E292E00BC085E292E008C086E292E001
-:1021C00005C087E292E002C08AE292E0CF910C94CF
-:1021D000320FCF910895882309F44BC0823859F407
-:1021E0000E94FA0E81FF45C089E30E94CD190E942A
-:1021F0009A1A89E30CC0833871F40E94FA0E80FFAA
-:1022000038C083E50E94CD190E949A1A83E50E9486
-:102210000F1A0C949A1A843859F40E94FA0E82FF0D
-:1022200028C087E40E94CD190E949A1A87E4EFCF54
-:102230009CEF980F913A58F390E2980F983050F431
-:10224000877091E001C0990F8A95EAF7892F0E9463
-:10225000591ADFCF9BE5980F933020F480E090E08F
-:102260000C941C0F885A833120F480E090E00C9489
-:10227000320F0895882321F00E94531A0C949A1A61
-:102280000895882321F00E94591A0C949A1A0895EF
-:10229000BF92CF92DF92EF92FF920F931F93CF9353
-:1022A000DF9300D000D000D0CDB7DEB725E0FC0131
-:1022B000DE01119601900D922A95E1F7FC01D08084
-:1022C00011810281258122952F7043815481452BF4
-:1022D00009F4FCC21F3F21F4FFEFDF1609F4F6C238
-:1022E0007C012E830E942210D9821A8369817A810F
-:1022F000802F0E94C919182FB92E0E947E190E94A2
-:1023000045182E81002319F00E94701A2E81EB2DA2
-:10231000E295EF70F0E0E05AFF4F0C9483238B2D91
-:10232000807F9B2D9F70F92E882319F0F29480EF07
-:10233000F822002389F0FF2009F475C280E2810FA2
-:10234000883020F48F2D0E94531A03C08F2D0E94D5
-:10235000631A0E949A1A67C2812F0E94EB10FF2015
-:1023600009F4B4C2105E8F2D183018F40E94591A67
-:1023700002C00E94691A26960FB6F894DEBF0FBEFF
-:10238000CDBFDF91CF911F910F91FF90EF90DF9024
-:10239000CF90BF900C949A1A3B2D307F8B2D8F706D
-:1023A000303211F08295807F112319F0113021F124
-:1023B0002CC00023B9F0222309F4A0C1213009F078
-:1023C0009DC126960FB6F894DEBF0FBECDBFDF913C
-:1023D000CF911F910F91FF90EF90DF90CF90BF9022
-:1023E0000C94831A222319F0213009F46FC28E83D2
-:1023F0000E94861A8E8196C1002321F0223008F0B7
-:1024000065C27CC1211162C28DC1002321F022234B
-:1024100009F474C108C2222309F484C119C22B2D06
-:1024200026952695237030E02115310521F02130C5
-:102430003105D1F04BC2002321F0812F9B2D9370E9
-:1024400002C080E090E026960FB6F894DEBF0FBE83
-:10245000CDBFDF91CF911F910F91FF90EF90DF9053
-:10246000CF90BF900C941C0F002321F0812F9B2D47
-:10247000937002C080E090E026960FB6F894DEBF1D
-:102480000FBECDBFDF91CF911F910F91FF90EF90C5
-:10249000DF90CF90BF900C94320F812F002319F062
-:1024A0000E94131E02C00E947B1E26960FB6F8944F
-:1024B000DEBF0FBECDBFDF91CF911F910F91FF9077
-:1024C000EF90DF90CF90BF900C94001F8B2D837006
-:1024D00009F07BC00111FAC1812F82958695877022
-:1024E000880F880F912F9F70C92ED12CE12CF12CD1
-:1024F000082E04C0CC0CDD1CEE1CFF1C0A94D2F785
-:1025000014FF12C04FE050E060E070E004C0440FE0
-:10251000551F661F771F8A95D2F7CB01BA016095C8
-:1025200070958095909503C060E070E0CB012B2DF5
-:10253000269526952370422F50E042305105D9F060
-:102540004330510569F16C297D298E299F2941303D
-:10255000510551F126960FB6F894DEBF0FBECDBFE0
-:10256000DF91CF911F910F91FF90EF90DF90CF906F
-:10257000BF900C946C186C297D298E299F29269672
-:102580000FB6F894DEBF0FBECDBFDF91CF911F9184
-:102590000F91FF90EF90DF90CF90BF900C94881830
-:1025A0000E946C18C701B60126960FB6F894DEBFDC
-:1025B0000FBECDBFDF91CF911F910F91FF90EF9094
-:1025C000DF90CF90BF900C945018002319F08B2D02
-:1025D000817001C08695882309F478C1812F829586
-:1025E00086958770880F880F912F9F70C92ED12CE8
-:1025F000E12CF12C082E04C0CC0CDD1CEE1CFF1CC1
-:102600000A94D2F714FF12C04FE050E060E070E08F
-:1026100004C0440F551F661F771F8A95D2F7CB0160
-:10262000BA01609570958095909503C060E070E068
-:10263000CB012B2D269526952370422F50E042305A
-:102640005105D9F04330510569F16C297D298E2956
-:102650009F294130510551F126960FB6F894DEBFFF
-:102660000FBECDBFDF91CF911F910F91FF90EF90E3
-:10267000DF90CF90BF900C9446196C297D298E294C
-:102680009F2926960FB6F894DEBF0FBECDBFDF910F
-:10269000CF911F910F91FF90EF90DF90CF90BF905F
-:1026A0000C9462190E944619C701B60126960FB60E
-:1026B000F894DEBF0FBECDBFDF91CF911F910F9178
-:1026C000FF90EF90DF90CF90BF900C942A19103FAD
-:1026D000D1F118F4103E50F4A1C0123F09F463C0C8
-:1026E00008F44CC0133F09F473C098C01F708B2DC1
-:1026F0008F710023A1F00E94C318812F26960FB678
-:10270000F894DEBF0FBECDBFDF91CF911F910F9127
-:10271000FF90EF90DF90CF90BF900C943A110E9401
-:10272000E418812F26960FB6F894DEBF0FBECDBFFA
-:10273000DF91CF911F910F91FF90EF90DF90CF909D
-:10274000BF900C9441110023A9F02111BFC08B2D23
-:102750008F7126960FB6F894DEBF0FBECDBFDF9106
-:10276000CF911F910F91FF90EF90DF90CF90BF908E
-:102770000C940919223008F0A9C0E9CF0023A9F070
-:102780008B2D8F7126960FB6F894DEBF0FBECDBF8E
-:10279000DF91CF911F910F91FF90EF90DF90CF903D
-:1027A000BF900C94C318002359F38B2D8F7126967C
-:1027B0000FB6F894DEBF0FBECDBFDF91CF911F9152
-:1027C0000F91FF90EF90DF90CF90BF900C94E418A2
-:1027D000002399F08B2D8F7126960FB6F894DEBFEB
-:1027E0000FBECDBFDF91CF911F910F91FF90EF9062
-:1027F000DF90CF90BF900C94AE1826960FB6F89449
-:10280000DEBF0FBECDBFDF91CF911F910F91FF9023
-:10281000EF90DF90CF90BF900C94A4180023A9F004
-:10282000222309F4ADCF812F26960FB6F894DEBF90
-:102830000FBECDBFDF91CF911F910F91FF90EF9011
-:10284000DF90CF90BF900C942310222309F4ADCFDA
-:10285000812F26960FB6F894DEBF0FBECDBFDF9155
-:10286000CF911F910F91FF90EF90DF90CF90BF908D
-:102870000C94EB104B2D4F70612FC7010E94AB02DF
-:1028800026960FB6F894DEBF0FBECDBFDF91CF9175
-:102890001F910F91FF90EF90DF90CF90BF900C941D
-:1028A000C8174B2D4F70612FC70126960FB6F894AD
-:1028B000DEBF0FBECDBFDF91CF911F910F91FF9073
-:1028C000EF90DF90CF90BF900C94180526960FB62E
-:1028D000F894DEBF0FBECDBFDF91CF911F910F9156
-:1028E000FF90EF90DF90CF90BF9008950E94701AF4
-:1028F0000E94801A0E94451A0E949A1A0E94B11FD3
-:102900000E94001F80E090E00E941C0F80E090E099
-:102910000C94320F0E94601A0C9476140E94BE1917
-:10292000292F22952F7030E02C3031054CF42A30BD
-:1029300031056CF4225031092230310588F407C08A
-:102940002C30310549F02F30310531F009C0803E7F
-:1029500048F0803F29F406C093FB882780F908954A
-:1029600080E0089581E00895CF93DF9300D000D0F8
-:102970001F92CDB7DEB70F900F900F900F900F9072
-:10298000DF91CF910895CF93DF9300D000D000D096
-:10299000CDB7DEB726960FB6F894DEBF0FBECDBF1B
-:1029A000DF91CF9108951F93CF93DF93C091790169
-:1029B00016E080917A01C81799F0D0E01C9FF001D1
-:1029C0001D9FF00D1124E558FE4F40815181628119
-:1029D0007381848195810E94C3142196C770E9CFC9
-:1029E000DF91CF911F9108954091AB015091AC01BF
-:1029F0006091AD017091AE018091AF019091B001F5
-:102A00000C94C3148091B00182958F7009F054C06A
-:102A10008091AD01882309F44FC080917901A09184
-:102A20007A016091AB017091AC014091AE0150917F
-:102A3000AF01B6E08A1709F43FC090E04115510597
-:102A4000C1F17F3F11F46F3FA1F1B89FF001B99F31
-:102A5000F00D1124E558FE4F218172132AC0208108
-:102A6000621327C02281211124C0238134812417BD
-:102A7000350710F421503109241B350B283C310552
-:102A8000C0F42091B0012F7020612093B00126E0A6
-:102A9000289FF001299FF00D1124E058FE4F8081FE
-:102AA0008F70806180838BEA91E00E9448110C94C2
-:102AB000D31401968770BECF0895CF92DF92EF9224
-:102AC000FF920F931F93CF93DF93CDB7DEB762973B
-:102AD0000FB6F894DEBF0FBECDBF8C0185E0F801C4
-:102AE000DE011D9601900D928A95E1F7D8014C9177
-:102AF00011965C91119712966C9112971396CD9046
-:102B0000DC9014973091AB017091AC018091AE01D3
-:102B10009091AF01009709F46BC17F3F19F43F3FDB
-:102B200009F466C1E090AD01EE2009F4C0C0209127
-:102B3000B001C816D90628F0F601E81BF90BCF0141
-:102B400004C0809590958C0D9D1DFF24F394883CC6
-:102B5000910578F0F12C207F09F0C6C07C2DD98A30
-:102B6000C88A89890E94B4148BEA91E00E944811B6
-:102B7000B1C0822F807F09F046C0751314C0341392
-:102B800012C0611110C02F7020612093B0010E940B
-:102B9000F4148BEA91E00E9448118091B001D801B1
-:102BA00015968C932EC0CD2819F15F3F11F44F3F3D
-:102BB000F9F0F62E61111CC08091790120917A0103
-:102BC00036E0821709F45AC090E0389FF001399F2F
-:102BD000F00D1124E558FE4F7181571306C0708126
-:102BE000471303C07281711103C001968770E9CF4A
-:102BF000F62E662309F418C18091B001816080939C
-:102C0000B001F12C11C1751308C0341306C0611155
-:102C100004C08091B001D801C3C04D875E878D8507
-:102C20009E856A8B0E948E146A898823E1F166234F
-:102C3000D1F12091B001822F82958F7090E00297A0
-:102C400074F08091AB019091AC0198878F831986C5
-:102C5000DB86CA862C87CE0107960E94481186E043
-:102C6000F801ABEAB1E001900D928A95E1F70E947C
-:102C700002150E94F414FF24F394D6C04D875E879A
-:102C80008D859E850E94BE19292F22952F7030E0D8
-:102C9000223031050CF0BCC09F7009F0B6C0805ED8
-:102CA000883008F4C1C0C8010E944811E4CFC8169A
-:102CB000D90608F453C0F601E81BF90BCF01883C94
-:102CC000910508F450C0F12C7C2DD98AC88A8989D5
-:102CD0000E94B414EBEAF1E086E0DF011D928A95D0
-:102CE000E9F70E94F414A0C0751314C0341312C085
-:102CF000611110C08091B001F8018583C8010E9464
-:102D0000481186E0EBEAF1E0DF011D928A95E9F7D0
-:102D1000FE2C8AC04D875E878D859E856A8B0E94BA
-:102D20008E146A89882309F4BECF662309F4BBCFC9
-:102D30002091B001822F82958F7090E002970CF461
-:102D40008ECF8091AB019091AC019A8389831B82D5
-:102D5000DD82CC822E83CE0101967FCF8095909527
-:102D60008C0D9D1DACCFF62E662309F49CCF7513F8
-:102D70002EC034132CC02091B00120FD1FC0822F23
-:102D800082958F70D9F0D80115962C9315978F30B6
-:102D900049F08F5F982F9295907F822F8F70892BAB
-:102DA00015968C93C8010E94481186E0F801ABEAA1
-:102DB000B1E001900D928A95E1F793CF86E0F8019A
-:102DC000ABEAB1E001900D928A95E1F72DC04D87F5
-:102DD0005E878D859E850E948E14811140CF8091E3
-:102DE000B00181608093B001C8010E9448111CC0ED
-:102DF000662309F458CF4D875E878D859E850E9496
-:102E00008E14882309F44FCF2ACF811148CF0CC0EC
-:102E1000243031050CF047CF9F7009F440CFF80102
-:102E20009581907F09F03BCF8F2D62960FB6F89475
-:102E3000DEBF0FBECDBFDF91CF911F910F91FF90ED
-:102E4000EF90DF90CF9008951F93CF93DF93CDB78E
-:102E5000DEB72C970FB6F894DEBF0FBECDBF4F8301
-:102E6000588769877A878B879C87CE0107960E944F
-:102E70005D15882369F08F8198852A853B85232BF2
-:102E8000F1F19F3F09F063C08F3F09F060C037C088
-:102E900086E0FE013796DE01119601900D928A952B
-:102EA000E1F76F817885EA85FB85309741F17F3FB7
-:102EB00011F46F3F21F120917A0130E0C9010196B0
-:102EC000877099274091790150E08417950709F49C
-:102ED00047C069837A83FD83EC8396E0929FD0019B
-:102EE000939FB00D1124A558BE4FFE01319601905D
-:102EF0000D929A95E1F780937A010E94D31416E01F
-:102F00008091790190917A018917C1F1189FC001D0
-:102F1000112485589E4F0E945D15882379F1E09118
-:102F200079011E9FF0011124E558FE4F4081518127
-:102F300062817381848195810E94C314809179019B
-:102F400090E001968770992780937901D9CF4F81BE
-:102F5000588569857A858B859C850E94C314CFCF5F
-:102F60000E948A1410927A0110927901EBEAF1E042
-:102F700086E0DF011D928A95E9F7C1CF2C960FB646
-:102F8000F894DEBF0FBECDBFDF91CF911F910895A2
-:102F9000EF92FF920F931F93CF93DF938C01892BB6
-:102FA00009F46CC0F12CEE24E394E8012196F801B9
-:102FB0008491843740F4843008F051C0813081F02E
-:102FC000823019F15BC0853709F444C0A8F19CE751
-:102FD000980F903708F052C08F770E94EB1041C0D5
-:102FE0000E5F1F4FFE01C49180E28C0F883048F4C1
-:102FF000C7708E2D01C0880FCA95EAF70E94731A18
-:1030000014C08C2F0E9423102DC00E5F1F4FFE0195
-:10301000C49180E28C0F883058F4C7708E2D01C0A7
-:10302000880FCA95EAF70E94791A0E949A1A1AC064
-:103030008C2F0E94EB1016C00E5F1F4FFE01C49133
-:10304000CC2381F08FE99FE00197F1F700C00000E9
-:10305000C150F6CF0E5F1F4FFE01F49003C00E94D7
-:1030600023108E018F2D882309F49FCFEFE9FFE015
-:103070003197F1F700C000008150F5CFDF91CF917B
-:103080001F910F91FF90EF90089508956093B501FF
-:103090007093B6018093B7019093B8010C947614A5
-:1030A0000F931F930091B5011091B6012091B701C4
-:1030B0003091B801DC01CB01802B912BA22BB32BDB
-:1030C0008093B5019093B601A093B701B093B80176
-:1030D0001F910F910C9476140F931F930091B501DB
-:1030E0001091B6012091B7013091B801DC01CB01FC
-:1030F00080239123A223B3238093B5019093B6013B
-:10310000A093B701B093B8011F910F910C9476145E
-:103110000F931F930091B5011091B6012091B70153
-:103120003091B801DC01CB0180279127A227B3277A
-:103130008093B5019093B601A093B701B093B80105
-:103140001F910F910C9476141092B1011092B2015C
-:103150001092B3011092B4010C94761441E050E047
-:1031600060E070E004C0440F551F661F771F8A950A
-:10317000D2F74093B1015093B2016093B3017093C1
-:10318000B4010C94761441E050E060E070E004C0BB
-:10319000440F551F661F771F8A95D2F78091B101A2
-:1031A0009091B201A091B301B091B401482B592B79
-:1031B0006A2B7B2B4093B1015093B2016093B30112
-:1031C0007093B4010C94761441E050E060E070E03C
-:1031D00004C0440F551F661F771F8A95D2F740958C
-:1031E0005095609570958091B1019091B201A09138
-:1031F000B301B091B401482359236A237B23409340
-:10320000B1015093B2016093B3017093B4010C9477
-:10321000761441E050E060E070E004C0440F551FB8
-:10322000661F771F8A95D2F78091B1019091B20104
-:10323000A091B301B091B401482759276A277B2791
-:103240004093B1015093B2016093B3017093B40104
-:103250000C9476140F931F930091B1011091B20159
-:103260002091B3013091B401DC01CB01802B912B73
-:10327000A22BB32B8093B1019093B201A093B30121
-:10328000B093B4011F910F910C9476140F931F9378
-:103290000091B1011091B2012091B3013091B401BC
-:1032A000DC01CB0180239123A223B3238093B101BE
-:1032B0009093B201A093B301B093B4011F910F9109
-:1032C0000C9476140F931F930091B1011091B201E9
-:1032D0002091B3013091B401DC01CB01802791270B
-:1032E000A227B3278093B1019093B201A093B301B9
-:1032F000B093B4011F910F910C9476140895CF925E
-:10330000DF92EF92FF920F931F93CF93DF938C0185
-:10331000C090B501D090B601E090B701F090B8012F
-:103320008091B1019091B201A091B301B091B4012B
-:10333000C82AD92AEA2AFB2ACFE1D0E0D701C60160
-:103340000C2E04C0B695A795979587950A94D2F749
-:1033500080FF06C0B8018C2F0E945807019721F406
-:10336000219760F780E001C08C2FDF91CF911F91F2
-:103370000F91FF90EF90DF90CF900895CF93DF9360
-:10338000EC010E947F19BE010E945807DF91CF9186
-:103390000895CB010E94BE19089590910C019923C4
-:1033A00021F090910D01911109C020910E013091F1
-:1033B0000F01F90132969FEF40E01FC0982F9695BC
-:1033C000969596959F3050F5E0910E01F0910F0182
-:1033D000E90FF11D877021E030E0A90102C0440F20
-:1033E000551F8A95E2F7CA019181892B818308953F
-:1033F0009F3F39F04F5F4E3041F051915813F8CF55
-:103400000DC05111F7CF942FF5CF9F3F39F0F9013F
-:10341000E90FF11D97FDFA95828308950895909123
-:103420000C01992321F090910D01911109C0209177
-:103430000E0130910F01F9013296205F3F4F1FC0FE
-:10344000982F9695969596959F30F0F4E0910E0101
-:10345000F0910F01E90FF11D877021E030E0A90123
-:1034600002C0440F551F8A95E2F7CA0180959181E9
-:103470008923818308953196E217F30729F090811B
-:103480009813F9CF1082F7CF089581E090E0E09192
-:103490000E01F0910F01E80FF91F108201968031A3
-:1034A0009105A9F708959091CC01892B8093CC01C7
-:1034B000089580959091CC0189238093CC01089543
-:1034C0001092CC0108959091CB01892B8093CB0170
-:1034D000089580959091CB0189238093CB01089525
-:1034E0001092CB0108959091CA01892B8093CA0153
-:1034F000089580959091CA0189238093CA01089507
-:103500001092CA0108958093B90108951092B901EB
-:10351000089580910E0190910F01FC0131969C015C
-:10352000205F3F4F80E0919191118F5FE217F30789
-:10353000D1F70895E0910E01F0910F018091CC0137
-:103540008083E0910E01F0910F0190818091CB0179
-:10355000892B8083E0910E01F0910F019081809181
-:10356000CA01892B80838091B901882361F0E091A1
-:103570000E01F0910F019081892B80830E94891A9E
-:1035800081111092B90180910E0190910F010C945C
-:10359000060FCF92DF92EF92FF926C01EE24FF2490
-:1035A000C114D104E104F10421F0C701B60120E106
-:1035B00001C020E0C72ED82EE92EFF24C114D1046B
-:1035C000E104F10419F0285FC701B6016B017C0129
-:1035D00054E0F694E794D794C7945A95D1F7C11460
-:1035E000D104E104F10419F02C5FC701B6016B01AD
-:1035F0007C0142E0F694E794D794C7944A95D1F7BA
-:10360000C114D104E104F10419F02E5FC701B60121
-:10361000DC01CB01B695A79597958795892B8A2BC9
-:103620008B2B09F02F5F822FFF90EF90DF90CF90D0
-:1036300008958091E401843021F11092CE0120E4BC
-:1036400088E190E00FB6F894A895809360000FBED3
-:103650002093600080E00E94F30783B7817F84603D
-:1036600083BF83B7816083BF7894889583B78E7F4B
-:1036700083BF88E10FB6F8948093600010926000D9
-:103680000FBE089508950895CF930E94421B0E9493
-:1036900023040E94431BC0E08C2F0E94110581115E
-:1036A00004C0CF5FCE30C1F701C081E0CF91089553
-:1036B0000E948A140E94FA0E0C94F30782E084BDE3
-:1036C00093E095BD9AEF97BD80936E0008952FB754
-:1036D000F8948091CF019091D001A091D101B09147
-:1036E000D2012FBF0895CF92DF92EF92FF920F93F6
-:1036F0001F932FB7F8944091CF015091D001609162
-:10370000D1017091D2012FBF6A017B01EE24FF2409
-:103710008C0120E030E0C016D106E206F30610F47A
-:10372000415051099A01281B390BC9011F910F9172
-:10373000FF90EF90DF90CF9008951F920F920FB6F9
-:103740000F9211248F939F93AF93BF938091CF01DA
-:103750009091D001A091D101B091D2010196A11D0B
-:10376000B11D8093CF019093D001A093D101B0936C
-:10377000D201BF91AF919F918F910F900FBE0F908B
-:103780001F9018950E94F70BF8942FEF87EA91E6A7
-:10379000215080409040E1F700C0000087E090EBAE
-:1037A000DC018093EE019093EF01A093F001B093C0
-:1037B000F1019CE088E10FB6F894A8958093600031
-:1037C0000FBE90936000FFCFEF92FF920F931F9375
-:1037D000CF93DF93D82FC0E08C2F0E94110500E01B
-:1037E00010E0E82EF12CC701002E02C095958795B8
-:1037F0000A94E2F780FD06C00F5F1F4F06301105E7
-:1038000091F709C0602F7C2F80E00E941905D81322
-:10381000F3CF81E004C0CF5FCE30F1F680E0DF91DE
-:10382000CF911F910F91FF90EF900895CF93C82FE4
-:103830008CE20E94E41B882321F08C2FCF910C9402
-:10384000E41B80E0CF910895CF930E946B1D8111FE
-:1038500002C00E94511DC5E6C15049F00E942304D8
-:103860008FE39CE90197F1F700C00000F5CF89E2F2
-:103870000E94161C811113C18AE20E94161C81113C
-:103880000E94511D85E00E94161C81110E94C21BDE
-:103890000E94761D8093CD0187E00E94161C88232C
-:1038A000A9F18BE10E94161C882351F08091CD0173
-:1038B00081FB222720F991E0922790FB81F90EC02D
-:1038C0008EE00E94161C882361F08091CD0182FB5E
-:1038D000222720F991E0922790FB82F98093CD0175
-:1038E00015C080E10E94161C9091CD01882341F003
-:1038F00093FB222720F981E0822780FB93F904C003
-:10390000892F809580FB90F99093CD018091CD0116
-:103910000E947A1D0E94881D8093ED0180EE0E9416
-:10392000161C882341F08091ED01982F909590FB13
-:1039300080F98093ED0189E30E94161C882359F0D9
-:103940008091ED0181FB222720F991E0922790FBE5
-:1039500081F98093ED0182EE0E94161C882359F0B4
-:103960008091ED0182FB222720F991E0922790FBC4
-:1039700082F98093ED0186EE0E94161C882359F08F
-:103980008091ED0183FB222720F991E0922790FBA3
-:1039900083F98093ED0183EE0E94161C882359F071
-:1039A0008091ED0184FB222720F991E0922790FB82
-:1039B00084F98093ED0185E30E94161C882359F059
-:1039C0008091ED0185FB222720F991E0922790FB61
-:1039D00085F98093ED0181E30E94161C882359F03C
-:1039E0008091ED0186FB222720F991E0922790FB40
-:1039F00086F98093ED0181E10E94161C882359F01D
-:103A00008091ED0187FB222720F991E0922790FB1E
-:103A100087F98093ED018091ED010E948C1D8091CA
-:103A2000ED0187FB882780F980930D0187E20E94D2
-:103A3000161CC82F8EE10E94161C8111C2608FE1F6
-:103A40000E94161C8111C46080E20E94161C811124
-:103A5000C86081E20E94161C8111C06182E20E944E
-:103A6000161C8111C06283E20E94161C8111C06481
-:103A700084E20E94161C882311F0C06802C0CC2387
-:103A800029F08C2F0E94831D6C2F03C00E947F1D84
-:103A9000682F70E080E090E0CF910C944618CF91B1
-:103AA00008956DEE7EEF80E090E00E94BD2360E01F
-:103AB00082E090E00E94AB2360E083E090E00E940F
-:103AC000AB2360E084E090E00E94AB2360E085E0FF
-:103AD00090E00C94AB2380E090E00E94A52321E0CD
-:103AE0008D3E9E4F09F020E0822F089582E090E005
-:103AF0000C949D23682F82E090E00C94AB2383E02C
-:103B000090E00C949D23682F83E090E00C94AB230D
-:103B100084E090E00C949D23682F84E090E00C9466
-:103B2000AB238091D50180FF0BC06091130185E02C
-:103B3000689FB001112475956795759567952BC0A1
-:103B400081FF09C06091130185E0689FB0011124D5
-:103B50007595679520C082FF07C06091130185E0CD
-:103B6000689FB001112417C09091D6019923D1F01C
-:103B700060911201961788F72091130185E0289F24
-:103B800090011124929FA001939F500D112470E089
-:103B9000CA010E946F236038710540F461157105F8
-:103BA00039F002C065E070E0862F08958FE7089530
-:103BB00081E008958091D50180FF08C060911101D6
-:103BC00070E0759567957595679521C081FF06C072
-:103BD0006091110170E07595679519C082FF04C06E
-:103BE0006091110170E010C09091D6019923C1F04D
-:103BF000609110019617A0F780911101899FC00173
-:103C0000112470E00E946F236038710528F461155B
-:103C1000710521F0862F08958FE7089581E00895BA
-:103C200061E070E0F4CF803F21F40E94911D819506
-:103C300004C0813F29F40E94911D8093D901089509
-:103C4000823F21F40E94911D819504C0833F29F495
-:103C50000E94911D8093D8010895893F19F40E9414
-:103C6000DA1D05C08A3F31F40E94DA1D81958093E8
-:103C7000DA0108958B3F21F40E94DA1D819504C07A
-:103C80008C3F29F40E94DA1D8093DB010895843F64
-:103C900021F48091D701816017C0853F21F4809184
-:103CA000D701826011C0863F21F48091D7018460E2
-:103CB0000BC0873F21F48091D701886005C0883F01
-:103CC00031F48091D70180618093D70108958D3FB1
-:103CD00021F48091D50181600BC08E3F21F4809149
-:103CE000D501826005C08F3F29F48091D5018460A1
-:103CF0008093D5010895803F39F48091D90187FFE1
-:103D00006CC01092D90169C0813F29F48091D9011A
-:103D10001816BCF362C09091D801823F29F497FF36
-:103D20005CC01092D80159C0833F19F41916CCF326
-:103D300054C0893F41F48091DA0118160CF04DC04F
-:103D40001092DA014AC08A3F29F48091DA0187FF94
-:103D500044C0F6CF8B3F39F48091DB0187FF3DC033
-:103D60001092DB013AC08C3F29F48091DB011816D8
-:103D7000BCF333C0843F21F48091D7018E7F17C0FC
-:103D8000853F21F48091D7018D7F11C0863F21F4BA
-:103D90008091D7018B7F0BC0873F21F48091D701A1
-:103DA000877F05C0883F31F48091D7018F7E809353
-:103DB000D70113C08D3F21F48091D5018E7F0BC0B8
-:103DC0008E3F21F48091D5018D7F05C08F3F29F46E
-:103DD0008091D5018B7F8093D5018091D80181118D
-:103DE0000EC08091D90181110AC08091DA01811140
-:103DF00006C08091DB01811102C01092D6010895A6
-:103E000087ED91E00E94110F0E94671B9093D401EF
-:103E10008093D30108951F93CF93DF938091D301B3
-:103E20009091D4010E94731BAC019091D60199230B
-:103E300021F02091140130E006C0209115018AE0A4
-:103E4000289F900111244217530708F486C08091DF
-:103E5000D801C091D901D091DA011091DB01811113
-:103E600007C0C11176C0D11174C0111172C075C0E4
-:103E70009F3F19F09F5F9093D601181624F40E947B
-:103E8000911D8093D8018091D80187FF05C00E94C1
-:103E9000911D81958093D8011C1624F40E94911DD8
-:103EA0008093D9018091D90187FF05C00E94911D9F
-:103EB00081958093D9016091D801662339F1C09131
-:103EC000D901CC2319F1772767FD7095872F972F9C
-:103ED0000E94802223E333E343E35FE30E94E42272
-:103EE0000E944D226093D8016C2F772767FD709553
-:103EF000872F972F0E94802223E333E343E35FE37E
-:103F00000E94E4220E944D226093D9011D1624F4E0
-:103F10000E94DA1D8093DA018091DA0187FF05C0E3
-:103F20000E94DA1D81958093DA01111624F40E9413
-:103F3000DA1D8093DB018091DB0187FF05C00E94C1
-:103F4000DA1D81958093DB01DF91CF911F910C9455
-:103F5000001F9F3F09F08ECF96CFDF91CF911F9129
-:103F60000895E7EDF1E085E0DF011D928A95E9F71C
-:103F70001092D6011092D5010895833081F128F472
-:103F8000813059F08230D1F00895853009F449C06C
-:103F9000B8F1863009F456C0089580911501262F96
-:103FA00030E0280F311D2F3F310524F4680F609356
-:103FB000150108958FEF80931501089580911401E4
-:103FC000262F30E0280F311D2F3F310524F4680FD4
-:103FD0006093140108958FEF8093140108958091E8
-:103FE0001301262F30E0280F311D2F3F310524F417
-:103FF000680F6093130108958FEF80931301089564
-:1040000080911201262F30E0280F311D2F3F3105FE
-:1040100024F4680F6093120108958FEF80931201CA
-:10402000089580911101262F30E0280F311D2F3F78
-:10403000310524F4680F6093110108958FEF809388
-:104040001101089580911001262F30E0280F311DB5
-:104050002F3F310524F4680F6093100108958FEF0E
-:10406000809310010895833011F128F4813049F0D4
-:10407000823091F00895853081F120F18630C1F1D0
-:10408000089580911501681720F4861B809315010F
-:10409000089510921501089580911401681720F475
-:1040A000861B809314010895109214010895809145
-:1040B0001301681720F4861B809313010895109252
-:1040C0001301089580911201681720F4861B8093D4
-:1040D000120108951092120108958091110168173C
-:1040E00020F4861B80931101089510921101089508
-:1040F00080911001681720F4861B809310010895A9
-:104100001092100108950F931F938D3109F46BC025
-:1041100008F03FC08E3009F47FC0C0F4873009F446
-:1041200069C068F4863009F0B1C08091CD01817F0B
-:104130008E7F8093CD0181E08093DD01A8C088301F
-:1041400009F4A2C08B3009F49FC0A0C0863109F4E5
-:104150009BC078F4803109F472C0813109F096C0B7
-:104160000E948A1490910D0181E0892780930D01AE
-:104170008BC0893109F488C08B3109F087C08091E8
-:10418000CD0181FB222720F991E0922790FB81F954
-:104190004CC0853309F470C048F4873209F46CC010
-:1041A00008F459C0893209F467C070C0833438F408
-:1041B0008A3308F04EC0883309F466C067C0833480
-:1041C00009F45AC0883409F061C00E948A140FEFC4
-:1041D00013ED20E3015010402040E1F700C0000043
-:1041E0000E94C21B51C00E9407220E94FA0E0E9428
-:1041F000F3074AC09091CD01892F8095817080FB93
-:1042000090F929F0966098609093CD0140C0997F15
-:10421000977F9093CD0138C08091CD0182FB2227FA
-:1042200020F991E0922790FB82F98093CD019923A8
-:1042300059F18091CD0181608093CD0125C080919D
-:10424000CD0183FB222720F991E0922790FB83F98F
-:10425000ECCF895301C08D5141E050E060E070E047
-:104260008A019B0104C0000F111F221F331F8A9572
-:10427000D2F7C901B80104C061E070E080E090E0CD
-:104280000E9446180E948A1481E001C080E01F91BC
-:104290000F91089580E0089580E00895CF93C82F8E
-:1042A0008091DD01813079F018F08230E9F187C02A
-:1042B000E0910E01F0910F018081813169F082322D
-:1042C00009F07FC009C0E0910E01F0910F018081DB
-:1042D000813111F0823261F48C2F0E944A218111C8
-:1042E00004C08C2F0E9483201DC081E090E01AC082
-:1042F0008C2F0E944C21811114C0C43179F048F4F4
-:10430000CB3079F0C03109F060C082E08093DD01EC
-:1043100008C0C93219F0C83321F057C01092DD012E
-:1043200054C081E0817053C0C93289F118F5C4319D
-:1043300071F1A8F4C73009F046C08AE080931501F6
-:1043400094E19093140193E09093130180931201F0
-:1043500088E08093110188E28093100134C0CE512F
-:10436000C63088F5EC2FF0E0E65DFE4F808180934B
-:10437000DC0129C0CE34E9F020F4CB3421F56AE029
-:1043800013C0C13579F0C235F1F461E00DC0809100
-:10439000DC01882319F01092DC0115C081E08093C4
-:1043A000DD0115C061E006C08091DC010E94BD1FE7
-:1043B0000AC06AE08091DC010E94332004C01092A0
-:1043C000DD0180E004C081E002C080E0ABCFCF918E
-:1043D0000895E1E8F0E080818860808380818160D9
-:1043E00080838FB7F89493E09093890090ED909339
-:1043F00088008FBF0895EFE6F0E0808182608083BF
-:104400000895EFE6F0E080818D7F80830895EFE6E8
-:10441000F0E0908182E08927808308951F920F92B7
-:104420000FB60F9211242F933F934F935F936F9387
-:104430007F938F939F93AF93BF93EF93FF9380915D
-:10444000DE019091DF0101969093DF018093DE0100
-:10445000811103C082E00E94F307E091DF01E6953D
-:10446000E695F0E0E657FB4FE4918091DE018E1374
-:1044700003C080E00E94F307FF91EF91BF91AF91DD
-:104480009F918F917F916F915F914F913F912F916C
-:104490000F900FBE0F901F90189504D06894B11123
-:1044A0008DC0089570D088F09F5790F0B92F99274C
-:1044B000B751A0F0D1F0660F771F881F991F1AF02F
-:1044C000BA95C9F712C0B13081F077D0B1E0089544
-:1044D00074C0672F782F8827B85F39F0B93FCCF3C5
-:1044E000869577956795B395D9F73EF49095809525
-:1044F000709561957F4F8F4F9F4F0895E89409C045
-:1045000097FB3EF490958095709561957F4F8F4F06
-:104510009F4F9923A9F0F92F96E9BB279395F6951C
-:10452000879577956795B795F111F8CFFAF4BB0F9A
-:1045300011F460FF1BC06F5F7F4F8F4F9F4F16C0FE
-:10454000882311F096E911C0772321F09EE8872F88
-:10455000762F05C0662371F096E8862F70E060E044
-:104560002AF09A95660F771F881FDAF7880F9695BD
-:10457000879597F9089557FD9058440F551F59F0A6
-:104580005F3F71F04795880F97FB991F61F09F3F40
-:1045900079F087950895121613061406551FF2CF69
-:1045A0004695F1DF08C0161617061806991FF1CFB9
-:1045B00086957105610508940895E894BB276627E0
-:1045C0007727CB0197F908950BD078C069D028F0F0
-:1045D0006ED018F0952309F05AC05FC01124EECFB9
-:1045E000CADFA0F3959FD1F3950F50E0551F629F4E
-:1045F000F001729FBB27F00DB11D639FAA27F00D3C
-:10460000B11DAA1F649F6627B00DA11D661F829F62
-:104610002227B00DA11D621F739FB00DA11D621F47
-:10462000839FA00D611D221F749F3327A00D611D64
-:10463000231F849F600D211D822F762F6A2F112446
-:104640009F5750408AF0E1F088234AF0EE0FFF1F99
-:10465000BB1F661F771F881F91505040A9F79E3FD0
-:10466000510570F014C0AACF5F3FECF3983EDCF325
-:10467000869577956795B795F795E7959F5FC1F70D
-:10468000FE2B880F911D9695879597F9089597F9B8
-:104690009F6780E870E060E008959FEF80EC0895E8
-:1046A00000240A9416161706180609060895002411
-:1046B0000A9412161306140605060895092E03948B
-:1046C000000C11F4882352F0BB0F40F4BF2B11F4FF
-:1046D00060FF04C06F5F7F4F8F4F9F4F089597FB20
-:1046E000072E16F4009407D077FD09D00E94892385
-:1046F00007FC05D03EF4909581959F4F08957095E5
-:1047000061957F4F0895EE0FFF1F0590F491E02D06
-:104710000994AA1BBB1B51E107C0AA1FBB1FA61708
-:10472000B70710F0A61BB70B881F991F5A95A9F75A
-:1047300080959095BC01CD010895F999FECF92BD69
-:1047400081BDF89A992780B50895A8E1B0E042E0CC
-:1047500050E00C94C523262FF999FECF92BD81BD60
-:10476000F89A019700B4021639F01FBA20BD0FB6AF
-:10477000F894FA9AF99A0FBE08950196272F0E948D
-:10478000AC230C94AB23DC01CB01FC01F999FECFE7
-:1047900006C0F2BDE1BDF89A319600B40D924150C9
-:0A47A0005040B8F70895F894FFCFD9
-:1047AA002002F507830860082C08F8070101BA01FE
-:1047BA0028080A03140A3F4D36394B04FE03C8037E
-:1047CA008F0322033B0354036D030102030405060E
-:0447DA0007080900C3
+:100000000C94D3020C9417030C9417030C9417034D
+:100010000C9417030C9417030C9417030C941703F8
+:100020000C9417030C9417030C94CF0D0C94A10E91
+:100030000C9417030C9417030C9417030C941703D8
+:100040000C9417030C94AB220C9417030C94170315
+:100050000C9417030C943E1C0C9417030C94170378
+:100060000C9417030C9417030C9417030C941703A8
+:100070000C9417030C9417030C9417030C94170398
+:100080000C9417030C9417030C9417030C94170388
+:100090000C9417030C9417030C9417030C94170378
+:1000A0000C9417030C9417030C9417030E0F300FC6
+:1000B0001E10300F1E10750F980F1E10ED0F001040
+:1000C000CF12CF12FE12FE1234135413851485146E
+:1000D0005F1385140F140F147614851485147F1480
+:1000E0001C141C141C141C141C141C141C141C1490
+:1000F0001C141C141C141C141C141C141C141C1480
+:100100002E143B14421449145314750A01E2012CB5
+:10011000022C02E2746401160216010402040109B1
+:1001200002090104020401150215010C020C012848
+:10013000022800750A01E2012C022C02E27464011B
+:10014000170217010802080115021501100210011B
+:100150000C020C0111021101040204010F020F0133
+:1001600028022800750A01E2012C022C02E27464C4
+:100170000105020501050205010802080107020741
+:10018000010C020C011702170128022800750A0150
+:10019000E30116021602E301E3012B022B02E30145
+:1001A000E30115021502E300750A01E301160216C8
+:1001B00002E301E3012B022B02E3000000F0A12E79
+:1001C000004C002A00E100E00000001E00140004C2
+:1001D000001D00E200E2001F001A0016001B00E3F1
+:1001E000002A00200008000700060050002C002113
+:1001F000001500090019004F004B00220017000AEB
+:1002000000050000003500015401520000E3000029
+:10021000003400015401520000E3000000290023D3
+:10022000001C000B00110000002A00240018000D23
+:1002300000100052004E0025000C000E0036005148
+:10024000002800260012000F0037002F002B002787
+:10025000001300334238713000E0002D00310034CB
+:1002600078E5002C00000001000100010001000100
+:100270000000003A002F0036020100010001003B9F
+:1002800000300037020100010001003C002F02266F
+:10029000020100010001003D0030022702010001BF
+:1002A0000001003E003402340001000000010001A2
+:1002B0000001000000010000000100010001000039
+:1002C000000100000001003F0038002D0024020062
+:1002D0000001004000240021001E0027004A0041C8
+:1002E00000250022001F00370001004200260023E5
+:1002F00000200050000100430025022E022E004F76
+:10030000004D004400450001000100010000000113
+:10031000000100010001000100000069000100016E
+:10032000000100010001006A000100043001000129
+:1003300000010001004B004E00010001000100011E
+:100340000001300100010001004A000100033001FA
+:100350000002300000010001000100000001000067
+:100360000001001408010000000100000001001A53
+:100370000830082F082C0200000100350A520C50EA
+:10038000002C00A9000100350852005100AC00AA61
+:100390000019080100510C4F00AB00A8000608012D
+:1003A0000001000100010001001B08A5000100AED2
+:1003B0000001000100000016034500720067006F95
+:1003C0000044006F007800200045005A000000162D
+:1003D000034500720067006F0044006F0078002042
+:1003E0000045005A0000000403090409026D0004DE
+:1003F0000100A0FA09040000010301010009211114
+:10040000010001223F000705810308000A090401D9
+:10041000000103010200092111010001224D000722
+:1004200005820308000A0904020001030000000914
+:1004300021110100012236000705830308000A0983
+:100440000403000103000000092111010001223909
+:1004500000070584031000011201100100000008CC
+:10046000EDFE071301000102000105010906A101CB
+:10047000050719E029E71500250195087501810296
+:100480000508190129059505750191029501750366
+:100490009101050719002977150025019578750147
+:1004A0008102C005010980A101850216010026B75D
+:1004B000001A01002AB700751095018100C0050CD3
+:1004C0000901A1018503160100269C021A01002AD8
+:1004D0009C02751095018100C005010902A1010966
+:1004E00001A10005091901290515002501950575CA
+:1004F000018102950175038101050109300931155A
+:1005000081257F95027508810609381581257F951B
+:100510000175088106050C0A38021581257F9501B1
+:1005200075088106C0C005010906A101050719E08B
+:1005300029E71500250195087501810295017508C7
+:10054000810105081901290595057501910295019B
+:10055000750391010507190029FF150025FF950670
+:1005600075088100C00000000000000000000000CD
+:10057000010204060A0F17202C3A4A5D71879DB3C9
+:10058000C7DAE9F5FCFFFCF5E9DAC7B39D87715DD1
+:100590004A3A2C20170F0A0604020100000000004E
+:1005A00000000000000011241FBECFEFDAE0DEBF24
+:1005B000CDBF04B603FE24C08091FB019091FC01E5
+:1005C000A091FD01B091FE018730904BA740B04B48
+:1005D000B9F41092FB011092FC011092FD011092EF
+:1005E000FE0114BE84B7877F84BF88E10FB6F894FC
+:1005F00080936000109260000FBEE0E0FFE3099579
+:1006000011E0A0E0B1E0E4EEF8E402C005900D9244
+:10061000A433B107D9F711E0A4E3B1E001C01D9202
+:10062000AB3FB107E1F70E94130B0C9470240C94BC
+:100630000000FC016230B9F028F4662341F061301B
+:1006400061F023C06330A9F06430C9F01EC082811C
+:100650008823D9F088EA91E0089582818823A9F05F
+:100660008DE891E008958281882379F084E691E015
+:1006700008958281882349F083E391E0089582817F
+:10068000882319F08AE091E0089580E090E00895D1
+:1006900008956091BD017091BE018091BF0190915C
+:1006A000C0010E94701B56985E9825982D98269838
+:1006B0002E9827982F98813019F0823021F00895D4
+:1006C000259A2D9A0895269A2E9A08950C944903F6
+:1006D00056985E9825982D9826982E9827982F98AA
+:1006E0008FEF90E0909389008093880090938B0027
+:1006F00080938A0090938D0080938C00259A2D9A88
+:100700002FEF80E792E0215080409040E1F700C059
+:100710000000269A2E9A2FEF80E792E02150804029
+:100720009040E1F700C00000279A2F9A2FEF80E752
+:1007300092E0215080409040E1F700C000002598F1
+:100740002D982FEF80E792E0215080409040E1F714
+:1007500000C0000026982E982FEF80E792E02150ED
+:1007600080409040E1F700C0000027982F985698ED
+:100770005E9825982D9826982E9827982F9808955A
+:1007800089EA8093800089E08093810024982C98E6
+:100790003F988AB18F748AB96E98479A8BB1806BF3
+:1007A0008BB9769A0E9468030C94480380E2809388
+:1007B00000018091340181110EC00E94250481E066
+:1007C000809334012FEF83ED90E3215080409040DF
+:1007D000E1F700C0000080E40E942B048093000138
+:1007E00081112EC00E94550480930001811128C000
+:1007F0000E94550480930001811122C08FE30E9462
+:1008000055048093000181111BC00E944D0480E4B7
+:100810000E942B0480930001811112C08CE00E9481
+:1008200055048093000181110BC00E9455048093F0
+:100830000001811105C08FE30E94550480930001DF
+:100840000E944D048091000108951092B9008AE041
+:100850008093B800089594EA9093BC009091BC00F6
+:1008600097FFFCCF9091B900987F983021F090319C
+:1008700011F081E008958093BB0084E88093BC0070
+:100880008091BC0087FFFCCF8091B900887F8831C0
+:1008900011F0803471F780E0089584E98093BC0002
+:1008A0008091BC0084FDFCCF08958093BB0084E858
+:1008B0008093BC008091BC0087FFFCCF9091B90071
+:1008C000987F81E0983209F480E0089584E880936D
+:1008D000BC008091BC0087FFFCCF8091BB000895D5
+:1008E00080910001811115C080E40E942B04809347
+:1008F000000181110CC082E10E9455048093000127
+:10090000811105C08FEF0E945504809300010E9461
+:100910004D0484B1807F84B985B1807F85B98AB167
+:10092000837F8AB98BB1837F8BB93E9846980895AF
+:100930000E94D603809300010E94700480B38C70E3
+:1009400080BB81B3836F81BBA6E3B1E0E4E4F1E057
+:100950008EE08E0F11921D928E13FCCF0C94C0036B
+:10096000BF92CF92DF92EF92FF920F931F93CF939C
+:10097000DF9380910001882379F0809135018F5FAA
+:1009800080933501811108C00E94D6038093000135
+:10099000811102C00E94680306E311E0C0E0D0E0CC
+:1009A000DD24D39482E0C82EEE24E394F12CC730EA
+:1009B000D10500F580910001811164C080E40E949E
+:1009C0002B0480930001811112C082E10E94550422
+:1009D0008093000181110BC0C7010C2E01C0880F4C
+:1009E0000A94EAF780950E945504809300010E94C2
+:1009F0004D0448C0CA30A1F028F4C83059F0C930BD
+:100A000061F005C0CC3089F070F0CD3089F0209ACB
+:100A1000289810C0219A29980DC0229A2A980AC0B5
+:100A2000239A2B9807C0529A01C0539A5B9802C030
+:100A30003E9A469890EA9A95F1F79FB1799902C04B
+:100A400082E001C080E091709D25982B7C9902C0C6
+:100A500084E001C080E0892B7D9902C038E001C0AC
+:100A600030E0832B7E9902C020E101C020E0822B80
+:100A70009FB19095991F9927991F9295990F907EF4
+:100A8000892B0FC080910001811149C080E40E9430
+:100A90002B0480930001882379F1B12C0E944D042E
+:100AA0008B2DF8019081981719F08083C092010175
+:100AB0000E94700421960F5F1F4FCE30D10509F0C0
+:100AC00076CF80910101882361F1815080930101EB
+:100AD000882339F08FE99FE00197F1F700C000000B
+:100AE00020C0A4E4B1E0E6E3F1E0CF01825F9191A0
+:100AF0009D938E13FCCF15C083E10E945504809313
+:100B000000018111CACF81E40E942B04809300016F
+:100B10008111C3CF0E946604B82EB094BFCF80E08D
+:100B2000C0CF0E94660381E0DF91CF911F910F91AA
+:100B3000FF90EF90DF90CF90BF900895E82FF0E006
+:100B4000EC5BFE4F8081089508950F931F93CF9320
+:100B5000DF93C4E4D1E010E00C2F025F899190E0B4
+:100B60000E94641B180F0C13F9CF812FDF91CF91D6
+:100B70001F910F91089581E0089508950F931F9399
+:100B8000CF93DF938C01FC01C081D181CE010E9403
+:100B9000E919BE010E946106EC01F80182818823F7
+:100BA00009F44AC080915D0181111FC0C431F0E594
+:100BB000DF0709F051C00E94BD0581E080935D010F
+:100BC0000E94081C90935C0180935B011092540179
+:100BD000109256011092550110925801109257012F
+:100BE00010925A011092590165C080915B01909159
+:100BF0005C010E94141C883C910570F480915401A2
+:100C0000E82FF0E0EE0FFF1FEB5AFE4FD183C083B9
+:100C10008F5F809354014EC0C43880E5D80721F01F
+:100C2000C538D04501F13AC0F8018281882341F0EE
+:100C30001092520182E01EC0C438E0E5DE0759F58B
+:100C400080915201811106C086E20E94731186E2F2
+:100C50000E943B1282E01CC0C438F0E5DF0741F37C
+:100C6000C538D045D9F4F8018281882331F010923B
+:100C7000530180E20E948A121DC0809153018111AC
+:100C800006C087E20E94731187E20E943B1280E255
+:100C90000E9491120FC0C538D04529F381E080939E
+:100CA000520180935301C801DF91CF911F910F91A1
+:100CB0000C94BB0580E0DF91CF911F910F910895B7
+:100CC000089596E0799FF001112494E5899FE00D45
+:100CD000F11D1124E60FF11DEE0FFF1FE154FE4F31
+:100CE000859194910895880F991FFC01E55CFF4F51
+:100CF000859194910895880F991FFC01E554FE4F4A
+:100D00008591949108950F931F93CF93DF93EC01F6
+:100D10008115904350F5C11580E2D80708F0C3C093
+:100D2000CB3BD10590F4C83AD10508F06AC0C53A6A
+:100D3000D10508F05BC0C430D10508F0D0C12197BF
+:100D400009F0CAC101E010E00AC2CF3FD10511F09D
+:100D500008F0C5C1C03FD10508F0A2C0CE01805E39
+:100D60009109089708F4BBC1B7C1C13090E5D90714
+:100D700009F4A2C020F5C0318FE4D80770F4C11582
+:100D800090E4D90708F094C0C11521E3D20708F018
+:100D9000A3C1DD278E01106CE2C1C115D04509F059
+:100DA0009BC10E94F0148FEF94E32CE0815090409F
+:100DB0002040E1F700C000000E94631CD0C1C115B3
+:100DC00097E5D90758F4C03121E5D20708F01CC1D6
+:100DD000C43180E5D80708F475C07EC1CE019057B4
+:100DE0008115904108F078C1DF7073C1C53AD10513
+:100DF00009F477C1C63AD10509F076C102E810E4DA
+:100E0000AEC1C83AD10509F472C1C93AD10509F495
+:100E100071C1CA3AD10509F470C1CB3AD10509F4C0
+:100E20006FC1CC3AD10509F46EC1CD3AD10509F4B0
+:100E30006DC1C03BD10509F46CC1CE3AD10509F4AE
+:100E40006BC1CF3AD10509F46AC1C13BD10509F4A0
+:100E500069C1C23BD10509F468C1C33BD10509F49E
+:100E600067C1C43BD10509F466C1C53BD10509F48E
+:100E700065C1C63BD10509F464C1C73BD10509F47E
+:100E800063C1C83BD10509F462C1C93BD10509F46E
+:100E900061C1CA3BD10509F460C100E014E45FC13F
+:100EA0008E0110655CC1CE019F700E947B0658C107
+:100EB000DF708E01106A53C18091DA0181608093E6
+:100EC000DA014DC10E94081E811102C00E94EE1D70
+:100ED0000E94251E90E09093FB018093FA01C2309E
+:100EE00080E5D80721F48091FA01816086C0C43082
+:100EF00090E5D90721F48091FA0182607EC0C63066
+:100F000020E5D20721F48091FA01846076C0C830D0
+:100F100080E5D80719F48091FA0127C0CA3090E51E
+:100F2000D90721F48091FA01806167C0CC3020E5B7
+:100F3000D20721F48091FA0180625FC0CE3080E553
+:100F4000D80721F48091FA01806457C0C03190E540
+:100F5000D90721F48091FA0180684FC0C23120E5A1
+:100F6000D20729F48091FA018460886046C0C330BA
+:100F700080E5D80721F48091FA018E7F3EC0C5300C
+:100F800090E5D90721F48091FA018D7F36C0C730F2
+:100F900020E5D20721F48091FA018B7F2EC0C93061
+:100FA00080E5D80719F48091FA0126C0CB3090E58E
+:100FB000D90721F48091FA018F7E1FC0CD3020E542
+:100FC000D20721F48091FA018F7D17C0CF3080E5E0
+:100FD000D80721F48091FA018F7B0FC0C13190E5D1
+:100FE000D90721F48091FA018F7707C0C331D0452A
+:100FF00031F48091FA018B7F877F8093FA01809191
+:10100000FA010E94291EABC08D2F99278F70992756
+:1010100081309105D9F49E012370332702C0880FD7
+:10102000991F2A95E2F79C688E0144E0000F111F7A
+:101030004A95E1F700271370802B912B53E0CC0FDA
+:10104000DD1F5A95E1F7C076DD272FC0823091056C
+:1010500031F4DC2FCC278E01016F106A80C0833001
+:10106000910569F4CE018370992701E010E002C078
+:10107000000F111F8A95E2F7C8019C680FC08430E9
+:101080009105B9F4CE018370992701E010E002C008
+:10109000000F111F8A95E2F7C8019A6823E0CC0F70
+:1010A000DD1F2A95E1F7C07ED7708C010C2B1D2B1C
+:1010B00056C08530910531F4DC2FCC278E01046FAA
+:1010C000106A4DC0069709F04AC0CF71DD27DC2FAA
+:1010D000CC278E01106243C000E010E040C08E01BA
+:1010E0003EC001E810E43BC003E810E438C002EE63
+:1010F00014E435C009EE14E432C00AEE14E42FC043
+:1011000005EB14E42CC006EB14E429C007EB14E44F
+:1011100026C00CEC14E423C00DEC14E420C003E85A
+:1011200015E41DC00AE815E41AC002E915E417C069
+:1011300004E915E414C001E216E411C003E216E468
+:101140000EC004E216E40BC005E216E408C006E295
+:1011500016E405C007E216E402C00AE216E4C8017C
+:10116000DF91CF911F910F91089596E0799FF00143
+:10117000112494E5899FE00DF11D1124E60FF11D66
+:10118000EE0FFF1FE154FE4F85919491803E910533
+:10119000E0F4803C910558F58133910509F46FC066
+:1011A00048F48932910509F463C08A32910509F443
+:1011B0006DC072C089339105E9F082389105D1F094
+:1011C0008533910509F44DC067C0833E910581F1D7
+:1011D00038F4803E9105B9F0823E9105D9F05CC0AB
+:1011E000863E910561F1873E9105A1F155C00E94AF
+:1011F000730608952091FA0120FD02C021FF4CC022
+:1012000080EE90E049C08091FA0180FFF9CF89E338
+:1012100090E042C08091FA0182FF0EC08091FA01F5
+:1012200084FF03C080E090E037C083EE90E034C0DC
+:101230008091FA0182FFF2CF82EE90E02DC0809182
+:10124000FA0183FF0BC08091FA0184FDEBCF87EE9A
+:1012500090E022C08091FA0183FFF5CF86EE90E006
+:101260001BC08091FA0185FF07C089E290E014C09D
+:101270008091FA0185FFF9CF85E390E00DC0809160
+:10128000FA0186FF07C08AE290E006C08091FA0169
+:1012900086FFF9CF81E390E00E94830608950895C8
+:1012A0000C944F0980916E010895CF93DF9300D085
+:1012B0001F92CDB7DEB79C018091F101843019F502
+:1012C00093E099833B832A839093E9008FEF909179
+:1012D000E800815095FD06C095ED9A95F1F7000064
+:1012E0008111F5CF8091E80085FF0DC040E050E00E
+:1012F00063E070E0CE0101960E94BF0B8091E80090
+:101300008E778093E8000F900F900F90DF91CF9130
+:101310000895CF93DF9300D01F92CDB7DEB7209111
+:10132000F101243021F522E029839B838A8383E025
+:101330008093E9008FEF9091E800815095FD06C001
+:1013400095ED9A95F1F700008111F5CF8091E800B5
+:1013500085FF0DC040E050E063E070E0CE010196F3
+:101360000E94BF0B8091E8008E778093E8000F9079
+:101370000F900F90DF91CF9108952091F1012430CB
+:10138000F1F422E02093E9002FEF3091E8002150A2
+:1013900035FD06C035ED3A95F1F700002111F5CF86
+:1013A0002091E80025FF0BC040E050E065E070E0D0
+:1013B0000E94BF0B8091E8008E778093E80008952B
+:1013C000CF93DF93EC019091F101943009F046C086
+:1013D00080910C018823D9F080910D018823B9F008
+:1013E0009093E9008FEF9091E800815095FD06C041
+:1013F00095E19A95F1F700008111F5CF8091E80011
+:1014000085FF2CC040E050E060E170E017C081E053
+:101410008093E9008FEF9091E800815095FD06C020
+:1014200095ED9A95F1F700008111F5CF8091E800D4
+:1014300085FF14C040E050E068E070E0CE010E94FB
+:10144000BF0B8091E8008E778093E80080E1FE0179
+:10145000AEE5B1E001900D928A95E1F7DF91CF9171
+:1014600008958091F001811109C00E94540D0E94DD
+:10147000B10D8091E20084608093E20008951092A3
+:10148000F001089508950C9498220E94F91B0E947F
+:101490009E220E9457100C94500942E061EC81E0BA
+:1014A0000E94CE0C42E061EC82E00E94CE0C42E051
+:1014B00061EC83E00E94CE0C42E161EC84E00C948C
+:1014C000CE0C8091F301833009F455C030F48130A3
+:1014D00071F0823009F48EC008958A3009F47AC020
+:1014E0008B3009F460C0893009F09CC020C0809125
+:1014F000F201813A09F096C08091E800877F8093DD
+:10150000E8008091F6019091F701892B21F460E1C8
+:101510008EE591E003C060E080E090E070E00E9422
+:101520000A0C8091E8008B778093E8000895809101
+:10153000F201813209F076C08091F6019091F701B5
+:10154000009719F0039709F06DC08091E800877F3C
+:101550008093E8008091E80082FD05C08091F10150
+:101560008111F8CF5FC08091F10080936E0180916E
+:10157000E8008B7753C08091F201813A09F052C0A4
+:101580008091F6019091F701892B09F04BC0809171
+:10159000E800877F8093E8008091E80080FFFCCF1F
+:1015A00080910C0136C08091F2018132D9F5809191
+:1015B000F6019091F701892BA9F58091E800877FCA
+:1015C0008093E8000E94030D8091F40180930C0148
+:1015D0000C94F0148091F201813221F58091E800A1
+:1015E000877F8093E8000E94030D8091F50180932E
+:1015F0006F0108958091F201813AA1F48091E80091
+:10160000877F8093E8008091E80080FFFCCF809185
+:101610006F018093F1008091E8008E778093E8005D
+:101620000C94030D089584B7877F84BF88E10FB6BB
+:10163000F89480936000109260000FBE90E080E804
+:101640000FB6F89480936100909361000FBE0E94E2
+:10165000A6100E94540D0E94B10D8091E20084609A
+:101660008093E20078940E9437100E94A81082E0D4
+:1016700091E00E9452100E9486228091F1018530F3
+:1016800069F40E94C01B8091EF018823B1F30E948E
+:10169000EB1B882391F30E94A90BEFCF0E94AE10A1
+:1016A000ECCF292F332723303105C9F064F42130E2
+:1016B000310581F02230310509F043C08DE690E01C
+:1016C0002BEE33E042C021323105F1F022323105F8
+:1016D00041F137C082E190E028E534E036C0992737
+:1016E0008130910541F08230910541F0892B49F517
+:1016F000E7EEF3E005C0EFECF3E002C0E7EBF3E068
+:10170000849190E09F0121C06430D8F4E62FF0E08E
+:10171000EE0FFF1FEE5DFE4F2081318189E090E0EA
+:1017200014C0643070F470E0FB01EE0FFF1FE65E42
+:10173000FE4F20813181FB01EA5EFE4F808190E007
+:1017400004C080E090E020E030E0FA0131832083A3
+:10175000089580E189BD82E189BD09B400FEFDCF15
+:101760008091D8008F7D8093D8008091E0008260C6
+:101770008093E0008091E00081FDFCCF0895CF923E
+:10178000DF92EF92FF920F931F93CF93DF93EC01C1
+:101790008B016A010E94220D811133C0C114D10452
+:1017A00039F0F60180819181081B190BC80FD91FF0
+:1017B000E12CF12C0115110519F18091E80085FD4E
+:1017C00016C08091E8008E778093E800C114D104A0
+:1017D00049F0F60180819181E80EF91EF182E082E4
+:1017E00085E00FC00E94220D882321F30AC0899151
+:1017F0008093F10001501109FFEFEF1AFF0ADACFD1
+:1018000080E0DF91CF911F910F91FF90EF90DF90DB
+:10181000CF9008952091F8013091F90126173707EC
+:1018200048F06115710539F42091E8002E77209376
+:10183000E80001C0B90140E061157105A9F12091EE
+:10184000F101222309F443C0253009F442C020915C
+:10185000E80023FD40C02091E80022FD32C0209125
+:10186000E80020FFE9CF4091F3002091F20030E042
+:10187000342BFC01CF016115710559F02830310579
+:1018800040F481918093F100615071092F5F3F4FC7
+:10189000F1CF41E02830310509F040E02091E80027
+:1018A0002E772093E800C8CF4111C9CF0AC080919C
+:1018B000F101882361F0853061F08091E80083FDBB
+:1018C0000AC08091E80082FFF2CF80E0089582E0B4
+:1018D000089583E0089581E008952091F801309102
+:1018E000F9012617370748F06115710539F4209181
+:1018F000E8002E772093E80001C0B901FC0120E048
+:101900006115710591F18091F101882309F440C0BE
+:10191000853009F43FC08091E80083FD3DC080918F
+:10192000E80082FD2FC08091E80080FFE9CF209180
+:10193000F3008091F20090E0922B6115710559F04F
+:101940008830910540F424912093F1003196615044
+:1019500071090196F2CF21E0089709F020E080910B
+:10196000E8008E778093E800CBCF2111CCCF0AC05E
+:101970008091F101882361F0853061F08091E80069
+:1019800083FD0AC08091E80082FFF2CF80E00895D5
+:1019900082E0089583E0089581E00895982F9730BC
+:1019A00058F59093E900981739F07091EC00209168
+:1019B000ED005091F00003C0242F762F50E021FF5E
+:1019C00019C03091EB003E7F3093EB003091ED0079
+:1019D0003D7F3093ED003091EB0031603093EB00B0
+:1019E0007093EC002093ED005093F0002091EE00F6
+:1019F00027FF07C09F5FD3CF8F708093E90081E0FE
+:101A0000089580E008958091F20187FF11C08091D0
+:101A1000E80082FD05C08091F1018111F8CF11C06D
+:101A20008091E8008B770BC08091F101882349F009
+:101A30008091E80080FFF8CF8091E8008E77809356
+:101A4000E80008952091E4003091E50095E640918A
+:101A5000EC00842F817040FF22C08091E80080FD5F
+:101A60001CC08091F101882391F0853091F0809124
+:101A7000EB0085FD10C04091E4005091E500421755
+:101A8000530729F39A01915011F784E0089582E0F9
+:101A9000089583E0089581E0089580E008954091DD
+:101AA000E80042FFDECF08950E94C20D0E94CA0DD9
+:101AB000E0EEF0E0808181608083E8EDF0E08081FD
+:101AC0008F77808319BCA7EDB0E08C918E7F8C93CB
+:101AD00080818F7E80831092F00108950F931F9371
+:101AE000CF93DF930E94C20D0E94CA0DC8EDD0E0D3
+:101AF00088818F77888388818068888388818F7DBB
+:101B0000888319BC1092F1011092ED011092EF013F
+:101B10001092EE0100EE10E0F80180818B7F80834F
+:101B200088818160888342E060E080E00E94CE0C82
+:101B3000E1EEF0E080818E7F8083E2EEF0E0808154
+:101B400081608083808188608083F80180818E7FBE
+:101B50008083888180618883DF91CF911F910F916D
+:101B60000895E8EDF0E080818F7E8083E7EDF0E07E
+:101B700080818160808384E082BF81E08093F00176
+:101B80000C946E0DE8EDF0E080818E7F80831092E2
+:101B9000E20008951092DA001092E10008951F9279
+:101BA0000F920FB60F9211242F933F934F935F9391
+:101BB0006F937F938F939F93AF93BF93EF93FF9315
+:101BC0008091E10082FF0BC08091E20082FF07C09C
+:101BD0008091E1008B7F8093E1000E94361080911C
+:101BE000DA0080FF1FC08091D80080FF1BC0809169
+:101BF000DA008E7F8093DA008091D90080FF0DC0DB
+:101C000080E189BD82E189BD09B400FEFDCF81E09C
+:101C10008093F1010E94310A05C019BC1092F101B4
+:101C20000E943F0A8091E10080FF19C08091E2008C
+:101C300080FF15C08091E2008E7F8093E20080914A
+:101C4000E20080618093E2008091D80080628093FE
+:101C5000D80019BC85E08093F1010E94430A80916D
+:101C6000E10084FF30C08091E20084FF2CC080E15D
+:101C700089BD82E189BD09B400FEFDCF8091D80005
+:101C80008F7D8093D8008091E1008F7E8093E1006A
+:101C90008091E2008F7E8093E2008091E20081607B
+:101CA0008093E2008091ED01882311F084E007C069
+:101CB0008091E30087FD02C081E001C083E0809352
+:101CC000F1010E94450A8091E10083FF29C08091C3
+:101CD000E20083FF25C08091E100877F8093E100CF
+:101CE00082E08093F1011092ED018091E1008E7FFE
+:101CF0008093E1008091E2008E7F8093E2008091EA
+:101D0000E20080618093E20042E060E080E00E94B7
+:101D1000CE0C8091F00088608093F0000E94420A0F
+:101D2000FF91EF91BF91AF919F918F917F916F91B3
+:101D30005F914F913F912F910F900FBE0F901F9089
+:101D400018951F920F920FB60F9211242F933F9365
+:101D50004F935F936F937F938F939F93AF93BF93B3
+:101D6000CF93DF93EF93FF93C091E900CF70809101
+:101D7000EC00D82FD17080FDD0E81092E90080915E
+:101D8000F000877F8093F00078940E94E50E109217
+:101D9000E9008091F00088608093F000CD2BCF7037
+:101DA000C093E900FF91EF91DF91CF91BF91AF9187
+:101DB0009F918F917F916F915F914F913F912F9163
+:101DC0000F900FBE0F901F9018951F93CF93DF9326
+:101DD000CDB7DEB7AA970FB6F894DEBF0FBECDBF62
+:101DE000E2EFF1E088E08E0F9091F10091938E1375
+:101DF000FBCF0E94610A8091E80083FF1FC18091A0
+:101E0000F2019091F301492F50E04A30510508F05A
+:101E100015C1FA01EA5AFF4F0C942024803881F052
+:101E2000823809F00BC18091F6018F708093E90030
+:101E30008091EB0085FB882780F91092E90006C0AD
+:101E40008091EE019091EF01911182609091E800F4
+:101E5000977F9093E8008093F1001092F100C8C042
+:101E6000282F2D7F09F0EAC0882319F0823061F015
+:101E7000E5C08091F401813009F0E0C0933009F0B1
+:101E800080E08093EF012BC08091F401811127C085
+:101E90008091F6018F7009F4D1C08093E900209100
+:101EA000EB0020FF1CC0933021F48091EB00806296
+:101EB00014C09091EB0090619093EB0021E030E032
+:101EC000A90102C0440F551F8A95E2F74093EA002A
+:101ED0001092EA008091EB0088608093EB001092F2
+:101EE000E9008091E800877F86C08111A7C010912A
+:101EF000F4011F778091E3008078812B8093E300C9
+:101F00008091E800877F8093E8000E94030D809114
+:101F1000E80080FFFCCF8091E30080688093E300BD
+:101F2000111102C082E001C083E08093F10186C0FC
+:101F30008058823008F082C08091F4019091F501C0
+:101F40008C3D53E0950779F583E08A838AE28983A3
+:101F50004FB7F894DE01139620E03EE051E2E32F04
+:101F6000F0E050935700E49120FF03C0E295EF703A
+:101F70003F5FEF708E2F90E0EA3010F0C79601C0FF
+:101F8000C0968D939D932F5F243149F74FBF809169
+:101F9000E800877F8093E8006AE270E0CE01019656
+:101FA0000E940A0C14C0AE014F5F5F4F6091F601B2
+:101FB0000E94510BBC01892B09F440C09091E800AC
+:101FC000977F9093E80089819A810E946D0C80919F
+:101FD000E8008B778093E80031C0803879F58091F4
+:101FE000E800877F8093E8008091ED018093F10005
+:101FF0008091E8008E778093E8000E94030D1EC058
+:1020000081111CC09091F4019230C0F48091E800DD
+:10201000877F8093E8009093ED010E94030D8091EB
+:10202000ED01811106C08091E30087FD02C081E0CF
+:1020300001C084E08093F1010E944D0A8091E80084
+:1020400083FF0AC08091E800877F8093E800809139
+:10205000EB0080628093EB00AA960FB6F894DEBF87
+:102060000FBECDBFDF91CF911F9108950895CF93FB
+:102070008091F1018823A1F0C091E900CF70909187
+:10208000EC00892F817090FD80E8C82B1092E90048
+:102090008091E80083FD0E94E50ECF70C093E900B7
+:1020A000CF91089590937501809374010895E09104
+:1020B0007401F0917501309721F00190F081E02DCD
+:1020C000099480E00895E0917401F09175013097D2
+:1020D00021F00280F381E02D09940895E0917401CC
+:1020E000F0917501309721F00480F581E02D09947D
+:1020F000089520917201309173018217930771F056
+:102100009093730180937201E0917401F0917501D5
+:10211000309721F00680F781E02D099408952091F1
+:102120007001309171018217930771F090937101E2
+:1021300080937001E0917401F0917501309721F066
+:102140000084F185E02D0994089508950C94A5105C
+:102150000E94FF1B0E9498040C94C11C9F92AF9296
+:10216000BF92CF92DF92EF92FF920F931F93CF9384
+:10217000DF9300D000D000D0CDB7DEB70E94B0040E
+:102180000DE010E0AA24A394B12C902E802F0E9481
+:102190009E05980129583E4F6901F901F080F82603
+:1021A000A1F40150110988F78FEF89838A831B827C
+:1021B0000E94081C8160782F9D838C8349815A81FD
+:1021C0006B818D810E9445112FC09091DA0191FFA2
+:1021D00004C08E830E94A4058E8125E030E0A50115
+:1021E000022E01C0440F0A94EAF7E42E4F21C1F0F9
+:1021F00029839A828E2191E009F490E09B830E94CA
+:10220000081C8160782F9D838C8349815A816B8162
+:102210008D810E944511F6018081E826E08204C08C
+:1022200021503109E0F6BDCF0E94A81F1091760120
+:102230000E9457101817B9F00E945710809376012A
+:1022400026960FB6F894DEBF0FBECDBFDF91CF91BB
+:102250001F910F91FF90EF90DF90CF90BF90AF90C4
+:102260009F900C94500926960FB6F894DEBF0FBECF
+:10227000CDBFDF91CF911F910F91FF90EF90DF9035
+:10228000CF90BF90AF909F900895CF93DF93CDB73D
+:10229000DEB72B970FB6F894DEBF0FBECDBF4F83CE
+:1022A000588769877A878B87DE01119686E0FD0162
+:1022B00011928A95E9F785E0FE01379601900D921B
+:1022C0008A95E1F749815A816B817C818D819E815C
+:1022D0000E948E172B960FB6F894DEBF0FBECDBFAF
+:1022E000DF91CF910895CF93882309F4C2C0C82FFE
+:1022F000823859F40E94571081FDBBC089E30E94C7
+:10230000681A0E94351B89E30CC0833879F40E9457
+:10231000571080FDAEC083E50E94681A0E94351BED
+:1023200083E50E94AA1ACF910C94351B843859F486
+:102330000E94571082FD9DC087E40E94681A0E9487
+:10234000351B87E4EECF8CEF8C0F813A48F48C2F4D
+:102350000E94EB2181118DC08C2F0E94681AE3CF5F
+:1023600080E28C0F883048F4C77081E001C0880F8C
+:10237000CA95EAF70E94EE1AD6CF8BE58C0F833010
+:1023800078F4C53A29F0C63A31F083E890E005C008
+:1023900081E890E002C082E890E0CF910C9479103F
+:1023A00088E58C0F833108F064C0C83A39F1C93A26
+:1023B00041F1CA3A49F1CB3A51F1CC3A59F1CD3A0F
+:1023C00061F1C03B69F1CE3A71F1CF3A79F1C13B8D
+:1023D00081F1C23B89F1C33B91F1C43B99F1C53B0B
+:1023E000A1F1C63BA9F1C73BB1F1C83BB9F1C93B6B
+:1023F000C1F1CA3BC9F180E090E038C082EE90E0C4
+:1024000035C089EE90E032C08AEE90E02FC085EBB7
+:1024100090E02CC086EB90E029C087EB90E026C0CE
+:102420008CEC90E023C08DEC90E020C083E891E03C
+:102430001DC08AE891E01AC082E991E017C084E9E2
+:1024400091E014C081E292E011C083E292E00EC0FC
+:1024500084E292E00BC085E292E008C086E292E05E
+:1024600005C087E292E002C08AE292E0CF910C942C
+:102470008F10CF910895882309F44BC0823859F406
+:102480000E94571081FF45C089E30E94681A0E948C
+:10249000351B89E30CC0833871F40E94571080FF0C
+:1024A00038C083E50E94681A0E94351B83E50E94AC
+:1024B000AA1A0C94351B843859F40E94571082FFD5
+:1024C00028C087E40E94681A0E94351B87E4EFCF7A
+:1024D0009CEF980F913A58F390E2980F983050F48F
+:1024E000877091E001C0990F8A95EAF7892F0E94C1
+:1024F000F41ADFCF9BE5980F933020F480E090E052
+:102500000C947910885A833120F480E090E00C9488
+:102510008F100895882321F00E94EE1A0C94351B29
+:102520000895882321F00E94F41A0C94351B089515
+:102530007F928F929F92AF92BF92CF92DF92EF9253
+:10254000FF920F931F93CF93DF931F92CDB7DEB708
+:102550007C01C62E772EFC01058102950F70128139
+:1025600011110E940B1B0E94611A882379F011231C
+:1025700069F080E28C0D883048F082E00E944A1AAF
+:102580000E94611A91E0D82ED92601C0D12CE72DE6
+:10259000E295EF70F0E0E05AFF4F0C942024872D75
+:1025A000807F072D0F70882311F00295007F112383
+:1025B00089F0002309F490C180E28C0D883020F46A
+:1025C000802F0E94EE1A03C0802F0E94FE1A0E94E4
+:1025D000351B82C18C2D0E943B12002309F495C14A
+:1025E00080E28C0D883020F4802F0E94F41A03C002
+:1025F000802F0E94041B0E94351B87C1972D907F5E
+:10260000872D8F70903211F08295807FCC2021F041
+:10261000F1E0CF16B1F01EC0112349F0002309F4F8
+:1026200014C1013009F011C10E941E1B6EC10023AC
+:1026300019F0013009F469C189830E94211B898145
+:102640000AC1112321F0023008F05FC1FEC0011160
+:102650005CC101C1112321F0002309F4F6C03CC183
+:10266000002309F4F8C03EC1872D869586958370B6
+:1026700090E0009719F0019761F047C1112321F014
+:102680008C2D972D937002C080E090E00E9479100D
+:102690003CC1112321F08C2D972D937002C080E056
+:1026A00090E00E948F1031C18C2D112319F00E94EF
+:1026B000B01E02C00E94181F0E949D1F26C1872DB8
+:1026C000837009F052C0111120C18C2D829586951E
+:1026D0008770880F880F9C2D9F70892E912CA12CBC
+:1026E000B12C082E04C0880C991CAA1CBB1C0A948F
+:1026F000D2F7C4FE14C00FE010E020E030E0B901D2
+:10270000A80104C0440F551F661F771F8A95D2F792
+:10271000CB01BA01609570958095909503C060E0FB
+:1027200070E0CB01272D26952695237030E02230CE
+:10273000310569F02330310589F0682979298A2922
+:102740009B292130310571F00E94D618DEC068291E
+:1027500079298A299B290E94F218D7C00E94D6188D
+:10276000C501B4010E94BA18D0C0112319F0872DF9
+:10277000817001C08695882309F4C7C08C2D82958D
+:1027800086958770880F880F9C2D9F70892E912CBD
+:10279000A12CB12C082E04C0880C991CAA1CBB1CAF
+:1027A0000A94D2F7C4FE14C00FE010E020E030E03D
+:1027B000B901A80104C0440F551F661F771F8A95F1
+:1027C000D2F7CB01BA01609570958095909503C0C2
+:1027D00060E070E0CB01272D269526952370422FCF
+:1027E00050E04230510569F04330510589F06829C5
+:1027F00079298A299B294130510571F00E94B0192D
+:1028000084C0682979298A299B290E94CC197DC016
+:102810000E94B019C501B4010E94941976C08C2D94
+:1028200090E0FC01E05EF109E531F10508F050C0EF
+:10283000E059FF4F0C9420240C2D0F70872D8F71C1
+:10284000112331F00E942D19802F0E948A125DC041
+:102850000E944E19802F0E94911257C0112339F007
+:10286000011153C0872D8F710E9473194EC0023021
+:1028700008F04BC0F7CF112339F0872D8F710E94DC
+:102880002D1943C01123C9F3872D8F710E944E1952
+:102890003CC0112329F0872D8F710E94181935C073
+:1028A0000E940E1932C0112351F0172D1F71812F74
+:1028B0000E942D1963E0812F0E94411A26C081E0F9
+:1028C0000E944A1A023008F182E00E944A1A1DC092
+:1028D000112331F0002389F28C2D0E94731115C051
+:1028E000002391F28C2D0E943B120FC0472D4F7098
+:1028F0006C2DC7010E9419030E94321806C0472D93
+:102900004F706C2DC7010E946006DD20F9F00E9417
+:102910003D1A80FD1BC0F70112820E94371A0E94E7
+:102920002D19C7010E94B5140E94371A0F90DF912C
+:10293000CF911F910F91FF90EF90DF90CF90BF90BC
+:10294000AF909F908F907F900C944E190F90DF91D5
+:10295000CF911F910F91FF90EF90DF90CF90BF909C
+:10296000AF909F908F907F9008950F931F93CF9378
+:10297000DF93EC01888199812B813C81232BB9F075
+:102980009F3F11F48F3F99F0CE010E94BE0588232E
+:1029900071F0688179818A810E94331A8C010E94CA
+:1029A000E8190E94AF18B801CE010E949812DF9179
+:1029B000CF911F910F9108950E940B1B0E941B1B2A
+:1029C0000E94E01A0E94351B0E944E200E949D1F0B
+:1029D00080E090E00E94791080E090E00C948F10ED
+:1029E0000E94FB1A0C94DC140E94281A292F2295AD
+:1029F0002F7030E02C3031054CF42A3031056CF466
+:102A00002250310922303105A8F407C02C3031059D
+:102A100069F02F30310551F00DC0803F69F018F496
+:102A2000803E40F409C0843F29F406C093FB882708
+:102A300080F9089580E0089581E00895CF93DF93B1
+:102A400000D000D01F92CDB7DEB70F900F900F903F
+:102A50000F900F90DF91CF910895CF93DF9300D027
+:102A600000D000D0CDB7DEB726960FB6F894DEBF03
+:102A70000FBECDBFDF91CF9108951F93CF93DF930A
+:102A8000C091850116E080918601C81799F0D0E0C9
+:102A90001C9FF0011D9FF00D1124E957FE4F40814E
+:102AA000518162817381848195810E942D152196C7
+:102AB000C770E9CFDF91CF911F9108954091B70181
+:102AC0005091B8016091B9017091BA018091BB0138
+:102AD0009091BC010C942D158091BC0182958F7052
+:102AE00009F054C08091B901882309F44FC0809146
+:102AF0008501A09186016091B7017091B801409164
+:102B0000BA015091BB01B6E08A1709F43FC090E0CA
+:102B100041155105C1F17F3F11F46F3FA1F1B89FFD
+:102B2000F001B99FF00D1124E957FE4F2181721376
+:102B30002AC02081621327C02281211124C0238151
+:102B400034812417350710F421503109241B350B2B
+:102B5000283C3105C0F42091BC012F7020612093E6
+:102B6000BC0126E0289FF001299FF00D1124E457B5
+:102B7000FE4F80818F708061808387EB91E00E949F
+:102B8000B5140C943D1501968770BECF0895CF9271
+:102B9000DF92EF92FF920F931F93CF93DF93CDB706
+:102BA000DEB762970FB6F894DEBF0FBECDBF8C01C3
+:102BB00085E0F801DE011D9601900D928A95E1F7FE
+:102BC000D8014C9111965C91119712966C911297C5
+:102BD0001396CD90DC9014973091B7017091B801A5
+:102BE0008091BA019091BB01009709F46BC17F3FBE
+:102BF00019F43F3F09F466C1E090B901EE2009F4F1
+:102C0000C0C02091BC01C816D90628F0F601E81B07
+:102C1000F90BCF0104C0809590958C0D9D1DFF246C
+:102C2000F394883C910578F0F12C207F09F0C6C020
+:102C30007C2DD98AC88A89890E941E1587EB91E06C
+:102C40000E94B514B1C0822F807F09F046C0751371
+:102C500014C0341312C0611110C02F702061209372
+:102C6000BC010E945E1587EB91E00E94B514809133
+:102C7000BC01D80115968C932EC0CD2819F15F3F69
+:102C800011F44F3FF9F0F62E61111CC080918501BF
+:102C90002091860136E0821709F45AC090E0389FEF
+:102CA000F001399FF00D1124E957FE4F7181571340
+:102CB00006C07081471303C07281711103C0019671
+:102CC0008770E9CFF62E662309F418C18091BC0104
+:102CD00081608093BC01F12C11C1751308C03413BD
+:102CE00006C0611104C08091BC01D801C3C04D87EA
+:102CF0005E878D859E856A8B0E94F4146A8988237D
+:102D0000E1F16623D1F12091BC01822F82958F7071
+:102D100090E0029774F08091B7019091B801988784
+:102D20008F831986DB86CA862C87CE0107960E9480
+:102D3000B51486E0F801A7EBB1E001900D928A95F9
+:102D4000E1F70E946C150E945E15FF24F394D6C033
+:102D50004D875E878D859E850E94281A292F229592
+:102D60002F7030E0223031050CF0BCC09F7009F0AC
+:102D7000B6C0805E883008F4C1C0C8010E94B51496
+:102D8000E4CFC816D90608F453C0F601E81BF90BC6
+:102D9000CF01883C910508F450C0F12C7C2DD98AD4
+:102DA000C88A89890E941E15E7EBF1E086E0DF0101
+:102DB0001D928A95E9F70E945E15A0C0751314C094
+:102DC000341312C0611110C08091BC01F8018583D9
+:102DD000C8010E94B51486E0E7EBF1E0DF011D9227
+:102DE0008A95E9F7FE2C8AC04D875E878D859E8582
+:102DF0006A8B0E94F4146A89882309F4BECF662383
+:102E000009F4BBCF2091BC01822F82958F7090E096
+:102E100002970CF48ECF8091B7019091B8019A83FC
+:102E200089831B82DD82CC822E83CE0101967FCFE7
+:102E3000809590958C0D9D1DACCFF62E662309F4E0
+:102E40009CCF75132EC034132CC02091BC0120FDE3
+:102E50001FC0822F82958F70D9F0D80115962C93C0
+:102E600015978F3049F08F5F982F9295907F822F22
+:102E70008F70892B15968C93C8010E94B51486E03B
+:102E8000F801A7EBB1E001900D928A95E1F793CF9D
+:102E900086E0F801A7EBB1E001900D928A95E1F789
+:102EA0002DC04D875E878D859E850E94F41481110B
+:102EB00040CF8091BC0181608093BC01C8010E9419
+:102EC000B5141CC0662309F458CF4D875E878D85E5
+:102ED0009E850E94F414882309F44FCF2ACF8111D4
+:102EE00048CF0CC0243031050CF047CF9F7009F457
+:102EF00040CFF8019581907F09F03BCF8F2D6296EE
+:102F00000FB6F894DEBF0FBECDBFDF91CF911F91FA
+:102F10000F91FF90EF90DF90CF9008951F93CF9384
+:102F2000DF93CDB7DEB72C970FB6F894DEBF0FBE98
+:102F3000CDBF4F83588769877A878B879C87CE015F
+:102F400007960E94C715882369F08F8198852A8586
+:102F50003B85232BF1F19F3F09F063C08F3F09F0C0
+:102F600060C037C086E0FE013796DE011196019001
+:102F70000D928A95E1F76F817885EA85FB85309718
+:102F800041F17F3F11F46F3F21F12091860130E044
+:102F9000C9010196877099274091850150E08417F7
+:102FA000950709F447C069837A83FD83EC8396E033
+:102FB000929FD001939FB00D1124A957BE4FFE01DF
+:102FC000319601900D929A95E1F7809386010E94C7
+:102FD0003D1516E080918501909186018917C1F118
+:102FE000189FC001112489579E4F0E94C71588233E
+:102FF00079F1E09185011E9FF0011124E957FE4F00
+:103000004081518162817381848195810E942D1557
+:103010008091850190E001968770992780938501C2
+:10302000D9CF4F81588569857A858B859C850E948B
+:103030002D15CFCF0E94F0141092860110928501B9
+:10304000E7EBF1E086E0DF011D928A95E9F7C1CF59
+:103050002C960FB6F894DEBF0FBECDBFDF91CF9197
+:103060001F910895EF92FF920F931F93CF93DF93D9
+:103070008C01892B09F46CC0F12CEE24E394E80157
+:103080002196F8018491843740F4843008F051C0CF
+:10309000813081F0823019F15BC0853709F444C07A
+:1030A000A8F19CE7980F903708F052C08F770E94E4
+:1030B0003B1241C00E5F1F4FFE01C49180E28C0F96
+:1030C000883048F4C7708E2D01C0880FCA95EAF782
+:1030D0000E940E1B14C08C2F0E9473112DC00E5F16
+:1030E0001F4FFE01C49180E28C0F883058F4C770E6
+:1030F0008E2D01C0880FCA95EAF70E94141B0E940A
+:10310000351B1AC08C2F0E943B1216C00E5F1F4F3A
+:10311000FE01C491CC2381F08FE99FE00197F1F784
+:1031200000C00000C150F6CF0E5F1F4FFE01F490AB
+:1031300003C00E9473118E018F2D882309F49FCF45
+:10314000EFE9FFE03197F1F700C000008150F5CFC3
+:10315000DF91CF911F910F91FF90EF900895089507
+:103160006093C1017093C2018093C3019093C40125
+:103170000C94DC140F931F930091C1011091C201B4
+:103180002091C3013091C401DC01CB01802B912B34
+:10319000A22BB32B8093C1019093C201A093C301D2
+:1031A000B093C4011F910F910C94DC140F931F93E3
+:1031B0000091C1011091C2012091C3013091C4015D
+:1031C000DC01CB0180239123A223B3238093C1018F
+:1031D0009093C201A093C301B093C4011F910F91BA
+:1031E0000C94DC140F931F930091C1011091C20144
+:1031F0002091C3013091C401DC01CB0180279127CC
+:10320000A227B3278093C1019093C201A093C30169
+:10321000B093C4011F910F910C94DC141092BD0166
+:103220001092BE011092BF011092C0010C94DC14E8
+:1032300041E050E060E070E004C0440F551F661F9D
+:10324000771F8A95D2F74093BD015093BE016093DA
+:10325000BF017093C0010C94DC1441E050E060E0C9
+:1032600070E004C0440F551F661F771F8A95D2F780
+:103270008091BD019091BE01A091BF01B091C001AC
+:10328000482B592B6A2B7B2B4093BD015093BE01D9
+:103290006093BF017093C0010C94DC1441E050E0D6
+:1032A00060E070E004C0440F551F661F771F8A95C9
+:1032B000D2F740955095609570958091BD019091A1
+:1032C000BE01A091BF01B091C001482359236A23D8
+:1032D0007B234093BD015093BE016093BF01709367
+:1032E000C0010C94DC1441E050E060E070E004C0E8
+:1032F000440F551F661F771F8A95D2F78091BD0135
+:103300009091BE01A091BF01B091C00148275927FB
+:103310006A277B274093BD015093BE016093BF0194
+:103320007093C0010C94DC140F931F930091BD01A6
+:103330001091BE012091BF013091C001DC01CB0191
+:10334000802B912BA22BB32B8093BD019093BE01B8
+:10335000A093BF01B093C0011F910F910C94DC1496
+:103360000F931F930091BD011091BE012091BF01E9
+:103370003091C001DC01CB0180239123A223B32330
+:103380008093BD019093BE01A093BF01B093C00193
+:103390001F910F910C94DC140F931F930091BD01AA
+:1033A0001091BE012091BF013091C001DC01CB0121
+:1033B00080279127A227B3278093BD019093BE0158
+:1033C000A093BF01B093C0011F910F910C94DC1426
+:1033D0000895CF92DF92EF92FF920F931F93CF93B6
+:1033E000DF938C01C090C101D090C201E090C30175
+:1033F000F090C4018091BD019091BE01A091BF01E8
+:10340000B091C001C82AD92AEA2AFB2ACFE1D0E02C
+:10341000D701C6010C2E04C0B695A7959795879540
+:103420000A94D2F780FF06C0B8018C2F0E94B5081D
+:10343000019721F4219760F780E001C08C2FDF9184
+:10344000CF911F910F91FF90EF90DF90CF90089553
+:10345000CF93DF93EC010E94E919BE010E94B508E9
+:10346000DF91CF910895CB010E94281A0895809191
+:10347000C50185958595859508958091C5018770CD
+:10348000089598E0899F90011124262B2093C5016F
+:103490000C942D192091C501809582238093C5013C
+:1034A000982F977069F430E0482F552747FD5095C5
+:1034B0002417350729F08595859585950C944E1927
+:1034C00008959091C501977081E009F480E0089516
+:1034D00090910C01992321F090910D01911109C057
+:1034E00020910E0130910F01F90132969FEF40E0DB
+:1034F0001FC0982F9695969596959F3050F5E09120
+:103500000E01F0910F01E90FF11D877021E030E00D
+:10351000A90102C0440F551F8A95E2F7CA019181A3
+:10352000892B818308959F3F39F04F5F4E3041F0E2
+:1035300051915813F8CF0DC05111F7CF942FF5CFFB
+:103540009F3F39F0F901E90FF11D97FDFA9582834C
+:103550000895089590910C01992321F090910D0107
+:10356000911109C020910E0130910F01F90132969D
+:10357000205F3F4F1FC0982F9695969596959F3048
+:10358000F0F4E0910E01F0910F01E90FF11D877049
+:1035900021E030E0A90102C0440F551F8A95E2F7EF
+:1035A000CA01809591818923818308953196E2171C
+:1035B000F30729F090819813F9CF1082F7CF08957F
+:1035C00081E090E0E0910E01F0910F01E80FF91F0A
+:1035D0001082019680319105A9F708959091D90143
+:1035E000892B8093D901089580959091D9018923E1
+:1035F0008093D90108951092D90108959091D8012E
+:10360000892B8093D801089580959091D8018923C2
+:103610008093D80108951092D80108959091D70110
+:10362000892B8093D701089580959091D7018923A4
+:103630008093D70108951092D70108958093C60111
+:1036400008951092C601089580910E0190910F0186
+:10365000FC0131969C01205F3F4F80E091919111D8
+:103660008F5FE217F307D1F70895E0910E01F09113
+:103670000F018091D9018083E0910E01F0910F013B
+:1036800090818091D801892B8083E0910E01F09187
+:103690000F0190818091D701892B80838091C60191
+:1036A000882361F0E0910E01F0910F019081892B48
+:1036B00080830E94241B81111092C60180910E010B
+:1036C00090910F010C94631020E0009739F0AC0149
+:1036D00041505109842395232F5FF7CF822F0895FE
+:1036E000CF92DF92EF92FF926C01EE24FF24C1147F
+:1036F000D104E104F10421F0C701B60120E101C0C9
+:1037000020E0C72ED82EE92EFF24C114D104E104F5
+:10371000F10419F0285FC701B6016B017C0154E088
+:10372000F694E794D794C7945A95D1F7C114D1046D
+:10373000E104F10419F02C5FC701B6016B017C01B3
+:1037400042E0F694E794D794C7944A95D1F7C11410
+:10375000D104E104F10419F02E5FC701B601DC01C8
+:10376000CB01B695A79597958795892B8A2B8B2B9F
+:1037700009F02F5F822FFF90EF90DF90CF90089598
+:103780008091F101843021F11092DB0120E488E185
+:1037900090E00FB6F894A895809360000FBE209338
+:1037A000600080E00E94500983B7817F846083BFFE
+:1037B00083B7816083BF7894889583B78E7F83BFFA
+:1037C00088E10FB6F89480936000109260000FBEFD
+:1037D0000895089508950E94E91B0E94B0040E9474
+:1037E000EA1B0E94A50591E0811101C090E0892F9C
+:1037F00008950E94F0140E9457100C94500982E022
+:1038000084BD93E095BD9AEF97BD80936E000895B7
+:103810002FB7F8948091DC019091DD01A091DE0139
+:10382000B091DF012FBF0895CF92DF92EF92FF9208
+:103830000F931F932FB7F8944091DC015091DD0155
+:103840006091DE017091DF012FBF6A017B01EE24E0
+:10385000FF248C0120E030E0C016D106E206F3061A
+:1038600010F4415051099A01281B390BC9011F91CD
+:103870000F91FF90EF90DF90CF9008951F920F92DD
+:103880000FB60F9211248F939F93AF93BF938091A4
+:10389000DC019091DD01A091DE01B091DF01019684
+:1038A000A11DB11D8093DC019093DD01A093DE0189
+:1038B000B093DF01BF91AF919F918F910F900FBE99
+:1038C0000F901F9018950E94540DF8942FEF87EADF
+:1038D00091E6215080409040E1F700C0000087E071
+:1038E00090EBDC018093FB019093FC01A093FD0120
+:1038F000B093FE019CE088E10FB6F894A895809300
+:1039000060000FBE90936000FFCFEF92FF920F9385
+:103910001F93CF93DF93D82FCDE08C2F0E949E056D
+:1039200005E010E0E82EF12CC701002E02C09595AD
+:1039300087950A94E2F780FF09C0602F7C2F80E012
+:103940000E946106D81302C081E006C0015011092F
+:1039500058F7C15010F780E0DF91CF911F910F9180
+:10396000FF90EF900895CF93C82F8CE20E94851CA2
+:10397000882321F08C2FCF910C94851C80E0CF916F
+:103980000895CF930E94081E811102C00E94EE1D6F
+:10399000C5E6C15049F00E94B0048FE39CE901974D
+:1039A000F1F700C00000F5CF89E20E94B31C81113D
+:1039B00013C18AE20E94B31C81110E94EE1D85E0B2
+:1039C0000E94B31C81110E94631C0E94131E8093ED
+:1039D000DA0187E00E94B31C8823A9F18BE10E94E1
+:1039E000B31C882351F08091DA0181FB222720F952
+:1039F00091E0922790FB81F90EC08EE00E94B31CEB
+:103A0000882361F08091DA0182FB222720F991E07E
+:103A1000922790FB82F98093DA0115C080E10E9421
+:103A2000B31C9091DA01882341F093FB222720F9FF
+:103A300081E0822780FB93F904C0892F809580FB69
+:103A400090F99093DA018091DA010E94171E0E948A
+:103A5000251E8093FA0180EE0E94B31C882341F05A
+:103A60008091FA01982F909590FB80F98093FA014C
+:103A700089E30E94B31C882359F08091FA0181FBED
+:103A8000222720F991E0922790FB81F98093FA0197
+:103A900082EE0E94B31C882359F08091FA0182FBC8
+:103AA000222720F991E0922790FB82F98093FA0176
+:103AB00086EE0E94B31C882359F08091FA0183FBA3
+:103AC000222720F991E0922790FB83F98093FA0155
+:103AD00083EE0E94B31C882359F08091FA0184FB85
+:103AE000222720F991E0922790FB84F98093FA0134
+:103AF00085E30E94B31C882359F08091FA0185FB6D
+:103B0000222720F991E0922790FB85F98093FA0112
+:103B100081E30E94B31C882359F08091FA0186FB4F
+:103B2000222720F991E0922790FB86F98093FA01F1
+:103B300081E10E94B31C882359F08091FA0187FB30
+:103B4000222720F991E0922790FB87F98093FA01D0
+:103B50008091FA010E94291E8091FA0187FB882733
+:103B600080F980930D0187E20E94B31CC82F8EE17B
+:103B70000E94B31C8111C2608FE10E94B31C8111AD
+:103B8000C46080E20E94B31C8111C86081E20E947F
+:103B9000B31C8111C06182E20E94B31C8111C0621A
+:103BA00083E20E94B31C8111C06484E20E94B31CB2
+:103BB000882311F0C06802C0CC2329F08C2F0E940A
+:103BC000201E6C2F03C00E941C1E682F70E080E036
+:103BD00090E0CF910C94B018CF9108956DEE7EEFE8
+:103BE00080E090E00E945A2460E082E090E00E9431
+:103BF000482460E083E090E00E94482460E084E094
+:103C000090E00E94482460E085E090E00C94482415
+:103C100080E090E00E94422421E08D3E9E4F09F01A
+:103C200020E0822F089582E090E00C943A24682FDF
+:103C300082E090E00C94482483E090E00C943A24D5
+:103C4000682F83E090E00C94482484E090E00C948A
+:103C50003A24682F84E090E00C9448248091E2019B
+:103C600080FF0BC06091130185E0689FB0011124B3
+:103C700075956795759567952BC081FF09C0609113
+:103C8000130185E0689FB00111247595679520C0E8
+:103C900082FF07C06091130185E0689FB001112485
+:103CA00017C09091E3019923D1F06091120196170A
+:103CB00088F72091130185E0289F90011124929F9D
+:103CC000A001939F500D112470E0CA010E940C24A2
+:103CD0006038710540F46115710539F002C065E086
+:103CE00070E0862F08958FE7089581E00895809110
+:103CF000E20180FF08C06091110170E07595679541
+:103D00007595679521C081FF06C06091110170E033
+:103D10007595679519C082FF04C06091110170E02C
+:103D200010C09091E3019923C1F0609110019617A2
+:103D3000A0F780911101899FC001112470E00E94B9
+:103D40000C246038710528F46115710521F0862F67
+:103D500008958FE7089581E0089561E070E0F4CF61
+:103D6000803F21F40E942E1E819504C0813F29F4DA
+:103D70000E942E1E8093E6010895823F21F40E9446
+:103D80002E1E819504C0833F29F40E942E1E80932D
+:103D9000E5010895893F19F40E94771E05C08A3F06
+:103DA00031F40E94771E81958093E70108958B3F3F
+:103DB00021F40E94771E819504C08C3F29F40E9453
+:103DC000771E8093E8010895843F21F48091E401F7
+:103DD000816017C0853F21F48091E401826011C0A9
+:103DE000863F21F48091E40184600BC0873F21F479
+:103DF0008091E401886005C0883F31F48091E4013E
+:103E000080618093E40108958D3F21F48091E20167
+:103E100081600BC08E3F21F48091E201826005C079
+:103E20008F3F29F48091E20184608093E20108953C
+:103E3000803F39F48091E60187FF6CC01092E60163
+:103E400069C0813F29F48091E6011816BCF362C075
+:103E50009091E501823F29F497FF5CC01092E50143
+:103E600059C0833F19F41916CCF354C0893F41F46B
+:103E70008091E70118160CF04DC01092E7014AC07E
+:103E80008A3F29F48091E70187FF44C0F6CF8B3F3A
+:103E900039F48091E80187FF3DC01092E8013AC0F3
+:103EA0008C3F29F48091E8011816BCF333C0843F9D
+:103EB00021F48091E4018E7F17C0853F21F4809129
+:103EC000E4018D7F11C0863F21F48091E4018B7F56
+:103ED0000BC0873F21F48091E401877F05C0883FB4
+:103EE00031F48091E4018F7E8093E40113C08D3F13
+:103EF00021F48091E2018E7F0BC08E3F21F48091EE
+:103F0000E2018D7F05C08F3F29F48091E2018B7F14
+:103F10008093E2018091E50181110EC08091E6015C
+:103F200081110AC08091E701811106C08091E801EA
+:103F3000811102C01092E301089584EE91E00E9485
+:103F40006E100E94081C9093E1018093E001089597
+:103F50001F93CF93DF938091E0019091E1010E9444
+:103F6000141CAC019091E301992321F020911401DC
+:103F700030E006C0209115018AE0289F90011124AD
+:103F80004217530708F486C08091E501C091E6010D
+:103F9000D091E7011091E801811107C0C11176C0ED
+:103FA000D11174C0111172C075C09F3F19F09F5F8D
+:103FB0009093E301181624F40E942E1E8093E501CD
+:103FC0008091E50187FF05C00E942E1E8195809398
+:103FD000E5011C1624F40E942E1E8093E6018091B8
+:103FE000E60187FF05C00E942E1E81958093E601A1
+:103FF0006091E501662339F1C091E601CC2319F106
+:10400000772767FD7095872F972F0E941D2323E345
+:1040100033E343E35FE30E9481230E94EA2260933B
+:10402000E5016C2F772767FD7095872F972F0E94EA
+:104030001D2323E333E343E35FE30E9481230E94D4
+:10404000EA226093E6011D1624F40E94771E8093F5
+:10405000E7018091E70187FF05C00E94771E8195E7
+:104060008093E701111624F40E94771E8093E801E3
+:104070008091E80187FF05C00E94771E819580939B
+:10408000E801DF91CF911F910C949D1F9F3F09F094
+:104090008ECF96CFDF91CF911F910895E4EEF1E09E
+:1040A00085E0DF011D928A95E9F71092E3011092F5
+:1040B000E2010895833081F128F4813059F0823093
+:1040C000D1F00895853009F449C0B8F1863009F47B
+:1040D00056C0089580911501262F30E0280F311D1C
+:1040E0002F3F310524F4680F6093150108958FEF79
+:1040F00080931501089580911401262F30E0280F38
+:10410000311D2F3F310524F4680F60931401089589
+:104110008FEF80931401089580911301262F30E0D2
+:10412000280F311D2F3F310524F4680F60931301D0
+:1041300008958FEF80931301089580911201262F27
+:1041400030E0280F311D2F3F310524F4680F6093B4
+:10415000120108958FEF809312010895809111014B
+:10416000262F30E0280F311D2F3F310524F4680F32
+:104170006093110108958FEF80931101089580914C
+:104180001001262F30E0280F311D2F3F310524F478
+:10419000680F6093100108958FEF809310010895C8
+:1041A000833011F128F4813049F0823091F0089584
+:1041B000853081F120F18630C1F10895809115019B
+:1041C000681720F4861B809315010895109215013D
+:1041D000089580911401681720F4861B80931401C0
+:1041E000089510921401089580911301681720F426
+:1041F000861B8093130108951092130108958091F6
+:104200001201681720F4861B809312010895109202
+:104210001201089580911101681720F4861B809384
+:1042200011010895109211010895809110016817ED
+:1042300020F4861B809310010895109210010895B8
+:104240000F931F938D3109F46BC008F03FC08E307F
+:1042500009F47FC0C0F4873009F469C068F486307F
+:1042600009F0B1C08091DA01817F8E7F8093DA01FD
+:1042700081E08093EA01A8C0883009F4A2C08B30A5
+:1042800009F49FC0A0C0863109F49BC078F4803146
+:1042900009F472C0813109F096C00E94F014909127
+:1042A0000D0181E0892780930D018BC0893109F4CC
+:1042B00088C08B3109F087C08091DA0181FB222709
+:1042C00020F991E0922790FB81F94CC0853309F4E5
+:1042D00070C048F4873209F46CC008F459C08932C0
+:1042E00009F467C070C0833438F48A3308F04EC0D4
+:1042F000883309F466C067C0833409F45AC088342F
+:1043000009F061C00E94F0140FEF13ED20E301509B
+:1043100010402040E1F700C000000E94631C51C023
+:104320000E94A4220E9457100E9450094AC09091F6
+:10433000DA01892F8095817080FB90F929F09660D1
+:1043400098609093DA0140C0997F977F9093DA014B
+:1043500038C08091DA0182FB222720F991E0922770
+:1043600090FB82F98093DA01992359F18091DA0167
+:1043700081608093DA0125C08091DA0183FB2227D6
+:1043800020F991E0922790FB83F9ECCF895301C08B
+:104390008D5141E050E060E070E08A019B0104C073
+:1043A000000F111F221F331F8A95D2F7C901B801D0
+:1043B00004C061E070E080E090E00E94B0180E94CC
+:1043C000F01481E001C080E01F910F91089580E01A
+:1043D000089580E00895CF93C82F8091EA0181303D
+:1043E00079F018F08230E9F187C0E0910E01F09188
+:1043F0000F018081813169F0823209F07FC009C0EC
+:10440000E0910E01F0910F018081813111F0823233
+:1044100061F48C2F0E94E721811104C08C2F0E942F
+:1044200020211DC081E090E01AC08C2F0E94E9215C
+:10443000811114C0C43179F048F4CB3079F0C03127
+:1044400009F060C082E08093EA0108C0C93219F027
+:10445000C83321F057C01092EA0154C081E0817046
+:1044600053C0C93289F118F5C43171F1A8F4C730CD
+:1044700009F046C08AE08093150194E190931401FD
+:1044800093E0909313018093120188E080931101CF
+:1044900088E28093100134C0CE51C63088F5EC2FED
+:1044A000F0E0E65DFE4F80818093E90129C0CE34C3
+:1044B000E9F020F4CB3421F56AE013C0C13579F07E
+:1044C000C235F1F461E00DC08091E901882319F053
+:1044D0001092E90115C081E08093EA0115C061E006
+:1044E00006C08091E9010E945A200AC06AE08091CA
+:1044F000E9010E94D02004C01092EA0180E004C0CB
+:1045000081E002C080E0ABCFCF910895E1E8F0E018
+:104510008081886080838081816080838FB7F894F8
+:1045200093E09093890090ED909388008FBF089559
+:10453000EFE6F0E08081826080830895EFE6F0E0AE
+:1045400080818D7F80830895EFE6F0E0908182E0A6
+:104550008927808308951F920F920FB60F9211241E
+:104560002F933F934F935F936F937F938F939F937B
+:10457000AF93BF93EF93FF938091EB019091EC0188
+:1045800001969093EC018093EB01811103C082E0CE
+:104590000E945009E091EC01E695E695F0E0EB59B8
+:1045A000FA4FE4918091EB018E1303C080E00E94EA
+:1045B0005009FF91EF91BF91AF919F918F917F91A2
+:1045C0006F915F914F913F912F910F900FBE0F9080
+:1045D0001F90189504D06894B1118DC0089570D0C3
+:1045E00088F09F5790F0B92F9927B751A0F0D1F0DC
+:1045F000660F771F881F991F1AF0BA95C9F712C066
+:10460000B13081F077D0B1E0089574C0672F782F72
+:104610008827B85F39F0B93FCCF3869577956795D1
+:10462000B395D9F73EF490958095709561957F4F3D
+:104630008F4F9F4F0895E89409C097FB3EF49095E3
+:104640008095709561957F4F8F4F9F4F9923A9F06B
+:10465000F92F96E9BB279395F695879577956795FA
+:10466000B795F111F8CFFAF4BB0F11F460FF1BC03E
+:104670006F5F7F4F8F4F9F4F16C0882311F096E9D1
+:1046800011C0772321F09EE8872F762F05C066237F
+:1046900071F096E8862F70E060E02AF09A95660F38
+:1046A000771F881FDAF7880F9695879597F90895F1
+:1046B00057FD9058440F551F59F05F3F71F04795D3
+:1046C000880F97FB991F61F09F3F79F087950895B8
+:1046D000121613061406551FF2CF4695F1DF08C0D7
+:1046E000161617061806991FF1CF869571056105F4
+:1046F00008940895E894BB2766277727CB0197F99C
+:1047000008950BD078C069D028F06ED018F09523AA
+:1047100009F05AC05FC01124EECFCADFA0F3959F05
+:10472000D1F3950F50E0551F629FF001729FBB2798
+:10473000F00DB11D639FAA27F00DB11DAA1F649F44
+:104740006627B00DA11D661F829F2227B00DA11DF7
+:10475000621F739FB00DA11D621F839FA00D611D7D
+:10476000221F749F3327A00D611D231F849F600D9E
+:10477000211D822F762F6A2F11249F5750408AF0D7
+:10478000E1F088234AF0EE0FFF1FBB1F661F771F63
+:10479000881F91505040A9F79E3F510570F014C0FA
+:1047A000AACF5F3FECF3983EDCF38695779567954B
+:1047B000B795F795E7959F5FC1F7FE2B880F911D81
+:1047C0009695879597F9089597F99F6780E870E027
+:1047D00060E008959FEF80EC089500240A94161677
+:1047E000170618060906089500240A9412161306DF
+:1047F000140605060895092E0394000C11F488236D
+:1048000052F0BB0F40F4BF2B11F460FF04C06F5F88
+:104810007F4F8F4F9F4F089597FB072E16F40094FC
+:1048200007D077FD09D00E94262407FC05D03EF46E
+:10483000909581959F4F0895709561957F4F08954C
+:10484000EE0FFF1F0590F491E02D0994AA1BBB1BEE
+:1048500051E107C0AA1FBB1FA617B70710F0A61B80
+:10486000B70B881F991F5A95A9F780959095BC01A1
+:10487000CD010895F999FECF92BD81BDF89A99278F
+:1048800080B50895A8E1B0E042E050E00C946224C5
+:10489000262FF999FECF92BD81BDF89A019700B4F9
+:1048A000021639F01FBA20BD0FB6F894FA9AF99A99
+:1048B0000FBE08950196272F0E9449240C94482486
+:1048C000DC01CB01FC01F999FECF06C0F2BDE1BDD0
+:1048D000F89A319600B40D9241505040B8F70895BF
+:0448E000F894FFCF7A
+:1048E40020025209E009BD09890955090101C701DE
+:1048F40028080A03140A3F4D36392605D904A304AF
+:104904006A04FD0316042F04480401020304050687
+:044914000708090087
:00000001FF
diff --git a/keyboard/ghost_squid/Makefile.lufa b/keyboard/ghost_squid/Makefile.lufa deleted file mode 100644 index 54adb1e3d8..0000000000 --- a/keyboard/ghost_squid/Makefile.lufa +++ /dev/null @@ -1,117 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = ghostsquid_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# List C source files here. (C dependencies are automatically generated.) -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - -# MCU name -MCU = atmega32u2 - -# 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) - - -# Build Options -# comment out to disable the options. -# -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -#CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/ghost_squid/README.md b/keyboard/ghost_squid/README.md deleted file mode 100644 index dda67e6ba1..0000000000 --- a/keyboard/ghost_squid/README.md +++ /dev/null @@ -1,20 +0,0 @@ -The Ghost Squid controller -========================== -Custom controller for the Cooler Master QuickFire XT keyboard designed by bpiphany. - -*Note that this is not the official firmware* - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.lufa - -At the moment only the LUFA stack is supported. - - -Bootloader ---------- -To enter bootloader by hardware use a magnet above the controller before connecting the usb cable. - -It is still possible to use Boot Magic and Command (LSFT+RSFT+PAUS) to access the bootloader though. diff --git a/keyboard/ghost_squid/config.h b/keyboard/ghost_squid/config.h deleted file mode 100644 index 54f03143c1..0000000000 --- a/keyboard/ghost_squid/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED // 0x2516 (original CM XT value) -#define PRODUCT_ID 0x001A -#define DEVICE_VER 0x0000 -#define MANUFACTURER Cooler Master -#define PRODUCT Cooler Master QuickFire XT - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for Cooler Master QuickFire XT - -/* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 18 - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/ghost_squid/keymap.c b/keyboard/ghost_squid/keymap.c deleted file mode 100644 index e9ad9efe1a..0000000000 --- a/keyboard/ghost_squid/keymap.c +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keymap.h" - -/* - Matrix col/row mapping - - ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------. - |06/6| |07/4|08/4|08/2|08/6| |15/5|11/6|12/2|12/4| |14/4|14/5|14/6|14/0| |13/5|13/7|15/7| - `----' `-------------------' `-------------------' `-------------------' `--------------' - ,-------------------------------------------------------------------------. ,--------------. ,-------------------. - |06/4|06/5|07/5|08/5|09/5|09/4|10/4|10/5|11/5|12/5|05/5|05/4|11/4| 14/2| |17/4|02/4|04/4| |16/1|17/1|04/1|04/0| - |-------------------------------------------------------------------------| |--------------| |-------------------| - |06/2 |06/7|07/7|08/7|09/7|09/2|10/2|10/7|11/7|12/7|05/7|05/2|11/2| 14/3| |16/4|02/5|04/5| |16/7|17/7|04/7| | - |-------------------------------------------------------------------------| '--------------' |-------------- 02/7| - |02/7 |06/3|07/3|08/3|09/3|09/6|10/6|10/3|11/3|12/3|05/3|05/6| 14/1| |16/2|17/2|04/2| | - |-------------------------------------------------------------------------| ,----. |-------------------| - |01/2 |06/1|07/1|08/1|09/1|09/0|10/0|10/1|11/1|12/1|05/0| 01/3| |02/6| |16/3|17/3|04/3| | - |-------------------------------------------------------------------------| ,--------------. |-------------- 02/3| - |15/4|03/2|13/6| 16/6 |13/0|0/3|12/0|15/1| |02/0|16/0|17/0| | 17/6 |04/6| | - `-------------------------------------------------------------------------' `--------------' `-------------------' -*/ - -#define KEYMAP( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, KQ1, KR1, KE1, KE0, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, KQ7, KR7, KE7, KC7, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, KQ2, KR2, KE2, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, KQ3, KR3, KE3, KC3, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0, KR6, KE6 \ -) { \ -/* 0 1 2 3 4 5 6 7 */ \ -/* A 0 */ {KC_NO, KC_NO, KC_NO, KC_##KA3, KC_NO, KC_NO, KC_NO, KC_NO },\ -/* B 1 */ {KC_NO, KC_NO, KC_##KB2, KC_##KB3, KC_NO, KC_NO, KC_NO, KC_NO },\ -/* C 2 */ {KC_##KC0, KC_NO, KC_NO, KC_##KC3, KC_##KC4, KC_##KC5, KC_##KC6, KC_##KC7},\ -/* D 3 */ {KC_NO, KC_NO, KC_##KD2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO },\ -/* E 4 */ {KC_##KE0, KC_##KE1, KC_##KE2, KC_##KE3, KC_##KE4, KC_##KE5, KC_##KE6, KC_##KE7},\ -/* F 5 */ {KC_##KF0, KC_NO, KC_##KF2, KC_##KF3, KC_##KF4, KC_##KF5, KC_##KF6, KC_##KF7},\ -/* G 6 */ {KC_NO, KC_##KG1, KC_##KG2, KC_##KG3, KC_##KG4, KC_##KG5, KC_##KG6, KC_##KG7},\ -/* H 7 */ {KC_NO, KC_##KH1, KC_##KH2, KC_##KH3, KC_##KH4, KC_##KH5, KC_##KH6, KC_##KH7},\ -/* I 8 */ {KC_NO, KC_##KI1, KC_##KI2, KC_##KI3, KC_##KI4, KC_##KI5, KC_##KI6, KC_##KI7},\ -/* J 9 */ {KC_##KJ0, KC_##KJ1, KC_##KJ2, KC_##KJ3, KC_##KJ4, KC_##KJ5, KC_##KJ6, KC_##KJ7},\ -/* K 10 */ {KC_##KK0, KC_##KK1, KC_##KK2, KC_##KK3, KC_##KK4, KC_##KK5, KC_##KK6, KC_##KK7},\ -/* L 11 */ {KC_NO, KC_##KL1, KC_##KL2, KC_##KL3, KC_##KL4, KC_##KL5, KC_##KL6, KC_##KL7},\ -/* M 12 */ {KC_##KM0, KC_##KM1, KC_##KM2, KC_##KM3, KC_##KM4, KC_##KM5, KC_NO, KC_##KM7},\ -/* N 13 */ {KC_##KN0, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KN5, KC_##KN6, KC_##KN7},\ -/* O 14 */ {KC_##KO0, KC_##KO1, KC_##KO2, KC_##KO3, KC_##KO4, KC_##KO5, KC_##KO6, KC_NO },\ -/* P 15 */ {KC_NO, KC_##KP1, KC_NO, KC_NO, KC_##KP4, KC_##KP5, KC_NO, KC_##KP7},\ -/* Q 16 */ {KC_##KQ0, KC_##KQ1, KC_##KQ2, KC_##KQ3, KC_##KQ4, KC_NO, KC_##KQ6, KC_##KQ7},\ -/* R 17 */ {KC_##KR0, KC_##KR1, KC_##KR2, KC_##KR3, KC_##KR4, KC_NO, KC_##KR6, KC_##KR7} \ -} - -#include "keymap_ansi.h" - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.col)][(key.row)]); - } else { - return pgm_read_byte(&keymaps[0][(key.col)][(key.row)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/ghost_squid/keymap_ansi.h b/keyboard/ghost_squid/keymap_ansi.h deleted file mode 100644 index ed1088baa9..0000000000 --- a/keyboard/ghost_squid/keymap_ansi.h +++ /dev/null @@ -1,23 +0,0 @@ - -static const uint8_t PROGMEM keymaps[][MATRIX_COLS][MATRIX_ROWS] = { - /* Layer 0: Standard ANSI layer */ - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI, FN0,RCTL, LEFT,DOWN,RGHT, P0, PDOT), \ - /* Layer 1: Function layer */ - KEYMAP(\ - CALC,MYCM,WSCH,WHOM,MAIL,VOLD,VOLU,MSEL,MSTP,MPLY,MPRV,MNXT,TRNS, WAKE, PWR,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS) -}; - -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) -}; diff --git a/keyboard/ghost_squid/led.c b/keyboard/ghost_squid/led.c deleted file mode 100644 index da5dbd7ae2..0000000000 --- a/keyboard/ghost_squid/led.c +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - -/* LED pin configuration - * - * Scroll Lock PB7 - * CAPS PC6 - * NUMLOCK PC5 - * - */ -void led_set(uint8_t usb_led) -{ - DDRB |= (1<<7); - DDRC |= (1<<5) | (1<<6); - - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - { - PORTC &= ~(1<<6); - } - else - { - PORTC |= (1<<6); - } - - if (usb_led & (1<<USB_LED_NUM_LOCK)) - { - PORTC &= ~(1<<5); - } - else - { - PORTC |= (1<<5); - } - - if (usb_led & (1<<USB_LED_SCROLL_LOCK)) - { - PORTB &= ~(1<<7); - } - else - { - PORTB |= (1<<7); - } -} diff --git a/keyboard/ghost_squid/matrix.c b/keyboard/ghost_squid/matrix.c deleted file mode 100644 index d6a82ef759..0000000000 --- a/keyboard/ghost_squid/matrix.c +++ /dev/null @@ -1,237 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint8_t read_rows(void); -static void init_rows(void); -static void unselect_cols(void); -static void select_col(uint8_t col); - -inline uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - unselect_cols(); - init_rows(); - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - select_col(col); - _delay_us(3); - uint8_t rows = read_rows(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - debouncing = DEBOUNCE; - } - } - unselect_cols(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop32(matrix[i]); - } - return count; -} - -/* Row pin configuration - * - * row: 0 1 2 3 4 5 6 7 - * pin: PB1 PC2 PB6 PB4 PB3 PB5 PB0 PB2 - * - */ -static void init_rows(void) -{ - DDRC &= ~0b00000100; - DDRB &= ~0b01111111; - PORTC |= 0b00000100; - PORTB |= 0b01111111; -} - -static uint8_t read_rows(void) -{ - return (PINB&(1<<1) ? 0 : (1<<0)) | - (PINC&(1<<2) ? 0 : (1<<1)) | - (PINB&(1<<6) ? 0 : (1<<2)) | - (PINB&(1<<4) ? 0 : (1<<3)) | - (PINB&(1<<3) ? 0 : (1<<4)) | - (PINB&(1<<5) ? 0 : (1<<5)) | - (PINB&(1<<0) ? 0 : (1<<6)) | - (PINB&(1<<2) ? 0 : (1<<7)); -} - -/* These columns uses two 74HC42 4 to 10 bit demultiplexers (low active). - * - * COL PD6 PD5 PD4 PD3 PD2 PD1 - * 10 1 1 0 0 0 0 - * 15 1 1 0 0 0 1 - * 8 1 1 0 0 1 0 - * 14 1 1 0 1 0 0 - * 6 1 1 0 1 0 1 - * 13 1 1 0 1 1 0 - * 12 1 1 1 0 0 0 - * 9 1 1 1 0 1 0 - * 11 1 1 1 1 0 0 - * 7 1 1 1 1 1 0 - * - * COL PD1 PD2 PD3 PD4 PD5 PD6 - * 3 1 1 0 0 0 1 - * 4 1 1 0 0 1 0 - * 17 1 1 0 1 0 0 - * 16 1 1 0 1 1 0 - * 0 1 1 1 0 0 1 - * 5 1 1 1 0 1 0 - * 2 1 1 1 1 0 0 - * 1 1 1 1 1 1 0 - */ -static void unselect_cols(void) -{ - DDRD |= 0b01111111; - PORTD &= ~0b01111111; -} - -static void select_col(uint8_t col) -{ - switch (col) { - case 0: - PORTD |= (1<<6) | (1<<3) | (1<<2) | (1<<1); - break; - case 1: - PORTD |= (1<<5) | (1<<4) | (1<<3) | (1<<2) | (1<<1); - break; - case 2: - PORTD |= (1<<4) | (1<<3) | (1<<2) | (1<<1); - break; - case 3: - PORTD |= (1<<6) | (1<<2) | (1<<1); - break; - case 4: - PORTD |= (1<<5) | (1<<2) | (1<<1); - break; - case 5: - PORTD |= (1<<5) | (1<<3) | (1<<2) | (1<<1); - break; - case 6: - PORTD |= (1<<6) | (1<<5) | (1<<3) | (1<<1); - break; - case 7: - PORTD |= (1<<6) | (1<<5) | (1<<4) | (1<<3) | (1<<2); - break; - case 8: - PORTD |= (1<<6) | (1<<5) | (1<<2); - break; - case 9: - PORTD |= (1<<6) | (1<<5) | (1<<4) | (1<<2); - break; - case 10: - PORTD |= (1<<6) | (1<<5); - break; - case 11: - PORTD |= (1<<6) | (1<<5) | (1<<4) | (1<<3); - break; - case 12: - PORTD |= (1<<6) | (1<<5) | (1<<4); - break; - case 13: - PORTD |= (1<<6) | (1<<5) | (1<<3) | (1<<2); - break; - case 14: - PORTD |= (1<<6) | (1<<5) | (1<<3); - break; - case 15: - PORTD |= (1<<6) | (1<<5) | (1<<1); - break; - case 16: - PORTD |= (1<<5) | (1<<4) | (1<<2) | (1<<1); - break; - case 17: - PORTD |= (1<<4) | (1<<2) | (1<<1); - break; - } -} diff --git a/keyboard/hbkb/Makefile.lufa b/keyboard/hbkb/Makefile.lufa deleted file mode 100644 index 322f219d69..0000000000 --- a/keyboard/hbkb/Makefile.lufa +++ /dev/null @@ -1,120 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = hbkb_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# 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) - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/hbkb/config.h b/keyboard/hbkb/config.h deleted file mode 100644 index fef8c05ed3..0000000000 --- a/keyboard/hbkb/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xBB00 -#define MANUFACTURER t.m.k. -#define DEVICE_VER 0x0100 -#define PRODUCT Happy Buckling Keyboard - -#define DESCRIPTION mod version of IBM Model M keyboard - -/* matrix size */ -#define MATRIX_ROWS 12 -#define MATRIX_COLS 8 - -/* define if matrix has ghost */ -#define MATRIX_HAS_GHOST - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* legacy keymap support */ -#define USE_LEGACY_KEYMAP - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) \ -) - -#endif diff --git a/keyboard/hbkb/keymap.c b/keyboard/hbkb/keymap.c deleted file mode 100644 index b89bdf8e42..0000000000 --- a/keyboard/hbkb/keymap.c +++ /dev/null @@ -1,231 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * Keymap for Macway mod - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "keymap.h" - - -/* - * Layout: 59key - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BS | - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L|Fn3| '|Return | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .|Fn2|Shift | - * |-----------------------------------------------------------| - * |Ctrl | |Alt | Fn4 |Alt | |Fn1 | - * `-----' `---------------------------------------' `-----' - * - * Matrix: 12x8 - * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 - * ---+---------+---------+---------+---------+---------+---------+---------+--------- - * 0 | | | LCTRL | | | | RCTRL | - * 1 | | LSHIFT | | | | | RSHIFT | - * 2 | | Tab | Grave | 1 | Q | A | Z | - * 3 | | Cpslck | | 2 | W | S | X | - * 4 | | | | 3 | E | D | C | - * 5 | G | T | 5 | 4 | R | F | V | B - * 6 | | Bckspc | | | Key*1 | Bckslsh | Enter | Space - * 7 | H | Y | 6 | 7 | U | J | M | N - * 8 | | Rbrckt | Equal | 8 | I | K | Comma | - * 9 | | | | 9 | O | L | Dot | - * A | | Lbrckt | Minus | 0 | P | Smcolon | | Slash - * B | LALT | | | | | | | RALT - * Key*1 This key locates between Equal and Backspace. - * - * Original matrix here: http://geekhack.org/showthread.php?7767-Wireless-Model-M&p=133911&viewfull=1#post133911 - */ -#define KEYMAP( \ - K22, K23, K33, K43, K53, K52, K72, K73, K83, K93, KA3, KA2, K82, K64, K61, \ - K21, K24, K34, K44, K54, K51, K71, K74, K84, K94, KA4, KA1, K81, K65, \ - K31, K25, K35, K45, K55, K50, K70, K75, K85, K95, KA5, KA0, K66, \ - K11, K26, K36, K46, K56, K57, K77, K76, K86, K96, KA7, K16, \ - K02, KB0, K67, KB7, K06 \ -) { \ - { KC_NO, KC_NO, KC_##K02, KC_NO, KC_NO, KC_NO, KC_##K06, KC_NO }, \ - { KC_NO, KC_##K11, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K16, KC_NO }, \ - { KC_NO, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO }, \ - { KC_NO, KC_##K31, KC_NO, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_NO }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ - { KC_NO, KC_##K61, KC_NO, KC_NO, 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_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_##K96, KC_NO }, \ - { KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_NO, KC_##KA7 }, \ - { KC_##KB0, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB7 }, \ -} - -#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)])) - - -// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed. -static const uint8_t PROGMEM fn_layer[] = { - 0, // Fn0 - 1, // Fn1 - 2, // Fn2 - 3, // Fn3 - 4, // Fn4 - 0, // Fn5 - 0, // Fn6 - 0 // Fn7 -}; - -// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. -// See layer.c for details. -static const uint8_t PROGMEM fn_keycode[] = { - KC_NO, // Fn0 - KC_NO, // Fn1 - KC_SLSH, // Fn2 - KC_SCLN, // Fn3 - KC_SPC, // Fn4 - KC_NO, // Fn5 - KC_NO, // Fn6 - KC_NO // Fn7 -}; - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BS | - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L|Fn3| '|Return | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .|Fn2|Shift | - * |-----------------------------------------------------------| - * |Ctrl | |Alt | Fn4 |Alt | |Fn1 | - * `-----' `---------------------------------------' `-----' - */ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \ - LCTL,A, S, D, F, G, H, J, K, L, FN3, QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN2, FN1, \ - LGUI, LALT, FN4, RALT, FN1), - - - /* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | - * |-----------------------------------------------------------| - * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | - * |-----------------------------------------------------------| - * |Shift | | | | | | +| -|End|PgD|Dow|Shift | - * |-----------------------------------------------------------| - * |Ctrl | |Alt | Space |Alt | |Fn1 | - * `-----' `---------------------------------------' `-----' - */ - KEYMAP(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,NO, NO, NO, NO, NO, NO, NO, PSCR,SLCK,BRK, UP, NO, NO, \ - LCTL,VOLD,VOLU,MUTE,NO, NO, PAST,PSLS,HOME,PGUP,LEFT,RGHT,NO, \ - LSFT,NO, NO, NO, NO, NO, PPLS,PMNS,END, PGDN,DOWN,FN1, \ - LGUI, LALT, SPC, RALT, FN1), - - - /* Layer 2: Vi mode (Quote/Rmeta) - * ,-----------------------------------------------------------. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | - * |-----------------------------------------------------------| - * | \ |Hom|PgD|Up |PgU|End|Hom|PgD|PgU|End| | | | | - * |-----------------------------------------------------------| - * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | | | - * |-----------------------------------------------------------| - * |Shift | | | | | |Hom|PgD|PgU|End|xxx|Shift | - * |-----------------------------------------------------------| - * |Ctrl | |Alt | Space |Alt | |Fn1 | - * `-----' `---------------------------------------' `-----' - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, \ - BSLS,HOME,PGDN,UP, PGUP,END, HOME,PGDN,PGUP,END, NO, NO, NO, NO, \ - LCTL,NO, LEFT,DOWN,RGHT,NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, \ - LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, RSFT, \ - LGUI, LALT, SPC, RALT, NO), - - - - /* Layer 3: Mouse mode (Semicolon) - * ,-----------------------------------------------------------. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| | | - * |-----------------------------------------------------------| - * | \ |MwL|MwD|McU|MwU|MwR|MwL|MwD|MwU|MwR| | | | | - * |-----------------------------------------------------------| - * |Contro| |McL|McD|McR| |McL|McD|McU|McR|xxx| | | - * |-----------------------------------------------------------| - * |Shift | | |Mb1|Mb2|Mb3|Mb2|Mb1| | | |Shift | - * |-----------------------------------------------------------| - * |Ctrl | |Alt | Space |Alt | | | - * `-----' `---------------------------------------' `-----' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, \ - BSLS,WH_L,WH_D,MS_U,WH_U,WH_R,WH_L,WH_D,WH_U,WH_R,NO, NO, NO, NO, \ - LCTL,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN3, NO, NO, \ - LSFT,NO, NO, BTN1,BTN2,BTN3,BTN2,BTN1,NO, NO, NO, RSFT, \ - LGUI, LALT, BTN1, RALT, NO), - - - /* Layer 4: Matias half keyboard style (Space) - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | - * |-----------------------------------------------------------| - * |Backs| P| O| I| U| Y| T| R| E| W| Q| | |Tab | - * |-----------------------------------------------------------| - * |Contro| ;| L| K| J| H| G| F| D| S| A|Con|Control | - * |-----------------------------------------------------------| - * |Shift | /| .| ,| M| N| B| V| C| X| Z|Shift | - * |-----------------------------------------------------------| - * |Ctrl | |Alt | Fn4 |Alt | | | - * `-----' `---------------------------------------' `-----' - */ - KEYMAP(MINS,0, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO, NO, NO, ESC, \ - BSPC,P, O, I, U, Y, T, R, E, W, Q, NO, NO, TAB, \ - LCTL,SCLN,L, K, J, H, G, F, D, S, A, RCTL,RCTL, \ - LSFT,SLSH,DOT, COMM,M, N, B, V, C, X, Z, RSFT, \ - LGUI, LALT, FN4, RALT, NO), - -}; - - -uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col) -{ - return KEYCODE(layer, row, col); -} - -uint8_t keymap_fn_layer(uint8_t index) -{ - return pgm_read_byte(&fn_layer[index]); -} - -uint8_t keymap_fn_keycode(uint8_t index) -{ - return pgm_read_byte(&fn_keycode[index]); -} diff --git a/keyboard/hbkb/led.c b/keyboard/hbkb/led.c deleted file mode 100644 index fc0eeb0ff7..0000000000 --- a/keyboard/hbkb/led.c +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ -} diff --git a/keyboard/hbkb/matrix.c b/keyboard/hbkb/matrix.c deleted file mode 100644 index ee32312d9a..0000000000 --- a/keyboard/hbkb/matrix.c +++ /dev/null @@ -1,206 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -/* - * Happy Buckling Keyboard(IBM Model M mod) - * - * Pin usage: - * COL: PD0-7 - * ROW: PB0-7, PF4-7 - */ -#ifndef DEBOUNCE -# define DEBOUNCE 10 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#ifdef MATRIX_HAS_GHOST -static bool matrix_has_ghost_in_row(uint8_t row); -#endif -static matrix_row_t read_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<<JTD); - MCUCR |= (1<<JTD); - - // initialize rows - unselect_rows(); - - // initialize columns to input with pull-up(DDR:0, PORT:1) - DDRD = 0x00; - PORTD = 0xFF; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 01234567\n"); - for (uint8_t row = 0; row < matrix_rows(); row++) { - phex(row); print(": "); - pbin_reverse(matrix_get_row(row)); -#ifdef MATRIX_HAS_GHOST - if (matrix_has_ghost_in_row(row)) { - print(" <ghost"); - } -#endif - print("\n"); - } -} - -#ifdef MATRIX_HAS_GHOST -inline -static bool matrix_has_ghost_in_row(uint8_t row) -{ - // no ghost exists in case less than 2 keys on - if (((matrix[row] - 1) & matrix[row]) == 0) - return false; - - // ghost exists in case same state as other row - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - if (i != row && (matrix[i] & matrix[row])) - return true; - } - return false; -} -#endif - -inline -static matrix_row_t read_cols(void) -{ - return ~PIND; -} - -inline -static void unselect_rows(void) -{ - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~0b11111111; - PORTB &= ~0b11111111; - DDRF &= ~0b11110000; - PORTF &= ~0b11110000; -} - -inline -static void select_row(uint8_t row) -{ - // Output low(DDR:1, PORT:0) to select - switch (row) { - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - DDRB |= (1<<row); - PORTB &= ~(1<<row); - break; - case 8: - DDRF |= (1<<4); - PORTF &= ~(1<<4); - break; - case 9: - case 10: - case 11: - DDRF |= (1<<(row-4)); - PORTF &= ~(1<<(row-4)); - break; - } -} diff --git a/keyboard/hhkb/Makefile b/keyboard/hhkb/Makefile index d434246cef..21ba261a23 100644 --- a/keyboard/hhkb/Makefile +++ b/keyboard/hhkb/Makefile @@ -27,7 +27,7 @@ # make flip-ee = Download the eeprom file to the device, using Atmel FLIP # (must have Atmel FLIP installed). # -# make debug = Start either simulavr or avarice as specified for debugging, +# make debug = Start either simulavr or avarice as specified for debugging, # with avr-gdb or avr-insight as the front end for debugging. # # make filename.s = Just compile filename.c into the assembler code only. @@ -39,27 +39,30 @@ #---------------------------------------------------------------------------- # Target file name (without extension). -TARGET = hhkb_lufa +TARGET = hhkb_qmk + # Directory common source filess exist +TOP_DIR = ../.. TMK_DIR = ../../tmk_core # Directory keyboard dependent files exist TARGET_DIR = . +# # project specific files +SRC = hhkb_qmk.c \ + matrix.c -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap_common.c \ - matrix.c \ - led.c +ifdef KEYMAP + SRC := keymaps/keymaps/$(KEYMAP).c $(SRC) +else + SRC := keymaps/keymaps/default.c $(SRC) +endif CONFIG_H = config.h - # MCU name -# PJRC Teensy++ 2.0 -#MCU = at90usb1286 -# TMK Alt Controller or PJRC Teensy 2.0 +#MCU = at90usb1287 MCU = atmega32u4 # Processor frequency. @@ -95,66 +98,52 @@ ARCH = AVR8 # 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 -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +# 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 (TMK Alt Controller) +# Atmel DFU loader 4096 # LUFA bootloader 4096 # USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 +#OPT_DEFS += -DBOOTLOADER_SIZE=4096 +# as per original hasu settings +OPT_DEFS += -DBOOTLOADER_SIZE=512 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover -#KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor -#HHKB_JP = yes # HHKB JP support +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the HHKB +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +# UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID -#OPT_DEFS += -DNO_ACTION_TAPPING -#OPT_DEFS += -DNO_ACTION_LAYER -#OPT_DEFS += -DNO_ACTION_MACRO - - -# -# Keymap file -# -ifdef KEYMAP - SRC := keymaps/$(KEYMAP).c $(SRC) -else - ifdef HHKB_JP - SRC := keymaps/jp.c $(SRC) - else - SRC := keymaps/hhkb.c $(SRC) - endif -endif - - -ifneq (, $(or $(findstring jp.c, $(SRC)), $(findstring yes, $(HHKB_JP)))) - OPT_DEFS += -DHHKB_JP -endif +# Optimize size but this may cause error "relocation truncated to fit" +#EXTRALDFLAGS = -Wl,--relax # Search Path VPATH += $(TARGET_DIR) +VPATH += $(TOP_DIR) VPATH += $(TMK_DIR) -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION debug-on: all debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) debug-off: all + +include $(TOP_DIR)/quantum/quantum.mk diff --git a/keyboard/hhkb/Makefile.jp b/keyboard/hhkb/Makefile.jp deleted file mode 100644 index e04dbb2424..0000000000 --- a/keyboard/hhkb/Makefile.jp +++ /dev/null @@ -1,2 +0,0 @@ -HHKB_JP = yes -include Makefile diff --git a/keyboard/hhkb/Makefile.pjrc b/keyboard/hhkb/Makefile.pjrc deleted file mode 100644 index 403a8ec60a..0000000000 --- a/keyboard/hhkb/Makefile.pjrc +++ /dev/null @@ -1,68 +0,0 @@ -# -# Makefile for PJRC Teensy -# - - -# Target file name (without extension). -TARGET = hhkb_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap_common.c \ - matrix.c \ - led.c - -ifdef KEYMAP - SRC := keymaps/$(KEYMAP).c $(SRC) -else - SRC := keymaps/hasu.c $(SRC) -endif - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 -#MCU = at90usb646 # Teensy++ 1.0 -#MCU = at90usb1286 # Teensy++ 2.0 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - - - -#---------------- Programming Options -------------------------- -PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex - - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/hhkb/Makefile.rn42 b/keyboard/hhkb/Makefile.rn42 deleted file mode 100644 index a730442af0..0000000000 --- a/keyboard/hhkb/Makefile.rn42 +++ /dev/null @@ -1,155 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = hhkb_rn42 - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap_common.c \ - matrix.c \ - led.c - -CONFIG_H = config_rn42.h - - -# 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 -#OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 (TMK Alt Controller) -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#NKRO_ENABLE = yes # USB Nkey Rollover -#KEYMAP_SECTION_ENABLE = yes # fixed address keymap for keymap editor -#HHKB_JP = yes # HHKB JP support - - -# -# Keymap file -# -ifdef KEYMAP - SRC := keymaps/$(KEYMAP).c $(SRC) -else - ifdef HHKB_JP - SRC := keymaps/jp.c $(SRC) - else - SRC := keymaps/hhkb.c $(SRC) - endif -endif - - -ifneq (, $(or $(findstring jp.c, $(SRC)), $(findstring yes, $(HHKB_JP)))) - OPT_DEFS += -DHHKB_JP -endif - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include rn42.mk -include $(TMK_DIR)/protocol.mk -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION -debug-on: all - -debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT -debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) -debug-off: all diff --git a/keyboard/hhkb/README.md b/keyboard/hhkb/README.md index e20c23d823..389407b3aa 100644 --- a/keyboard/hhkb/README.md +++ b/keyboard/hhkb/README.md @@ -1,102 +1,180 @@ -Alternative Controller for HHKB Pro -=================================== -I wanted to add some features like vi cursor and mouse keys to my [HHKB][HHKB] but its controller is not programmable and firmware source code is not open, of course. This means customizing this keyboard needs to replace original controller with programmable one. +hhkb_qmk keyboard firmware +====================== -This controller can work with HHKB **Professional**, **Professional** 2, **JP** and **Type-S**. +## Quantum MK Firmware -See [this thread][AltController] in geekhack.org. +You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you. -[HHKB]: http://www.pfu.fujitsu.com/hhkeyboard/ -[AltController]: http://geekhack.org/index.php?topic=12047.0 + BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality + MIDI_ENABLE = yes # MIDI controls + # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not // + BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID +## Quick aliases to common actions -## Update -* Bluetooth module RN-42 is supported.(2015/01) -* V-USB and iWRAP are no longer supported now, but still it'll works with a little fix. See not_supported directory.(2015/01) +Your keymap can include shortcuts to common operations (called "function actions" in tmk). +### Switching and toggling layers -##Features -* Customizable keymap -* More keymap layers(more Fn keys) -* Mouse keys -* USB NKRO -* Bluetooth(RN-42) +`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. -See README of [tmk_keyboard] for more. +`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). -[tmk_keyboard]: http://github.com/tmk/tmk_keyboard - -###Pros -* No risks: Everything is all reversible -* No need for PCB trace patching, case cutting or any other destructive mod -* Can keep original controller intact -* Can change all HHKB behavior as you like +`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. + +### Fun with modifier keys + +* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias +* `RSFT(kc)` - applies right Shift to *kc* +* `LCTL(kc)` - applies left Control to *kc* +* `RCTL(kc)` - applies right Control to *kc* +* `LALT(kc)` - applies left Alt to *kc* +* `RALT(kc)` - applies right Alt to *kc* +* `LGUI(kc)` - applies left GUI (command/win) to *kc* +* `RGUI(kc)` - applies right GUI (command/win) to *kc* + +You can also chain these, like this: + + LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. + +The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`. + + KC_TILD ~ + KC_EXLM ! + KC_AT @ + KC_HASH # + KC_DLR $ + KC_PERC % + KC_CIRC ^ + KC_AMPR & + KC_ASTR * + KC_LPRN ( + KC_RPRN ) + KC_UNDS _ + KC_PLUS + + KC_LCBR { + KC_RCBR } + KC_PIPE | + KC_COLN : + +`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. + +These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available): + + * MOD_LCTL + * MOD_LSFT + * MOD_LALT + * MOD_LGUI -###Cons -* Void your warranty -* Lose USB hub function of Pro2 +These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. -##DISCLAIMER -I'm not a professional of electronics nor MCU programming. This may damage your HHKB. -And my English writing is poor, I'm not sure I can convey my notions accurately. +We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: + * `CTL_T(kc)` - is LCTL when held and *kc* when tapped + * `SFT_T(kc)` - is LSFT when held and *kc* when tapped + * `ALT_T(kc)` - is LALT when held and *kc* when tapped + * `GUI_T(kc)` - is LGUI when held and *kc* when tapped + * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) -##Documents -See [doc/HHKB.txt](doc/HHKB.txt) and files under [doc/](doc/) for internal of HHKB and this controller. +### Temporarily setting the default layer +`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. -##Build Firmware & Program -See [this document](../../doc/build.md) first. +### Remember: These are just aliases -### Configuration -If your target is **HHKB JP** you need to set `HHKB_JP` build option in `Makefile` or use `Makefile.jp` instead of `Makefile`. +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). -If you use other than **TMK Alt Controller Board** set proper `MCU`, `BOOTLOADER_SIZE` and other build options in `Makefile` and `config.h`. At least PJRC Teensy requires changing `BOOTLOADER_SIZE` to 512. +Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. -### Build -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. Just `make` with `KEYMAP` option like: +## Macro shortcuts: Send a whole string when pressing just one key - $ make -f Makefile.<jp|pjrc|rn42> KEYMAP=(hasu|hhkb|spacefn|<name>) +Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c). -You can omit `-f` option when you use `Makefile`. `Makefile` is used for **Pro2 and Pro**, `Makefile.jp` fits for **JP** model and `Makefile.rn42` supports Bluetooth module **RN-42**. `Makefile.pjrc` uses **PJRC** as output protocol instead of **LUFA**. +```c +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. +{ + switch(id) { + case 0: // this would trigger when you hit a key mapped as M(0) + if (record->event.pressed) { + return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes + } + break; + } + return MACRO_NONE; +}; +``` +A macro can include the following commands: + +* I() change interval of stroke in milliseconds. +* D() press key. +* U() release key. +* T() type key(press and release). +* W() wait (milliseconds). +* END end mark. + +So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends. + +Note: Using macros to have your keyboard send passwords for you is a bad idea. + +### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) + +Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: + + #include "keymap_<layout>.h" + +Where <layout> is "colemak" or "dvorak". After including this line, you will get access to: + + * `CM_*` for all of the Colemak-equivalent characters + * `DV_*` for all of the Dvorak-equivalent characters + +These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. +To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`. -### Program -First, push reset button on board to start bootloader. +## Additional language support -This command programs the controller with [dfu-programmer] if the tool is installed and configured properly. +In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support). - $ make -f Makefile.<variant> KEYMAP=<name> dfu +## Unicode support -Or you can also use [FLIP] command to program. Also the tool should be installed and configured properly. FLIP GUI application is also available. +You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. - $ make -f Makefile.<variant> KEYMAP=<name> flip +## Other firmware shortcut keycodes -Use [Teensy Loader] if your controller is Teensy/Teensy++. +* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`) +* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things +* `BL_ON` - turns the backlight on +* `BL_OFF` - turns the backlight off +* `BL_<n>` - sets the backlight to level *n* +* `BL_INC` - increments the backlight level by one +* `BL_DEC` - decrements the backlight level by one +* `BL_TOGG` - toggles the backlight +* `BL_STEP` - steps through the backlight levels +Enable the backlight from the Makefile. -##Keymap -To define your own keymap create a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files. +## MIDI functionalty +This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. -##Hardware -You have some options for hardware. Development boards with USB AVR family(ATMega32U4, AT90USB1286) like Teensy will work while MegaAVR with [V-USB] library is also cheaper option for DIY. +## Bluetooth functionality -###1. TMK Alt Controller Board -Design files are available at [Keyboard Controller Board for HHKB(KiCad project)](https://github.com/tmk/HHKB_controller) and see [Controller Distribution thread](http://geekhack.org/index.php?topic=56494.0) if you get an assembled one. +This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. +## Building -###2. PJRC Teensy -See [this thread](http://geekhack.org/index.php?topic=57008.0). +Download or clone the whole firmware and navigate to the keyboard/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. -###3. V-USB version -See [V-USB controller for HHKB](doc/V-USB.md). +### 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 a file in the keymaps folder named `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files. -[LUFA]: http://www.fourwalledcubicle.com/LUFA.php -[PJRC]: http://www.pjrc.com/teensy/usb_keyboard.html -[dfu-programmer]: http://dfu-programmer.sourceforge.net/ -[FLIP]: http://www.atmel.com/tools/FLIP.aspx -[Teensy Loader]: http://www.pjrc.com/teensy/loader.html -[V-USB]: http://www.obdev.at/products/vusb/index.html +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|<name>] +``` +Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. diff --git a/keyboard/hhkb/config.h b/keyboard/hhkb/config.h index c0acc0a7ed..ee66e44571 100644 --- a/keyboard/hhkb/config.h +++ b/keyboard/hhkb/config.h @@ -1,5 +1,5 @@ /* -Copyright 2011 Jun Wako <wakojun@gmail.com> +Copyright 2012 Jun Wako <wakojun@gmail.com> 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 @@ -18,43 +18,43 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef CONFIG_H #define CONFIG_H +#include "config_common.h" +/* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0xCAFE #define DEVICE_VER 0x0104 -#define MANUFACTURER t.m.k. +#define MANUFACTURER q.m.k #define PRODUCT HHKB mod -#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod +#define DESCRIPTION q.m.k keyboard firmware for HHKB - -/* matrix size */ -#ifdef HHKB_JP -# define MATRIX_ROWS 16 -#else -# define MATRIX_ROWS 8 -#endif +/* key matrix size */ +#define MATRIX_ROWS 8 #define MATRIX_COLS 8 +#define TAPPING_TERM 200 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 -/* period of tapping(ms) */ -#define TAPPING_TERM 300 -/* tap count needed for toggling a feature */ -#define TAPPING_TOGGLE 5 -/* Oneshot timeout(ms) */ -#define ONESHOT_TIMEOUT 300 +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 -/* Boot Magic salt key: Space */ -#define BOOTMAGIC_KEY_SALT KC_SPACE +/* 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 diff --git a/keyboard/hhkb/config_rn42.h b/keyboard/hhkb/config_rn42.h deleted file mode 100644 index 21e73f1c53..0000000000 --- a/keyboard/hhkb/config_rn42.h +++ /dev/null @@ -1,112 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x4242 -#define DEVICE_VER 0x0104 -#define MANUFACTURER t.m.k. -#define PRODUCT HHKB mod -#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod - - -/* matrix size */ -#ifdef HHKB_JP -# define MATRIX_ROWS 16 -#else -# define MATRIX_ROWS 8 -#endif -#define MATRIX_COLS 8 - - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - - -/* period of tapping(ms) */ -#define TAPPING_TERM 300 -/* tap count needed for toggling a feature */ -#define TAPPING_TOGGLE 5 -/* Oneshot timeout(ms) */ -#define ONESHOT_TIMEOUT 300 - -/* Boot Magic salt key: Space */ -#define BOOTMAGIC_KEY_SALT KC_FN6 - -/* power control of key switch board */ -#define HHKB_POWER_SAVING - -/* - * Hardware Serial(UART) - * Baud rate are calculated with round off(+0.5). - */ -#ifdef __AVR_ATmega32U4__ - /* iom32u4.h has no definition of UCSR1D. copy from iom32u2.h */ - #define UCSR1D _SFR_MEM8(0xCB) - #define RTSEN 0 - #define CTSEN 1 - - #define SERIAL_UART_BAUD 115200 - #define SERIAL_UART_DATA UDR1 - #define SERIAL_UART_UBRR ((F_CPU/(16.0*SERIAL_UART_BAUD)-1+0.5)) - #define SERIAL_UART_RXD_VECT USART1_RX_vect - #define SERIAL_UART_TXD_READY (UCSR1A&(1<<UDRE1)) - #define SERIAL_UART_INIT() do { \ - UBRR1L = (uint8_t) SERIAL_UART_UBRR; /* baud rate */ \ - UBRR1H = ((uint16_t)SERIAL_UART_UBRR>>8); /* baud rate */ \ - UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \ - UCSR1B |= (0<<TXCIE1) | (1<<TXEN1); /* TX interrupt, TX: enable */ \ - UCSR1C |= (0<<UPM11) | (0<<UPM10); /* parity: none(00), even(01), odd(11) */ \ - UCSR1D |= (0<<RTSEN) | (0<<CTSEN); /* RTS, CTS(no flow control by hardware) */ \ - DDRD |= (1<<5); PORTD &= ~(1<<5); /* RTS for flow control by firmware */ \ - sei(); \ - } while(0) - #define SERIAL_UART_RTS_LO() do { PORTD &= ~(1<<5); } while (0) - #define SERIAL_UART_RTS_HI() do { PORTD |= (1<<5); } while (0) -#else - #error "USART configuration is needed." -#endif - - -/* for debug */ -#define SUART_OUT_PORT PORTD -#define SUART_OUT_BIT 0 -#define SUART_IN_PIN PIND -#define SUART_IN_BIT 1 - - -/* - * 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/keyboard/hhkb/doc/Bluetooth.txt b/keyboard/hhkb/doc/Bluetooth.txt deleted file mode 100644 index 24243aff86..0000000000 --- a/keyboard/hhkb/doc/Bluetooth.txt +++ /dev/null @@ -1,39 +0,0 @@ -HHKB Bluetooth mod -================== -See this article: -http://geekhack.org/showwiki.php?title=Island:20851 - - - -Power consume -============= -Switch board ------------- -5V -18mA full scan/no power control -16.5mA full scan with power control of POWER_ON/POWER_OFF in matrix.c -3.5-6mA 60ms watchdog timer sleep iwrap/main.c - -- the longer sleep time the less power is consumed. -- power control of swtich board must be needed. -FET switch may be better, though 18mA is with in port sink current limit. In current design switch board ground is connected to PB5 pin and power it on by making the pin low. - -Blueguiga WT12 --------------- -3.3V --42mA startup/searching/connecting -19-23mA connected -4mA -8mA not connected - -iWRAP sleep command may not work. to be looked into. - -Power Over all --------------- -5V --65mA startup -17-24mA idle/not connected --42mA connecting -32-37mA idle/connecting(with sleep) -50-53mA typing/connecting(no sleep) - -2013/06/07 diff --git a/keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg b/keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg Binary files differdeleted file mode 100644 index 2e5a25e81e..0000000000 --- a/keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB.txt b/keyboard/hhkb/doc/HHKB.txt deleted file mode 100644 index 3d08ceb0af..0000000000 --- a/keyboard/hhkb/doc/HHKB.txt +++ /dev/null @@ -1,204 +0,0 @@ -Internal of HHKB pro -===================== -HHKB pro has MCU and some chips on separate two PCBs. - -Controller PCB --------------- - M38K07M4 Renesas MCU with USB function - http://documentation.renesas.com/eng/products/mpumcu/rej03b0192_38k0ds.pdf - - (HHKB_controller.jpg) - -Keyswitch PCB -------------- - HC4051 Analog Multiplexer: select a row line. - http://www.ti.com/lit/ds/schs122j/schs122j.pdf - LS145 BCD Decoder: select a column line. - http://www.ti.com/lit/ds/symlink/sn74ls145.pdf - BU9831 Non-volatile electronic potentiometer: for calibration? - https://www.spezial.com/doc/rohm-a/bu9831.pdf - TP1683/4 Capacitive Sensing controller: no datasheet available. - - (HHKB_keyswitch.jpg) - - Topre original chip? - (HHKB_TP1684.jpg) - - -Connector Cable ---------------- -Two PCBs are connected by 15 lines(13 in case of Pro2). -Vcc and GND use 3(2) lines each, other lines are for keyboard signaling. - - HHKB connector lines: - JP Pro2 Pro Function Description TMK pin usage - -------------------------------------------------------------------------------------------- - 1 Vcc(5V) 5V - 1 1 2 Vcc(5V) 5V - 2 2 3 Vcc(5V) 5V - 3 3 4 TP1684 ~KEY: Low(0) when key is pressed PD7 input(with pullup) - 4 4 5 TP1684 HYS: High(1) when key is pressed PB7 output - 5 5 6 HC4051 A(bit0)\ PB0 output - 6 6 7 HC4051 B(bit1) > select row 0-7 PB1 output - 7 7 8 HC4051 C(bit2)/ PB2 output - 8 8 9 LS145 A(bit0)\ PB3 output - 9 9 10 LS145 B(bit1) > select column 0-7 PB4 output - 10 10 11 LS145 C(bit2)/ PB5 output - 11 11 12 LS145 ~D(enable) Low(0) enables selected column PB6 output - 12 12 13 GND GND - 13 13 14 GND GND - 15 GND - 14 HC4051(Z2) ~Enable of Z2 row0-7 PC6 - 15 HC4051(Z3) ~Enable of Z3 row8-15 PC7 - - NOTE: Probably HYS changes threshold for upstroke and makes hysteresis in the result. - NOTE: HYS should be given High(1) when previous KEY state is Low(0). - NOTE: 1KOhm didn't work as pullup resistor on KEY. AVR internal pullup or 10KOhm resistor was OK. - NOTE: JP has two HC4051(Z2,Z3) and line 5, 6 and 7 are connected to both of them. - - (HHKB_connector.jpg) - - -Keyswitch matrix ----------------- -HHKB switch matrix is ghost-free and bounce-free. - - Pro/Pro2(8x8): - COL 0 1 2 3 4 5 6 7 - ROW --------------------------------------------------------------- - 0| 2 q w s a z x c - 1| 3 4 r e d f v b - 2| 5 6 y t g h n _NONE_ - 3| 1 Esc Tab Control LShift LAlt LMeta Space - 4| 7 8 u i k j m _NONE_ - 5| \ ` Delete Return Fn RShift RAlt RMeta - 6| 9 0 o p ; l , _NONE_ - 7| - + ] [ ' / . _NONE_ - - - JP(16x8): - COL 0 1 2 3 4 5 6 7 - ROW --------------------------------------------------------------- - 0| ESC TAB LFn LShift LCtrl - 1| 4 E MuHKN C D - 2| 3 W LAlt X S - 3| 1 HHK - 4| - 5| 5 R V F - 6| 2 Q LGui Z A - 7| 6 T Space B G - 8| 9 I Kana , K - 9| 8 U Henkan M J - A| 7 Y N H - B| 0 O RAlt . L - C| BS Right RShift Enter - D| \ [ Down Up ] - E| - P RFn / ; - F| ~ @ Left Ro : - - -Matrix diagram: - - Pro/Pro2: - +-------------------------+-+-+-+-+-+-+-+ Vcc - |bias control? - - - - - - - - --- - | 3.9K*8 R R R R R R R R | - +--------^+ +--------+ - - - - - - - - | - | 2| | HC4051 <0-------|-|-|-|-|-|-|-|--|R|-+ - | |capa. | <1-------|-|-|-|-|-|-|-|--|R|-+ - | TP1684 |sense | <2-------|-|-|-|-|-|-|-|--|R|-+ - | 11<------| <3-------|-|-|-|-|-|-|-|--|R|-+ - | | | <4-------|-|-|-|-|-|-|-|--|R|-+ - | | | <5-------|-|-|-|-|-|-|-|--|R|-+ - | <-+ | <6-------|-|-|-|-|-|-|-|--|R|-+ - | 1 4 | | | <7-------|-|-|-|-|-|-|-|--|R|-+ - +---V---^-+ | +-^-^-^--+ 0 1 2 3 4 5 6 7 33K*8 - KEY HYS | A B C +-----------------+ - | | +-^----+ | | | | LS145 | - Vcc | | |BU9831| | | | +-^--^--^--^------+ - --- | | +------+ | | | A B C D +-------+ - | | | | | | | | | | | | - 1-3 4 5 6 7 8 9 10 11 12 13-15 Pro | - 1-2 3 4 5 6 7 8 9 10 11 12-13 Pro2| - +--------------------------------------------------+ | - | connector | --- - +--------------------------------------------------+ GND - - - JP: - +-----------------------------+-+-+-+-+ Vcc - |bias control? - - - - - --- - | 3.9K*5 R R R R R | - +--------^+ +--------+ - - - - - | - | | | HC4051 <0-----------|-|-|-|-|----|R|-+ - | |capa. | Z2 <1-----------|-|-|-|-|----|R|-+ - | TP1684 |sense | <2-----------|-|-|-|-|----|R|-+ - | <---+--| <3-----------|-|-|-|-|----|R|-+ - | | | | <4-----------|-|-|-|-|----|R|-+ - | | ~En| <5-----------|-|-|-|-|----|R|-+ - | | +----> <6-----------|-|-|-|-|----|R|-+ - | | | | | A B C <7-----------|-|-|-|-|----|R|-+ - +---V---^-+ | | +-^-^-^--+ | | | | | | - KEY HYS | | | | | | | | | | | - | | | | +--------+ | | | | | | - | | | | | HC4051 <8-----------|-|-|-|-|----|R|-+ - | | | | | Z3 <9-----------|-|-|-|-|----|R|-+ - | | | +--| <A-----------|-|-|-|-|----|R|-+ - | | | | <B-----------|-|-|-|-|----|R|-+ - | | | | <C-----------|-|-|-|-|----|R|-+ - | | | ~En| <D-----------|-|-|-|-|----|R|-+ - | | | +-> <E-----------|-|-|-|-|----|R|-+ - | | | | | A B C <F-----------|-|-|-|-|----|R|-+ - | | | | +-^-^-^--+ 0 1 2 3 4 5 6 7 33K*8 - | | | | | | | +-----------------+ - | | | | | | | | LS145 | - Vcc | | | | | | | +-^--^--^--^------+ - --- | | | | | | | A B C D +-------+ - | | | | | | | | | | | | | | - 1-2 3 4 14 15 5 6 7 8 9 10 11 12-13 | - +--------------------------------------------------+ | - | connector | --- - +--------------------------------------------------+ GND - - -Signals charts --------------- - While pressing space bar, watched HHKB Pro original controller signals by logic analyzer. - Row and column is looping between 0-7 each for selecting a key. - A key is scaned every about 15ms, so scan rate is 66Hz. - - (HHKB_chart1.jpg) - - Space bar locate at ROW:3 COL:7. A key is selected by HC4051(C,B,A) and LS145(C,B,A). - Key state can be read on TP1684(4/KEY) while asserting low on LS145(D). - - (HHKB_chart2.jpg) - - - Signal of JP: - - 1) Select row - rowC ____~~~~____~~~~ 3.8/3.8ms(JP) 7.7/7.7ms(Pro) S2 of HC4051 - rowB __~~__~~__~~__~~ 1.9/1.9ms(JP) 3.8/3.8ms(Pro) S1 of HC4051 - rowA _~_~_~_~_~_~_~_~ 1.0/1.0ms(JP) 1.9/1.9ms(Pro) S0 of HC4051 - 0123456701234567 selected row(Pro) - 0123456789ABCDEF selected row(JP) - rowEn0 ________~~~~~~~~ 7.7/7.7ms(JP only) ~Enable of Z2 HC4051(JP only) - rowEn1 ~~~~~~~~________ 7.7/7.7ms(JP only) ~Enable of Z3 HC4051(JP only) - - 2) Select column - colC ____~~~~____~~~~ 550/410us(JP) / us(Pro) - colB __~~__~~__~~__~~ 200/210us(JP) 450/460us(Pro) - colA _~_~_~_~_~_~_~_~ 100/110us(JP) 220/230us(Pro) - 0123456701234567 selected column - - 3) Wait 5us after column select, then set prev, strobe colD to spit out key status and read it. - hys _~~~~_____ 20us if previous key state is low - colD ~~~__~~~~~ 10us strobe - key ~~~____~~~ 22us indicates current state of the key - - NOTE: JP scans twice fast as Pro/Pro2 does. So Pro/Pro2 scans 8x8 matrix in 15.4ms while JP scans 16x8 in that time. - - - -EOF diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg Binary files differdeleted file mode 100644 index 0a03164094..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg Binary files differdeleted file mode 100644 index 1f09bd185c..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg Binary files differdeleted file mode 100644 index 45f5ada905..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg Binary files differdeleted file mode 100644 index e8a09e9b28..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg Binary files differdeleted file mode 100644 index e3dae8e86c..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg Binary files differdeleted file mode 100644 index 3afc269e7b..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg b/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg Binary files differdeleted file mode 100644 index 5304bc8d7e..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg b/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg Binary files differdeleted file mode 100644 index f1b438ae77..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg b/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg Binary files differdeleted file mode 100644 index dc79afa0cc..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg b/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg Binary files differdeleted file mode 100644 index 873d988edb..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg b/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg Binary files differdeleted file mode 100644 index 1c4eb67434..0000000000 --- a/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg +++ /dev/null diff --git a/keyboard/hhkb/doc/HHKB_keycodes.txt b/keyboard/hhkb/doc/HHKB_keycodes.txt deleted file mode 100644 index 9ec85901e0..0000000000 --- a/keyboard/hhkb/doc/HHKB_keycodes.txt +++ /dev/null @@ -1,69 +0,0 @@ -HHKB keycodes -============= -2015/10/03 -Looked into unclear keycodes(usages) of Fn-chording-key on HHKB. -Followings are usages of Keyboard/Keypad Page(0x07) that HHKB spits out when Fn key is down. - -## HHK mode(Off-Off) - Key Usage - ------------------------ - ⌘ / ◇ 0x78 Stop - -## Lite Ext. mode(On-Off) - - -## Mac mode(Off-On) - Key Usage - ------------------------ - Esc 0x66 Power - A 0x81 Volume Down - S 0x80 Volume Up - D 0x7F Mute - F 0x6F F20 - Delete 0x53 Num Lock and Clear - - -## Secret mode(On-On) - Key Usage - ------------------------ - Esc 0x66 Power - Q 0x78 Stop - W 0x7E Find - E 0x74 Execute - R 0x77 Select - T 0x76 Menu - Y 0x75 Help - Z 0x7A Undo - X 0x7B Cut - C 0x7C Copy - V 0x7D Paste - B 0x79 Again - - -## Matrix Key-Mode - - - Mode - ------------------------------- - Key HHK Lite Mac Secret Desc - --------------------------------------------------------------------------------------- - ⌘ / ◇ 0x78 - - - Stop - Esc - - 0x66 0x66 Power - A - - 0x81 - Volume Down - S - - 0x80 - Volume Up - D - - 0x7F - Mute - F - - 0x6F - F20 - Delete 0x2A 0x2A 0x53 0x2A Num Lock and Clear(0x53)/Backspace(0x2A) - Q - - - 0x78 Stop - W - - - 0x7E Find - E - - - 0x74 Execute - R - - - 0x77 Select - T - - - 0x76 Menu - Y - - - 0x75 Help - Z - - - 0x7A Undo - X - - - 0x7B Cut - C - - - 0x7C Copy - V - - - 0x7D Paste - B - - - 0x79 Again - -EOF diff --git a/keyboard/hhkb/doc/Power.txt b/keyboard/hhkb/doc/Power.txt deleted file mode 100644 index 1287053c3c..0000000000 --- a/keyboard/hhkb/doc/Power.txt +++ /dev/null @@ -1,48 +0,0 @@ -HHKB Power consumption ----------------------- - -**Power consumption - board clock/prescaler keyswitch power ctrl current - -------------------------------------------------------------------------- - tmk 16MHz no no 26.4mA - tmk 16MHz pro1 no 45.1mA - tmk 16MHz/2 no no 18.1mA - tmk 16MHz/2 pro1 no 37.3mA - tmk 8MHz no no 18.9mA - tmk 8MHz pro2 no(w/o FET) 32.1mA - tmk 8MHz pro2 no(w FET) 32.1mA withou POWER_ON/FF - tmk 8MHz pro2 no(w FET) 32.6mA with POWR_ON/OFF - tmk 8MHz pro2 15ms(w FET) 21.3mA with POWR_ON/OFF, enumerated but error -32 - tmk 8MHz pro2 60ms(w FET) 13.3mA with POWR_ON/OFF, not enumerated - - gh60 16MHz 25.8mA - gh60 16MHz USB suspend w LED breathing 17.6-29.1mA - gh60 16MHz USB suspend w/o LED 0.2mA(0.231-0.276mA) - Poker 5.6mA - Poker USB suspend 0.3mA(0.301mA) - gh60 16MHz stock firmware by komar 26.8mA - - - HHKB pro2 Over All 139.4mA - HHKB pro2 Controller 115.1mA - HHKB pro1 Controller 25.9mA - - -keyswitch power consumption: -pro1: 45.1-26.4=18.7mA - 37.3-18.1=19.2mA -pro2: 32.1-18.9=13.2mA - - - - - -**Low Freq Crystal or Prescaler? -No advantage of Low Freq Crystal against Prescaled. - -Clock routing -X'tal --+---->Prescaler-------> System Clock - | - +---------------------> USB PLL - -Design Decision: Install 16MHz crystal on board with using clock rescaler. diff --git a/keyboard/hhkb/doc/V-USB.md b/keyboard/hhkb/doc/V-USB.md deleted file mode 100644 index 7ae86f452f..0000000000 --- a/keyboard/hhkb/doc/V-USB.md +++ /dev/null @@ -1,39 +0,0 @@ -V-USB controller for HHKB -========================= -Not supported actively any more. - -## Build -Use `Makefile.vusb` for [V-USB] controller. - $ make -f Makefile.vusb - -##Hardware -###3. V-USB connection - +---+ +---------------+ - USB GND | | ATmega328p | - ~~~ C3 | | - 5V <-------+--------+---|Vcc,AVCC | HHKB pro pro2 - R1 | | ~~~~~~~~ ~~~~ - D- <----+--+-----R2-----|INT1 PB2-4|------->ROW (6-8) (5-7) - D+ <----|---+----R3-----|INT0 PC0-2|------->COL (9-11) (8-10) - Z1 Z2 | PC3|------->ENABLE (12) (11) - GND<----+---+-----------|GND PB0|<-------KEY (4) (3) - | PB1|------->PREV (5) (4) - | | - GND+-C2--+--|XTAL1 RXD|------->Debug Console - X1 | TXD|<-------Debug Console - GND+-C3--+--|XTAL2 RST|---SW--+GND - +---------------+ - R1: 1.5K Ohm - R2,R3: 68 Ohm - Z1,Z2: Zener 3.6V - C1,C2: 22pF - C3: 0.1uF - X1: Crystal 12MHz - SW: Push Switch(for bootloader) - -- NOTE: See [V-USB] documentation for more detail of hardware and the USB stack. -- NOTE: [USBaspLoader] is very useful for firmware update. - - -[V-USB]: http://www.obdev.at/products/vusb/index.html -[USBaspLoader]: http://www.obdev.at/products/vusb/usbasploader.html diff --git a/keyboard/hhkb_qmk/hhkb_qmk.c b/keyboard/hhkb/hhkb_qmk.c index 36dc3f29db..36dc3f29db 100644 --- a/keyboard/hhkb_qmk/hhkb_qmk.c +++ b/keyboard/hhkb/hhkb_qmk.c diff --git a/keyboard/hhkb_qmk/hhkb_qmk.h b/keyboard/hhkb/hhkb_qmk.h index 1bac33c2de..1bac33c2de 100644 --- a/keyboard/hhkb_qmk/hhkb_qmk.h +++ b/keyboard/hhkb/hhkb_qmk.h diff --git a/keyboard/hhkb/keymap_common.c b/keyboard/hhkb/keymap_common.c deleted file mode 100644 index e938fb6270..0000000000 --- a/keyboard/hhkb/keymap_common.c +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#include <stdint.h> -#include "action.h" -#include <avr/pgmspace.h> -#include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/hhkb/keymap_common.h b/keyboard/hhkb/keymap_common.h deleted file mode 100644 index 3622665f3a..0000000000 --- a/keyboard/hhkb/keymap_common.h +++ /dev/null @@ -1,84 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include <stdint.h> -#include <stdbool.h> -#include "keycode.h" -#include "action.h" -#include "action_code.h" -#include "action_layer.h" -#include "action_macro.h" -#include "action_util.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - - -#define KEYMAP( \ - K31, K30, K00, K10, K11, K20, K21, K40, K41, K60, K61, K70, K71, K50, K51, \ - K32, K01, K02, K13, K12, K23, K22, K42, K43, K62, K63, K73, K72, K52, \ - K33, K04, K03, K14, K15, K24, K25, K45, K44, K65, K64, K74, K53, \ - K34, K05, K06, K07, K16, K17, K26, K46, K66, K76, K75, K55, K54, \ - K35, K36, K37, K57, K56 \ -) \ -{ \ - { 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_NO }, \ - { 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_NO }, \ - { 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_NO }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_NO } \ -} - - -#define KEYMAP_JP( \ - K02, K32, K62, K22, K12, K52, K72, KA2, K92, K82, KB2, KE2, KF2, KD2, KC2, \ - K03, K63, K23, K13, K53, K73, KA3, K93, K83, KB3, KE3, KF3, KD3, \ - K06, K66, K26, K16, K56, K76, KA6, K96, K86, KB6, KE6, KF6, KD6, KC6, \ - K05, K65, K25, K15, K55, K75, KA5, K95, K85, KB5, KE5, KF5, KD5, KC5, \ - K04, K34, K64, K24, K14, K74, K94, K84, KB4, KE4, KF4, KD4, KC4 \ -) \ -{ \ - { KC_NO, KC_NO, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_NO }, \ - { KC_NO, KC_NO, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO }, \ - { KC_NO, KC_NO, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO }, \ - { KC_NO, KC_NO, KC_##K32, KC_NO, KC_##K34, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { KC_NO, KC_NO, KC_##K52, KC_##K53, KC_NO, KC_##K55, KC_##K56, KC_NO }, \ - { KC_NO, KC_NO, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_NO }, \ - { KC_NO, KC_NO, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_NO }, \ - { KC_NO, KC_NO, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_NO }, \ - { KC_NO, KC_NO, KC_##K92, KC_##K93, KC_##K94, KC_##K95, KC_##K96, KC_NO }, \ - { KC_NO, KC_NO, KC_##KA2, KC_##KA3, KC_NO, KC_##KA5, KC_##KA6, KC_NO }, \ - { KC_NO, KC_NO, KC_##KB2, KC_##KB3, KC_##KB4, KC_##KB5, KC_##KB6, KC_NO }, \ - { KC_NO, KC_NO, KC_##KC2, KC_NO, KC_##KC4, KC_##KC5, KC_##KC6, KC_NO }, \ - { KC_NO, KC_NO, KC_##KD2, KC_##KD3, KC_##KD4, KC_##KD5, KC_##KD6, KC_NO }, \ - { KC_NO, KC_NO, KC_##KE2, KC_##KE3, KC_##KE4, KC_##KE5, KC_##KE6, KC_NO }, \ - { KC_NO, KC_NO, KC_##KF2, KC_##KF3, KC_##KF4, KC_##KF5, KC_##KF6, KC_NO } \ -} - -#endif diff --git a/keyboard/hhkb_qmk/keymaps/default.c b/keyboard/hhkb/keymaps/default.c index bcd8ead377..bcd8ead377 100644 --- a/keyboard/hhkb_qmk/keymaps/default.c +++ b/keyboard/hhkb/keymaps/default.c diff --git a/keyboard/hhkb/keymaps/hasu.c b/keyboard/hhkb/keymaps/hasu.c deleted file mode 100644 index a5602ded31..0000000000 --- a/keyboard/hhkb/keymaps/hasu.c +++ /dev/null @@ -1,282 +0,0 @@ -/* - * Hasu: my personal keymap - */ -#include "keymap_common.h" - - -#ifdef KEYMAP_SECTION_ENABLE -const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { -#else -const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { -#endif - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L|Fn3| '|Fn6 | - * |-----------------------------------------------------------| - * |Fn7 | Z| X| C| V| B| N| M| ,| .|Fn2|Shift |Fn1| - * `-----------------------------------------------------------' - * |Gui|Alt | Fn4 |Fn5 |Gui| - * `-------------------------------------------' - */ - [0] = \ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \ - LCTL,A, S, D, F, G, H, J, K, L, FN3, QUOT,FN6, \ - FN7, Z, X, C, V, B, N, M, COMM,DOT, FN2, RSFT,FN1, \ - LGUI,LALT, FN4, FN5, RGUI), - - /* Layer 1: HHKB mode[HHKB Fn] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * |Shift | | | | | | +| -|End|PgD|Dow|Shift | | - * `-----------------------------------------------------------' - * |Gui|Alt | Space |Alt |Gui| - * `-------------------------------------------' - */ - [1] = \ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,NO, NO, NO, NO, NO, NO, NO, PSCR,SLCK,PAUS, UP, NO, BSPC, \ - LCTL,VOLD,VOLU,MUTE,NO, NO, PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \ - LSFT,NO, NO, NO, NO, NO, PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \ - LGUI,LALT, TRNS, RALT,RGUI), - - /* Layer 2: Vi mode[Slash] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab |Hom|PgD|Up |PgU|End|Hom|PgD|PgUlEnd| | | |Backs| - * |-----------------------------------------------------------| - * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | |Return | - * |-----------------------------------------------------------| - * |Shift | | | | | |Hom|PgD|PgUlEnd|Fn0|Shift | | - * `-----------------------------------------------------------' - * |Gui|Alt | Space |Alt |Gui| - * `-------------------------------------------' - */ - [2] = \ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - TAB, HOME,PGDN,UP, PGUP,END, HOME,PGDN,PGUP,END, NO, NO, NO, BSPC, \ - LCTL,NO, LEFT,DOWN,RGHT,NO, LEFT,DOWN,UP, RGHT,NO, NO, ENT, \ - LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, RSFT,TRNS, \ - LGUI,LALT, SPC, RALT,RGUI), - - /* Layer 3: Mouse mode(IJKL)[Semicolon] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| - * |-----------------------------------------------------------| - * |Contro| | | | | |Mb2|McL|McD|McR|Fn | |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Mb1 |Fn |Fn | - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - [3] = \ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - FN8, NO, NO, NO, NO, NO, WH_L,WH_D,MS_U,WH_U,WH_R,FN9, FN10,FN8, \ - LCTL,ACL0,ACL1,ACL2,ACL2,NO, NO, MS_L,MS_D,MS_R,FN3, NO, ENT, \ - LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,FN9, FN10,NO, RSFT,TRNS, \ - LGUI,LALT, BTN1, TRNS,TRNS), - - /* Layer 4: Mouse mode(IJKL)[Space] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| - * |-----------------------------------------------------------| - * |Contro| | | | | |Mb2|McL|McD|McR|Mb1| |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Mb1 |Fn |Fn | - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - [4] = \ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - FN8, NO, NO, NO, NO, NO, WH_L,WH_D,MS_U,WH_U,WH_R,BTN4,BTN5,FN8, \ - LCTL,VOLD,VOLU,MUTE,NO, NO, NO, MS_L,MS_D,MS_R,BTN1,NO, ENT, \ - LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,FN9, FN10,NO, RSFT,TRNS, \ - LGUI,LALT, TRNS, TRNS,TRNS), - -#if 0 - /* Layer 3: Mouse mode(HJKL)[Semicolon] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|MwU|MwR| | | |Backs| - * |-----------------------------------------------------------| - * |Contro| | | | | |McL|McD|McU|McR|Fn0| |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Mb1 |Alt |Fn0| - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - TAB, NO, NO, NO, NO, NO, NO, WH_D,WH_U,RGHT,NO, NO, NO, BSPC, \ - LCTL,NO, ACL0,ACL1,ACL2,NO, MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \ - LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,FN9, FN10,SLSH,RSFT,NO, \ - LGUI,LALT, BTN1, RALT,TRNS), - - /* Layer4: Mouse mode(HJKL)[Space] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|MwU|MwR| |Wbk|Wfr|Alt-T| - * |-----------------------------------------------------------| - * |Contro| | | | | |McL|McD|McU|McR|Fn0| |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Fn0 |Alt |Fn0| - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - FN8, NO, NO, NO, NO, NO, NO, WH_D,WH_U,RGHT,NO, FN9, FN10,FN8, \ - LCTL,NO, ACL0,ACL1,ACL2,NO, MS_L,MS_D,MS_U,MS_R,BTN1,NO, ENT, \ - LSFT,NO, NO, NO, NO, BTN3,BTN2,BTN1,FN9, FN10,NO, RSFT,NO, \ - LGUI,LALT, TRNS, RALT,RGUI), -#endif -#if 0 - /* Layer x: Matias half-qwerty keyboard style[Space] - * ,-----------------------------------------------------------. - * | -| 0| 9| 8| 7| 6| 5| 4| 3| 2| 1| | | |Esc| - * |-----------------------------------------------------------| - * |Backs| P| O| I| U| Y| T| R| E| W| Q| | |Tab | - * |-----------------------------------------------------------| - * |Contro| ;| L| K| J| H| G| F| D| S| A|Con|Control | - * |-----------------------------------------------------------| - * |Shift | /| .| ,| M| N| B| V| C| X| Z|Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Fn0 |Alt |Gui| - * `--------------------------------------------' - */ - KEYMAP(MINS,0, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO, NO, NO, ESC, \ - BSPC,P, O, I, U, Y, T, R, E, W, Q, NO, NO, TAB, \ - LCTL,SCLN,L, K, J, H, G, F, D, S, A, RCTL,RCTL, \ - LSFT,SLSH,DOT, COMM,M, N, B, V, C, X, Z, RSFT,NO, \ - LGUI,LALT, TRNS, RALT,RGUI), -#endif -}; - - - -/* id for user defined functions */ -enum function_id { - LSHIFT_LPAREN, -}; - -enum macro_id { - HELLO, - VOLUP, - ALT_TAB, -}; - - -/* - * Fn action definition - */ -#ifdef KEYMAP_SECTION_ENABLE -const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = { -#else -const uint16_t fn_actions[] PROGMEM = { -#endif - [0] = ACTION_DEFAULT_LAYER_SET(0), // Default layer(not used) - [1] = ACTION_LAYER_TAP_TOGGLE(1), // HHKB layer(toggle with 5 taps) - [2] = ACTION_LAYER_TAP_KEY(2, KC_SLASH), // Cursor layer with Slash* - [3] = ACTION_LAYER_TAP_KEY(3, KC_SCLN), // Mousekey layer with Semicolon* - [4] = ACTION_LAYER_TAP_KEY(4, KC_SPC), // Mousekey layer with Space - [5] = ACTION_LAYER_MOMENTARY(4), // Mousekey layer(IJKL) - [6] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT), // RControl with tap Enter - [7] = ACTION_MODS_ONESHOT(MOD_LSFT), // Oneshot Shift - [8] = ACTION_MACRO(ALT_TAB), // Application switching - [9] = ACTION_MODS_KEY(MOD_LALT, KC_LEFT), - [10] = ACTION_MODS_KEY(MOD_LALT, KC_RIGHT), - -// [x] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_BSPC), // LControl with tap Backspace -// [x] = ACTION_LMOD_TAP_KEY(KC_LCTL, KC_ESC), // LControl with tap Esc -// [x] = ACTION_FUNCTION_TAP(LSHIFT_LPAREN), // Function: LShift with tap '(' -// [x] = ACTION_MACRO(HELLO), // Macro: say hello -// [x] = ACTION_MACRO(VOLUP), // Macro: media key -}; - - -/* - * Macro definition - */ -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch (id) { - case HELLO: - return (record->event.pressed ? - MACRO( I(0), T(H), T(E), T(L), T(L), W(255), T(O), END ) : - MACRO_NONE ); - case VOLUP: - return (record->event.pressed ? - MACRO( D(VOLU), U(VOLU), END ) : - MACRO_NONE ); - case ALT_TAB: - return (record->event.pressed ? - MACRO( D(LALT), D(TAB), END ) : - MACRO( U(TAB), END )); - } - return MACRO_NONE; -} - - - -/* - * user defined action function - */ -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - if (record->event.pressed) dprint("P"); else dprint("R"); - dprintf("%d", record->tap.count); - if (record->tap.interrupted) dprint("i"); - dprint("\n"); - - switch (id) { - case LSHIFT_LPAREN: - // Shift parentheses example: LShft + tap '(' - // http://stevelosh.com/blog/2012/10/a-modern-space-cadet/#shift-parentheses - // http://geekhack.org/index.php?topic=41989.msg1304899#msg1304899 - if (record->event.pressed) { - if (record->tap.count > 0 && !record->tap.interrupted) { - if (record->tap.interrupted) { - dprint("tap interrupted\n"); - register_mods(MOD_BIT(KC_LSHIFT)); - } - } else { - register_mods(MOD_BIT(KC_LSHIFT)); - } - } else { - if (record->tap.count > 0 && !(record->tap.interrupted)) { - add_weak_mods(MOD_BIT(KC_LSHIFT)); - send_keyboard_report(); - register_code(KC_9); - unregister_code(KC_9); - del_weak_mods(MOD_BIT(KC_LSHIFT)); - send_keyboard_report(); - record->tap.count = 0; // ad hoc: cancel tap - } else { - unregister_mods(MOD_BIT(KC_LSHIFT)); - } - } - break; - } -} diff --git a/keyboard/hhkb/keymaps/hhkb.c b/keyboard/hhkb/keymaps/hhkb.c deleted file mode 100644 index 86ad0f5eee..0000000000 --- a/keyboard/hhkb/keymaps/hhkb.c +++ /dev/null @@ -1,95 +0,0 @@ -/* - * HHKB Layout - */ -#include "keymap_common.h" - - -#ifdef KEYMAP_SECTION_ENABLE -const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { -#else -const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { -#endif - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * `-----------------------------------------------------------' - * |Alt|Gui | Space |Gui |Alt| - * `-------------------------------------------' - */ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \ - LALT,LGUI, SPC, RGUI,RALT), - - /* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | - * `-----------------------------------------------------------' - * | | | | | | - * `-------------------------------------------' - */ - KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS, BSPC, \ - TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,PENT, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS, \ - TRNS,TRNS, TRNS, TRNS,TRNS), -}; - - - -/* - * Fn action definition - */ -#ifdef KEYMAP_SECTION_ENABLE -const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_MOMENTARY(2), - [2] = ACTION_LAYER_MOMENTARY(3), - [3] = ACTION_LAYER_MOMENTARY(4), - [4] = ACTION_LAYER_MOMENTARY(5), - [5] = ACTION_LAYER_MOMENTARY(6), - [6] = ACTION_LAYER_MOMENTARY(7), - [7] = ACTION_LAYER_TOGGLE(1), - [8] = ACTION_LAYER_TOGGLE(2), - [9] = ACTION_LAYER_TOGGLE(3), - [10] = ACTION_LAYER_TAP_TOGGLE(1), - [11] = ACTION_LAYER_TAP_TOGGLE(2), - [12] = ACTION_LAYER_TAP_TOGGLE(3), - [13] = ACTION_LAYER_TAP_KEY(1, KC_A), - [14] = ACTION_LAYER_TAP_KEY(2, KC_F), - [15] = ACTION_LAYER_TAP_KEY(3, KC_J), - [16] = ACTION_LAYER_TAP_KEY(4, KC_SPACE), - [17] = ACTION_LAYER_TAP_KEY(5, KC_SCOLON), - [18] = ACTION_LAYER_TAP_KEY(6, KC_QUOTE), - [19] = ACTION_LAYER_TAP_KEY(7, KC_SLASH), - [20] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_SPACE), - [21] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_SPACE), - [22] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_QUOTE), - [23] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENTER), - [24] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), - [25] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPACE), - [26] = ACTION_MODS_ONESHOT(MOD_LCTL), - [27] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC), - [28] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPACE), - [29] = ACTION_MODS_ONESHOT(MOD_LSFT), - [30] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ESC), - [31] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_BSPACE), -}; -#else -const uint16_t fn_actions[] PROGMEM = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; -#endif diff --git a/keyboard/hhkb/keymaps/jp.c b/keyboard/hhkb/keymaps/jp.c deleted file mode 100644 index 48d0ee70ba..0000000000 --- a/keyboard/hhkb/keymaps/jp.c +++ /dev/null @@ -1,50 +0,0 @@ -/* - * HHKB JP Layout - */ -#include "keymap_common.h" - - -#ifdef KEYMAP_SECTION_ENABLE -const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = { -#else -const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { -#endif - /* Layer 0: Default Layer */ - KEYMAP_JP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, JYEN,BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,BSLS,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RO, UP, RSFT, \ - FN0, ZKHK,LGUI,LALT,MHEN, SPC, HENK,KANA,RALT,FN0, LEFT,DOWN,RGHT), - - /* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | - * |------------------------------------------------------` | - * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig| | | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | | - * |-----------------------------------------------------------| - * | || | | | | | | | | || | | | - * `-----------------------------------------------------------' - */ - KEYMAP_JP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS, \ - TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,TRNS,PENT, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS), -}; - - - -/* - * Fn action definition - */ -#ifdef KEYMAP_SECTION_ENABLE -const uint16_t fn_actions[] __attribute__ ((section (".keymap.fn_actions"))) = { -#else -const uint16_t fn_actions[] PROGMEM = { -#endif - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboard/hhkb_qmk/keymaps/lxol.c b/keyboard/hhkb/keymaps/lxol.c index 3256fda516..3256fda516 100644 --- a/keyboard/hhkb_qmk/keymaps/lxol.c +++ b/keyboard/hhkb/keymaps/lxol.c diff --git a/keyboard/hhkb/keymaps/spacefn.c b/keyboard/hhkb/keymaps/spacefn.c deleted file mode 100644 index deff920ae2..0000000000 --- a/keyboard/hhkb/keymaps/spacefn.c +++ /dev/null @@ -1,116 +0,0 @@ -/* - * SpaceFN - * http://geekhack.org/index.php?topic=51069.0 - */ -#include "keymap_common.h" - - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * `-----------------------------------------------------------' - * |Gui|Alt | SpaceFN |Alt |Gui| - * `-------------------------------------------' - */ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, GRV, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \ - LGUI,LALT, FN1, RALT,RGUI), - - /* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | - * `-----------------------------------------------------------' - * | | | | | | - * `-------------------------------------------' - */ - KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS, BSPC, \ - TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,PENT, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS, \ - TRNS,TRNS, SPC, TRNS,TRNS), - - /* Layer 2: SpaceFN - * ,-----------------------------------------------------------. - * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Del| - * |-----------------------------------------------------------| - * | | | |Esc| | | |Hom|Up |End|Psc|Slk|Pau|Ins | - * |-----------------------------------------------------------| - * | | | | | | |PgU|Lef|Dow|Rig| | | | - * |-----------------------------------------------------------| - * | | | | | |Spc|PgD|` |~ | | | | | - * `-----------------------------------------------------------' - * | | | | | | - * `-------------------------------------------' - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,DEL, \ - TRNS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,FN3, END, PSCR,SLCK,PAUS,INS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN2, TRNS,TRNS,TRNS,NO, \ - TRNS,TRNS, TRNS, TRNS,TRNS), -}; - - -/* - * user defined action function - */ -enum function_id { - CTRL_SPACE_I, // Ctrl + Up(SpaceFN) -> PgUp -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ -# define MODS_CTRL_MASK (MOD_BIT(KC_LCTRL)|MOD_BIT(KC_RCTRL)) - static uint8_t ctrl_space_i_prev_ctrl; - - switch (id) { - // Ctrl + Up(SpaceFN) -> PgUp - case CTRL_SPACE_I: - ctrl_space_i_prev_ctrl = get_mods()&MODS_CTRL_MASK; - if (record->event.pressed) { - if (ctrl_space_i_prev_ctrl) { - del_mods(ctrl_space_i_prev_ctrl); // remove Ctrl - add_key(KC_PGUP); - send_keyboard_report(); // send PgUp without Ctrl - add_mods(ctrl_space_i_prev_ctrl); // return Ctrl but not sent - } else { - add_key(KC_UP); - send_keyboard_report(); - } - } else { - if (ctrl_space_i_prev_ctrl) { - del_key(KC_PGUP); - send_keyboard_report(); - } else { - del_key(KC_UP); - send_keyboard_report(); - } - } - break; - } -} - - -/* - * Fn action definition - */ -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // tilde - [3] = ACTION_FUNCTION(CTRL_SPACE_I), // Ctrl + Up(SpaceFN) -> PgUp -}; diff --git a/keyboard/hhkb/led.c b/keyboard/hhkb/led.c deleted file mode 100644 index 8a08fe27fc..0000000000 --- a/keyboard/hhkb/led.c +++ /dev/null @@ -1,33 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - - -/* HHKB has no LEDs */ -void led_set(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - DDRD |= (1<<6); - PORTD |= (1<<6); - } else { - DDRD |= (1<<6); - PORTD &= ~(1<<6); - } -} diff --git a/keyboard/hhkb/not_supported/Makefile.iwrap b/keyboard/hhkb/not_supported/Makefile.iwrap deleted file mode 100644 index 1614c21d75..0000000000 --- a/keyboard/hhkb/not_supported/Makefile.iwrap +++ /dev/null @@ -1,103 +0,0 @@ -# -# Makefile for iWRAP -# - - -# Target file name (without extension). -TARGET = hhkb_iwrap - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = \ - keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config_iwrap.h - - -# V-USB debug level: To use ps2_usart.c level must be 0 -# ps2_usart.c requires USART to receive PS/2 signal. -OPT_DEFS = -DDEBUG_LEVEL=0 - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -MCU = atmega328p - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 12000000 - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#NKRO_ENABLE = yes # USB Nkey Rollover - - - -#---------------- Programming Options -------------------------- -AVRDUDE = avrdude -# Type: avrdude -c ? to get a full listing. -AVRDUDE_PROGRAMMER = usbasp -AVRDUDE_PORT = -AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex -#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep - -# Uncomment the following if you want avrdude's erase cycle counter. -# Note that this counter needs to be initialized first using -Yn, -# see avrdude manual. -#AVRDUDE_ERASE_COUNTER = -y - -# Uncomment the following if you do /not/ wish a verification to be -# performed after programming the device. -#AVRDUDE_NO_VERIFY = -V - -# Increase verbosity level. Please use this when submitting bug -# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> -# to submit bug reports. -#AVRDUDE_VERBOSE = -v -v - -#AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER) -AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) -AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) -AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) - -PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) - - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/iwrap.mk -# TODO: to be selectable: V-USB, LUFA or PJRC -#include $(TMK_DIR)/protocol/vusb.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/hhkb/not_supported/Makefile.vusb b/keyboard/hhkb/not_supported/Makefile.vusb deleted file mode 100644 index 1f8d84684b..0000000000 --- a/keyboard/hhkb/not_supported/Makefile.vusb +++ /dev/null @@ -1,97 +0,0 @@ -# -# Makefile for V-USB -# - - -# Target file name (without extension). -TARGET = hhkb_vusb - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = \ - keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config_vusb.h - - -# V-USB debug level: To use ps2_usart.c level must be 0 -# ps2_usart.c requires USART to receive PS/2 signal. -OPT_DEFS = -DDEBUG_LEVEL=0 - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -MCU = atmega328p -# avrdude doesn't know atmega168p -AVRDUDE_MCU = $(MCU) - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 12000000 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#NKRO_ENABLE = yes # USB Nkey Rollover - - - -#---------------- Programming Options -------------------------- -AVRDUDE = avrdude -# Type: avrdude -c ? to get a full listing. -AVRDUDE_PROGRAMMER = usbasp -AVRDUDE_PORT = -AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex -#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep - -# Uncomment the following if you want avrdude's erase cycle counter. -# Note that this counter needs to be initialized first using -Yn, -# see avrdude manual. -#AVRDUDE_ERASE_COUNTER = -y - -# Uncomment the following if you do /not/ wish a verification to be -# performed after programming the device. -#AVRDUDE_NO_VERIFY = -V - -# Increase verbosity level. Please use this when submitting bug -# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> -# to submit bug reports. -#AVRDUDE_VERBOSE = -v -v - -#AVRDUDE_FLAGS = -p $(AVRDUDE_MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -AVRDUDE_FLAGS = -p $(AVRDUDE_MCU) -c $(AVRDUDE_PROGRAMMER) -AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) -AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) -AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) - -PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) - - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/vusb.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -debug-on: EXTRAFLAGS += -DDEBUG -debug-on: all diff --git a/keyboard/hhkb/not_supported/config_iwrap.h b/keyboard/hhkb/not_supported/config_iwrap.h deleted file mode 100644 index 747c755132..0000000000 --- a/keyboard/hhkb/not_supported/config_iwrap.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xBEEA -// TODO: share these strings with usbconfig.h -// Edit usbconfig.h to change these. -#define MANUFACTURER t.m.k. -#define PRODUCT HHKB mod -#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod - - -/* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -/* pins for Software UART */ -#define SUART_IN_PIN PINC -#define SUART_IN_BIT 5 -#define SUART_OUT_PORT PORTC -#define SUART_OUT_BIT 4 - - -#define DEBUG_LED 1 -#define DEBUG_LED_CONFIG (DDRD |= (1<<4)) -#define DEBUG_LED_OFF (PORTD |= (1<<4)) -#define DEBUG_LED_ON (PORTD &= ~(1<<4)) - -/* period of tapping(ms) */ -#define TAPPING_TERM 300 -/* tap count needed for toggling a feature */ -#define TAPPING_TOGGLE 5 - -#endif diff --git a/keyboard/hhkb/not_supported/config_vusb.h b/keyboard/hhkb/not_supported/config_vusb.h deleted file mode 100644 index 44f7acd6cd..0000000000 --- a/keyboard/hhkb/not_supported/config_vusb.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xC0FE -// TODO: share these strings with usbconfig.h -// Edit usbconfig.h to change these. -#define MANUFACTURER t.m.k. -#define PRODUCT HHKB mod -#define DESCRIPTION t.m.k. keyboard firmware for HHKB mod - - -/* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - -#endif diff --git a/keyboard/hhkb/not_supported/iwrap.txt b/keyboard/hhkb/not_supported/iwrap.txt deleted file mode 100644 index 20a2420a0b..0000000000 --- a/keyboard/hhkb/not_supported/iwrap.txt +++ /dev/null @@ -1,32 +0,0 @@ - -iWRAP ------ - +---------------+ WT12 - 5V | ATmega168 | 5V/3.3V~~~~ - +-----+---|Vcc,AVCC PC4|---/--->iWRAP(RxD) -USB | C3 | PC5|<--/----iWRAP(TxD) -~~~ | + | | -5V <--BATT + GND | | HHKB - R1 | | ~~~~ -D- <----+-----+--R2-----|INT1 PB2-4|------->ROW(6-8) -D+ <----|---+----R3-----|INT0 PC0-2|------->COL(9-11) - Z1 Z2 | PC3|------->ENABLE(12) -GND<----+---+-----------|GND PB0|<-------KEY(4) - | PB1|------->PREV(5) - | | - GND+-C2--+--|XTAL1 RXD|------->Debug Console - X1 | TXD|<-------Debug Console - GND+-C3--+--|XTAL2 RST|---SW--+GND - +---------------+ - -R1: 1.5K Ohm -R2,R3: 68 Ohm -Z1,Z2: Zener 3.6V -C1,C2: 22pF -C3: 0.1uF -X1: Crystal 12MHz -SW: Push Switch(Optional) -BATT: Li-Po Battery, Battery Charger and Voltage Regulator(5V and 3.3V). - - - diff --git a/keyboard/hhkb/not_supported/usbconfig.h b/keyboard/hhkb/not_supported/usbconfig.h deleted file mode 100644 index c3aad34bef..0000000000 --- a/keyboard/hhkb/not_supported/usbconfig.h +++ /dev/null @@ -1,388 +0,0 @@ -/* Name: usbconfig.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2005-04-01 - * Tabsize: 4 - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ - */ - -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ - -#include "config_vusb.h" - -/* -General Description: -This file is an example configuration (with inline documentation) for the USB -driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is -also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may -wire the lines to any other port, as long as D+ is also wired to INT0 (or any -other hardware interrupt, as long as it is the highest level interrupt, see -section at the end of this file). -*/ - -/* ---------------------------- Hardware Config ---------------------------- */ - -#define USB_CFG_IOPORTNAME D -/* This is the port where the USB bus is connected. When you configure it to - * "B", the registers PORTB, PINB and DDRB will be used. - */ -#define USB_CFG_DMINUS_BIT 3 -/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. - * This may be any bit in the port. - */ -#define USB_CFG_DPLUS_BIT 2 -/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. - * This may be any bit in the port. Please note that D+ must also be connected - * to interrupt pin INT0! [You can also use other interrupts, see section - * "Optional MCU Description" below, or you can connect D- to the interrupt, as - * it is required if you use the USB_COUNT_SOF feature. If you use D- for the - * interrupt, the USB interrupt will also be triggered at Start-Of-Frame - * markers every millisecond.] - */ -#define USB_CFG_CLOCK_KHZ (F_CPU/1000) -/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, - * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code - * require no crystal, they tolerate +/- 1% deviation from the nominal - * frequency. All other rates require a precision of 2000 ppm and thus a - * crystal! - * Since F_CPU should be defined to your actual clock rate anyway, you should - * not need to modify this setting. - */ -#define USB_CFG_CHECK_CRC 0 -/* Define this to 1 if you want that the driver checks integrity of incoming - * data packets (CRC checks). CRC checks cost quite a bit of code size and are - * currently only available for 18 MHz crystal clock. You must choose - * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. - */ - -/* ----------------------- Optional Hardware Config ------------------------ */ - -/* #define USB_CFG_PULLUP_IOPORTNAME D */ -/* If you connect the 1.5k pullup resistor from D- to a port pin instead of - * V+, you can connect and disconnect the device from firmware by calling - * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). - * This constant defines the port on which the pullup resistor is connected. - */ -/* #define USB_CFG_PULLUP_BIT 4 */ -/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined - * above) where the 1.5k pullup resistor is connected. See description - * above for details. - */ - -/* --------------------------- Functional Range ---------------------------- */ - -#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 -/* Define this to 1 if you want to compile a version with two endpoints: The - * default control endpoint 0 and an interrupt-in endpoint (any other endpoint - * number). - */ -#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 -/* Define this to 1 if you want to compile a version with three endpoints: The - * default control endpoint 0, an interrupt-in endpoint 3 (or the number - * configured below) and a catch-all default interrupt-in endpoint as above. - * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. - */ -#define USB_CFG_EP3_NUMBER 3 -/* If the so-called endpoint 3 is used, it can now be configured to any other - * endpoint number (except 0) with this macro. Default if undefined is 3. - */ -/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ -/* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. - * Since the token is toggled BEFORE sending any data, the first packet is - * sent with the oposite value of this configuration! - */ -#define USB_CFG_IMPLEMENT_HALT 0 -/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature - * for endpoint 1 (interrupt endpoint). Although you may not need this feature, - * it is required by the standard. We have made it a config option because it - * bloats the code considerably. - */ -#define USB_CFG_SUPPRESS_INTR_CODE 0 -/* Define this to 1 if you want to declare interrupt-in endpoints, but don't - * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. - */ -#define USB_CFG_INTR_POLL_INTERVAL 10 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ -#define USB_CFG_IS_SELF_POWERED 0 -/* Define this to 1 if the device has its own power supply. Set it to 0 if the - * device is powered from the USB bus. - */ -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ -#define USB_CFG_IMPLEMENT_FN_WRITE 1 -/* Set this to 1 if you want usbFunctionWrite() to be called for control-out - * transfers. Set it to 0 if you don't need it and want to save a couple of - * bytes. - */ -#define USB_CFG_IMPLEMENT_FN_READ 0 -/* Set this to 1 if you need to send control replies which are generated - * "on the fly" when usbFunctionRead() is called. If you only want to send - * data from a static buffer, set it to 0 and return the data from - * usbFunctionSetup(). This saves a couple of bytes. - */ -#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 -/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. - * You must implement the function usbFunctionWriteOut() which receives all - * interrupt/bulk data sent to any endpoint other than 0. The endpoint number - * can be found in 'usbRxToken'. - */ -#define USB_CFG_HAVE_FLOWCONTROL 0 -/* Define this to 1 if you want flowcontrol over USB data. See the definition - * of the macros usbDisableAllRequests() and usbEnableAllRequests() in - * usbdrv.h. - */ -#define USB_CFG_DRIVER_FLASH_PAGE 0 -/* If the device has more than 64 kBytes of flash, define this to the 64 k page - * where the driver's constants (descriptors) are located. Or in other words: - * Define this to 1 for boot loaders on the ATMega128. - */ -#define USB_CFG_LONG_TRANSFERS 0 -/* Define this to 1 if you want to send/receive blocks of more than 254 bytes - * in a single control-in or control-out transfer. Note that the capability - * for long transfers increases the driver size. - */ -/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ -/* This macro is a hook if you want to do unconventional things. If it is - * defined, it's inserted at the beginning of received message processing. - * If you eat the received message and don't want default processing to - * proceed, do a return after doing your things. One possible application - * (besides debugging) is to flash a status LED on each packet. - */ -/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ -/* This macro is a hook if you need to know when an USB RESET occurs. It has - * one parameter which distinguishes between the start of RESET state and its - * end. - */ -/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ -/* This macro (if defined) is executed when a USB SET_ADDRESS request was - * received. - */ -#define USB_COUNT_SOF 1 -/* define this macro to 1 if you need the global variable "usbSofCount" which - * counts SOF packets. This feature requires that the hardware interrupt is - * connected to D- instead of D+. - */ -/* #ifdef __ASSEMBLER__ - * macro myAssemblerMacro - * in YL, TCNT0 - * sts timer0Snapshot, YL - * endm - * #endif - * #define USB_SOF_HOOK myAssemblerMacro - * This macro (if defined) is executed in the assembler module when a - * Start Of Frame condition is detected. It is recommended to define it to - * the name of an assembler macro which is defined here as well so that more - * than one assembler instruction can be used. The macro may use the register - * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages - * immediately after an SOF pulse may be lost and must be retried by the host. - * What can you do with this hook? Since the SOF signal occurs exactly every - * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in - * designs running on the internal RC oscillator. - * Please note that Start Of Frame detection works only if D- is wired to the - * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! - */ -#define USB_CFG_CHECK_DATA_TOGGLING 0 -/* define this macro to 1 if you want to filter out duplicate data packets - * sent by the host. Duplicates occur only as a consequence of communication - * errors, when the host does not receive an ACK. Please note that you need to - * implement the filtering yourself in usbFunctionWriteOut() and - * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable - * for each control- and out-endpoint to check for duplicate packets. - */ -#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 -/* define this macro to 1 if you want the function usbMeasureFrameLength() - * compiled in. This function can be used to calibrate the AVR's RC oscillator. - */ -#define USB_USE_FAST_CRC 0 -/* The assembler module has two implementations for the CRC algorithm. One is - * faster, the other is smaller. This CRC routine is only used for transmitted - * messages where timing is not critical. The faster routine needs 31 cycles - * per byte while the smaller one needs 61 to 69 cycles. The faster routine - * may be worth the 32 bytes bigger code size if you transmit lots of data and - * run the AVR close to its limit. - */ - -/* -------------------------- Device Description --------------------------- */ - -#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) -/* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you may use one of obdev's free - * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) -/* This is the ID of the product, low byte first. It is interpreted in the - * scope of the vendor ID. If you have registered your own VID with usb.org - * or if you have licensed a PID from somebody else, define it here. Otherwise - * you may use one of obdev's free shared VID/PID pairs. See the file - * USB-IDs-for-free.txt for details! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x01 -/* Version number of the device: Minor number first, then major number. - */ -#define USB_CFG_VENDOR_NAME 't', '.', 'm', '.', 'k', '.' -#define USB_CFG_VENDOR_NAME_LEN 6 -/* These two values define the vendor name returned by the USB device. The name - * must be given as a list of characters under single quotes. The characters - * are interpreted as Unicode (UTF-16) entities. - * If you don't want a vendor name string, undefine these macros. - * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for - * details. - */ -#define USB_CFG_DEVICE_NAME 'H', 'H', 'K', 'B', ' ', 'm', 'o', 'd' -#define USB_CFG_DEVICE_NAME_LEN 8 -/* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USB-IDs-for-free.txt before you assign a name if - * you use a shared VID/PID. - */ -/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ -/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ -/* Same as above for the serial number. If you don't want a serial number, - * undefine the macros. - * It may be useful to provide the serial number through other means than at - * compile time. See the section about descriptor properties below for how - * to fine tune control over USB descriptors such as the string descriptor - * for the serial number. - */ -#define USB_CFG_DEVICE_CLASS 0 -#define USB_CFG_DEVICE_SUBCLASS 0 -/* See USB specification if you want to conform to an existing device class. - * Class 0xff is "vendor specific". - */ -#define USB_CFG_INTERFACE_CLASS 3 /* HID */ -#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ -#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ -/* See USB specification if you want to conform to an existing device class or - * protocol. The following classes must be set at interface level: - * HID class is 3, no subclass and protocol required (but may be useful!) - * CDC class is 2, use subclass 2 and protocol 1 for ACM - */ -#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 -/* Define this to the length of the HID report descriptor, if you implement - * an HID device. Otherwise don't define it or define it to 0. - * If you use this define, you must add a PROGMEM character array named - * "usbHidReportDescriptor" to your code which contains the report descriptor. - * Don't forget to keep the array and this define in sync! - */ - -/* #define USB_PUBLIC static */ -/* Use the define above if you #include usbdrv.c instead of linking against it. - * This technique saves a couple of bytes in flash memory. - */ - -/* ------------------- Fine Control over USB Descriptors ------------------- */ -/* If you don't want to use the driver's default USB descriptors, you can - * provide our own. These can be provided as (1) fixed length static data in - * flash memory, (2) fixed length static data in RAM or (3) dynamically at - * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more - * information about this function. - * Descriptor handling is configured through the descriptor's properties. If - * no properties are defined or if they are 0, the default descriptor is used. - * Possible properties are: - * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched - * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is - * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if - * you want RAM pointers. - * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found - * in static memory is in RAM, not in flash memory. - * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), - * the driver must know the descriptor's length. The descriptor itself is - * found at the address of a well known identifier (see below). - * List of static descriptor names (must be declared PROGMEM if in flash): - * char usbDescriptorDevice[]; - * char usbDescriptorConfiguration[]; - * char usbDescriptorHidReport[]; - * char usbDescriptorString0[]; - * int usbDescriptorStringVendor[]; - * int usbDescriptorStringDevice[]; - * int usbDescriptorStringSerialNumber[]; - * Other descriptors can't be provided statically, they must be provided - * dynamically at runtime. - * - * Descriptor properties are or-ed or added together, e.g.: - * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) - * - * The following descriptors are defined: - * USB_CFG_DESCR_PROPS_DEVICE - * USB_CFG_DESCR_PROPS_CONFIGURATION - * USB_CFG_DESCR_PROPS_STRINGS - * USB_CFG_DESCR_PROPS_STRING_0 - * USB_CFG_DESCR_PROPS_STRING_VENDOR - * USB_CFG_DESCR_PROPS_STRING_PRODUCT - * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER - * USB_CFG_DESCR_PROPS_HID - * USB_CFG_DESCR_PROPS_HID_REPORT - * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) - * - * Note about string descriptors: String descriptors are not just strings, they - * are Unicode strings prefixed with a 2 byte header. Example: - * int serialNumberDescriptor[] = { - * USB_STRING_DESCRIPTOR_HEADER(6), - * 'S', 'e', 'r', 'i', 'a', 'l' - * }; - */ - -#define USB_CFG_DESCR_PROPS_DEVICE 0 -#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#define USB_CFG_DESCR_PROPS_STRINGS 0 -#define USB_CFG_DESCR_PROPS_STRING_0 0 -#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -/* ----------------------- Optional MCU Description ------------------------ */ - -/* The following configurations have working defaults in usbdrv.h. You - * usually don't need to set them explicitly. Only if you want to run - * the driver on a device which is not yet supported or with a compiler - * which is not fully supported (such as IAR C) or if you use a differnt - * interrupt than INT0, you may have to define some of these. - */ -/* #define USB_INTR_CFG MCUCR */ -/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE GIMSK */ -/* #define USB_INTR_ENABLE_BIT INT0 */ -/* #define USB_INTR_PENDING GIFR */ -/* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR INT0_vect */ - -/* Set INT1 for D- falling edge to count SOF */ -/* #define USB_INTR_CFG EICRA */ -#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE EIMSK */ -#define USB_INTR_ENABLE_BIT INT1 -/* #define USB_INTR_PENDING EIFR */ -#define USB_INTR_PENDING_BIT INTF1 -#define USB_INTR_VECTOR INT1_vect - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboard/hhkb/rn42.mk b/keyboard/hhkb/rn42.mk deleted file mode 100644 index fd6f7db1a8..0000000000 --- a/keyboard/hhkb/rn42.mk +++ /dev/null @@ -1,12 +0,0 @@ -RN42_DIR = rn42 - -SRC += serial_uart.c \ - rn42/suart.S \ - rn42/rn42.c \ - rn42/rn42_task.c \ - rn42/battery.c \ - rn42/main.c - -OPT_DEFS += -DPROTOCOL_RN42 - -VPATH += $(RN42_DIR) diff --git a/keyboard/hhkb/rn42/MEMO.txt b/keyboard/hhkb/rn42/MEMO.txt deleted file mode 100644 index 0363c2f433..0000000000 --- a/keyboard/hhkb/rn42/MEMO.txt +++ /dev/null @@ -1,255 +0,0 @@ -Memo of deveopment -================== -just memo, NOT WORTH READING - -Bug: -- Factory Reset PIO4 doesn't work - - the reason is unclear - 12/08 NOT LOOK INTO ANY MORE - - WORKAROUND: use serial pins(3.3V, GND, RX and TX) - - SF,1 and R,1 to set factory defalult - - -Todo: -- LED cover and switch knob and new Slide Switch -- RN42 auto configuration - - configure the module as HID device every time powering up - - this'll reduce work load of assembly - -- move rn42 to protocol directory when it becomes reusable stack - -- sendchar() in lufa.c no buffer - - no buffering. character lost can be caused. -- LUFA sendchar should be buffered and serial_uart.c buffur size is too large(256). - -- BT operations - - disconnect - - new connection - - remove connection - -- sendchar() in lufa.c block loop - DONE 11/29 - - block loop when powered with AC adapter - - FrameNumber is not updated when adapter powered - -Improving: -- ADC resolution - AVR120 - AVR32138 - - Enhancing ADC resolution by oversampling - AVR121 http://www.atmel.com/images/doc8003.pdf - - disable digital input buffer DIDR(7.8.6) - -Design: -- suspend.h - DONE 11/26 - - remove argument from suspend_power_down() for backward compatitibility -- remove MCU dependent power saving code from core/keyboard - DONE 11/23 - - it should be located in project matrix.c -- HHKB matrix.c needs matrix_prev? - - is_modified() is obsolete now. really needs? -- ADC: removing AREF capacitor C10 - - seems to be better while usb powered - - still bad while battery powered - http://electronics.stackexchange.com/questions/105849/avcc-and-capacitor-using-adc -- ADC: smaller resistors for voltage dividor - - 1K + 1K: not improved. - 11/27 - - -LUFA: -USB connection check: state of USB deivce -- USB_DeviceState: - USB_Deivce_State_t { Unattached, Powered, Default, Addressed, Configured*, Suspended* } - Unattached: unpluged - Powered: pluged with power adapter - Default: enumerate process bigin - Addressed: addressed - Configured: enumerated - Suspended: suspended - -- USB_IsInitialized: state of LUFA core setup - becomes true in USB_Init() USBController_AVR8.c - becomes false in USB_Disable() USBController_AVR8.c -- USB_VBUS_GetStatus(): state of VBUS(power/connection) -- USB_Disable() detaches, disables all interrupts, controller, PLL, regulater. - -- When connect to power adapter - - event happened: CW or CSW or C or DDC - - USB state: not configured - -- USB evnets - - USB connect: CSWRWRW - - USB connect but fail to enumeration: CWRWRWRWS - - USB disconnect: D - - Power adapter connect: CW, CSW, C - - Power adapter disconnect: D - - -Power saving: -- Pro2 current consumption - - active: 138.2mA(no device on Hub) - - suspended: 30.9mA(WakeUp enabled DIPSW6) - - suspended: 0mA->46.0mA(WakeUp disabled DIPSW6) -- Pro current consumption - - active: 54.0mA - - suspended: 40.5mA(WakeUp enabled DIPSW6) - - suspended: 0.3mA(WakeUp disabled DIPSW6) - -- RN42 3.3V - - disconnected(Idle): 5mA (config mode) - - connected(Active): - SW,0000: 23-26mA - SW,0010: 27-29mA worse than 0000 for unknown reason - SW,0020: 17-19mA mouse NG - SW,0030: 13-16mA laggy mouse NG - SW,0050: 10-13mA laggy mouse NG - -- matrix power saving - - power saving while externally powered and not while unpluged -- confirm suspend mode lufa.c: matrix_power_*, suspend_wakeup_condition -- 8MHz clock -- When not connected in a few minutes get into deep sleep to save battery life -- CTS is needed for waking up from deep sleep? How deep sleep is activated? -- firmware controlled 3.3V DC converter to switch on/off BT module -- sleep MCU and BT module(keyboard is not used) -- deep sleep MCU and BT module(keyboard is not used for long time) -- deep sleep MCU and turn off BT module(keyboard is not used and not connected) -- Battery ADC; switching, high resistance - - switching gnd end of divider with PF4 - - high resistor 100K/1M? - capacitor 10nF - http://www.eevblog.com/forum/beginners/measuring-battery-voltage-without-consuming-current/ -- During USB suspend change clock source to internal RC from external Xtal(6.8) -- FRZCLK: you can freeze clock for power saving. still WAKEUPI and VBUSTI interrupts are available while freezing.(21.7.3) -- Suspend: Clear Suspend Bit, Freeze clock, disable PLL, MCU sleep(21.13) -- Voltage reference(8.1.1) - - to reduce power consumption while power down mode -- unset ADEN before sleep(24.7) - - - - - - - -Lipo ----- -850mA lasts around 9 hours(07/28) - -Sparkfun Polymer Lithium Ion Battery 850mAh: -https://www.sparkfun.com/products/341 -Lipo Cell spec: -https://www.sparkfun.com/datasheets/Batteries/063048%20Li-polymer.pdf -Protection spec: -http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Prototyping/BatteryProtection.pdf - min typical max - over-charge 4.255 4.280 4.305 - over-charge discover? 4.030 4.080 4.130 - over-discharge 2.827 2.900 2.973 - over-discharge discover 3.022 3.100 3.178 - -ADC voltage monitor: voltage divider 10K+10K(0.5) - ADC=V*0.5/2.56*1024 - - V ADC - ------------------ - 4.20 0x347(839) - 3.10 0x26b(619) - - - - -TROUBLE SHOOT -------------- -07/16 After fix of voltage dividor on GPIO6, had a trouble that it could not send a char to BT module, though could receive. - Found R8 had wrong 1K resistor and changed to 10K, after that it can send to the module again. Not sure how it had sent with the wrong 1K before. - -07/18 On Linux, had an USB related trouble; keyboard or console didn't work for some reason. Changing PID cured this problem. Very annoying, took very long time before resolved it. - -12/07 rn42_rts() read 1 every time. R12 broke in open mode(no coductive), idk why, too much heat with soldering? and PF1 pin was not soldered. - It resolved with resoldering PF1 and new resistor on R12. - - - - -Done: -- low battery alert(solid light) 09/04 -- *** Rev.E BT test *** - DONE - - with MCP73832, new Schottky, tantalum caps - DONE 12/07 - * MCP73832 doesn't leak from Vcc pin when unpluged and battery powered - 34mV vs 2.07V(MCP73831) at Vcc pin - MCP73832 doesn't need revese protection diode D5 - * PMEG2010ER is very low VF while reverse current/voltage is high - VF=0.96 vs 1.98(RB160M-30TR)with Fluke 175 - Anode of D11 is 680mV vs 20mV(RB160M-30TR) - 780mV is still low < 1.4V VBUS plugin detection(21.11) - this doesn't cause false VBUS detect - and 780mV on MCP73832 Vcc pin is also no problem. - D5 can be removed. - - ADC divider switching - DONE 12/07 - * Drain and Source of Q4 Pch was reversed wrongly on Rev.E. - - - reverse current from Lipo charger - DONE 12/07 - * MCP73832 has no recverse current from Vcc pin unlike MCP73831 - - -- Rev.F design - DONE - - current measure point - DONE 12/08 - - change value of cap 68->47 - DONE 12/08 - - PPTC land pattern: no solder jumper, use 0Ohm resistor instead - CANCEL 12/08 - - Q4 Pch FET: wrong Drain and Source - DONE 12/08 - - D5 can be removed. - DONE 12/08 - - - -- BT_INDICATOR LED turns on wrongly when touching line or pin. -- pull-up enabled on PF6/GPIO2 08/30 -- Lipo charger configuration: fast charge time: USB charger spec? -- used 2kohm -- use LED of charger to alarm low battery. LED should be powered directly from Lipo? - cancel; powered from VUSB -- Use RTS in serial_uart.c to resolve missing chars from help message of RN-42 - done -- CTS/RTS lines are needed? just connect in loop back if no flow control is needed. - done -- add IO pin to charger status CHRG; LED control(low) and detect charge status(input HiZ) 07.24 -- LINKED: add trace on PIO2 to PF6 07.24 -- Lipo voltage ADC sensing -- Lipo charger MCP73831: needs capacitor 4.7uF *2 -- USB connection check - 07.01 -- BT on/off check: whether RX line is pulled up? - checking RTS 07.01 -- USB/BT switching BT is on -> BT, BT is off -> USB - 07.01 -- Under voltage lock out UVLO for protection of Lipo - Lipo has discharge protection at 3.100V 07.01 -- Power saving: HHKB scan, BT radio control - 9h with 850mAh, this is enough 07.01 -- Power selector doesn't work; Q4 MOSFET leaks from Lipo to USB power line. -- use Schottky instead 07/04 - -- wrongly suspended when powered from adapter without USB connection - DONE - - suspend event may occur when plug into adapter - - and never wake until conected to real USB line - - without debug print via USB no problem; CSW(wake just after suspend as real USB line) - - seems like USB print causes this problem after suspended - -- lose USB connection during power-down mode - DONE - - USB initialize code in main() causes this - WRONG - - Do not power-down during USB connection is active - DONE 11/11 - (USB_DeviceState == USB_DEVICE_Configured) is used to check USB connection - matrix_power_down() matrix.c - 11/23 - -- with Nexus5 keyboard and mouse are very laggy. - Not confirmed. 01/15 - -- switch BT host connections - CANCEL 01/15 - - switch next connection - cannot switch connection with version 6.15 at least - -- When given power only from wall wart adapter - DONE? not confirmed 01/15 - - it sleeps. it should not sleep - - Configured state without USB connection? - -- timer is slow while power down - DONE 11/26 - - time out interrupt is lost while power down? - - interrupt of watchdog timer compensates timer counter(avr/suspend.c) - -- repeated CHARGING/FULL_CHARGED - No longer problem 01/15 - - In LTC sharp pulses are observed. - - MCP has no pulse but still has a problem. - - needs more wait before read pin state? - NO - -- USB plug-in fails while BT - No longer problem 01/15 - - it ends in suspend state - - maybe, not responsive to host enumeration process due to power-down. - - matrix_power_down() only when state is unattached - 11/26 - - need to observe a while - diff --git a/keyboard/hhkb/rn42/PowerSave.txt b/keyboard/hhkb/rn42/PowerSave.txt deleted file mode 100644 index 4b9c8f415d..0000000000 --- a/keyboard/hhkb/rn42/PowerSave.txt +++ /dev/null @@ -1,88 +0,0 @@ -Power Saving -============ - - -MCU+HHKB Power Comsumption --------------------------- -Battery drive: - idle 18.9mA - active 35.8mA - -USB powered: - 40.0mA - 52mA 01/17 - -Other keyboards: -HHKB Pro 55mA -HHKB Pro2 140mA -HHKB Pro 42mA(Alt) -HHKB Pro2 52mA(Alt BT controller USB mode) -HHKB Pro2 88mA(Alt BT controller BT mode connected) -HHKB Pro2 68mA(Alt BT controller BT mode config mode) -Poker X 6mA -Infinity 24mA(TMK) - 65mA(kiibohd) - - -HHKB key switch power control ------------------------------ -MOS FET Nch: BSS138 or IRLML6344T, either works and no apparent difference. -Normally on(pull-up) or off(pull-down)? interms of power saving it prefers pull-down? - -Pull-down will be better for power saving, normally off. - - - -Used Timer ----------- - -8MHz clock ----------- -1) 16MHz xtal with system prescaler div2: F_CPU=8MHz, F_USB=16MHz -2) 8MHz xtal with div1: F_CPU=8MHz, F_USB=8MHz -Hardware USART doesn't work at 115200bps with 8MHz(F_CPU). - -workaround: -a) use Sotwre serial for communcation with RN-42 -b) reduce baud of RN-42 to lower rate;(factory default is 115200bps) -10/03 - - - -Slave mode ----------- -Discovery/Inquire -Connect/Page - -SI,0012 -SJ,0012 -InqWindw=0100 -PagWindw=0100 - - -Sniff mode ----------- -0.625ms * <hex> -SW,0320 Very sluggish. Type is not lost but very slow to register. -SW,0160 Still sluggish. may transposed? can type but ... - Mouse point move intermittently -SW,0020 feel a bit late like stumble(20ms) -SW,0010 feel no latency(10ms) - - -Deep sleep ----------- -SW,8010 - - -TX power --------- -SY,fff4 - - -IO pins -------- -S%,1000 status led and connection control don't work - GPIO5: status LED - GPIO6: Connection control - GPIO2: linked status diff --git a/keyboard/hhkb/rn42/RN42.txt b/keyboard/hhkb/rn42/RN42.txt deleted file mode 100644 index 64c3fdd4ec..0000000000 --- a/keyboard/hhkb/rn42/RN42.txt +++ /dev/null @@ -1,408 +0,0 @@ -RN-42 Bluetooth Module Support -============================== -Bluetooth controller board works with HHKB Pro2, JP, Type-S and Type-S JP and it supports both USB and Bluetooth as keyboard output protocol. Bluetooth module Roving Networks/Microchip RN-42 is installed on the board. - - -RN-42: -http://www.microchip.com/wwwproducts/Devices.aspx?product=RN42 - - -Capabitlities: -- USB keyboard functions - completely equivarent to USB controller including mouse keys and NKRO. -- Switching between USB and Bluetooth - You can switch the two connections with BT switch or key combination. -- RN-42 config mode - You can change power/connection configuration of the module if needed. -- Low battery alert - Red LED turns on when low voltage. -- RN-42 status indicator - LED indicates status of Bluetooth connection. -- Pairing - The module stores up to 8 connections. -- Auto connect - The module connects the last connected device automatically. -- iOS support - works as keyboard with iPhone5. No tested completely. -- Android support - works as keyboard and mouse with Nexus5. No tested completely. -- Mouse keys over BT - Note that iOS doesn't accept mouse device. - - -Limitations: -- Short battery life - Around 12hr with 1000mAh -- No connection switching - RN-42 auto-connects to the last connected device. - Some of consumer products can switch between devices, for example Logitech K480. - http://www.logitech.com/en-us/product/multi-device-keyboard-k480?crid=26 -- HHKB JP requires case modification for BT switch and LEDs. - without switch power controlled by MCU? Probably using 3.3V regulator enable pin power of RN-42 can be controlled. - -NOTE: -- LIPO BATTERY IS VERY DANGEROUS, TAKE EXTRA CARE OF YOUR SAFETY AND PROPERTY. -- RN-42 version 6.15 is supported. -- No NKRO over Bluetooth -- Check you country's wiress regulation and certification of RN-42. - -Bugs: - -Todos: - - -Lipo Battery ------------- -You can use 3.7V Lithium Ion battery with JST PH 2pin connector and protection circuit. -Battery space inside HHKB is around 54mm x 50mm and its height is 7mm. - -Sparkfun 850mAh -https://www.sparkfun.com/products/341 -Sparkfun 1000mAh -https://www.sparkfun.com/products/339 - -Sparkfun 2000mAh battery won't fit due to its size. - -Learn about Lipo battery: -https://learn.adafruit.com/li-ion-and-lipoly-batteries - - - - - -LED Status ----------- -Configuring 10 times per sec -Startup/configuration timer 2 times per sec -Discoverable/Inquiring/Idle once per sec -Connected solid on - - -RN-42 Magic Command --------------------- -Magic key combination is 'LShift+RShift' by default in case of HHKB. - -Here is help. - - ----- Bluetooth RN-42 Help ----- - i: RN-42 info - b: battery voltage - Del: enter/exit RN-42 config mode - Slck: RN-42 initialize - p: pairing - u: toggle Force USB mode - - RN-42 info: displays information of the module on console. - battery voltage: displays current voltage of battery and uptime. - RN-42 initialize: does factory reset and configures RN-42 - pairing: enters Pairing mode. - toggle Force USB mode: switch between USB and Bluetooth - - -RN-42 Config mode ------------------ -You can tune/operate RN-42 yourself with config(command) mode. - -1. hook up USB cable -2. run `hid_listen` command in console -3. turn on Bluetooth switch -4. press LShift+RShift+Delete(Fn+~) you will see output like followings: - - Entering config mode ... - CMD - v - Ver 6.15 04/26/2013 - (c) Roving Networks - -5. do config with RN-42 commands. See documentations of RN-42. -6. to exit also press LShift+RShift+Delete(Fn+~) - - Exiting config mode ... - --- - END - - -RN-42 Initial Configuration ---------------------------- -RN-42 is configured as SPP device at factory reset, you need to configure it as HID device. This is needed just once first time. - -1. hook up USB cable -2. run `hid_listen` command in console -3. turn on Bluetooth switch -4. press LShift+RShift+ScrLk(Fn+O) you will see output like followings: - - Entering config mode ... - CMD - Ver 6.15 04/26/2013 - (c) Roving Networks - ECHO ON - SF,1 - AOK - S-,TmkBT - AOK - SS,Keyboard/Mouse - AOK - SM,4 - AOK - SW,8000 - AOK - S~,6 - AOK - SH,003C - AOK - SY,FFF4 - AOK - R,1 - Reboot! - Exiting config mode ... - -5. output of command 'X' after cofiguration - - Ver 6.15 04/26/2013 - (c) Roving Networks - ***Settings*** - BTA=00066667BBE9 - BTName=TmkBT-BBE9 - Baudrt(SW4)=115K - Mode =DTR - Authen=1 - PinCod=1234 - Bonded=0 - Rem=NONE SET - ***ADVANCED Settings*** - SrvName= Keyboard/Mouse - SrvClass=0000 - DevClass=1F00 - InqWindw=0100 - PagWindw=0100 - CfgTimer=255 - StatuStr=NULL - HidFlags=3c - DTRtimer=8 - KeySwapr=0 - ***OTHER Settings*** - Profile= HID - CfgChar= $ - SniffEna=8000 - LowPower=0 - TX Power=fff4 - IOPorts= 0 - IOValues=0 - Sleeptmr=0 - DebugMod=0 - RoleSwch=0 - - -Switch to USB mode ------------------- -You can switch between USB and Bluetooth with pressing 'LShift+RShift+u'. - - -Pairing mode ------------- -This disconnects current connect and enter pairing mode. - - - - -For deveropment -=============== - -RN-42 Serial Connection ------------------------ -UART: 115200bps, 8bit, 1-stopbit, non-parity, no flow control -SSP: 115200bps, 8bit, 1-stopbit, non-parity, no flow control(via Bluetooth) - -To enter command mode disconnect the module from host and type '$$$'.(you will see 'CMD') and type '+' to get local echo. To exit type '---'(you will see 'END'). - - -RN-42 Commands --------------- -S-,tmkBT // Device name -SS,keyboard/mouse // service name -SM,4 // Auto Connect DTR mode -SW,8010 // Sniff enable 0x10*0.625ms=10ms; 50ms is laggish and not much power save -S~,6 // HID profile -S~,0 // SPP profile -SH,003C // HID register -SY,0004 // Transmit power -SC,0000 // COD: 000005C0 (see HID spec/Bluegiga doc) -SD,05C0 // bit 12-8 7 6 5-0 - // 00101 1 1 0 - // peripheral pointing keybaord joystick, gamepad, ... -SM,6 // Pairing mode: auto connect -SM,4 // Master mode: Connection can be controled with GPIO6 -SF,1 // Factroy reset -R,1 // reboot -SR,Z // removes all remote addresses for reconnecting. - // can be used to connect another host -SR,I // registers last inquiry address - - -Operation Modes ---------------- -SM,3 Auto Connect Master mode -SM,4 Auto Connect DTR Mode uses GPIO6 to make and break connection(Mode =DTR) - confirm: auto connect works and control connection with GPIO6 -SM,5 Auto Connect ANY Mode (Mode =ANY) - each time GPIO is set, make inquiry and connect to the first found device -SM,6 automatically reconnect(Mode =Pair) - confirm: auto connect works well but difficult to enter command mode. - - -HID flag register ------------------ -SH,0200 -GH - -10 0000 0000(0200) default -00 0011 1000(0038) Combo -|| | | |\_\____ number of paired devices to which the module can reconnect -|| | | \_______ send out reports over UART (0xFF <len> <data>) -|| \__\_________ descriptor type -|\______________ toggle virtual keyboard on iOS when first connected -\_______________ Force HID mode if GPIO11 is high on power-up - - Descriptor type: - 0000: keybaord - 0001: Game Pad - 0010: Mouse - 0011: Combo - 0100: Joystick - 1xxx: reserved - - -Out report - Indicator ----------------------- -0xFE 0x02 0x01 <LED_state> - - -Apple iOS ---------- -Keyboard can be used with iPhone, but mouse cannot. - - -Android -------- -3.7.1.5 Note: To connect with Android phone the modules must wake up 11ms every 2.5seconds. - - -Power Management ----------------- -Inquiry and Page window Idle or Active (3.1.1) - Downside: delay in discovery or connection time - SI, // set inquiry scan window(discovery) on/off duty? - SJ, // set page scan window(connection) - This reduces averaege power >20mA to 5mA(3mA in Sniff mode) - -Sniff mode Transmit - Sniff mode is disabled by default and radio is active continuously when connected.(25-30mA) - In Sniff mode the radio wakes up intermittently and sleeps in very low power mode.(2mA) - SW,<val> // set interval timer(*0.625ms) 0000-7FFF - -Deep sleep Idle (3.1.2) - In this mode the module shuts down completly and only draws about 300uA. To enable this set the most signifant bit(0x8000) of Sniff interaval timer. - SW,8320 // deep sleep enable(interval=0x320*0.625=500ms) - In normal sleep the firmware is still running in idle mode, and wakes up about 20 times per second to check ports, update LEDs, etc. During deep sleep, the firmware actually stops runnig some tasks and the LEDs only update about once per second. - To wake from deep sleep there are three ways: (in worst case wake up takes 5ms) - *send a charactor to the UART(first charactor will be lost) - *toggle CTS low to high and wait 5ms - *wake automatically every slot time(<val>*0.625ms) - Once the radio is awake it stay active for exactly 1 second of inactivity and then sleeps again. - Downside: latency and data loss - -Disable Output driver Idle or Active (3.1.3) - S%,1000 // set all GPIO pins(0-11) to inputs. - -Lower Transmit Power Idle or Active (3.1.4) - SY,<hex> // transmit power setting(takes effect after a power cycle and reboot) - Downside: reducing effective range - - -Optimizig for Latency ---------------------- -By default the firmware is optimized for throughput. -SQ,16 // set latency bit -SQ,0 // unset latency bit - - -Configuration timer settings ----------------------------- -Remote configuration is used for the module to be configured with various commands over Bluetooth(SPP profile only?). - -The module has remote configuration timer to allow remote configuration over Bluetooth after power up in Slave mode. In Master modes the remote configuration timer is set to 0(no remote configuration). (In Trigger Master mode the timer is used as an idle timer to break the connection after time expires with no charactors receive.) - ST,0 // no remote, no local when connected - ST,<1-252> // local and remote with timeout in seconds from power up - ST,253 // local only without timeout - ST,254 // remote only without timeout - ST,255 // local and remote without timeout - - -Commands --------- -S7, 7bit mode -SA, Authenticaiton -SB, Send break -SC, Service class -SD, Device class -SM,<val> Operation mode -SP,<string> Pin code(alpahnumeric) -SQ,<mask> Special configuration(GPIO, discovery mode, low latency, reboot, UART) -SR,<hex> Store remote address -SR,Z Erase all address -SS,<string> Set service name(1-20)** -ST,<val> Remote configuration timer(Master:0, Slave:0-255, Triger:as idle timer) -SU,<val> UART baud rate -SW,<val> low-power sniff mode** deep sleep and wake up every 625us * <val> -SX,<0|1> bonding enable only acceps device that matches the stored address -SY,<hex> power setting** -SZ,<val> non-standard raw baud rate <val>=baud*0.004096 -S~,<val> Profile 0:SPP, 5:APL, 6:HID -S-,<string> Device name -15 alphanumeric charactors -S?,<0|1> role switch enable -S$,<char> command mode char -$|,<hex> low-power connect mode deep sleep/active(discoverable and connectable) cycle -D display basic setting -E display extended setting -GB display the device's Bluetooth address -GF display Bluetooth address of connected device -GK show connection status -GR show remote address for reconnecting -G& show GPIO pin -G<char> show stored setting -+ toggle local echo on/off -& show GPIO 3,4,6,7(DIP switch) -C connect to stored remote address -C,<address> connect last address -CFI connect and go into fast data mode -CFR connect and go into fast data mode -CT,<address>,<val> connect to the address and disconnect after val? -F,1 fast data mod: -H display help -I,<time>,<cod> inquiry scan with <cod> -IN,<time>,<cod> inquiry scan with <cod>, return without BT name -IR inquiry scan with 0055AA -IS inquiry scan with 001F00 -J hide pin code -K, kill disconnects current connection -L link quality -M show modem signlal status -O display other settings -P,<char> pass through? -Q quiet mode make the module not discoverable -Q,0 discoverable and connectable -Q,1 not discoverable and not connectable -Q,2 not discoverable and connectable -Q,? display current quiet mode -R,1 reboot -T,<0|1> pass received data while in command mode -U,<baud>,<parity> change UART setting tentatively -V display firmware version -W wake from quiet mode enable discovery and connection -Z deep sleep mode(<2mA) - - -Reset to Factory Default ------------------------- -SF,1 -R,1 diff --git a/keyboard/hhkb/rn42/battery.c b/keyboard/hhkb/rn42/battery.c deleted file mode 100644 index 7e868c9646..0000000000 --- a/keyboard/hhkb/rn42/battery.c +++ /dev/null @@ -1,130 +0,0 @@ -#include <avr/io.h> -#include <util/delay.h> -#include "battery.h" - - -/* - * Battery - */ -void battery_init(void) -{ - // blink - battery_led(LED_ON); _delay_ms(500); - battery_led(LED_OFF); _delay_ms(500); - battery_led(LED_ON); _delay_ms(500); - battery_led(LED_OFF); _delay_ms(500); - // LED indicates charger status - battery_led(LED_CHARGER); - - // ADC setting for voltage monitor - // Ref:2.56V band-gap, Input:ADC0(PF0), Prescale:128(16MHz/128=125KHz) - ADMUX = (1<<REFS1) | (1<<REFS0); - ADCSRA = (1<<ADPS2) | (1<<ADPS1) | (1<<ADPS0); - // digital input buffer disable(24.9.5) - DIDR0 = (1<<ADC0D) | (1<<ADC4D) | (1<<ADC7D); - DIDR1 = (1<<AIN0D); - DIDR2 = (1<<ADC8D) | (1<<ADC9D) | (1<<ADC11D) | (1<<ADC12D) | (1<<ADC13D); - - // ADC disable voltate divider(PF4) - DDRF |= (1<<4); - PORTF &= ~(1<<4); -} - -// Indicator for battery -void battery_led(battery_led_t val) -{ - if (val == LED_TOGGLE) { - // Toggle LED - DDRF |= (1<<5); - PINF |= (1<<5); - } else if (val == LED_ON) { - // On overriding charger status - DDRF |= (1<<5); - PORTF &= ~(1<<5); - } else if (val == LED_OFF) { - // Off overriding charger status - DDRF |= (1<<5); - PORTF |= (1<<5); - } else { - // Display charger status - DDRF &= ~(1<<5); - PORTF &= ~(1<<5); - } -} - -bool battery_charging(void) -{ - if (!(USBSTA&(1<<VBUS))) return false; - - // Charger Status: - // MCP73831 MCP73832 LTC4054 Status - // Hi-Z Hi-Z Hi-Z Shutdown/No Battery - // Low Low Low Charging - // Hi Hi-Z Hi-Z Charged - - // preserve last register status - uint8_t ddrf_prev = DDRF; - uint8_t portf_prev = PORTF; - - // Input with pullup - DDRF &= ~(1<<5); - PORTF |= (1<<5); - _delay_ms(1); - bool charging = PINF&(1<<5) ? false : true; - - // restore last register status - DDRF = (DDRF&~(1<<5)) | (ddrf_prev&(1<<5)); - PORTF = (PORTF&~(1<<5)) | (portf_prev&(1<<5)); - - // TODO: With MCP73831 this can not get stable status when charging. - // LED is powered from PSEL line(USB or Lipo) - // due to weak low output of STAT pin? - // due to pull-up'd via resitor and LED? - return charging; -} - -// Returns voltage in mV -uint16_t battery_voltage(void) -{ - // ADC disable voltate divider(PF4) - DDRF |= (1<<4); - PORTF |= (1<<4); - - volatile uint16_t bat; - ADCSRA |= (1<<ADEN); - _delay_ms(1); // wait for charging S/H capacitance - - ADCSRA |= (1<<ADSC); - while (ADCSRA & (1<<ADSC)) ; - bat = ADC; - - ADCSRA &= ~(1<<ADEN); - - // ADC disable voltate divider(PF4) - DDRF |= (1<<4); - PORTF &= ~(1<<4); - - return (bat - BATTERY_ADC_OFFSET) * BATTERY_ADC_RESOLUTION; -} - -static bool low_voltage(void) { - static bool low = false; - uint16_t v = battery_voltage(); - if (v < BATTERY_VOLTAGE_LOW_LIMIT) { - low = true; - } else if (v > BATTERY_VOLTAGE_LOW_RECOVERY) { - low = false; - } - return low; -} - -battery_status_t battery_status(void) -{ - if (USBSTA&(1<<VBUS)) { - /* powered */ - return battery_charging() ? CHARGING : FULL_CHARGED; - } else { - /* not powered */ - return low_voltage() ? LOW_VOLTAGE : DISCHARGING; - } -} diff --git a/keyboard/hhkb/rn42/battery.h b/keyboard/hhkb/rn42/battery.h deleted file mode 100644 index 180d4dcfaa..0000000000 --- a/keyboard/hhkb/rn42/battery.h +++ /dev/null @@ -1,35 +0,0 @@ -#ifndef POWER_H -#define POWER_H - -#include <stdint.h> -#include <stdbool.h> - -typedef enum { - FULL_CHARGED, - CHARGING, - DISCHARGING, - LOW_VOLTAGE, - UNKNOWN, -} battery_status_t; - -typedef enum { - LED_CHARGER = 0, - LED_ON, - LED_OFF, - LED_TOGGLE, -} battery_led_t; - -/* Battery API */ -void battery_init(void); -void battery_led(battery_led_t val); -bool battery_charging(void); -uint16_t battery_voltage(void); -battery_status_t battery_status(void); - -#define BATTERY_VOLTAGE_LOW_LIMIT 3500 -#define BATTERY_VOLTAGE_LOW_RECOVERY 3700 -// ADC offset:16, resolution:5mV -#define BATTERY_ADC_OFFSET 16 -#define BATTERY_ADC_RESOLUTION 5 - -#endif diff --git a/keyboard/hhkb/rn42/main.c b/keyboard/hhkb/rn42/main.c deleted file mode 100644 index 83d9950388..0000000000 --- a/keyboard/hhkb/rn42/main.c +++ /dev/null @@ -1,111 +0,0 @@ -#include <avr/io.h> -#include <avr/power.h> -#include <avr/wdt.h> -#include "lufa.h" -#include "print.h" -#include "sendchar.h" -#include "rn42.h" -#include "rn42_task.h" -#include "serial.h" -#include "keyboard.h" -#include "keycode.h" -#include "action.h" -#include "action_util.h" -#include "wait.h" -#include "suart.h" -#include "suspend.h" - -static int8_t sendchar_func(uint8_t c) -{ - xmit(c); // SUART - sendchar(c); // LUFA - return 0; -} - -static void SetupHardware(void) -{ - /* Disable watchdog if enabled by bootloader/fuses */ - MCUSR &= ~(1 << WDRF); - wdt_disable(); - - /* Disable clock division */ - clock_prescale_set(clock_div_1); - - // Leonardo needs. Without this USB device is not recognized. - USB_Disable(); - - USB_Init(); - - // for Console_Task - USB_Device_EnableSOFEvents(); - print_set_sendchar(sendchar_func); - - // SUART PD0:output, PD1:input - DDRD |= (1<<0); - PORTD |= (1<<0); - DDRD &= ~(1<<1); - PORTD |= (1<<1); -} - -int main(void) __attribute__ ((weak)); -int main(void) -{ - SetupHardware(); - sei(); - - /* wait for USB startup to get ready for debug output */ - uint8_t timeout = 255; // timeout when USB is not available(Bluetooth) - while (timeout-- && USB_DeviceState != DEVICE_STATE_Configured) { - wait_ms(4); -#if defined(INTERRUPT_CONTROL_ENDPOINT) - ; -#else - USB_USBTask(); -#endif - } - print("\nUSB init\n"); - - rn42_init(); - rn42_task_init(); - print("RN-42 init\n"); - - /* init modules */ - keyboard_init(); - - if (!rn42_rts()) { - host_set_driver(&rn42_driver); - } else { - host_set_driver(&lufa_driver); - } - -#ifdef SLEEP_LED_ENABLE - sleep_led_init(); -#endif - - print("Keyboard start\n"); - while (1) { - while (rn42_rts() && // RN42 is off - USB_DeviceState == DEVICE_STATE_Suspended) { - print("[s]"); - matrix_power_down(); - suspend_power_down(); - suspend_power_down(); - suspend_power_down(); - suspend_power_down(); - suspend_power_down(); - suspend_power_down(); - suspend_power_down(); - if (USB_Device_RemoteWakeupEnabled && suspend_wakeup_condition()) { - USB_Device_SendRemoteWakeup(); - } - } - - keyboard_task(); - -#if !defined(INTERRUPT_CONTROL_ENDPOINT) - USB_USBTask(); -#endif - - rn42_task(); - } -} diff --git a/keyboard/hhkb/rn42/rn42.c b/keyboard/hhkb/rn42/rn42.c deleted file mode 100644 index 756285d7bb..0000000000 --- a/keyboard/hhkb/rn42/rn42.c +++ /dev/null @@ -1,237 +0,0 @@ -#include <avr/io.h> -#include "host.h" -#include "host_driver.h" -#include "serial.h" -#include "rn42.h" -#include "print.h" -#include "timer.h" -#include "wait.h" - - -/* Host driver */ -static uint8_t keyboard_leds(void); -static void send_keyboard(report_keyboard_t *report); -static void send_mouse(report_mouse_t *report); -static void send_system(uint16_t data); -static void send_consumer(uint16_t data); - -host_driver_t rn42_driver = { - keyboard_leds, - send_keyboard, - send_mouse, - send_system, - send_consumer -}; - - -void rn42_init(void) -{ - // JTAG disable for PORT F. write JTD bit twice within four cycles. - MCUCR |= (1<<JTD); - MCUCR |= (1<<JTD); - - // PF7: BT connection control(high: connect, low: disconnect) - rn42_autoconnect(); - - // PF6: linked(input without pull-up) - DDRF &= ~(1<<6); - PORTF |= (1<<6); - - // PF1: RTS(low: allowed to send, high: not allowed) - DDRF &= ~(1<<1); - PORTF &= ~(1<<1); - - // PD5: CTS(low: allow to send, high:not allow) - DDRD |= (1<<5); - PORTD &= ~(1<<5); - - serial_init(); -} - -int16_t rn42_getc(void) -{ - return serial_recv2(); -} - -const char *rn42_gets(uint16_t timeout) -{ - static char s[24]; - uint16_t t = timer_read(); - uint8_t i = 0; - int16_t c; - while (i < 23 && timer_elapsed(t) < timeout) { - if ((c = rn42_getc()) != -1) { - if ((char)c == '\r') continue; - if ((char)c == '\n') break; - s[i++] = c; - } - } - s[i] = '\0'; - return s; -} - -void rn42_putc(uint8_t c) -{ - serial_send(c); -} - -void rn42_puts(char *s) -{ - while (*s) - serial_send(*s++); -} - -bool rn42_autoconnecting(void) -{ - // GPIO6 for control connection(high: auto connect, low: disconnect) - // Note that this needs config: SM,4(Auto-Connect DTR Mode) - return (PORTF & (1<<7) ? true : false); -} - -void rn42_autoconnect(void) -{ - // hi to auto connect - DDRF |= (1<<7); - PORTF |= (1<<7); -} - -void rn42_disconnect(void) -{ - // low to disconnect - DDRF |= (1<<7); - PORTF &= ~(1<<7); -} - -bool rn42_rts(void) -{ - // low when RN-42 is powered and ready to receive - return PINF&(1<<1); -} - -void rn42_cts_hi(void) -{ - // not allow to send - PORTD |= (1<<5); -} - -void rn42_cts_lo(void) -{ - // allow to send - PORTD &= ~(1<<5); -} - -bool rn42_linked(void) -{ - // RN-42 GPIO2 - // Hi-Z: Not powered - // High: Linked - // Low: Connecting - return PINF&(1<<6); -} - - -static uint8_t leds = 0; -static uint8_t keyboard_leds(void) { return leds; } -void rn42_set_leds(uint8_t l) { leds = l; } - -static void send_keyboard(report_keyboard_t *report) -{ - // wake from deep sleep -/* - PORTD |= (1<<5); // high - wait_ms(5); - PORTD &= ~(1<<5); // low -*/ - - serial_send(0xFD); // Raw report mode - serial_send(9); // length - serial_send(1); // descriptor type - serial_send(report->mods); - serial_send(0x00); - serial_send(report->keys[0]); - serial_send(report->keys[1]); - serial_send(report->keys[2]); - serial_send(report->keys[3]); - serial_send(report->keys[4]); - serial_send(report->keys[5]); -} - -static void send_mouse(report_mouse_t *report) -{ - // wake from deep sleep -/* - PORTD |= (1<<5); // high - wait_ms(5); - PORTD &= ~(1<<5); // low -*/ - - serial_send(0xFD); // Raw report mode - serial_send(5); // length - serial_send(2); // descriptor type - serial_send(report->buttons); - serial_send(report->x); - serial_send(report->y); - serial_send(report->v); -} - -static void send_system(uint16_t data) -{ - // Table 5-6 of RN-BT-DATA-UB - // 81,82,83 scan codes can be used? -} - - -static uint16_t usage2bits(uint16_t usage) -{ - switch (usage) { - case AC_HOME: return 0x01; - case AL_EMAIL: return 0x02; - case AC_SEARCH: return 0x04; - //case AL_KBD_LAYOUT: return 0x08; // Apple virtual keybaord toggle - case AUDIO_VOL_UP: return 0x10; - case AUDIO_VOL_DOWN: return 0x20; - case AUDIO_MUTE: return 0x40; - case TRANSPORT_PLAY_PAUSE: return 0x80; - case TRANSPORT_NEXT_TRACK: return 0x100; - case TRANSPORT_PREV_TRACK: return 0x200; - case TRANSPORT_STOP: return 0x400; - case TRANSPORT_STOP_EJECT: return 0x800; - //case return 0x1000; // Fast forward - //case return 0x2000; // Rewind - //case return 0x4000; // Stop/eject - //case return 0x8000; // Internet browser - }; - return 0; -} - -static void send_consumer(uint16_t data) -{ - uint16_t bits = usage2bits(data); - serial_send(0xFD); // Raw report mode - serial_send(3); // length - serial_send(3); // descriptor type - serial_send(bits&0xFF); - serial_send((bits>>8)&0xFF); -} - - -/* Null driver for config_mode */ -static uint8_t config_keyboard_leds(void); -static void config_send_keyboard(report_keyboard_t *report); -static void config_send_mouse(report_mouse_t *report); -static void config_send_system(uint16_t data); -static void config_send_consumer(uint16_t data); - -host_driver_t rn42_config_driver = { - config_keyboard_leds, - config_send_keyboard, - config_send_mouse, - config_send_system, - config_send_consumer -}; - -static uint8_t config_keyboard_leds(void) { return leds; } -static void config_send_keyboard(report_keyboard_t *report) {} -static void config_send_mouse(report_mouse_t *report) {} -static void config_send_system(uint16_t data) {} -static void config_send_consumer(uint16_t data) {} diff --git a/keyboard/hhkb/rn42/rn42.h b/keyboard/hhkb/rn42/rn42.h deleted file mode 100644 index db6916fe86..0000000000 --- a/keyboard/hhkb/rn42/rn42.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef RN42_H -#define RN42_H - -#include <stdbool.h> - -host_driver_t rn42_driver; -host_driver_t rn42_config_driver; - -void rn42_init(void); -int16_t rn42_getc(void); -const char *rn42_gets(uint16_t timeout); -void rn42_putc(uint8_t c); -void rn42_puts(char *s); -bool rn42_autoconnecting(void); -void rn42_autoconnect(void); -void rn42_disconnect(void); -bool rn42_rts(void); -void rn42_cts_hi(void); -void rn42_cts_lo(void); -bool rn42_linked(void); -void rn42_set_leds(uint8_t l); - -#endif diff --git a/keyboard/hhkb/rn42/rn42_task.c b/keyboard/hhkb/rn42/rn42_task.c deleted file mode 100644 index 84001b3f1a..0000000000 --- a/keyboard/hhkb/rn42/rn42_task.c +++ /dev/null @@ -1,478 +0,0 @@ -#include <stdint.h> -#include <string.h> -#include <avr/pgmspace.h> -#include <avr/eeprom.h> -#include "keycode.h" -#include "serial.h" -#include "host.h" -#include "action.h" -#include "action_util.h" -#include "lufa.h" -#include "rn42_task.h" -#include "print.h" -#include "debug.h" -#include "timer.h" -#include "wait.h" -#include "command.h" -#include "battery.h" - -static bool config_mode = false; -static bool force_usb = false; - -static void status_led(bool on) -{ - if (on) { - DDRE |= (1<<6); - PORTE &= ~(1<<6); - } else { - DDRE |= (1<<6); - PORTE |= (1<<6); - } -} - -void rn42_task_init(void) -{ - battery_init(); -} - -void rn42_task(void) -{ - int16_t c; - // Raw mode: interpret output report of LED state - while ((c = rn42_getc()) != -1) { - // LED Out report: 0xFE, 0x02, 0x01, <leds> - // To get the report over UART set bit3 with SH, command. - static enum {LED_INIT, LED_FE, LED_02, LED_01} state = LED_INIT; - switch (state) { - case LED_INIT: - if (c == 0xFE) state = LED_FE; - else { - if (0x0 <= c && c <= 0x7f) xprintf("%c", c); - else xprintf(" %02X", c); - } - break; - case LED_FE: - if (c == 0x02) state = LED_02; - else state = LED_INIT; - break; - case LED_02: - if (c == 0x01) state = LED_01; - else state = LED_INIT; - break; - case LED_01: - dprintf("LED status: %02X\n", c); - rn42_set_leds(c); - state = LED_INIT; - break; - default: - state = LED_INIT; - } - } - - /* Bluetooth mode when ready */ - if (!config_mode && !force_usb) { - if (!rn42_rts() && host_get_driver() != &rn42_driver) { - clear_keyboard(); - host_set_driver(&rn42_driver); - } else if (rn42_rts() && host_get_driver() != &lufa_driver) { - clear_keyboard(); - host_set_driver(&lufa_driver); - } - } - - - static uint16_t prev_timer = 0; - uint16_t e = timer_elapsed(prev_timer); - if (e > 1000) { - /* every second */ - prev_timer += e/1000*1000; - - /* Low voltage alert */ - uint8_t bs = battery_status(); - if (bs == LOW_VOLTAGE) { - battery_led(LED_ON); - } else { - battery_led(LED_CHARGER); - } - - /* every minute */ - uint32_t t = timer_read32()/1000; - if (t%60 == 0) { - uint16_t v = battery_voltage(); - uint8_t h = t/3600; - uint8_t m = t%3600/60; - uint8_t s = t%60; - dprintf("%02u:%02u:%02u\t%umV\n", h, m, s, v); - /* TODO: xprintf doesn't work for this. - xprintf("%02u:%02u:%02u\t%umV\n", (t/3600), (t%3600/60), (t%60), v); - */ - } - } - - - /* Connection monitor */ - if (!rn42_rts() && rn42_linked()) { - status_led(true); - } else { - status_led(false); - } -} - - - -/****************************************************************************** - * Command - ******************************************************************************/ -static host_driver_t *prev_driver = &rn42_driver; - -static void print_rn42(void) -{ - int16_t c; - while ((c = rn42_getc()) != -1) { - xprintf("%c", c); - } -} - -static void clear_rn42(void) -{ - while (rn42_getc() != -1) ; -} - -#define SEND_STR(str) send_str(PSTR(str)) -#define SEND_COMMAND(cmd) send_command(PSTR(cmd)) - -static void send_str(const char *str) -{ - uint8_t c; - while ((c = pgm_read_byte(str++))) - rn42_putc(c); -} - -static const char *send_command(const char *cmd) -{ - static const char *s; - send_str(cmd); - wait_ms(500); - s = rn42_gets(100); - xprintf("%s\r\n", s); - print_rn42(); - return s; -} - -static void enter_command_mode(void) -{ - prev_driver = host_get_driver(); - clear_keyboard(); - host_set_driver(&rn42_config_driver); // null driver; not to send a key to host - rn42_disconnect(); - while (rn42_linked()) ; - - print("Entering config mode ...\n"); - wait_ms(1100); // need 1 sec - SEND_COMMAND("$$$"); - wait_ms(600); // need 1 sec - print_rn42(); - const char *s = SEND_COMMAND("v\r\n"); - if (strncmp("v", s, 1) != 0) SEND_COMMAND("+\r\n"); // local echo on -} - -static void exit_command_mode(void) -{ - print("Exiting config mode ...\n"); - SEND_COMMAND("---\r\n"); // exit - - rn42_autoconnect(); - clear_keyboard(); - host_set_driver(prev_driver); -} - -static void init_rn42(void) -{ - // RN-42 configure - if (!config_mode) enter_command_mode(); - SEND_COMMAND("SF,1\r\n"); // factory defaults - SEND_COMMAND("S-,TmkBT\r\n"); - SEND_COMMAND("SS,Keyboard/Mouse\r\n"); - SEND_COMMAND("SM,4\r\n"); // auto connect(DTR) - SEND_COMMAND("SW,8000\r\n"); // Sniff disable - SEND_COMMAND("S~,6\r\n"); // HID profile - SEND_COMMAND("SH,003C\r\n"); // combo device, out-report, 4-reconnect - SEND_COMMAND("SY,FFF4\r\n"); // transmit power -12 - SEND_COMMAND("R,1\r\n"); - if (!config_mode) exit_command_mode(); -} - -#if 0 -// Switching connections -// NOTE: Remote Address doesn't work in the way manual says. -// EEPROM address for link store -#define RN42_LINK0 (uint8_t *)128 -#define RN42_LINK1 (uint8_t *)140 -#define RN42_LINK2 (uint8_t *)152 -#define RN42_LINK3 (uint8_t *)164 -static void store_link(uint8_t *eeaddr) -{ - enter_command_mode(); - SEND_STR("GR\r\n"); // remote address - const char *s = rn42_gets(500); - if (strcmp("GR", s) == 0) s = rn42_gets(500); // ignore local echo - xprintf("%s(%d)\r\n", s, strlen(s)); - if (strlen(s) == 12) { - for (int i = 0; i < 12; i++) { - eeprom_update_byte(eeaddr+i, *(s+i)); - dprintf("%c ", *(s+i)); - } - dprint("\r\n"); - } - exit_command_mode(); -} - -static void restore_link(const uint8_t *eeaddr) -{ - enter_command_mode(); - SEND_COMMAND("SR,Z\r\n"); // remove remote address - SEND_STR("SR,"); // set remote address from EEPROM - for (int i = 0; i < 12; i++) { - uint8_t c = eeprom_read_byte(eeaddr+i); - rn42_putc(c); - dprintf("%c ", c); - } - dprintf("\r\n"); - SEND_COMMAND("\r\n"); - SEND_COMMAND("R,1\r\n"); // reboot - exit_command_mode(); -} - -static const char *get_link(uint8_t * eeaddr) -{ - static char s[13]; - for (int i = 0; i < 12; i++) { - uint8_t c = eeprom_read_byte(eeaddr+i); - s[i] = c; - } - s[12] = '\0'; - return s; -} -#endif - -static void pairing(void) -{ - enter_command_mode(); - SEND_COMMAND("SR,Z\r\n"); // remove remote address - SEND_COMMAND("R,1\r\n"); // reboot - exit_command_mode(); -} - -bool command_extra(uint8_t code) -{ - uint32_t t; - uint16_t b; - switch (code) { - case KC_H: - case KC_SLASH: /* ? */ - print("\n\n----- Bluetooth RN-42 Help -----\n"); - print("i: RN-42 info\n"); - print("b: battery voltage\n"); - print("Del: enter/exit RN-42 config mode\n"); - print("Slck: RN-42 initialize\n"); -#if 0 - print("1-4: restore link\n"); - print("F1-F4: store link\n"); -#endif - print("p: pairing\n"); - - if (config_mode) { - return true; - } else { - print("u: toggle Force USB mode\n"); - return false; // to display default command help - } - case KC_P: - pairing(); - return true; -#if 0 - /* Store link address to EEPROM */ - case KC_F1: - store_link(RN42_LINK0); - return true; - case KC_F2: - store_link(RN42_LINK1); - return true; - case KC_F3: - store_link(RN42_LINK2); - return true; - case KC_F4: - store_link(RN42_LINK3); - return true; - /* Restore link address to EEPROM */ - case KC_1: - restore_link(RN42_LINK0); - return true; - case KC_2: - restore_link(RN42_LINK1); - return true; - case KC_3: - restore_link(RN42_LINK2); - return true; - case KC_4: - restore_link(RN42_LINK3); - return true; -#endif - case KC_I: - print("\n----- RN-42 info -----\n"); - xprintf("protocol: %s\n", (host_get_driver() == &rn42_driver) ? "RN-42" : "LUFA"); - xprintf("force_usb: %X\n", force_usb); - xprintf("rn42: %s\n", rn42_rts() ? "OFF" : (rn42_linked() ? "CONN" : "ON")); - xprintf("rn42_autoconnecting(): %X\n", rn42_autoconnecting()); - xprintf("config_mode: %X\n", config_mode); - xprintf("USB State: %s\n", - (USB_DeviceState == DEVICE_STATE_Unattached) ? "Unattached" : - (USB_DeviceState == DEVICE_STATE_Powered) ? "Powered" : - (USB_DeviceState == DEVICE_STATE_Default) ? "Default" : - (USB_DeviceState == DEVICE_STATE_Addressed) ? "Addressed" : - (USB_DeviceState == DEVICE_STATE_Configured) ? "Configured" : - (USB_DeviceState == DEVICE_STATE_Suspended) ? "Suspended" : "?"); - xprintf("battery: "); - switch (battery_status()) { - case FULL_CHARGED: xprintf("FULL"); break; - case CHARGING: xprintf("CHARG"); break; - case DISCHARGING: xprintf("DISCHG"); break; - case LOW_VOLTAGE: xprintf("LOW"); break; - default: xprintf("?"); break; - }; - xprintf("\n"); - xprintf("RemoteWakeupEnabled: %X\n", USB_Device_RemoteWakeupEnabled); - xprintf("VBUS: %X\n", USBSTA&(1<<VBUS)); - t = timer_read32()/1000; - uint8_t d = t/3600/24; - uint8_t h = t/3600; - uint8_t m = t%3600/60; - uint8_t s = t%60; - xprintf("uptime: %02u %02u:%02u:%02u\n", d, h, m, s); -#if 0 - xprintf("LINK0: %s\r\n", get_link(RN42_LINK0)); - xprintf("LINK1: %s\r\n", get_link(RN42_LINK1)); - xprintf("LINK2: %s\r\n", get_link(RN42_LINK2)); - xprintf("LINK3: %s\r\n", get_link(RN42_LINK3)); -#endif - return true; - case KC_B: - // battery monitor - t = timer_read32()/1000; - b = battery_voltage(); - xprintf("BAT: %umV\t", b); - xprintf("%02u:", t/3600); - xprintf("%02u:", t%3600/60); - xprintf("%02u\n", t%60); - return true; - case KC_U: - if (config_mode) return false; - if (force_usb) { - print("Auto mode\n"); - force_usb = false; - } else { - print("USB mode\n"); - force_usb = true; - clear_keyboard(); - host_set_driver(&lufa_driver); - } - return true; - case KC_DELETE: - /* RN-42 Command mode */ - if (rn42_autoconnecting()) { - enter_command_mode(); - - command_state = CONSOLE; - config_mode = true; - } else { - exit_command_mode(); - - command_state = ONESHOT; - config_mode = false; - } - return true; - case KC_SCROLLLOCK: - init_rn42(); - return true; - default: - if (config_mode) - return true; - else - return false; // yield to default command - } - return true; -} - -/* - * RN-42 Command mode - * sends charactors to the module - */ -static uint8_t code2asc(uint8_t code); -bool command_console_extra(uint8_t code) -{ - rn42_putc(code2asc(code)); - return true; -} - -// convert keycode into ascii charactor -static uint8_t code2asc(uint8_t code) -{ - bool shifted = (get_mods() & (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT))) ? true : false; - switch (code) { - case KC_A: return (shifted ? 'A' : 'a'); - case KC_B: return (shifted ? 'B' : 'b'); - case KC_C: return (shifted ? 'C' : 'c'); - case KC_D: return (shifted ? 'D' : 'd'); - case KC_E: return (shifted ? 'E' : 'e'); - case KC_F: return (shifted ? 'F' : 'f'); - case KC_G: return (shifted ? 'G' : 'g'); - case KC_H: return (shifted ? 'H' : 'h'); - case KC_I: return (shifted ? 'I' : 'i'); - case KC_J: return (shifted ? 'J' : 'j'); - case KC_K: return (shifted ? 'K' : 'k'); - case KC_L: return (shifted ? 'L' : 'l'); - case KC_M: return (shifted ? 'M' : 'm'); - case KC_N: return (shifted ? 'N' : 'n'); - case KC_O: return (shifted ? 'O' : 'o'); - case KC_P: return (shifted ? 'P' : 'p'); - case KC_Q: return (shifted ? 'Q' : 'q'); - case KC_R: return (shifted ? 'R' : 'r'); - case KC_S: return (shifted ? 'S' : 's'); - case KC_T: return (shifted ? 'T' : 't'); - case KC_U: return (shifted ? 'U' : 'u'); - case KC_V: return (shifted ? 'V' : 'v'); - case KC_W: return (shifted ? 'W' : 'w'); - case KC_X: return (shifted ? 'X' : 'x'); - case KC_Y: return (shifted ? 'Y' : 'y'); - case KC_Z: return (shifted ? 'Z' : 'z'); - case KC_1: return (shifted ? '!' : '1'); - case KC_2: return (shifted ? '@' : '2'); - case KC_3: return (shifted ? '#' : '3'); - case KC_4: return (shifted ? '$' : '4'); - case KC_5: return (shifted ? '%' : '5'); - case KC_6: return (shifted ? '^' : '6'); - case KC_7: return (shifted ? '&' : '7'); - case KC_8: return (shifted ? '*' : '8'); - case KC_9: return (shifted ? '(' : '9'); - case KC_0: return (shifted ? ')' : '0'); - case KC_ENTER: return '\n'; - case KC_ESCAPE: return 0x1B; - case KC_BSPACE: return '\b'; - case KC_TAB: return '\t'; - case KC_SPACE: return ' '; - case KC_MINUS: return (shifted ? '_' : '-'); - case KC_EQUAL: return (shifted ? '+' : '='); - case KC_LBRACKET: return (shifted ? '{' : '['); - case KC_RBRACKET: return (shifted ? '}' : ']'); - case KC_BSLASH: return (shifted ? '|' : '\\'); - case KC_NONUS_HASH: return (shifted ? '|' : '\\'); - case KC_SCOLON: return (shifted ? ':' : ';'); - case KC_QUOTE: return (shifted ? '"' : '\''); - case KC_GRAVE: return (shifted ? '~' : '`'); - case KC_COMMA: return (shifted ? '<' : ','); - case KC_DOT: return (shifted ? '>' : '.'); - case KC_SLASH: return (shifted ? '?' : '/'); - case KC_DELETE: return '\0'; // Delete to disconnect - default: return ' '; - } -} diff --git a/keyboard/hhkb/rn42/rn42_task.h b/keyboard/hhkb/rn42/rn42_task.h deleted file mode 100644 index 8f6c3ab64d..0000000000 --- a/keyboard/hhkb/rn42/rn42_task.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef RN42_TASK_H -#define RN42_TASK_H - -#include <stdbool.h> -#include "rn42.h" - -void rn42_task_init(void); -void rn42_task(void); - -#endif diff --git a/keyboard/hhkb/rn42/suart.S b/keyboard/hhkb/rn42/suart.S deleted file mode 100644 index 9fa5452928..0000000000 --- a/keyboard/hhkb/rn42/suart.S +++ /dev/null @@ -1,156 +0,0 @@ -;---------------------------------------------------------------------------;
-; Software implemented UART module ;
-; (C)ChaN, 2005 (http://elm-chan.org/) ;
-;---------------------------------------------------------------------------;
-; Bit rate settings:
-;
-; 1MHz 2MHz 4MHz 6MHz 8MHz 10MHz 12MHz 16MHz 20MHz
-; 2.4kbps 138 - - - - - - - -
-; 4.8kbps 68 138 - - - - - - -
-; 9.6kbps 33 68 138 208 - - - - -
-; 19.2kbps - 33 68 102 138 173 208 - -
-; 38.4kbps - - 33 50 68 85 102 138 172
-; 57.6kbps - - 21 33 44 56 68 91 114
-; 115.2kbps - - - - 21 27 33 44 56
-
-.nolist
-#include <avr/io.h>
-.list
-
-#define BPS 44 /* Bit delay. (see above table) */
-#define BIDIR 0 /* 0:Separated Tx/Rx, 1:Shared Tx/Rx */
-
-#define OUT_1 sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 1 */
-#define OUT_0 cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 0 */
-#define SKIP_IN_1 sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 1 */
-#define SKIP_IN_0 sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT /* Skip if 0 */
-
-
-
-#ifdef SPM_PAGESIZE
-.macro _LPMI reg
- lpm \reg, Z+
-.endm
-.macro _MOVW dh,dl, sh,sl
- movw \dl, \sl
-.endm
-#else
-.macro _LPMI reg
- lpm
- mov \reg, r0
- adiw ZL, 1
-.endm
-.macro _MOVW dh,dl, sh,sl
- mov \dl, \sl
- mov \dh, \sh
-.endm
-#endif
-
-
-
-;---------------------------------------------------------------------------;
-; Transmit a byte in serial format of N81
-;
-;Prototype: void xmit (uint8_t data);
-;Size: 16 words
-
-.global xmit
-.func xmit
-xmit:
-#if BIDIR
- ldi r23, BPS-1 ;Pre-idle time for bidirectional data line
-5: dec r23 ;
- brne 5b ;/
-#endif
- in r0, _SFR_IO_ADDR(SREG) ;Save flags
-
- com r24 ;C = start bit
- ldi r25, 10 ;Bit counter
- cli ;Start critical section
-
-1: ldi r23, BPS-1 ;----- Bit transferring loop
-2: dec r23 ;Wait for a bit time
- brne 2b ;/
- brcs 3f ;MISO = bit to be sent
- OUT_1 ;
-3: brcc 4f ;
- OUT_0 ;/
-4: lsr r24 ;Get next bit into C
- dec r25 ;All bits sent?
- brne 1b ; no, coutinue
-
- out _SFR_IO_ADDR(SREG), r0 ;End of critical section
- ret
-.endfunc
-
-
-
-;---------------------------------------------------------------------------;
-; Receive a byte
-;
-;Prototype: uint8_t rcvr (void);
-;Size: 19 words
-
-.global rcvr
-.func rcvr
-rcvr:
- in r0, _SFR_IO_ADDR(SREG) ;Save flags
-
- ldi r24, 0x80 ;Receiving shift reg
- cli ;Start critical section
-
-1: SKIP_IN_1 ;Wait for idle
- rjmp 1b
-2: SKIP_IN_0 ;Wait for start bit
- rjmp 2b
- ldi r25, BPS/2 ;Wait for half bit time
-3: dec r25
- brne 3b
-
-4: ldi r25, BPS ;----- Bit receiving loop
-5: dec r25 ;Wait for a bit time
- brne 5b ;/
- lsr r24 ;Next bit
- SKIP_IN_0 ;Get a data bit into r24.7
- ori r24, 0x80
- brcc 4b ;All bits received? no, continue
-
- out _SFR_IO_ADDR(SREG), r0 ;End of critical section
- ret
-.endfunc
-
-
-; Not wait for start bit. This should be called after detecting start bit.
-.global recv
-.func recv
-recv:
- in r0, _SFR_IO_ADDR(SREG) ;Save flags
-
- ldi r24, 0x80 ;Receiving shift reg
- cli ;Start critical section
-
-;1: SKIP_IN_1 ;Wait for idle
-; rjmp 1b
-;2: SKIP_IN_0 ;Wait for start bit
-; rjmp 2b
- ldi r25, BPS/2 ;Wait for half bit time
-3: dec r25
- brne 3b
-
-4: ldi r25, BPS ;----- Bit receiving loop
-5: dec r25 ;Wait for a bit time
- brne 5b ;/
- lsr r24 ;Next bit
- SKIP_IN_0 ;Get a data bit into r24.7
- ori r24, 0x80
- brcc 4b ;All bits received? no, continue
-
- ldi r25, BPS/2 ;Wait for half bit time
-6: dec r25
- brne 6b
-7: SKIP_IN_1 ;Wait for stop bit
- rjmp 7b
-
- out _SFR_IO_ADDR(SREG), r0 ;End of critical section
- ret
-.endfunc
diff --git a/keyboard/hhkb/rn42/suart.h b/keyboard/hhkb/rn42/suart.h deleted file mode 100644 index 72725b998f..0000000000 --- a/keyboard/hhkb/rn42/suart.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef SUART
-#define SUART
-
-void xmit(uint8_t);
-uint8_t rcvr(void);
-uint8_t recv(void);
-
-#endif /* SUART */
diff --git a/keyboard/hhkb_qmk/Makefile b/keyboard/hhkb_qmk/Makefile deleted file mode 100644 index 21ba261a23..0000000000 --- a/keyboard/hhkb_qmk/Makefile +++ /dev/null @@ -1,149 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = hhkb_qmk - - -# Directory common source filess exist -TOP_DIR = ../.. -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# # project specific files -SRC = hhkb_qmk.c \ - matrix.c - -ifdef KEYMAP - SRC := keymaps/keymaps/$(KEYMAP).c $(SRC) -else - SRC := keymaps/keymaps/default.c $(SRC) -endif - -CONFIG_H = config.h - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# as per original hasu settings -OPT_DEFS += -DBOOTLOADER_SIZE=512 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -CUSTOM_MATRIX = yes # Custom matrix file for the HHKB -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -# MIDI_ENABLE = YES # MIDI controls -# UNICODE_ENABLE = YES # Unicode -# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -# Optimize size but this may cause error "relocation truncated to fit" -#EXTRALDFLAGS = -Wl,--relax - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) -VPATH += $(TMK_DIR) - -debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION -debug-on: all - -debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT -debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) -debug-off: all - -include $(TOP_DIR)/quantum/quantum.mk diff --git a/keyboard/hhkb_qmk/README.md b/keyboard/hhkb_qmk/README.md deleted file mode 100644 index 389407b3aa..0000000000 --- a/keyboard/hhkb_qmk/README.md +++ /dev/null @@ -1,180 +0,0 @@ -hhkb_qmk keyboard firmware -====================== - -## Quantum MK Firmware - -You have access to a bunch of goodies! Check out the Makefile to enable/disable some of the features. Uncomment the `#` to enable them. Setting them to `no` does nothing and will only confuse future you. - - BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - MIDI_ENABLE = yes # MIDI controls - # UNICODE_ENABLE = yes # Unicode support - this is commented out, just as an example. You have to use #, not // - BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID - -## Quick aliases to common actions - -Your keymap can include shortcuts to common operations (called "function actions" in tmk). - -### Switching and toggling layers - -`MO(layer)` - momentary switch to *layer*. As soon as you let go of the key, the layer is deactivated and you pop back out to the previous layer. When you apply this to a key, that same key must be set as `KC_TRNS` on the destination layer. Otherwise, you won't make it back to the original layer when you release the key (and you'll get a keycode sent). You can only switch to layers *above* your current layer. If you're on layer 0 and you use `MO(1)`, that will switch to layer 1 just fine. But if you include `MO(3)` on layer 5, that won't do anything for you -- because layer 3 is lower than layer 5 on the stack. - -`LT(layer, kc)` - momentary switch to *layer* when held, and *kc* when tapped. Like `MO()`, this only works upwards in the layer stack (`layer` must be higher than the current layer). - -`TG(layer)` - toggles a layer on or off. As with `MO()`, you should set this key as `KC_TRNS` in the destination layer so that tapping it again actually toggles back to the original layer. Only works upwards in the layer stack. - -### Fun with modifier keys - -* `LSFT(kc)` - applies left Shift to *kc* (keycode) - `S(kc)` is an alias -* `RSFT(kc)` - applies right Shift to *kc* -* `LCTL(kc)` - applies left Control to *kc* -* `RCTL(kc)` - applies right Control to *kc* -* `LALT(kc)` - applies left Alt to *kc* -* `RALT(kc)` - applies right Alt to *kc* -* `LGUI(kc)` - applies left GUI (command/win) to *kc* -* `RGUI(kc)` - applies right GUI (command/win) to *kc* - -You can also chain these, like this: - - LALT(LCTL(KC_DEL)) -- this makes a key that sends Alt, Control, and Delete in a single keypress. - -The following shortcuts automatically add `LSFT()` to keycodes to get commonly used symbols. Their long names are also available and documented in `/quantum/keymap_common.h`. - - KC_TILD ~ - KC_EXLM ! - KC_AT @ - KC_HASH # - KC_DLR $ - KC_PERC % - KC_CIRC ^ - KC_AMPR & - KC_ASTR * - KC_LPRN ( - KC_RPRN ) - KC_UNDS _ - KC_PLUS + - KC_LCBR { - KC_RCBR } - KC_PIPE | - KC_COLN : - -`MT(mod, kc)` - is *mod* (modifier key - MOD_LCTL, MOD_LSFT) when held, and *kc* when tapped. In other words, you can have a key that sends Esc (or the letter O or whatever) when you tap it, but works as a Control key or a Shift key when you hold it down. - -These are the values you can use for the `mod` in `MT()` (right-hand modifiers are not available): - - * MOD_LCTL - * MOD_LSFT - * MOD_LALT - * MOD_LGUI - -These can also be combined like `MOD_LCTL | MOD_LSFT` e.g. `MT(MOD_LCTL | MOD_LSFT, KC_ESC)` which would activate Control and Shift when held, and send Escape when tapped. - -We've added shortcuts to make common modifier/tap (mod-tap) mappings more compact: - - * `CTL_T(kc)` - is LCTL when held and *kc* when tapped - * `SFT_T(kc)` - is LSFT when held and *kc* when tapped - * `ALT_T(kc)` - is LALT when held and *kc* when tapped - * `GUI_T(kc)` - is LGUI when held and *kc* when tapped - * `ALL_T(kc)` - is Hyper (all mods) when held and *kc* when tapped. To read more about what you can do with a Hyper key, see [this blog post by Brett Terpstra](http://brettterpstra.com/2012/12/08/a-useful-caps-lock-key/) - -### Temporarily setting the default layer - -`DF(layer)` - sets default layer to *layer*. The default layer is the one at the "bottom" of the layer stack - the ultimate fallback layer. This currently does not persist over power loss. When you plug the keyboard back in, layer 0 will always be the default. It is theoretically possible to work around that, but that's not what `DF` does. - -### Remember: These are just aliases - -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). - -Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. - -## Macro shortcuts: Send a whole string when pressing just one key - -Instead of using the `ACTION_MACRO` function, you can simply use `M(n)` to access macro *n* - *n* will get passed into the `action_get_macro` as the `id`, and you can use a switch statement to trigger it. This gets called on the keydown and keyup, so you'll need to use an if statement testing `record->event.pressed` (see keymap_default.c). - -```c -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is. -{ - switch(id) { - case 0: // this would trigger when you hit a key mapped as M(0) - if (record->event.pressed) { - return MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END ); // this sends the string 'hello' when the macro executes - } - break; - } - return MACRO_NONE; -}; -``` -A macro can include the following commands: - -* I() change interval of stroke in milliseconds. -* D() press key. -* U() release key. -* T() type key(press and release). -* W() wait (milliseconds). -* END end mark. - -So above you can see the stroke interval changed to 255ms between each keystroke, then a bunch of keys being typed, waits a while, then the macro ends. - -Note: Using macros to have your keyboard send passwords for you is a bad idea. - -### Additional keycode aliases for software-implemented layouts (Colemak, Dvorak, etc) - -Everything is assuming you're in Qwerty (in software) by default, but there is built-in support for using a Colemak or Dvorak layout by including this at the top of your keymap: - - #include "keymap_<layout>.h" - -Where <layout> is "colemak" or "dvorak". After including this line, you will get access to: - - * `CM_*` for all of the Colemak-equivalent characters - * `DV_*` for all of the Dvorak-equivalent characters - -These implementations assume you're using Colemak or Dvorak on your OS, not on your keyboard - this is referred to as a software-implemented layout. If your computer is in Qwerty and your keymap is in Colemak or Dvorak, this is referred to as a firmware-implemented layout, and you won't need these features. - -To give an example, if you're using software-implemented Colemak, and want to get an `F`, you would use `CM_F` - `KC_F` under these same circumstances would result in `T`. - -## Additional language support - -In `quantum/keymap_extras/`, you'll see various language files - these work the same way as the alternative layout ones do. Most are defined by their two letter country/language code followed by an underscore and a 4-letter abbreviation of its name. `FR_UGRV` which will result in a `ù` when using a software-implemented AZERTY layout. It's currently difficult to send such characters in just the firmware (but it's being worked on - see Unicode support). - -## Unicode support - -You can currently send 4 hex digits with your OS-specific modifier key (RALT for OSX with the "Unicode Hex Input" layout) - this is currently limited to supporting one OS at a time, and requires a recompile for switching. 8 digit hex codes are being worked on. The keycode function is `UC(n)`, where *n* is a 4 digit hexidecimal. Enable from the Makefile. - -## Other firmware shortcut keycodes - -* `RESET` - puts the MCU in DFU mode for flashing new firmware (with `make dfu`) -* `DEBUG` - the firmware into debug mode - you'll need hid_listen to see things -* `BL_ON` - turns the backlight on -* `BL_OFF` - turns the backlight off -* `BL_<n>` - sets the backlight to level *n* -* `BL_INC` - increments the backlight level by one -* `BL_DEC` - decrements the backlight level by one -* `BL_TOGG` - toggles the backlight -* `BL_STEP` - steps through the backlight levels - -Enable the backlight from the Makefile. - -## MIDI functionalty - -This is still a WIP, but check out `quantum/keymap_midi.c` to see what's happening. Enable from the Makefile. - -## Bluetooth functionality - -This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboards/comments/3psx0q/the_planck_keyboard_with_bluetooth_guide_and/?ref=search_posts), but can be enabled via the Makefile. The firmware will still output characters via USB, so be aware of this when charging via a computer. It would make sense to have a switch on the Bluefruit to turn it off at will. - -## Building - -Download or clone the whole firmware and navigate to the keyboard/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 a file in the keymaps folder named `<name>.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|<name>] -``` -Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder. diff --git a/keyboard/hhkb_qmk/config.h b/keyboard/hhkb_qmk/config.h deleted file mode 100644 index ee66e44571..0000000000 --- a/keyboard/hhkb_qmk/config.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xCAFE -#define DEVICE_VER 0x0104 -#define MANUFACTURER q.m.k -#define PRODUCT HHKB mod -#define DESCRIPTION q.m.k keyboard firmware for HHKB - -/* key matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 8 - -#define TAPPING_TERM 200 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 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/keyboard/hhkb_qmk/hhkb_avr.h b/keyboard/hhkb_qmk/hhkb_avr.h deleted file mode 100644 index 7ea6322c73..0000000000 --- a/keyboard/hhkb_qmk/hhkb_avr.h +++ /dev/null @@ -1,167 +0,0 @@ -#ifndef HHKB_AVR_H -#define HHKB_AVR_H - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <avr/interrupt.h> -#include <util/delay.h> - - -// Timer resolution check -#if (1000000/TIMER_RAW_FREQ > 20) -# error "Timer resolution(>20us) is not enough for HHKB matrix scan tweak on V-USB." -#endif - - -/* - * HHKB Matrix I/O - * - * row: HC4051[A,B,C] selects scan row0-7 - * row-ext: [En0,En1] row extention for JP - * col: LS145[A,B,C,D] selects scan col0-7 and enable(D) - * key: on: 0/off: 1 - * prev: hysteresis control: assert(1) when previous key state is on - */ - - -#if defined(__AVR_ATmega32U4__) -/* - * For TMK HHKB alt controller(ATMega32U4) - * - * row: PB0-2 - * col: PB3-5,6 - * key: PD7(pull-uped) - * prev: PB7 - * power: PD4(L:off/H:on) - * row-ext: PC6,7 for HHKB JP(active low) - */ -static inline void KEY_ENABLE(void) { (PORTB &= ~(1<<6)); } -static inline void KEY_UNABLE(void) { (PORTB |= (1<<6)); } -static inline bool KEY_STATE(void) { return (PIND & (1<<7)); } -static inline void KEY_PREV_ON(void) { (PORTB |= (1<<7)); } -static inline void KEY_PREV_OFF(void) { (PORTB &= ~(1<<7)); } -#ifdef HHKB_POWER_SAVING -static inline void KEY_POWER_ON(void) { - DDRB = 0xFF; PORTB = 0x40; // change pins output - DDRD |= (1<<4); PORTD |= (1<<4); // MOS FET switch on - /* Without this wait you will miss or get false key events. */ - _delay_ms(5); // wait for powering up -} -static inline void KEY_POWER_OFF(void) { - /* input with pull-up consumes less than without it when pin is open. */ - DDRB = 0x00; PORTB = 0xFF; // change pins input with pull-up - DDRD |= (1<<4); PORTD &= ~(1<<4); // MOS FET switch off -} -static inline bool KEY_POWER_STATE(void) { return PORTD & (1<<4); } -#else -static inline void KEY_POWER_ON(void) {} -static inline void KEY_POWER_OFF(void) {} -static inline bool KEY_POWER_STATE(void) { return true; } -#endif -static inline void KEY_INIT(void) -{ - /* row,col,prev: output */ - DDRB = 0xFF; - PORTB = 0x40; // unable - /* key: input with pull-up */ - DDRD &= ~0x80; - PORTD |= 0x80; -#ifdef HHKB_JP - /* row extention for HHKB JP */ - DDRC |= (1<<6|1<<7); - PORTC |= (1<<6|1<<7); -#endif - KEY_UNABLE(); - KEY_PREV_OFF(); - - KEY_POWER_OFF(); -} -static inline void KEY_SELECT(uint8_t ROW, uint8_t COL) -{ - PORTB = (PORTB & 0xC0) | (((COL) & 0x07)<<3) | ((ROW) & 0x07); -#ifdef HHKB_JP - if ((ROW) & 0x08) PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<6); - else PORTC = (PORTC & ~(1<<6|1<<7)) | (1<<7); -#endif -} - - -#elif defined(__AVR_AT90USB1286__) -/* - * For Teensy++(AT90USB1286) - * - * HHKB pro HHKB pro2 - * row: PB0-2 (6-8) (5-7) - * col: PB3-5,6 (9-12) (8-11) - * key: PE6(pull-uped) (4) (3) - * prev: PE7 (5) (4) - * - * TODO: convert into 'staitc inline' function - */ -#define KEY_INIT() do { \ - DDRB |= 0x7F; \ - DDRE |= (1<<7); \ - DDRE &= ~(1<<6); \ - PORTE |= (1<<6); \ -} while (0) -#define KEY_SELECT(ROW, COL) (PORTB = (PORTB & 0xC0) | \ - (((COL) & 0x07)<<3) | \ - ((ROW) & 0x07)) -#define KEY_ENABLE() (PORTB &= ~(1<<6)) -#define KEY_UNABLE() (PORTB |= (1<<6)) -#define KEY_STATE() (PINE & (1<<6)) -#define KEY_PREV_ON() (PORTE |= (1<<7)) -#define KEY_PREV_OFF() (PORTE &= ~(1<<7)) -#define KEY_POWER_ON() -#define KEY_POWER_OFF() -#define KEY_POWER_STATE() true - - -#else -# error "define code for matrix scan" -#endif - - -#if 0 -// For ATMega328P with V-USB -// -// #elif defined(__AVR_ATmega328P__) -// Ports for V-USB -// key: PB0(pull-uped) -// prev: PB1 -// row: PB2-4 -// col: PC0-2,3 -// power: PB5(Low:on/Hi-z:off) -#define KEY_INIT() do { \ - DDRB |= 0x3E; \ - DDRB &= ~(1<<0); \ - PORTB |= 1<<0; \ - DDRC |= 0x0F; \ - KEY_UNABLE(); \ - KEY_PREV_OFF(); \ -} while (0) -#define KEY_SELECT(ROW, COL) do { \ - PORTB = (PORTB & 0xE3) | ((ROW) & 0x07)<<2; \ - PORTC = (PORTC & 0xF8) | ((COL) & 0x07); \ -} while (0) -#define KEY_ENABLE() (PORTC &= ~(1<<3)) -#define KEY_UNABLE() (PORTC |= (1<<3)) -#define KEY_STATE() (PINB & (1<<0)) -#define KEY_PREV_ON() (PORTB |= (1<<1)) -#define KEY_PREV_OFF() (PORTB &= ~(1<<1)) -// Power supply switching -#define KEY_POWER_ON() do { \ - KEY_INIT(); \ - PORTB &= ~(1<<5); \ - _delay_ms(1); \ -} while (0) -#define KEY_POWER_OFF() do { \ - DDRB &= ~0x3F; \ - PORTB &= ~0x3F; \ - DDRC &= ~0x0F; \ - PORTC &= ~0x0F; \ -} while (0) -#endif - -#endif diff --git a/keyboard/hhkb_qmk/matrix.c b/keyboard/hhkb_qmk/matrix.c deleted file mode 100644 index 14fae0b82c..0000000000 --- a/keyboard/hhkb_qmk/matrix.c +++ /dev/null @@ -1,196 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "timer.h" -#include "matrix.h" -#include "hhkb_avr.h" -#include <avr/wdt.h> -#include "suspend.h" -#include "lufa.h" - - -// matrix power saving -#define MATRIX_POWER_SAVE 10000 -static uint32_t matrix_last_modified = 0; - -// matrix state buffer(1:on, 0:off) -static matrix_row_t *matrix; -static matrix_row_t *matrix_prev; -static matrix_row_t _matrix0[MATRIX_ROWS]; -static matrix_row_t _matrix1[MATRIX_ROWS]; - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ -#ifdef DEBUG - debug_enable = true; - debug_keyboard = true; -#endif - - KEY_INIT(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00; - for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix1[i] = 0x00; - matrix = _matrix0; - matrix_prev = _matrix1; -} - -uint8_t matrix_scan(void) -{ - uint8_t *tmp; - - tmp = matrix_prev; - matrix_prev = matrix; - matrix = tmp; - - // power on - if (!KEY_POWER_STATE()) KEY_POWER_ON(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - KEY_SELECT(row, col); - _delay_us(5); - - // Not sure this is needed. This just emulates HHKB controller's behaviour. - if (matrix_prev[row] & (1<<col)) { - KEY_PREV_ON(); - } - _delay_us(10); - - // NOTE: KEY_STATE is valid only in 20us after KEY_ENABLE. - // If V-USB interrupts in this section we could lose 40us or so - // and would read invalid value from KEY_STATE. - uint8_t last = TIMER_RAW; - - KEY_ENABLE(); - - // Wait for KEY_STATE outputs its value. - // 1us was ok on one HHKB, but not worked on another. - // no wait doesn't work on Teensy++ with pro(1us works) - // no wait does work on tmk PCB(8MHz) with pro2 - // 1us wait does work on both of above - // 1us wait doesn't work on tmk(16MHz) - // 5us wait does work on tmk(16MHz) - // 5us wait does work on tmk(16MHz/2) - // 5us wait does work on tmk(8MHz) - // 10us wait does work on Teensy++ with pro - // 10us wait does work on 328p+iwrap with pro - // 10us wait doesn't work on tmk PCB(8MHz) with pro2(very lagged scan) - _delay_us(5); - - if (KEY_STATE()) { - matrix[row] &= ~(1<<col); - } else { - matrix[row] |= (1<<col); - } - - // Ignore if this code region execution time elapses more than 20us. - // MEMO: 20[us] * (TIMER_RAW_FREQ / 1000000)[count per us] - // MEMO: then change above using this rule: a/(b/c) = a*1/(b/c) = a*(c/b) - if (TIMER_DIFF_RAW(TIMER_RAW, last) > 20/(1000000/TIMER_RAW_FREQ)) { - matrix[row] = matrix_prev[row]; - } - - _delay_us(5); - KEY_PREV_OFF(); - KEY_UNABLE(); - - // NOTE: KEY_STATE keep its state in 20us after KEY_ENABLE. - // This takes 25us or more to make sure KEY_STATE returns to idle state. -#ifdef HHKB_JP - // Looks like JP needs faster scan due to its twice larger matrix - // or it can drop keys in fast key typing - _delay_us(30); -#else - _delay_us(75); -#endif - } - if (matrix[row] ^ matrix_prev[row]) matrix_last_modified = timer_read32(); - } - // power off - if (KEY_POWER_STATE() && - (USB_DeviceState == DEVICE_STATE_Suspended || - USB_DeviceState == DEVICE_STATE_Unattached ) && - timer_elapsed32(matrix_last_modified) > MATRIX_POWER_SAVE) { - KEY_POWER_OFF(); - suspend_power_down(); - } - return 1; -} - -bool matrix_is_modified(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - if (matrix[i] != matrix_prev[i]) - return true; - } - return false; -} - -inline -bool matrix_has_ghost(void) -{ - return false; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 01234567\n"); - for (uint8_t row = 0; row < matrix_rows(); row++) { - xprintf("%02X: %08b\n", row, bitrev(matrix_get_row(row))); - } -} - -void matrix_power_up(void) { - KEY_POWER_ON(); -} -void matrix_power_down(void) { - KEY_POWER_OFF(); -} diff --git a/keyboard/hid_liber/Makefile.lufa b/keyboard/hid_liber/Makefile.lufa deleted file mode 100644 index 5fc4156a9e..0000000000 --- a/keyboard/hid_liber/Makefile.lufa +++ /dev/null @@ -1,138 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = hid_liber_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# 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 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -ansi: OPT_DEFS += -DLAYOUT_ANSI -ansi: all - -iso: OPT_DEFS += -DLAYOUT_ISO -iso: all - -custom: OPT_DEFS += -DLAYOUT_CUSTOM -custom: all - -alaricljs: OPT_DEFS += -DLAYOUT_ALARICLJS -alaricljs: all diff --git a/keyboard/hid_liber/Makefile.pjrc b/keyboard/hid_liber/Makefile.pjrc deleted file mode 100644 index 326bbe86f5..0000000000 --- a/keyboard/hid_liber/Makefile.pjrc +++ /dev/null @@ -1,111 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = hid_liber_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 -#MCU = at90usb646 # Teensy++ 1.0 -#MCU = at90usb1286 # Teensy++ 2.0 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -ansi: OPT_DEFS += -DLAYOUT_ANSI -ansi: all - -iso: OPT_DEFS += -DLAYOUT_ISO -iso: all - -custom: OPT_DEFS += -DLAYOUT_CUSTOM -custom: all - -alaricljs: OPT_DEFS += -DLAYOUT_ALARICLJS -alaricljs: all diff --git a/keyboard/hid_liber/README.md b/keyboard/hid_liber/README.md deleted file mode 100644 index a5534ce711..0000000000 --- a/keyboard/hid_liber/README.md +++ /dev/null @@ -1,17 +0,0 @@ -hid_liberation firmware -====================== -DIY daughterboard for Filco Majestouch TKL developed by Geekhack and Deskthority communities. -The PCB was engineered by bpiphany. - -## Wiki on Deskthority.net -- [Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_Instructions) -- [Assembly Instructions](http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions) - - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.[pjrc|lufa] [ansi|iso|custom|alaricljs] - -Use `Makefile.pjrc` if you want to use PJRC stack or use `Makefile.lufa` for LUFA stack. diff --git a/keyboard/hid_liber/config.h b/keyboard/hid_liber/config.h deleted file mode 100644 index 968ccf5500..0000000000 --- a/keyboard/hid_liber/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xB919 -#define DEVICE_VER 0x0001 -#define MANUFACTURER t.m.k. -#define PRODUCT HID Liberation - - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for HID Liberation - - -/* matrix size */ -#define MATRIX_ROWS 18 -#define MATRIX_COLS 8 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 8 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/hid_liber/keymap.c b/keyboard/hid_liber/keymap.c deleted file mode 100644 index 433a620975..0000000000 --- a/keyboard/hid_liber/keymap.c +++ /dev/null @@ -1,125 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * Keymap for HID Liberator controller - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - - -// Convert physical keyboard layout to matrix array. -// This is a macro to define keymap easily in keyboard layout form. -#define KEYMAP( \ - KG1, KH7, KJ7, KJ6, KJ1, KO5, KL1, KA6, KA7, KD7, KD5, KD1, KD2, KB5, KB3, KO3, \ - KG7, KG5, KH5, KJ5, KI5, KI7, KK7, KK5, KL5, KA5, KC5, KC7, KL7, KD6, KQ7, KN7, KM7, \ - KG6, KG3, KH3, KJ3, KI3, KI6, KK6, KK3, KL3, KA3, KC3, KC6, KL6, KD4, KP7, KN5, KM5, \ - KH6, KG4, KH4, KJ4, KI4, KI1, KK1, KK4, KL4, KA4, KC4, KC1, KD0, \ - KF6, KH1, KG0, KH0, KJ0, KI0, KI2, KK2, KK0, KL0, KA0, KC2, KF4, KN1, \ - KO7, KE6, KB1, KP1, KB2, KR4, KA2, KO0, KN2, KP2, KQ2 \ -) { \ -/* 0 1 2 3 4 5 6 7 */ \ -/* A */ { KC_##KA0, KC_NO , KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7 }, \ -/* B */ { KC_NO , KC_##KB1, KC_##KB2, KC_##KB3, KC_NO , KC_##KB5, KC_NO , KC_NO }, \ -/* C */ { KC_NO , KC_##KC1, KC_##KC2, KC_##KC3, KC_##KC4, KC_##KC5, KC_##KC6, KC_##KC7 }, \ -/* D */ { KC_##KD0, KC_##KD1, KC_##KD2, KC_NO , KC_##KD4, KC_##KD5, KC_##KD6, KC_##KD7 }, \ -/* E */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_##KE6, KC_NO }, \ -/* F */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_##KF4, KC_NO , KC_##KF6, KC_NO }, \ -/* G */ { KC_##KG0, KC_##KG1, KC_NO , KC_##KG3, KC_##KG4, KC_##KG5, KC_##KG6, KC_##KG7 }, \ -/* H */ { KC_##KH0, KC_##KH1, KC_NO , KC_##KH3, KC_##KH4, KC_##KH5, KC_##KH6, KC_##KH7 }, \ -/* I */ { KC_##KI0, KC_##KI1, KC_##KI2, KC_##KI3, KC_##KI4, KC_##KI5, KC_##KI6, KC_##KI7 }, \ -/* J */ { KC_##KJ0, KC_##KJ1, KC_NO , KC_##KJ3, KC_##KJ4, KC_##KJ5, KC_##KJ6, KC_##KJ7 }, \ -/* K */ { KC_##KK0, KC_##KK1, KC_##KK2, KC_##KK3, KC_##KK4, KC_##KK5, KC_##KK6, KC_##KK7 }, \ -/* L */ { KC_##KL0, KC_##KL1, KC_NO , KC_##KL3, KC_##KL4, KC_##KL5, KC_##KL6, KC_##KL7 }, \ -/* M */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_##KM5, KC_NO , KC_##KM7 }, \ -/* N */ { KC_NO , KC_##KN1, KC_##KN2, KC_NO , KC_NO , KC_##KN5, KC_NO , KC_##KN7 }, \ -/* O */ { KC_##KO0, KC_NO , KC_NO , KC_##KO3, KC_NO , KC_##KO5, KC_NO , KC_##KO7 }, \ -/* P */ { KC_NO , KC_##KP1, KC_##KP2, KC_NO , KC_NO , KC_NO , KC_NO , KC_##KP7 }, \ -/* Q */ { KC_NO , KC_NO , KC_##KQ2, KC_NO , KC_NO , KC_NO , KC_NO , KC_##KQ7 }, \ -/* R */ { KC_NO , KC_NO , KC_NO , KC_NO , KC_##KR4, KC_NO , KC_NO , KC_NO } \ -} - -/* - * Tenkeyless keyboard default layout, ISO & ANSI (ISO is between Left Shift - * and Z, and the ANSI \ key above Return/Enter is used for the additional ISO - * switch in the ASD row next to enter. Use NUBS as keycode for the first and - * NUHS as the keycode for the second. - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - * |-----------------------------------------------------------| `-----------' - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|ISO| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ - -/* - * Add different layouts. If no layout is defined the default layout will be set to ANSI. -*/ -#if defined(LAYOUT_CUSTOM) - #include "keymap_custom.h" -#elif defined(LAYOUT_ALARICLJS) - #include "keymap_alaricljs.h" -#elif defined(LAYOUT_ISO) - #include "keymap_iso.h" -#elif defined(LAYOUT_ANSI) - #include "keymap_ansi.h" -#else - #include "keymap_ansi.h" -#endif - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/hid_liber/keymap_alaricljs.h b/keyboard/hid_liber/keymap_alaricljs.h deleted file mode 100644 index 8903fc683b..0000000000 --- a/keyboard/hid_liber/keymap_alaricljs.h +++ /dev/null @@ -1,61 +0,0 @@ -// hid_liber alaricljs -// this was the standard layout when hid_liber was merged into tmk's firmware - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Layer 0: Default ANSI - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - * |-----------------------------------------------------------| `-----------' - * |FN1 | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|iso| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ - - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR, SLCK, BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, INS, HOME, PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, DEL, END, PGDN, \ - FN1, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \ - LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT), - -/* Layer 1: - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Slp| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9|Mut|V- |V+ |Backsp | |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I|MSt|Ply|Prv|Nxt|Media| |Del|End|PgD| - * |-----------------------------------------------------------| `-----------' - * |FN1 | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|iso| Z| X|Clc| V| B| N| M| ,| .| /|Caps | |Up | - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ - - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR, SLCK, SLEP, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9,MUTE, VOLD, VOLU, BSPC, INS, HOME, PGUP, \ - TAB, Q, W, E, R, T, Y, U, I,MSTP,MPLY, MPRV, MNXT, MSEL, DEL, END, PGDN, \ - FN1, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \ - LSFT, NUBS, Z, X,CALC, V, B, N, M, COMM, DOT, SLSH, CAPS, UP, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT), - -}; - -static const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // activate layer 1 when FN1 pressed -}; diff --git a/keyboard/hid_liber/keymap_ansi.h b/keyboard/hid_liber/keymap_ansi.h deleted file mode 100644 index 8ce85a4997..0000000000 --- a/keyboard/hid_liber/keymap_ansi.h +++ /dev/null @@ -1,32 +0,0 @@ -// hid_liber ANSI - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Layer 0: Default ANSI - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - * |-----------------------------------------------------------| `-----------' - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|iso| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ - - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR, SLCK, BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, INS, HOME, PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, DEL, END, PGDN, \ - CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \ - LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT), - -}; - -static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/hid_liber/keymap_custom.h b/keyboard/hid_liber/keymap_custom.h deleted file mode 100644 index 03e1a1bfaf..0000000000 --- a/keyboard/hid_liber/keymap_custom.h +++ /dev/null @@ -1,64 +0,0 @@ -// hid_liber custom -// ANSI layout with FN key instead of APP button -// Layer 1 has mediakeys on the nav cluster and keypad numbers for alt-codes - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Layer 0: Default ANSI - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - * |-----------------------------------------------------------| `-----------' - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|iso| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|FN1|Ctl| |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ - - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR, SLCK, BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, INS, HOME, PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, BSLS, DEL, END, PGDN, \ - CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \ - LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, FN1, RCTL, LEFT, DOWN, RGHT), - -/* - * Layer 1: Media Keys - * Keypad numbers instead of normal numbers - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ |KP1|KP2|KP3|KP4|KP5|KP6|KP7|KP8|KP9|KP0| -| =|Backsp | |Ins|Med|Vl+| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|Mut|Vl-| - * |-----------------------------------------------------------| `-----------' - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|iso| Z| X| C| V| B| N| M| ,| .| /|Shift | |Ply| - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|FN1|Ctl| |Prv|Stp|Nxt| - * `-----------------------------------------------------------' `-----------' - */ - - KEYMAP(\ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, P1, P2, P3, P4, P5, P6, P7, P8, P9, P0, TRNS, TRNS, TRNS, TRNS, MSEL, VOLU, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MUTE, VOLD, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MPLY, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, TRNS, MPRV, MSTP, MNXT), - -}; - -static const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // activate layer 1 when FN1 pressed -}; diff --git a/keyboard/hid_liber/keymap_iso.h b/keyboard/hid_liber/keymap_iso.h deleted file mode 100644 index c18453675b..0000000000 --- a/keyboard/hid_liber/keymap_iso.h +++ /dev/null @@ -1,32 +0,0 @@ -// hid_liber ISO - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Layer 0: Default ISO - * - * ,---. ,---------------. ,---------------. ,---------------. ,-----------. - * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - * `---' `---------------' `---------------' `---------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - * |-----------------------------------------------------------| `-----------' - * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | - * |-----------------------------------------------------------| ,---. - * |Shft|iso| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - * |-----------------------------------------------------------| ,-----------. - * |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ - - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR, SLCK, BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, INS, HOME, PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, NUHS, DEL, END, PGDN, \ - CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, \ - LSFT, NUBS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, \ - LCTL, LGUI, LALT, SPC, RALT, RGUI, APP, RCTL, LEFT, DOWN, RGHT), - -}; - -static const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboard/hid_liber/led.c b/keyboard/hid_liber/led.c deleted file mode 100644 index e577424c59..0000000000 --- a/keyboard/hid_liber/led.c +++ /dev/null @@ -1,34 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - PORTB &= ~(1<<5); - else - PORTB |= (1<<5); - - if (usb_led & (1<<USB_LED_SCROLL_LOCK)) - PORTB &= ~(1<<6); - else - PORTB |= (1<<6); -} diff --git a/keyboard/hid_liber/matrix.c b/keyboard/hid_liber/matrix.c deleted file mode 100644 index adf6ac8c42..0000000000 --- a/keyboard/hid_liber/matrix.c +++ /dev/null @@ -1,231 +0,0 @@ -/* Copyright 2012 Jun Wako <wakojun@gmail.com> - * - * This is heavily based on hid_liber/board.{c|h}. - * https://github.com/BathroomEpiphanies/AVR-Keyboard - * - * Copyright (c) 2012 Fredrik Atmer, Bathroom Epiphanies Inc - * http://bathroomepiphanies.com - * - * As for liscensing consult with the original files or its author. - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -// bit array of key state(1:on, 0:off) -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - - -#define _DDRA (uint8_t *const)&DDRA -#define _DDRB (uint8_t *const)&DDRB -#define _DDRC (uint8_t *const)&DDRC -#define _DDRD (uint8_t *const)&DDRD -#define _DDRE (uint8_t *const)&DDRE -#define _DDRF (uint8_t *const)&DDRF - -#define _PINA (uint8_t *const)&PINA -#define _PINB (uint8_t *const)&PINB -#define _PINC (uint8_t *const)&PINC -#define _PIND (uint8_t *const)&PIND -#define _PINE (uint8_t *const)&PINE -#define _PINF (uint8_t *const)&PINF - -#define _PORTA (uint8_t *const)&PORTA -#define _PORTB (uint8_t *const)&PORTB -#define _PORTC (uint8_t *const)&PORTC -#define _PORTD (uint8_t *const)&PORTD -#define _PORTE (uint8_t *const)&PORTE -#define _PORTF (uint8_t *const)&PORTF - -#define _BIT0 0x01 -#define _BIT1 0x02 -#define _BIT2 0x04 -#define _BIT3 0x08 -#define _BIT4 0x10 -#define _BIT5 0x20 -#define _BIT6 0x40 -#define _BIT7 0x80 - -/* Specifies the ports and pin numbers for the rows */ -static -uint8_t *const row_ddr[MATRIX_ROWS] = { - _DDRB, _DDRB, - _DDRC, _DDRC, - _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, _DDRD, - _DDRF, _DDRF, _DDRF, _DDRF, _DDRF, _DDRF}; - -static -uint8_t *const row_port[MATRIX_ROWS] = { - _PORTB, _PORTB, - _PORTC, _PORTC, - _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, _PORTD, - _PORTF, _PORTF, _PORTF, _PORTF, _PORTF, _PORTF}; - -static -uint8_t *const row_pin[MATRIX_ROWS] = { - _PINB, _PINB, - _PINC, _PINC, - _PIND, _PIND, _PIND, _PIND, _PIND, _PIND, _PIND, _PIND, - _PINF, _PINF, _PINF, _PINF, _PINF, _PINF}; - -static -const uint8_t row_bit[MATRIX_ROWS] = { - _BIT4, _BIT7, - _BIT6, _BIT7, - _BIT0, _BIT1, _BIT2, _BIT3, _BIT4, _BIT5, _BIT6, _BIT7, - _BIT0, _BIT1, _BIT4, _BIT5, _BIT6, _BIT7}; - -static -const uint8_t mask = 0x0E; - -/* Specifies the ports and pin numbers for the columns */ -static -const uint8_t col_bit[MATRIX_COLS] = { 0x00, 0x02, 0x04, 0x06, 0x08, 0x0A, 0x0C, 0x0E}; - -static -inline void pull_column(int col) { - PORTB = col_bit[col] | (PORTB & ~mask); -} - -static -inline void release_column(int col) { -} - -/* PORTB is set as input with pull-up resistors - PORTC,D,E,F are set to high output */ -static -void setup_io_pins(void) { - uint8_t row; - DDRB |= 0x0E; - PORTB &= ~0x0E; - for(row = 0; row < MATRIX_ROWS; row++) { - *row_ddr[row] &= ~row_bit[row]; - *row_port[row] &= ~row_bit[row]; - } -} - -static -void setup_leds(void) { - DDRB |= 0x60; - PORTB |= 0x60; -} - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - MCUCR |= (1<<JTD); - MCUCR |= (1<<JTD); - - // initialize row and col - setup_io_pins(); - setup_leds(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { // 0-7 - pull_column(col); // output hi on theline - _delay_us(5); // without this wait it won't read stable value. - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { // 0-17 - bool prev_bit = matrix_debouncing[row] & (1<<col); - bool curr_bit = *row_pin[row] & row_bit[row]; - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - if (debouncing) { - dprintf("bounce!: %02X\n", debouncing); - } - debouncing = DEBOUNCE; - } - } - release_column(col); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - // NOTE: no longer used - return true; -} - -inline -bool matrix_has_ghost(void) -{ - return false; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 01234567\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); print(": "); - pbin_reverse(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - for (uint8_t j = 0; j < MATRIX_COLS; j++) { - if (matrix_is_on(i, j)) - count++; - } - } - return count; -} diff --git a/keyboard/infinity/Makefile b/keyboard/infinity/Makefile deleted file mode 100644 index e740b6adbc..0000000000 --- a/keyboard/infinity/Makefile +++ /dev/null @@ -1,42 +0,0 @@ -PROJECT = infinity - -TMK_DIR = ../../tmk_core -MBED_DIR = $(TMK_DIR)/tool/mbed/mbed-sdk - -#VPATH += $(MBED_DIR):$(TMK_DIR) -vpath %.s .:$(MBED_DIR):$(TMK_DIR) -vpath %.c .:$(MBED_DIR):$(TMK_DIR) -vpath %.cpp .:$(MBED_DIR):$(TMK_DIR) - -OBJDIR = ./build - -OBJECTS = \ - $(OBJDIR)/matrix.o \ - $(OBJDIR)/keymap_common.o \ - $(OBJDIR)/led.o \ - $(OBJDIR)/main.o - -ifdef KEYMAP - OBJECTS := $(OBJDIR)/keymap_$(KEYMAP).o $(OBJECTS) -else - OBJECTS := $(OBJDIR)/keymap.o $(OBJECTS) -endif - -CONFIG_H = config.h - -INCLUDE_PATHS = -I. - - -# Build Options -# Comment out to disable -#BOOTMAGIC_ENABLE = yes -#MOUSEKEY_ENABLE = yes - - -include mbed-infinity.mk -include $(TMK_DIR)/tool/mbed/mbed.mk -include $(TMK_DIR)/tool/mbed/common.mk -include $(TMK_DIR)/tool/mbed/gcc.mk - -program: $(OBJDIR)/$(PROJECT).bin - dfu-util -D $(OBJDIR)/$(PROJECT).bin diff --git a/keyboard/infinity/README b/keyboard/infinity/README deleted file mode 100644 index 53d1c91737..0000000000 --- a/keyboard/infinity/README +++ /dev/null @@ -1,81 +0,0 @@ -Infinity -======== -Massdrop Infinity Keyboard: -https://www.massdrop.com/buy/infinity-keyboard-kit - -kiibohd controller(MD1): -https://github.com/kiibohd/controller - -DFU bootloader: -https://github.com/kiibohd/controller/tree/master/Bootloader - -Program with bootloader: - $ dfu-util -D kiibohd.dfu.bin - -Pinout: -https://github.com/kiibohd/controller/blob/master/Scan/MD1/pinout - -MCHCK compatible: -https://mchck.org/about/ - -MCU Freescale MK20DX128VLF5 48-QFP: -http://cache.freescale.com/files/32bit/doc/data_sheet/K20P48M50SF0.pdf - - - -Pin Usage -========= -Key Matrix: - Strobe(output high): PTB0 PTB1 PTB2 PTB3 PTB16 PTB17 PTC4 PTC5 PTD0 - Sense(input with pull-down): PTD1 PTD2 PTD3 PTD4 PTD5 PTD6 PTD7 - - -SWD pinout: - SWD_CLK(PTA0) SWD_DIO(PTA3) - SWD pins are placed next to reset button; SWD_CLK, SWD_DIO, GND, VCC from top. - Note that RESET is also needed to get full control with OpenOCD. - -LED: - PTA19(turns on with output high) - - - -Memory map -========== -kiibohd bootloader: Lib/mk20dx128vlf5.bootloader.ld -0x0000_0000 +-------------------+ -----------------+---------------+ Vector table - | .vectors | ------------. | StackPointer0 | of Bootloader - | .startup | \ | ResetHandler1 | - | .rodata | `--+---------------+ 0xF8 -0x0000_0400 | .flashconfig(0x10)| - _0410 | .text | - | .init | -0x0000_1000 +-------------------+ -----------------+---------------+ Vector table - | _app_rom | ------------. | | of App - | | \ | | - | | `--+---------------+ - | | - ~ ~ - | | -0x07FF_FFFF +-------------------+ 128KB - - -0x1FFF_E000 +-------------------+ -----------------+---------------+ Vector table - _E0F8 | | ------------. | | of App(copied) - | | \ | | - | | `--+---------------+ mbed NVIC - | | - | RAM | - | 8KB| -0x2000_0000 +-------------------+ - | | - | | - | | - | | - | RAM | - | 8KB| -0x2000_2000 +-------------------+ _estack - - - - diff --git a/keyboard/infinity/config.h b/keyboard/infinity/config.h deleted file mode 100644 index dc734dbdbe..0000000000 --- a/keyboard/infinity/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2014 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#if 0 -// duplicated name against mbed USBDeivce -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3BED -#endif -#define DEVICE_VER 0x0001 -#define MANUFACTURER tmk. -#define PRODUCT Infinitiy -#define DESCRIPTION Massdrop Infinity keyboard firmware by tmk - - -/* matrix size */ -#define MATRIX_ROWS 9 // Strobe -#define MATRIX_COLS 7 // Sense - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - - -/* for prototype */ -//#define INFINITY_PROTOTYPE - -#endif diff --git a/keyboard/infinity/keymap.c b/keyboard/infinity/keymap.c deleted file mode 100644 index 4726cee653..0000000000 --- a/keyboard/infinity/keymap.c +++ /dev/null @@ -1,48 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| - * |-----------------------------------------------------------' - * | |Gui|Alt | Space |Alt |Gui| | | - * `-----------------------------------------------------------' - */ - [0] = - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS, GRV, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, \ - LCTL,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,FN0, \ - NO, LGUI,LALT, SPC, RALT,RGUI,NO, NO), - - /* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| - * |-----------------------------------------------------------| - * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * | | | | | | | +| -|End|PgD|Dow| | | - * `-----------------------------------------------------------' - * | |Gui|Alt | Space |Alt |Gui| | | - * `-----------------------------------------------------------' - */ - [1] = - KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, INS, DEL, \ - CAPS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS, UP, TRNS, BSPC, \ - TRNS,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,PENT, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,TRNS,TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS), -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; - diff --git a/keyboard/infinity/keymap_common.c b/keyboard/infinity/keymap_common.c deleted file mode 100644 index fdb1769e1c..0000000000 --- a/keyboard/infinity/keymap_common.c +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/infinity/keymap_common.h b/keyboard/infinity/keymap_common.h deleted file mode 100644 index b0f765bfeb..0000000000 --- a/keyboard/infinity/keymap_common.h +++ /dev/null @@ -1,80 +0,0 @@ -/* -Copyright 2014 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include <stdint.h> -#include <stdbool.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - - -#ifdef INFINITY_PROTOTYPE - -/* Infinity prototype */ -#define KEYMAP( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K86, \ - K51, K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, \ - K13, K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, \ - K54, K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, \ - K06, K16, K26, K36, K46, K56, K66, K76 \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06 }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16 }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26 }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36 }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46 }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56 }, \ - { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66 }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76 }, \ - { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86 } \ -} - -#else - -/* Infinity production */ -#define KEYMAP( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, \ - K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, \ - K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, \ - K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, K06, \ - K16, K26, K36, K46, K56, K66, K76, K86 \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06 }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16 }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26 }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36 }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46 }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56 }, \ - { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66 }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76 }, \ - { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86 } \ -} - -#endif - -#endif diff --git a/keyboard/infinity/led.c b/keyboard/infinity/led.c deleted file mode 100644 index b7e638b254..0000000000 --- a/keyboard/infinity/led.c +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include "stdint.h" -#include "led.h" - - -/* HHKB has no LEDs */ -void led_set(uint8_t usb_led) -{ -} diff --git a/keyboard/infinity/main.cpp b/keyboard/infinity/main.cpp deleted file mode 100644 index 847668a1de..0000000000 --- a/keyboard/infinity/main.cpp +++ /dev/null @@ -1,44 +0,0 @@ -#include "MK20D5.h" -#include "wait.h" -#include "gpio_api.h" -#include "PinNames.h" -#include "matrix.h" -#include "timer.h" - -#include "action.h" -#include "keycode.h" -#include "host.h" -#include "host_driver.h" -#include "mbed_driver.h" - - -int main() { - gpio_t led; - gpio_init_out(&led, PTA19); - - uint16_t t = 0; - - host_set_driver(&mbed_driver); - keyboard_init(); - - while(1) { - keyboard_task(); - - bool matrix_on = false; - matrix_scan(); - for (int i = 0; i < MATRIX_ROWS; i++) { - if (matrix_get_row(i)) { - matrix_on = true; - break; - } - } - if (matrix_on) - gpio_write(&led, 1); - else { - if (timer_elapsed(t) > 500) { - gpio_write(&led, !gpio_read(&led)); - t = timer_read(); - } - } - } -} diff --git a/keyboard/infinity/matrix.c b/keyboard/infinity/matrix.c deleted file mode 100644 index 478a40fd9e..0000000000 --- a/keyboard/infinity/matrix.c +++ /dev/null @@ -1,107 +0,0 @@ -#include <stdint.h> -#include <stdbool.h> -#include "gpio_api.h" -#include "timer.h" -#include "wait.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -#define DEBOUNCE 5 -#endif - -/* - * Infinity Pinusage: - * Column pins are input with internal pull-down. Row pins are output and strobe with high. - * Key is high or 1 when it turns on. - * - * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } - * row: { PTB0, PTB1, PTB2, PTB3, PTB16, PTB17, PTC4, PTC5, PTD0 } - */ -static gpio_t col[MATRIX_COLS]; -static gpio_t row[MATRIX_ROWS]; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - - -void matrix_init(void) -{ - /* Column(sense) */ - gpio_init_in_ex(&col[0], PTD1, PullDown); - gpio_init_in_ex(&col[1], PTD2, PullDown); - gpio_init_in_ex(&col[2], PTD3, PullDown); - gpio_init_in_ex(&col[3], PTD4, PullDown); - gpio_init_in_ex(&col[4], PTD5, PullDown); - gpio_init_in_ex(&col[5], PTD6, PullDown); - gpio_init_in_ex(&col[6], PTD7, PullDown); - - /* Row(strobe) */ - gpio_init_out_ex(&row[0], PTB0, 0); - gpio_init_out_ex(&row[1], PTB1, 0); - gpio_init_out_ex(&row[2], PTB2, 0); - gpio_init_out_ex(&row[3], PTB3, 0); - gpio_init_out_ex(&row[4], PTB16, 0); - gpio_init_out_ex(&row[5], PTB17, 0); - gpio_init_out_ex(&row[6], PTC4, 0); - gpio_init_out_ex(&row[7], PTC5, 0); - gpio_init_out_ex(&row[8], PTD0, 0); -} - -uint8_t matrix_scan(void) -{ - for (int i = 0; i < MATRIX_ROWS; i++) { - matrix_row_t r = 0; - - gpio_write(&row[i], 1); - wait_us(1); // need wait to settle pin state - for (int j = 0; j < MATRIX_COLS; j++) { - if (gpio_read(&col[j])) { - r |= (1<<j); - } - } - gpio_write(&row[i], 0); - - if (matrix_debouncing[i] != r) { - matrix_debouncing[i] = r; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - debouncing = false; - } -/* - if (debouncing) { - if (--debouncing) { - return 0; - } else { - for (int i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } -*/ - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1<<col)); -} - -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ -} diff --git a/keyboard/infinity/mbed-infinity.mk b/keyboard/infinity/mbed-infinity.mk deleted file mode 100644 index 2c8d2e4372..0000000000 --- a/keyboard/infinity/mbed-infinity.mk +++ /dev/null @@ -1,49 +0,0 @@ -# based on Makefile exported form mbed.org -# see http://mbed.org/handbook/Exporting-to-GCC-ARM-Embedded - -CPU = -mcpu=cortex-m4 -mthumb - -CC_SYMBOLS += \ - -DTARGET_INFINITY \ - -DTARGET_K20D50M \ - -DTARGET_M4 \ - -DTARGET_CORTEX_M \ - -DTARGET_Freescale \ - -DTOOLCHAIN_GCC_ARM \ - -DTOOLCHAIN_GCC \ - -D__CORTEX_M4 \ - -DARM_MATH_CM4 \ - -D__MBED__=1 - -OBJECTS += \ - $(OBJDIR)/mbed-infinity/cmsis_nvic.o \ - $(OBJDIR)/mbed-infinity/system_MK20D5.o \ - $(OBJDIR)/mbed-infinity/USBHAL_KL25Z.o \ - $(OBJDIR)/mbed-infinity/startup_MK20D5.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/analogin_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/gpio_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/gpio_irq_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/i2c_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/pinmap.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/port_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/pwmout_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/rtc_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/serial_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/sleep.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/spi_api.o \ - $(OBJDIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/us_ticker.o - -INCLUDE_PATHS += \ - -Imbed \ - -I$(MBED_DIR)/libraries/mbed/targets \ - -I$(MBED_DIR)/libraries/mbed/targets/cmsis \ - -I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_Freescale \ - -I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20XX \ - -I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20XX/TARGET_K20D50M \ - -I$(MBED_DIR)/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20XX/TARGET_K20D50M/TOOLCHAIN_GCC_ARM \ - -I$(MBED_DIR)/libraries/mbed/targets/hal \ - -I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_Freescale \ - -I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX \ - -I$(MBED_DIR)/libraries/mbed/targets/hal/TARGET_Freescale/TARGET_K20XX/TARGET_K20D50M - -LINKER_SCRIPT = mbed-infinity/infinity.ld diff --git a/keyboard/infinity/mbed-infinity/README b/keyboard/infinity/mbed-infinity/README deleted file mode 100644 index 43051c9003..0000000000 --- a/keyboard/infinity/mbed-infinity/README +++ /dev/null @@ -1,83 +0,0 @@ -mbed fix for Infinity -===================== -Without linker script patch it doesn't place vector table in final binary. -And clock is configured to 48MHz using internal clock reference and FLL multiplication. - - -mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/system_MK20D5.c - Fix SystemInit: clock setup for internal clock. Inifinity has no external Xtal. - -mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/cmsis_nvic.c - Fix NVIC vector address of firmware 0x1000 instead of 0x0 - -mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/TOOLCHAIN_GCC_ARM/MK20D5.ld - Fix memory map for Infinity bootloader - Flash starts at 0x1000 - No flash config bytes sector - -USBDevice/USBDevice/USBHAL_KL25Z.cpp - Fix USB clock setup, see below. - - -2015/01/04 Based on mbed-sdk @2f63fa7d78a26. - - - -Kinetis USB config -================== -Clock source: Internal reference clock wth FLL - SIM_SOPT[USBSRC] = 1(MCGPLLCLK/MCGFLLCLK) - SIM_SOPT[PLLSEL] = 0(MCGFLLCLK) - -Clock dividor: - SIM_CLKDIV2[USBDIV] = 0 - SIM_CLKDIV2[USBFAC] = 0 - -Clock enable: - SIM_SCGC4[USBOTG] = 1 - - - -Infinity bootloader change -========================== -After @2c7542e(2015/01) Infinity bootloader doesn't disable watchdog timer and keyboard firmware has to do it itself. mbed disables watchdog in startup sequence but unfortunately timer is timed out bofore that. - -We have to do that in earlier phase of mbed startup sequence. - - -mbed starup sequence files: -mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/TOOLCHAIN_GCC_ARM/startup_M20D5.s -mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/system_MK20D5.c - -Infinity booloader change commit: -https://github.com/kiibohd/controller/commit/2c7542e2e7f0b8a99edf563dc53164fe1a439483 - -discussion: -https://geekhack.org/index.php?topic=41989.msg1686616#msg1686616 - - -WORKAROUND ----------- -Call SystemInit early in Reset_Handler. - -$ diff -u ../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/TOOLCHAIN_GCC_ARM/startup_MK20D5.s mbed-infinity ---- ../../mbed-sdk/libraries/mbed/targets/cmsis/TARGET_Freescale/TARGET_K20D50M/TOOLCHAIN_GCC_ARM/startup_MK20D5.s 2015-03-22 10:33:22.779866000 +0900 -+++ mbed-infinity/startup_MK20D5.s 2015-03-22 10:32:56.483866000 +0900 -@@ -147,6 +147,8 @@ - * __etext: End of code section, i.e., begin of data sections to copy from. - * __data_start__/__data_end__: RAM address range that data should be - * copied to. Both must be aligned to 4 bytes boundary. */ -+ ldr r0, =SystemInit -+ blx r0 - - ldr r1, =__etext - ldr r2, =__data_start__ -@@ -161,8 +163,6 @@ - - .Lflash_to_ram_loop_end: - -- ldr r0, =SystemInit -- blx r0 - ldr r0, =_start - bx r0 - .pool diff --git a/keyboard/infinity/mbed-infinity/USBHAL_KL25Z.cpp b/keyboard/infinity/mbed-infinity/USBHAL_KL25Z.cpp deleted file mode 100644 index 90f02fa322..0000000000 --- a/keyboard/infinity/mbed-infinity/USBHAL_KL25Z.cpp +++ /dev/null @@ -1,557 +0,0 @@ -/* Copyright (c) 2010-2011 mbed.org, MIT License -* -* Permission is hereby granted, free of charge, to any person obtaining a copy of this software -* and associated documentation files (the "Software"), to deal in the Software without -* restriction, including without limitation the rights to use, copy, modify, merge, publish, -* distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the -* Software is furnished to do so, subject to the following conditions: -* -* The above copyright notice and this permission notice shall be included in all copies or -* substantial portions of the Software. -* -* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING -* BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, -* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/ - -#if defined(TARGET_KL25Z) | defined(TARGET_KL43Z) | defined(TARGET_KL46Z) | defined(TARGET_K20D50M) | defined(TARGET_K64F) | defined(TARGET_K22F) - -#include "USBHAL.h" - -USBHAL * USBHAL::instance; - -static volatile int epComplete = 0; - -// Convert physical endpoint number to register bit -#define EP(endpoint) (1<<(endpoint)) - -// Convert physical to logical -#define PHY_TO_LOG(endpoint) ((endpoint)>>1) - -// Get endpoint direction -#define IN_EP(endpoint) ((endpoint) & 1U ? true : false) -#define OUT_EP(endpoint) ((endpoint) & 1U ? false : true) - -#define BD_OWN_MASK (1<<7) -#define BD_DATA01_MASK (1<<6) -#define BD_KEEP_MASK (1<<5) -#define BD_NINC_MASK (1<<4) -#define BD_DTS_MASK (1<<3) -#define BD_STALL_MASK (1<<2) - -#define TX 1 -#define RX 0 -#define ODD 0 -#define EVEN 1 -// this macro waits a physical endpoint number -#define EP_BDT_IDX(ep, dir, odd) (((ep * 4) + (2 * dir) + (1 * odd))) - -#define SETUP_TOKEN 0x0D -#define IN_TOKEN 0x09 -#define OUT_TOKEN 0x01 -#define TOK_PID(idx) ((bdt[idx].info >> 2) & 0x0F) - -// for each endpt: 8 bytes -typedef struct BDT { - uint8_t info; // BD[0:7] - uint8_t dummy; // RSVD: BD[8:15] - uint16_t byte_count; // BD[16:32] - uint32_t address; // Addr -} BDT; - - -// there are: -// * 16 bidirectionnal endpt -> 32 physical endpt -// * as there are ODD and EVEN buffer -> 32*2 bdt -__attribute__((__aligned__(512))) BDT bdt[NUMBER_OF_PHYSICAL_ENDPOINTS * 2]; -uint8_t * endpoint_buffer[(NUMBER_OF_PHYSICAL_ENDPOINTS - 2) * 2]; -uint8_t * endpoint_buffer_iso[2*2]; - -static uint8_t set_addr = 0; -static uint8_t addr = 0; - -static uint32_t Data1 = 0x55555555; - -static uint32_t frameNumber() { - return((USB0->FRMNUML | (USB0->FRMNUMH << 8)) & 0x07FF); -} - -uint32_t USBHAL::endpointReadcore(uint8_t endpoint, uint8_t *buffer) { - return 0; -} - -USBHAL::USBHAL(void) { - // Disable IRQ - NVIC_DisableIRQ(USB0_IRQn); - -#if defined(TARGET_K64F) - MPU->CESR=0; -#endif - // fill in callback array - epCallback[0] = &USBHAL::EP1_OUT_callback; - epCallback[1] = &USBHAL::EP1_IN_callback; - epCallback[2] = &USBHAL::EP2_OUT_callback; - epCallback[3] = &USBHAL::EP2_IN_callback; - epCallback[4] = &USBHAL::EP3_OUT_callback; - epCallback[5] = &USBHAL::EP3_IN_callback; - epCallback[6] = &USBHAL::EP4_OUT_callback; - epCallback[7] = &USBHAL::EP4_IN_callback; - epCallback[8] = &USBHAL::EP5_OUT_callback; - epCallback[9] = &USBHAL::EP5_IN_callback; - epCallback[10] = &USBHAL::EP6_OUT_callback; - epCallback[11] = &USBHAL::EP6_IN_callback; - epCallback[12] = &USBHAL::EP7_OUT_callback; - epCallback[13] = &USBHAL::EP7_IN_callback; - epCallback[14] = &USBHAL::EP8_OUT_callback; - epCallback[15] = &USBHAL::EP8_IN_callback; - epCallback[16] = &USBHAL::EP9_OUT_callback; - epCallback[17] = &USBHAL::EP9_IN_callback; - epCallback[18] = &USBHAL::EP10_OUT_callback; - epCallback[19] = &USBHAL::EP10_IN_callback; - epCallback[20] = &USBHAL::EP11_OUT_callback; - epCallback[21] = &USBHAL::EP11_IN_callback; - epCallback[22] = &USBHAL::EP12_OUT_callback; - epCallback[23] = &USBHAL::EP12_IN_callback; - epCallback[24] = &USBHAL::EP13_OUT_callback; - epCallback[25] = &USBHAL::EP13_IN_callback; - epCallback[26] = &USBHAL::EP14_OUT_callback; - epCallback[27] = &USBHAL::EP14_IN_callback; - epCallback[28] = &USBHAL::EP15_OUT_callback; - epCallback[29] = &USBHAL::EP15_IN_callback; - -#if defined(TARGET_KL43Z) - // enable USBFS clock - SIM->SCGC4 |= SIM_SCGC4_USBFS_MASK; - - // enable the IRC48M clock - USB0->CLK_RECOVER_IRC_EN |= USB_CLK_RECOVER_IRC_EN_IRC_EN_MASK; - - // enable the USB clock recovery tuning - USB0->CLK_RECOVER_CTRL |= USB_CLK_RECOVER_CTRL_CLOCK_RECOVER_EN_MASK; - - // choose usb src clock - SIM->SOPT2 |= SIM_SOPT2_USBSRC_MASK; -#elif defined(TARGET_INFINITY) - // USB clock source: FLL - SIM->SOPT2 |= SIM_SOPT2_USBSRC_MASK; - - // enable OTG clock - SIM->SCGC4 |= SIM_SCGC4_USBOTG_MASK; -#else - // choose usb src as PLL - SIM->SOPT2 &= ~SIM_SOPT2_PLLFLLSEL_MASK; - SIM->SOPT2 |= (SIM_SOPT2_USBSRC_MASK | (1 << SIM_SOPT2_PLLFLLSEL_SHIFT)); - - // enable OTG clock - SIM->SCGC4 |= SIM_SCGC4_USBOTG_MASK; -#endif - - // Attach IRQ - instance = this; - NVIC_SetVector(USB0_IRQn, (uint32_t)&_usbisr); - NVIC_EnableIRQ(USB0_IRQn); - - // USB Module Configuration - // Reset USB Module - USB0->USBTRC0 |= USB_USBTRC0_USBRESET_MASK; - while(USB0->USBTRC0 & USB_USBTRC0_USBRESET_MASK); - - // Set BDT Base Register - USB0->BDTPAGE1 = (uint8_t)((uint32_t)bdt>>8); - USB0->BDTPAGE2 = (uint8_t)((uint32_t)bdt>>16); - USB0->BDTPAGE3 = (uint8_t)((uint32_t)bdt>>24); - - // Clear interrupt flag - USB0->ISTAT = 0xff; - - // USB Interrupt Enablers - USB0->INTEN |= USB_INTEN_TOKDNEEN_MASK | - USB_INTEN_SOFTOKEN_MASK | - USB_INTEN_ERROREN_MASK | - USB_INTEN_USBRSTEN_MASK; - - // Disable weak pull downs - USB0->USBCTRL &= ~(USB_USBCTRL_PDE_MASK | USB_USBCTRL_SUSP_MASK); - - USB0->USBTRC0 |= 0x40; -} - -USBHAL::~USBHAL(void) { } - -void USBHAL::connect(void) { - // enable USB - USB0->CTL |= USB_CTL_USBENSOFEN_MASK; - // Pull up enable - USB0->CONTROL |= USB_CONTROL_DPPULLUPNONOTG_MASK; -} - -void USBHAL::disconnect(void) { - // disable USB - USB0->CTL &= ~USB_CTL_USBENSOFEN_MASK; - // Pull up disable - USB0->CONTROL &= ~USB_CONTROL_DPPULLUPNONOTG_MASK; - - //Free buffers if required: - for (int i = 0; i<(NUMBER_OF_PHYSICAL_ENDPOINTS - 2) * 2; i++) { - free(endpoint_buffer[i]); - endpoint_buffer[i] = NULL; - } - free(endpoint_buffer_iso[2]); - endpoint_buffer_iso[2] = NULL; - free(endpoint_buffer_iso[0]); - endpoint_buffer_iso[0] = NULL; -} - -void USBHAL::configureDevice(void) { - // not needed -} - -void USBHAL::unconfigureDevice(void) { - // not needed -} - -void USBHAL::setAddress(uint8_t address) { - // we don't set the address now otherwise the usb controller does not ack - // we set a flag instead - // see usbisr when an IN token is received - set_addr = 1; - addr = address; -} - -bool USBHAL::realiseEndpoint(uint8_t endpoint, uint32_t maxPacket, uint32_t flags) { - uint32_t handshake_flag = 0; - uint8_t * buf; - - if (endpoint > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) { - return false; - } - - uint32_t log_endpoint = PHY_TO_LOG(endpoint); - - if ((flags & ISOCHRONOUS) == 0) { - handshake_flag = USB_ENDPT_EPHSHK_MASK; - if (IN_EP(endpoint)) { - if (endpoint_buffer[EP_BDT_IDX(log_endpoint, TX, ODD)] == NULL) - endpoint_buffer[EP_BDT_IDX(log_endpoint, TX, ODD)] = (uint8_t *) malloc (64*2); - buf = &endpoint_buffer[EP_BDT_IDX(log_endpoint, TX, ODD)][0]; - } else { - if (endpoint_buffer[EP_BDT_IDX(log_endpoint, RX, ODD)] == NULL) - endpoint_buffer[EP_BDT_IDX(log_endpoint, RX, ODD)] = (uint8_t *) malloc (64*2); - buf = &endpoint_buffer[EP_BDT_IDX(log_endpoint, RX, ODD)][0]; - } - } else { - if (IN_EP(endpoint)) { - if (endpoint_buffer_iso[2] == NULL) - endpoint_buffer_iso[2] = (uint8_t *) malloc (1023*2); - buf = &endpoint_buffer_iso[2][0]; - } else { - if (endpoint_buffer_iso[0] == NULL) - endpoint_buffer_iso[0] = (uint8_t *) malloc (1023*2); - buf = &endpoint_buffer_iso[0][0]; - } - } - - // IN endpt -> device to host (TX) - if (IN_EP(endpoint)) { - USB0->ENDPOINT[log_endpoint].ENDPT |= handshake_flag | // ep handshaking (not if iso endpoint) - USB_ENDPT_EPTXEN_MASK; // en TX (IN) tran - bdt[EP_BDT_IDX(log_endpoint, TX, ODD )].address = (uint32_t) buf; - bdt[EP_BDT_IDX(log_endpoint, TX, EVEN)].address = 0; - } - // OUT endpt -> host to device (RX) - else { - USB0->ENDPOINT[log_endpoint].ENDPT |= handshake_flag | // ep handshaking (not if iso endpoint) - USB_ENDPT_EPRXEN_MASK; // en RX (OUT) tran. - bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].byte_count = maxPacket; - bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].address = (uint32_t) buf; - bdt[EP_BDT_IDX(log_endpoint, RX, ODD )].info = BD_OWN_MASK | BD_DTS_MASK; - bdt[EP_BDT_IDX(log_endpoint, RX, EVEN)].info = 0; - } - - Data1 |= (1 << endpoint); - - return true; -} - -// read setup packet -void USBHAL::EP0setup(uint8_t *buffer) { - uint32_t sz; - endpointReadResult(EP0OUT, buffer, &sz); -} - -void USBHAL::EP0readStage(void) { - Data1 &= ~1UL; // set DATA0 - bdt[0].info = (BD_DTS_MASK | BD_OWN_MASK); -} - -void USBHAL::EP0read(void) { - uint32_t idx = EP_BDT_IDX(PHY_TO_LOG(EP0OUT), RX, 0); - bdt[idx].byte_count = MAX_PACKET_SIZE_EP0; -} - -uint32_t USBHAL::EP0getReadResult(uint8_t *buffer) { - uint32_t sz; - endpointReadResult(EP0OUT, buffer, &sz); - return sz; -} - -void USBHAL::EP0write(uint8_t *buffer, uint32_t size) { - endpointWrite(EP0IN, buffer, size); -} - -void USBHAL::EP0getWriteResult(void) { -} - -void USBHAL::EP0stall(void) { - stallEndpoint(EP0OUT); -} - -EP_STATUS USBHAL::endpointRead(uint8_t endpoint, uint32_t maximumSize) { - endpoint = PHY_TO_LOG(endpoint); - uint32_t idx = EP_BDT_IDX(endpoint, RX, 0); - bdt[idx].byte_count = maximumSize; - return EP_PENDING; -} - -EP_STATUS USBHAL::endpointReadResult(uint8_t endpoint, uint8_t * buffer, uint32_t *bytesRead) { - uint32_t n, sz, idx, setup = 0; - uint8_t not_iso; - uint8_t * ep_buf; - - uint32_t log_endpoint = PHY_TO_LOG(endpoint); - - if (endpoint > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) { - return EP_INVALID; - } - - // if read on a IN endpoint -> error - if (IN_EP(endpoint)) { - return EP_INVALID; - } - - idx = EP_BDT_IDX(log_endpoint, RX, 0); - sz = bdt[idx].byte_count; - not_iso = USB0->ENDPOINT[log_endpoint].ENDPT & USB_ENDPT_EPHSHK_MASK; - - //for isochronous endpoint, we don't wait an interrupt - if ((log_endpoint != 0) && not_iso && !(epComplete & EP(endpoint))) { - return EP_PENDING; - } - - if ((log_endpoint == 0) && (TOK_PID(idx) == SETUP_TOKEN)) { - setup = 1; - } - - // non iso endpoint - if (not_iso) { - ep_buf = endpoint_buffer[idx]; - } else { - ep_buf = endpoint_buffer_iso[0]; - } - - for (n = 0; n < sz; n++) { - buffer[n] = ep_buf[n]; - } - - if (((Data1 >> endpoint) & 1) == ((bdt[idx].info >> 6) & 1)) { - if (setup && (buffer[6] == 0)) // if no setup data stage, - Data1 &= ~1UL; // set DATA0 - else - Data1 ^= (1 << endpoint); - } - - if (((Data1 >> endpoint) & 1)) { - bdt[idx].info = BD_DTS_MASK | BD_DATA01_MASK | BD_OWN_MASK; - } - else { - bdt[idx].info = BD_DTS_MASK | BD_OWN_MASK; - } - - USB0->CTL &= ~USB_CTL_TXSUSPENDTOKENBUSY_MASK; - *bytesRead = sz; - - epComplete &= ~EP(endpoint); - return EP_COMPLETED; -} - -EP_STATUS USBHAL::endpointWrite(uint8_t endpoint, uint8_t *data, uint32_t size) { - uint32_t idx, n; - uint8_t * ep_buf; - - if (endpoint > NUMBER_OF_PHYSICAL_ENDPOINTS - 1) { - return EP_INVALID; - } - - // if write on a OUT endpoint -> error - if (OUT_EP(endpoint)) { - return EP_INVALID; - } - - idx = EP_BDT_IDX(PHY_TO_LOG(endpoint), TX, 0); - bdt[idx].byte_count = size; - - - // non iso endpoint - if (USB0->ENDPOINT[PHY_TO_LOG(endpoint)].ENDPT & USB_ENDPT_EPHSHK_MASK) { - ep_buf = endpoint_buffer[idx]; - } else { - ep_buf = endpoint_buffer_iso[2]; - } - - for (n = 0; n < size; n++) { - ep_buf[n] = data[n]; - } - - if ((Data1 >> endpoint) & 1) { - bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK; - } else { - bdt[idx].info = BD_OWN_MASK | BD_DTS_MASK | BD_DATA01_MASK; - } - - Data1 ^= (1 << endpoint); - - return EP_PENDING; -} - -EP_STATUS USBHAL::endpointWriteResult(uint8_t endpoint) { - if (epComplete & EP(endpoint)) { - epComplete &= ~EP(endpoint); - return EP_COMPLETED; - } - - return EP_PENDING; -} - -void USBHAL::stallEndpoint(uint8_t endpoint) { - USB0->ENDPOINT[PHY_TO_LOG(endpoint)].ENDPT |= USB_ENDPT_EPSTALL_MASK; -} - -void USBHAL::unstallEndpoint(uint8_t endpoint) { - USB0->ENDPOINT[PHY_TO_LOG(endpoint)].ENDPT &= ~USB_ENDPT_EPSTALL_MASK; -} - -bool USBHAL::getEndpointStallState(uint8_t endpoint) { - uint8_t stall = (USB0->ENDPOINT[PHY_TO_LOG(endpoint)].ENDPT & USB_ENDPT_EPSTALL_MASK); - return (stall) ? true : false; -} - -void USBHAL::remoteWakeup(void) { - // [TODO] -} - - -void USBHAL::_usbisr(void) { - instance->usbisr(); -} - - -void USBHAL::usbisr(void) { - uint8_t i; - uint8_t istat = USB0->ISTAT; - - // reset interrupt - if (istat & USB_ISTAT_USBRST_MASK) { - // disable all endpt - for(i = 0; i < 16; i++) { - USB0->ENDPOINT[i].ENDPT = 0x00; - } - - // enable control endpoint - realiseEndpoint(EP0OUT, MAX_PACKET_SIZE_EP0, 0); - realiseEndpoint(EP0IN, MAX_PACKET_SIZE_EP0, 0); - - Data1 = 0x55555555; - USB0->CTL |= USB_CTL_ODDRST_MASK; - - USB0->ISTAT = 0xFF; // clear all interrupt status flags - USB0->ERRSTAT = 0xFF; // clear all error flags - USB0->ERREN = 0xFF; // enable error interrupt sources - USB0->ADDR = 0x00; // set default address - - return; - } - - // resume interrupt - if (istat & USB_ISTAT_RESUME_MASK) { - USB0->ISTAT = USB_ISTAT_RESUME_MASK; - } - - // SOF interrupt - if (istat & USB_ISTAT_SOFTOK_MASK) { - USB0->ISTAT = USB_ISTAT_SOFTOK_MASK; - // SOF event, read frame number - SOF(frameNumber()); - } - - // stall interrupt - if (istat & 1<<7) { - if (USB0->ENDPOINT[0].ENDPT & USB_ENDPT_EPSTALL_MASK) - USB0->ENDPOINT[0].ENDPT &= ~USB_ENDPT_EPSTALL_MASK; - USB0->ISTAT |= USB_ISTAT_STALL_MASK; - } - - // token interrupt - if (istat & 1<<3) { - uint32_t num = (USB0->STAT >> 4) & 0x0F; - uint32_t dir = (USB0->STAT >> 3) & 0x01; - uint32_t ev_odd = (USB0->STAT >> 2) & 0x01; - - // setup packet - if ((num == 0) && (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == SETUP_TOKEN)) { - Data1 &= ~0x02; - bdt[EP_BDT_IDX(0, TX, EVEN)].info &= ~BD_OWN_MASK; - bdt[EP_BDT_IDX(0, TX, ODD)].info &= ~BD_OWN_MASK; - - // EP0 SETUP event (SETUP data received) - EP0setupCallback(); - - } else { - // OUT packet - if (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == OUT_TOKEN) { - if (num == 0) - EP0out(); - else { - epComplete |= (1 << EP(num)); - if ((instance->*(epCallback[EP(num) - 2]))()) { - epComplete &= ~(1 << EP(num)); - } - } - } - - // IN packet - if (TOK_PID((EP_BDT_IDX(num, dir, ev_odd))) == IN_TOKEN) { - if (num == 0) { - EP0in(); - if (set_addr == 1) { - USB0->ADDR = addr & 0x7F; - set_addr = 0; - } - } - else { - epComplete |= (1 << (EP(num) + 1)); - if ((instance->*(epCallback[EP(num) + 1 - 2]))()) { - epComplete &= ~(1 << (EP(num) + 1)); - } - } - } - } - - USB0->ISTAT = USB_ISTAT_TOKDNE_MASK; - } - - // sleep interrupt - if (istat & 1<<4) { - USB0->ISTAT |= USB_ISTAT_SLEEP_MASK; - } - - // error interrupt - if (istat & USB_ISTAT_ERROR_MASK) { - USB0->ERRSTAT = 0xFF; - USB0->ISTAT |= USB_ISTAT_ERROR_MASK; - } -} - - -#endif diff --git a/keyboard/infinity/mbed-infinity/cmsis_nvic.c b/keyboard/infinity/mbed-infinity/cmsis_nvic.c deleted file mode 100644 index 985c1d33f5..0000000000 --- a/keyboard/infinity/mbed-infinity/cmsis_nvic.c +++ /dev/null @@ -1,55 +0,0 @@ -/* mbed Microcontroller Library - * CMSIS-style functionality to support dynamic vectors - ******************************************************************************* - * Copyright (c) 2011 ARM Limited. All rights reserved. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. Neither the name of ARM Limited nor the names of its contributors - * may be used to endorse or promote products derived from this software - * without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************* - */ -#include "cmsis_nvic.h" - -#define NVIC_RAM_VECTOR_ADDRESS (0x1FFFE000) // Vectors positioned at start of RAM -#define NVIC_FLASH_VECTOR_ADDRESS (0x1000) // Initial vector position in flash - -void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) { - uint32_t *vectors = (uint32_t*)SCB->VTOR; - uint32_t i; - - // Copy and switch to dynamic vectors if the first time called - if (SCB->VTOR == NVIC_FLASH_VECTOR_ADDRESS) { - uint32_t *old_vectors = vectors; - vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS; - for (i=0; i<NVIC_NUM_VECTORS; i++) { - vectors[i] = old_vectors[i]; - } - SCB->VTOR = (uint32_t)NVIC_RAM_VECTOR_ADDRESS; - } - vectors[IRQn + 16] = vector; -} - -uint32_t NVIC_GetVector(IRQn_Type IRQn) { - uint32_t *vectors = (uint32_t*)SCB->VTOR; - return vectors[IRQn + 16]; -} diff --git a/keyboard/infinity/mbed-infinity/infinity.ld b/keyboard/infinity/mbed-infinity/infinity.ld deleted file mode 100644 index decdaa26e0..0000000000 --- a/keyboard/infinity/mbed-infinity/infinity.ld +++ /dev/null @@ -1,156 +0,0 @@ -/* - * Linker script for Massdrop Infinity - * Infinity has bootloader in top 4KB sector of flash and app should be placed after the area. - * - * based on mbed.org K20 ARM GCC linker script file: MK20D5.ld - */ - -MEMORY -{ - /* Infinity blootloader uses 4KB */ - FLASH (rx) : ORIGIN = 4K, LENGTH = 128K - 4K - RAM (rwx) : ORIGIN = 0x1FFFE0F8, LENGTH = 16K - 0xF8 -} - -/* Linker script to place sections and symbol values. Should be used together - * with other linker script that defines memory regions FLASH and RAM. - * It references following symbols, which must be defined in code: - * _reset_init : Entry of reset handler - * - * It defines following symbols, which code can use without definition: - * __exidx_start - * __exidx_end - * __etext - * __data_start__ - * __preinit_array_start - * __preinit_array_end - * __init_array_start - * __init_array_end - * __fini_array_start - * __fini_array_end - * __data_end__ - * __bss_start__ - * __bss_end__ - * __end__ - * end - * __HeapLimit - * __StackLimit - * __StackTop - * __stack - */ -ENTRY(Reset_Handler) - -SECTIONS -{ - .text : - { - __vector_table = .; - KEEP(*(.isr_vector)) - *(.text.Reset_Handler) - *(.text.System_Init) - . = ALIGN(4); - - *(.text*) - - KEEP(*(.init)) - KEEP(*(.fini)) - - /* .ctors */ - *crtbegin.o(.ctors) - *crtbegin?.o(.ctors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .ctors) - *(SORT(.ctors.*)) - *(.ctors) - - /* .dtors */ - *crtbegin.o(.dtors) - *crtbegin?.o(.dtors) - *(EXCLUDE_FILE(*crtend?.o *crtend.o) .dtors) - *(SORT(.dtors.*)) - *(.dtors) - - *(.rodata*) - - KEEP(*(.eh_frame*)) - } > FLASH - - .ARM.extab : - { - *(.ARM.extab* .gnu.linkonce.armextab.*) - } > FLASH - - __exidx_start = .; - .ARM.exidx : - { - *(.ARM.exidx* .gnu.linkonce.armexidx.*) - } > FLASH - __exidx_end = .; - - __etext = .; - - .data : AT (__etext) - { - __data_start__ = .; - *(vtable) - *(.data*) - - . = ALIGN(4); - /* preinit data */ - PROVIDE_HIDDEN (__preinit_array_start = .); - KEEP(*(.preinit_array)) - PROVIDE_HIDDEN (__preinit_array_end = .); - - . = ALIGN(4); - /* init data */ - PROVIDE_HIDDEN (__init_array_start = .); - KEEP(*(SORT(.init_array.*))) - KEEP(*(.init_array)) - PROVIDE_HIDDEN (__init_array_end = .); - - - . = ALIGN(4); - /* finit data */ - PROVIDE_HIDDEN (__fini_array_start = .); - KEEP(*(SORT(.fini_array.*))) - KEEP(*(.fini_array)) - PROVIDE_HIDDEN (__fini_array_end = .); - - . = ALIGN(4); - /* All data end */ - __data_end__ = .; - - } > RAM - - .bss : - { - __bss_start__ = .; - *(.bss*) - *(COMMON) - __bss_end__ = .; - } > RAM - - .heap : - { - __end__ = .; - end = __end__; - *(.heap*) - __HeapLimit = .; - } > RAM - - /* .stack_dummy section doesn't contains any symbols. It is only - * used for linker to calculate size of stack sections, and assign - * values to stack symbols later */ - .stack_dummy : - { - *(.stack) - } > RAM - - /* Set stack top to end of RAM, and stack limit move down by - * size of stack_dummy section */ - __StackTop = ORIGIN(RAM) + LENGTH(RAM); - __StackLimit = __StackTop - SIZEOF(.stack_dummy); - PROVIDE(__stack = __StackTop); - - /* Check if data + heap + stack exceeds RAM limit */ - ASSERT(__StackLimit >= __HeapLimit, "region RAM overflowed with stack") -} diff --git a/keyboard/infinity/mbed-infinity/startup_MK20D5.s b/keyboard/infinity/mbed-infinity/startup_MK20D5.s deleted file mode 100644 index 7a8d7ba45a..0000000000 --- a/keyboard/infinity/mbed-infinity/startup_MK20D5.s +++ /dev/null @@ -1,259 +0,0 @@ -/* File: startup_MK20D5.s - * Purpose: startup file for Cortex-M4 devices. Should use with - * GCC for ARM Embedded Processors - * Version: V1.3 - * Date: 08 Feb 2012 - * - * Copyright (c) 2012, ARM Limited - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - * Neither the name of the ARM Limited nor the - names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL ARM LIMITED BE LIABLE FOR ANY - * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - .syntax unified - .arch armv7-m - - .section .stack - .align 3 -#ifdef __STACK_SIZE - .equ Stack_Size, __STACK_SIZE -#else - .equ Stack_Size, 0x400 -#endif - .globl __StackTop - .globl __StackLimit -__StackLimit: - .space Stack_Size - .size __StackLimit, . - __StackLimit -__StackTop: - .size __StackTop, . - __StackTop - - .section .heap - .align 3 -#ifdef __HEAP_SIZE - .equ Heap_Size, __HEAP_SIZE -#else - .equ Heap_Size, 0xC00 -#endif - .globl __HeapBase - .globl __HeapLimit -__HeapBase: - .if Heap_Size - .space Heap_Size - .endif - .size __HeapBase, . - __HeapBase -__HeapLimit: - .size __HeapLimit, . - __HeapLimit - - .section .isr_vector - .align 2 - .globl __isr_vector -__isr_vector: - .long __StackTop /* Top of Stack */ - .long Reset_Handler /* Reset Handler */ - .long NMI_Handler /* NMI Handler */ - .long HardFault_Handler /* Hard Fault Handler */ - .long MemManage_Handler /* MPU Fault Handler */ - .long BusFault_Handler /* Bus Fault Handler */ - .long UsageFault_Handler /* Usage Fault Handler */ - .long 0 /* Reserved */ - .long 0 /* Reserved */ - .long 0 /* Reserved */ - .long 0 /* Reserved */ - .long SVC_Handler /* SVCall Handler */ - .long DebugMon_Handler /* Debug Monitor Handler */ - .long 0 /* Reserved */ - .long PendSV_Handler /* PendSV Handler */ - .long SysTick_Handler /* SysTick Handler */ - - /* External interrupts */ - .long DMA0_IRQHandler /* 0: Watchdog Timer */ - .long DMA1_IRQHandler /* 1: Real Time Clock */ - .long DMA2_IRQHandler /* 2: Timer0 / Timer1 */ - .long DMA3_IRQHandler /* 3: Timer2 / Timer3 */ - .long DMA_Error_IRQHandler /* 4: MCIa */ - .long 0 /* 5: MCIb */ - .long FTFL_IRQHandler /* 6: UART0 - DUT FPGA */ - .long Read_Collision_IRQHandler /* 7: UART1 - DUT FPGA */ - .long LVD_LVW_IRQHandler /* 8: UART2 - DUT FPGA */ - .long LLW_IRQHandler /* 9: UART4 - not connected */ - .long Watchdog_IRQHandler /* 10: AACI / AC97 */ - .long I2C0_IRQHandler /* 11: CLCD Combined Interrupt */ - .long SPI0_IRQHandler /* 12: Ethernet */ - .long I2S0_Tx_IRQHandler /* 13: USB Device */ - .long I2S0_Rx_IRQHandler /* 14: USB Host Controller */ - .long UART0_LON_IRQHandler /* 15: Character LCD */ - .long UART0_RX_TX_IRQHandler /* 16: Flexray */ - .long UART0_ERR_IRQHandler /* 17: CAN */ - .long UART1_RX_TX_IRQHandler /* 18: LIN */ - .long UART1_ERR_IRQHandler /* 19: I2C ADC/DAC */ - .long UART2_RX_TX_IRQHandler /* 20: Reserved */ - .long UART2_ERR_IRQHandler /* 21: Reserved */ - .long ADC0_IRQHandler /* 22: Reserved */ - .long CMP0_IRQHandler /* 23: Reserved */ - .long CMP1_IRQHandler /* 24: Reserved */ - .long FTM0_IRQHandler /* 25: Reserved */ - .long FTM1_IRQHandler /* 26: Reserved */ - .long CMT_IRQHandler /* 27: Reserved */ - .long RTC_IRQHandler /* 28: Reserved - CPU FPGA CLCD */ - .long RTC_Seconds_IRQHandler /* 29: Reserved - CPU FPGA */ - .long PIT0_IRQHandler /* 30: UART3 - CPU FPGA */ - .long PIT1_IRQHandler /* 31: SPI Touchscreen - CPU FPGA */ - .long PIT2_IRQHandler - .long PIT3_IRQHandler - .long PDB0_IRQHandler - .long USB0_IRQHandler - .long USBDCD_IRQHandler - .long TSI0_IRQHandler - .long MCG_IRQHandler - .long LPTimer_IRQHandler - .long PORTA_IRQHandler - .long PORTB_IRQHandler - .long PORTC_IRQHandler - .long PORTD_IRQHandler - .long PORTE_IRQHandler - .long SWI_IRQHandler - .size __isr_vector, . - __isr_vector - - .section .text.Reset_Handler - .thumb - .thumb_func - .align 2 - .globl Reset_Handler - .type Reset_Handler, %function -Reset_Handler: -/* Loop to copy data from read only memory to RAM. The ranges - * of copy from/to are specified by following symbols evaluated in - * linker script. - * __etext: End of code section, i.e., begin of data sections to copy from. - * __data_start__/__data_end__: RAM address range that data should be - * copied to. Both must be aligned to 4 bytes boundary. */ - ldr r0, =SystemInit - blx r0 - - ldr r1, =__etext - ldr r2, =__data_start__ - ldr r3, =__data_end__ - -.Lflash_to_ram_loop: - cmp r2, r3 - ittt lt - ldrlt r0, [r1], #4 - strlt r0, [r2], #4 - blt .Lflash_to_ram_loop - -.Lflash_to_ram_loop_end: - - ldr r0, =_start - bx r0 - .pool - .size Reset_Handler, . - Reset_Handler - - .text -/* Macro to define default handlers. Default handler - * will be weak symbol and just dead loops. They can be - * overwritten by other handlers */ - .macro def_default_handler handler_name - .align 1 - .thumb_func - .weak \handler_name - .type \handler_name, %function -\handler_name : - b . - .size \handler_name, . - \handler_name - .endm - - def_default_handler NMI_Handler - def_default_handler HardFault_Handler - def_default_handler MemManage_Handler - def_default_handler BusFault_Handler - def_default_handler UsageFault_Handler - def_default_handler SVC_Handler - def_default_handler DebugMon_Handler - def_default_handler PendSV_Handler - def_default_handler SysTick_Handler - def_default_handler Default_Handler - - .macro def_irq_default_handler handler_name - .weak \handler_name - .set \handler_name, Default_Handler - .endm - - def_irq_default_handler DMA0_IRQHandler - def_irq_default_handler DMA1_IRQHandler - def_irq_default_handler DMA2_IRQHandler - def_irq_default_handler DMA3_IRQHandler - def_irq_default_handler DMA_Error_IRQHandler - def_irq_default_handler FTFL_IRQHandler - def_irq_default_handler Read_Collision_IRQHandler - def_irq_default_handler LVD_LVW_IRQHandler - def_irq_default_handler LLW_IRQHandler - def_irq_default_handler Watchdog_IRQHandler - def_irq_default_handler I2C0_IRQHandler - def_irq_default_handler SPI0_IRQHandler - def_irq_default_handler I2S0_Tx_IRQHandler - def_irq_default_handler I2S0_Rx_IRQHandler - def_irq_default_handler UART0_LON_IRQHandler - def_irq_default_handler UART0_RX_TX_IRQHandler - def_irq_default_handler UART0_ERR_IRQHandler - def_irq_default_handler UART1_RX_TX_IRQHandler - def_irq_default_handler UART1_ERR_IRQHandler - def_irq_default_handler UART2_RX_TX_IRQHandler - def_irq_default_handler UART2_ERR_IRQHandler - def_irq_default_handler ADC0_IRQHandler - def_irq_default_handler CMP0_IRQHandler - def_irq_default_handler CMP1_IRQHandler - def_irq_default_handler FTM0_IRQHandler - def_irq_default_handler FTM1_IRQHandler - def_irq_default_handler CMT_IRQHandler - def_irq_default_handler RTC_IRQHandler - def_irq_default_handler RTC_Seconds_IRQHandler - def_irq_default_handler PIT0_IRQHandler - def_irq_default_handler PIT1_IRQHandler - def_irq_default_handler PIT2_IRQHandler - def_irq_default_handler PIT3_IRQHandler - def_irq_default_handler PDB0_IRQHandler - def_irq_default_handler USB0_IRQHandler - def_irq_default_handler USBDCD_IRQHandler - def_irq_default_handler TSI0_IRQHandler - def_irq_default_handler MCG_IRQHandler - def_irq_default_handler LPTimer_IRQHandler - def_irq_default_handler PORTA_IRQHandler - def_irq_default_handler PORTB_IRQHandler - def_irq_default_handler PORTC_IRQHandler - def_irq_default_handler PORTD_IRQHandler - def_irq_default_handler PORTE_IRQHandler - def_irq_default_handler SWI_IRQHandler - def_irq_default_handler DEF_IRQHandler - -/* Flash protection region, placed at 0x400 */ - .text - .thumb - .align 2 - .section .kinetis_flash_config_field,"a",%progbits -kinetis_flash_config: - .long 0xffffffff - .long 0xffffffff - .long 0xffffffff - .long 0xfffffffe - - .end diff --git a/keyboard/infinity/mbed-infinity/system_MK20D5.c b/keyboard/infinity/mbed-infinity/system_MK20D5.c deleted file mode 100644 index 4f4e2a2624..0000000000 --- a/keyboard/infinity/mbed-infinity/system_MK20D5.c +++ /dev/null @@ -1,299 +0,0 @@ -/* -** ################################################################### -** Compilers: ARM Compiler -** Freescale C/C++ for Embedded ARM -** GNU C Compiler -** IAR ANSI C/C++ Compiler for ARM -** -** Reference manuals: K20P64M50SF0RM Rev. 1, Oct 2011 -** K20P32M50SF0RM Rev. 1, Oct 2011 -** K20P48M50SF0RM Rev. 1, Oct 2011 -** -** Version: rev. 1.0, 2011-12-15 -** -** Abstract: -** Provides a system configuration function and a global variable that -** contains the system frequency. It configures the device and initializes -** the oscillator (PLL) that is part of the microcontroller device. -** -** Copyright: 2011 Freescale Semiconductor, Inc. All Rights Reserved. -** -** http: www.freescale.com -** mail: support@freescale.com -** -** Revisions: -** - rev. 1.0 (2011-12-15) -** Initial version -** -** ################################################################### -*/ - -/** - * @file MK20D5 - * @version 1.0 - * @date 2011-12-15 - * @brief Device specific configuration file for MK20D5 (implementation file) - * - * Provides a system configuration function and a global variable that contains - * the system frequency. It configures the device and initializes the oscillator - * (PLL) that is part of the microcontroller device. - */ - -#include <stdint.h> -#include "MK20D5.h" - -#define DISABLE_WDOG 1 - -#define CLOCK_SETUP 3 -/* Predefined clock setups - 0 ... Multipurpose Clock Generator (MCG) in FLL Engaged Internal (FEI) mode - Reference clock source for MCG module is the slow internal clock source 32.768kHz - Core clock = 41.94MHz, BusClock = 41.94MHz - 1 ... Multipurpose Clock Generator (MCG) in PLL Engaged External (PEE) mode - Reference clock source for MCG module is an external crystal 8MHz - Core clock = 48MHz, BusClock = 48MHz - 2 ... Multipurpose Clock Generator (MCG) in Bypassed Low Power External (BLPE) mode - Core clock/Bus clock derived directly from an external crystal 8MHz with no multiplication - Core clock = 8MHz, BusClock = 8MHz -*/ - -/*---------------------------------------------------------------------------- - Define clock source values - *----------------------------------------------------------------------------*/ -#if (CLOCK_SETUP == 0) - #define CPU_XTAL_CLK_HZ 8000000u /* Value of the external crystal or oscillator clock frequency in Hz */ - #define CPU_XTAL32k_CLK_HZ 32768u /* Value of the external 32k crystal or oscillator clock frequency in Hz */ - #define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */ - #define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */ - #define DEFAULT_SYSTEM_CLOCK 41943040u /* Default System clock value */ -#elif (CLOCK_SETUP == 1) - #define CPU_XTAL_CLK_HZ 8000000u /* Value of the external crystal or oscillator clock frequency in Hz */ - #define CPU_XTAL32k_CLK_HZ 32768u /* Value of the external 32k crystal or oscillator clock frequency in Hz */ - #define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */ - #define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */ - #define DEFAULT_SYSTEM_CLOCK 48000000u /* Default System clock value */ -#elif (CLOCK_SETUP == 2) - #define CPU_XTAL_CLK_HZ 8000000u /* Value of the external crystal or oscillator clock frequency in Hz */ - #define CPU_XTAL32k_CLK_HZ 32768u /* Value of the external 32k crystal or oscillator clock frequency in Hz */ - #define CPU_INT_SLOW_CLK_HZ 32768u /* Value of the slow internal oscillator clock frequency in Hz */ - #define CPU_INT_FAST_CLK_HZ 4000000u /* Value of the fast internal oscillator clock frequency in Hz */ - #define DEFAULT_SYSTEM_CLOCK 8000000u /* Default System clock value */ -#elif (CLOCK_SETUP == 3) - /* for Infinity */ - #define CPU_XTAL_CLK_HZ 8000000u - #define CPU_XTAL32k_CLK_HZ 32768u - #define CPU_INT_SLOW_CLK_HZ 32768u - #define CPU_INT_FAST_CLK_HZ 4000000u - #define DEFAULT_SYSTEM_CLOCK 48000000u -#endif - - -/* ---------------------------------------------------------------------------- - -- Core clock - ---------------------------------------------------------------------------- */ - -uint32_t SystemCoreClock = DEFAULT_SYSTEM_CLOCK; - -/* ---------------------------------------------------------------------------- - -- SystemInit() - ---------------------------------------------------------------------------- */ - -void SystemInit (void) { -#if (DISABLE_WDOG) - /* Disable the WDOG module */ - /* WDOG_UNLOCK: WDOGUNLOCK=0xC520 */ - WDOG->UNLOCK = (uint16_t)0xC520u; /* Key 1 */ - /* WDOG_UNLOCK : WDOGUNLOCK=0xD928 */ - WDOG->UNLOCK = (uint16_t)0xD928u; /* Key 2 */ - /* WDOG_STCTRLH: ??=0,DISTESTWDOG=0,BYTESEL=0,TESTSEL=0,TESTWDOG=0,??=0,STNDBYEN=1,WAITEN=1,STOPEN=1,DBGEN=0,ALLOWUPDATE=1,WINEN=0,IRQRSTEN=0,CLKSRC=1,WDOGEN=0 */ - WDOG->STCTRLH = (uint16_t)0x01D2u; -#endif /* (DISABLE_WDOG) */ -#if (CLOCK_SETUP == 0) - /* SIM->CLKDIV1: OUTDIV1=0,OUTDIV2=0,OUTDIV3=1,OUTDIV4=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */ - SIM->CLKDIV1 = (uint32_t)0x00110000u; /* Update system prescalers */ - /* Switch to FEI Mode */ - /* MCG->C1: CLKS=0,FRDIV=0,IREFS=1,IRCLKEN=1,IREFSTEN=0 */ - MCG->C1 = (uint8_t)0x06u; - /* MCG->C2: ??=0,??=0,RANGE0=0,HGO=0,EREFS=0,LP=0,IRCS=0 */ - MCG->C2 = (uint8_t)0x00u; - /* MCG_C4: DMX32=0,DRST_DRS=1 */ - MCG->C4 = (uint8_t)((MCG->C4 & (uint8_t)~(uint8_t)0xC0u) | (uint8_t)0x20u); - /* MCG->C5: ??=0,PLLCLKEN=0,PLLSTEN=0,PRDIV0=0 */ - MCG->C5 = (uint8_t)0x00u; - /* MCG->C6: LOLIE=0,PLLS=0,CME=0,VDIV0=0 */ - MCG->C6 = (uint8_t)0x00u; - while((MCG->S & MCG_S_IREFST_MASK) == 0u) { /* Check that the source of the FLL reference clock is the internal reference clock. */ - } - while((MCG->S & 0x0Cu) != 0x00u) { /* Wait until output of the FLL is selected */ - } -#elif (CLOCK_SETUP == 1) - /* SIM->CLKDIV1: OUTDIV1=0,OUTDIV2=0,OUTDIV3=1,OUTDIV4=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */ - SIM->CLKDIV1 = (uint32_t)0x00110000u; /* Update system prescalers */ - /* Switch to FBE Mode */ - /* OSC0->CR: ERCLKEN=0,??=0,EREFSTEN=0,??=0,SC2P=0,SC4P=0,SC8P=0,SC16P=0 */ - OSC0->CR = (uint8_t)0x00u; - /* MCG->C7: OSCSEL=0 */ - MCG->C7 = (uint8_t)0x00u; - /* MCG->C2: ??=0,??=0,RANGE0=2,HGO=0,EREFS=1,LP=0,IRCS=0 */ - MCG->C2 = (uint8_t)0x24u; - /* MCG->C1: CLKS=2,FRDIV=3,IREFS=0,IRCLKEN=1,IREFSTEN=0 */ - MCG->C1 = (uint8_t)0x9Au; - /* MCG->C4: DMX32=0,DRST_DRS=0 */ - MCG->C4 &= (uint8_t)~(uint8_t)0xE0u; - /* MCG->C5: ??=0,PLLCLKEN=0,PLLSTEN=0,PRDIV0=3 */ - MCG->C5 = (uint8_t)0x03u; - /* MCG->C6: LOLIE=0,PLLS=0,CME=0,VDIV0=0 */ - MCG->C6 = (uint8_t)0x00u; - while((MCG->S & MCG_S_OSCINIT0_MASK) == 0u) { /* Check that the oscillator is running */ - } -#if 0 /* ARM: THIS CHECK IS REMOVED DUE TO BUG WITH SLOW IRC IN REV. 1.0 */ - while((MCG->S & MCG_S_IREFST_MASK) != 0u) { /* Check that the source of the FLL reference clock is the external reference clock. */ - } -#endif - while((MCG->S & 0x0Cu) != 0x08u) { /* Wait until external reference clock is selected as MCG output */ - } - /* Switch to PBE Mode */ - /* MCG_C5: ??=0,PLLCLKEN=0,PLLSTEN=0,PRDIV0=3 */ - MCG->C5 = (uint8_t)0x03u; - /* MCG->C6: LOLIE=0,PLLS=1,CME=0,VDIV0=0 */ - MCG->C6 = (uint8_t)0x40u; - while((MCG->S & MCG_S_PLLST_MASK) == 0u) { /* Wait until the source of the PLLS clock has switched to the PLL */ - } - while((MCG->S & MCG_S_LOCK0_MASK) == 0u) { /* Wait until locked */ - } - /* Switch to PEE Mode */ - /* MCG->C1: CLKS=0,FRDIV=3,IREFS=0,IRCLKEN=1,IREFSTEN=0 */ - MCG->C1 = (uint8_t)0x1Au; - while((MCG->S & 0x0Cu) != 0x0Cu) { /* Wait until output of the PLL is selected */ - } - while((MCG->S & MCG_S_LOCK0_MASK) == 0u) { /* Wait until locked */ - } -#elif (CLOCK_SETUP == 2) - /* SIM_CLKDIV1: OUTDIV1=0,OUTDIV2=0,OUTDIV3=1,OUTDIV4=1,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0,??=0 */ - SIM->CLKDIV1 = (uint32_t)0x00110000u; /* Update system prescalers */ - /* Switch to FBE Mode */ - /* OSC0->CR: ERCLKEN=0,??=0,EREFSTEN=0,??=0,SC2P=0,SC4P=0,SC8P=0,SC16P=0 */ - OSC0->CR = (uint8_t)0x00u; - /* MCG->C7: OSCSEL=0 */ - MCG->C7 = (uint8_t)0x00u; - /* MCG->C2: ??=0,??=0,RANGE0=2,HGO=0,EREFS=1,LP=0,IRCS=0 */ - MCG->C2 = (uint8_t)0x24u; - /* MCG->C1: CLKS=2,FRDIV=3,IREFS=0,IRCLKEN=1,IREFSTEN=0 */ - MCG->C1 = (uint8_t)0x9Au; - /* MCG->C4: DMX32=0,DRST_DRS=0 */ - MCG->C4 &= (uint8_t)~(uint8_t)0xE0u; - /* MCG->C5: ??=0,PLLCLKEN=0,PLLSTEN=0,PRDIV0=0 */ - MCG->C5 = (uint8_t)0x00u; - /* MCG->C6: LOLIE=0,PLLS=0,CME=0,VDIV0=0 */ - MCG->C6 = (uint8_t)0x00u; - while((MCG->S & MCG_S_OSCINIT0_MASK) == 0u) { /* Check that the oscillator is running */ - } -#if 0 /* ARM: THIS CHECK IS REMOVED DUE TO BUG WITH SLOW IRC IN REV. 1.0 */ - while((MCG->S & MCG_S_IREFST_MASK) != 0u) { /* Check that the source of the FLL reference clock is the external reference clock. */ - } -#endif - while((MCG->S & 0x0CU) != 0x08u) { /* Wait until external reference clock is selected as MCG output */ - } - /* Switch to BLPE Mode */ - /* MCG->C2: ??=0,??=0,RANGE0=2,HGO=0,EREFS=1,LP=0,IRCS=0 */ - MCG->C2 = (uint8_t)0x24u; - -#elif (CLOCK_SETUP == 3) - /* for Infinity FEI: 48MHz */ - - /* OUTDIV1(core/system): 48/1, OUTDIV2(bus): 48/1, OUTDIV4(flash): 48/2 */ - SIM->CLKDIV1 = SIM_CLKDIV1_OUTDIV1(0) | SIM_CLKDIV1_OUTDIV2(0) | SIM_CLKDIV1_OUTDIV4(1); - MCG->C1 = MCG_C1_IREFS_MASK | MCG_C1_IRCLKEN_MASK; - /* 32.768KHz x FLL(1464) = 48MHz */ - MCG->C4 = MCG_C4_DMX32_MASK | MCG_C4_DRST_DRS(1); - /* USB clock source: MCGPLLCLK/MCGFLLCLK */ - //SIM->SOPT2 = SIM_SOPT2_USBSRC_MASK | SIM_SOPT2_TRACECLKSEL_MASK; - - while((MCG->S & MCG_S_IREFST_MASK) == 0u) { } - while((MCG->S & 0x0Cu) != 0x00u) { } -#endif -} - -/* ---------------------------------------------------------------------------- - -- SystemCoreClockUpdate() - ---------------------------------------------------------------------------- */ - -void SystemCoreClockUpdate (void) { - uint32_t MCGOUTClock; /* Variable to store output clock frequency of the MCG module */ - uint8_t Divider; - - if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x0u) { - /* Output of FLL or PLL is selected */ - if ((MCG->C6 & MCG_C6_PLLS_MASK) == 0x0u) { - /* FLL is selected */ - if ((MCG->C1 & MCG_C1_IREFS_MASK) == 0x0u) { - /* External reference clock is selected */ - if ((MCG->C7 & MCG_C7_OSCSEL_MASK) == 0x0u) { - MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */ - } else { /* (!((MCG->C7 & MCG_C7_OSCSEL_MASK) == 0x0u)) */ - MCGOUTClock = CPU_XTAL32k_CLK_HZ; /* RTC 32 kHz oscillator drives MCG clock */ - } /* (!((MCG->C7 & MCG_C7_OSCSEL_MASK) == 0x0u)) */ - Divider = (uint8_t)(1u << ((MCG->C1 & MCG_C1_FRDIV_MASK) >> MCG_C1_FRDIV_SHIFT)); - MCGOUTClock = (MCGOUTClock / Divider); /* Calculate the divided FLL reference clock */ - if ((MCG->C2 & MCG_C2_RANGE0_MASK) != 0x0u) { - MCGOUTClock /= 32u; /* If high range is enabled, additional 32 divider is active */ - } /* ((MCG->C2 & MCG_C2_RANGE0_MASK) != 0x0u) */ - } else { /* (!((MCG->C1 & MCG_C1_IREFS_MASK) == 0x0u)) */ - MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* The slow internal reference clock is selected */ - } /* (!((MCG->C1 & MCG_C1_IREFS_MASK) == 0x0u)) */ - /* Select correct multiplier to calculate the MCG output clock */ - switch (MCG->C4 & (MCG_C4_DMX32_MASK | MCG_C4_DRST_DRS_MASK)) { - case 0x0u: - MCGOUTClock *= 640u; - break; - case 0x20u: - MCGOUTClock *= 1280u; - break; - case 0x40u: - MCGOUTClock *= 1920u; - break; - case 0x60u: - MCGOUTClock *= 2560u; - break; - case 0x80u: - MCGOUTClock *= 732u; - break; - case 0xA0u: - MCGOUTClock *= 1464u; - break; - case 0xC0u: - MCGOUTClock *= 2197u; - break; - case 0xE0u: - MCGOUTClock *= 2929u; - break; - default: - break; - } - } else { /* (!((MCG->C6 & MCG_C6_PLLS_MASK) == 0x0u)) */ - /* PLL is selected */ - Divider = (1u + (MCG->C5 & MCG_C5_PRDIV0_MASK)); - MCGOUTClock = (uint32_t)(CPU_XTAL_CLK_HZ / Divider); /* Calculate the PLL reference clock */ - Divider = ((MCG->C6 & MCG_C6_VDIV0_MASK) + 24u); - MCGOUTClock *= Divider; /* Calculate the MCG output clock */ - } /* (!((MCG->C6 & MCG_C6_PLLS_MASK) == 0x0u)) */ - } else if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x40u) { - /* Internal reference clock is selected */ - if ((MCG->C2 & MCG_C2_IRCS_MASK) == 0x0u) { - MCGOUTClock = CPU_INT_SLOW_CLK_HZ; /* Slow internal reference clock selected */ - } else { /* (!((MCG->C2 & MCG_C2_IRCS_MASK) == 0x0u)) */ - MCGOUTClock = CPU_INT_FAST_CLK_HZ / (1 << ((MCG->SC & MCG_SC_FCRDIV_MASK) >> MCG_SC_FCRDIV_SHIFT)); /* Fast internal reference clock selected */ - } /* (!((MCG->C2 & MCG_C2_IRCS_MASK) == 0x0u)) */ - } else if ((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80u) { - /* External reference clock is selected */ - if ((MCG->C7 & MCG_C7_OSCSEL_MASK) == 0x0u) { - MCGOUTClock = CPU_XTAL_CLK_HZ; /* System oscillator drives MCG clock */ - } else { /* (!((MCG->C7 & MCG_C7_OSCSEL_MASK) == 0x0u)) */ - MCGOUTClock = CPU_XTAL32k_CLK_HZ; /* RTC 32 kHz oscillator drives MCG clock */ - } /* (!((MCG->C7 & MCG_C7_OSCSEL_MASK) == 0x0u)) */ - } else { /* (!((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80u)) */ - /* Reserved value */ - return; - } /* (!((MCG->C1 & MCG_C1_CLKS_MASK) == 0x80u)) */ - SystemCoreClock = (MCGOUTClock / (1u + ((SIM->CLKDIV1 & SIM_CLKDIV1_OUTDIV1_MASK) >> SIM_CLKDIV1_OUTDIV1_SHIFT))); -} diff --git a/keyboard/infinity/tool/README b/keyboard/infinity/tool/README deleted file mode 100644 index 698314e250..0000000000 --- a/keyboard/infinity/tool/README +++ /dev/null @@ -1,103 +0,0 @@ -OpenOCD config files for Kinetis -================================ -http://nemuisan.blog.bai.ne.jp/?eid=192848#OPENOCD - -These are needed for debug and programing bootloader with SWD. To flash keyboard firmware use 'dfu-util'. - -Flash security of Freescale kinetis ------------------------------------ -If FSEC of flash config is changed accidentally SWD/JTAG you can't get debug access until doing 'mdm mass_erase' with JTAG, CMSIS-DAP or OpenSAD adapter. HLA(high level adapter) like stlink doesn't work for this. - - -Example -------- -Debug: - $ openocd -s tool -f tool/openocd.cfg - $ arm-none-eabi-gdb build/infinity.elf -ex "target remote localhost:3333" - -Flash bootloader: - $ openocd -s tool -f tool/openocd.cfg -c "mt_flash kiibohd_bootloader.bin" - - -Infinity SWD pinout -------------------- -SWD pins are placed next to reset button; SWD_CLK, SWD_DIO, GND, 5V from top. -Note that RESET is also needed to get full control with OpenOCD. - - -------- - | ___ o |CLK - ||RST| o |DIO - ||BTN| o |GND - | --- o |5V - -------- - - -Kinetis sercure state ----------------------- -openocd 0.9.0 - -Warn : *********** ATTENTION! ATTENTION! ATTENTION! ATTENTION! ********** -Warn : **** **** -Warn : **** Your Kinetis MCU is in secured state, which means that, **** -Warn : **** with exception for very basic communication, JTAG/SWD **** -Warn : **** interface will NOT work. In order to restore its **** -Warn : **** functionality please issue 'kinetis mdm mass_erase' **** -Warn : **** command, power cycle the MCU and restart OpenOCD. **** -Warn : **** **** -Warn : *********** ATTENTION! ATTENTION! ATTENTION! ATTENTION! ********** - - -Info : MDM: Chip is unsecured. Continuing. -target state: halted -target halted due to debug-request, current mode: Thread -xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc -auto erase enabled -Info : Probing flash info for bank 0 -Warn : flash configuration field erased, please reset the device -wrote 4096 bytes from file kiibohd_bootloader.bin in 2.442562s (1.638 KiB/s) -Info : MDM: Chip is unsecured. Continuing. - - - - -Open On-Chip Debugger 0.9.0-dev-00346-g3e1dfdc-dirty (2015-03-21-20:41) -Licensed under GNU GPL v2 -For bug reports, read - http://openocd.sourceforge.net/doc/doxygen/bugs.html -Info : only one transport option; autoselect 'cmsis-dap' -Kinetis MUST need Hardware SRST Control to Recover Secure-State! -adapter_nsrst_delay: 200 -srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst -Info : add flash_bank kinetis k20.pflash -cortex_m reset_config sysresetreq -adapter speed: 1000 kHz -srst_only separate srst_nogate srst_open_drain connect_assert_srst -Info : CMSIS-DAP: SWD Supported -Info : CMSIS-DAP: Interface Initialised (SWD) -Info : CMSIS-DAP: FW Version = 1.0 -Info : SWCLK/TCK = 0 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1 -Info : Connecting under reset -Info : DAP_SWJ Sequence (reset: 50+ '1' followed by 0) -Info : CMSIS-DAP: Interface ready -Info : clock speed 1000 kHz -Info : IDCODE 0x2ba01477 -Warn : Adapter returned success despite SSTICKYERR being set. -Warn : Adapter returned success despite SSTICKYERR being set. -Warn : Adapter returned success despite SSTICKYERR being set. -Warn : Adapter returned success despite SSTICKYERR being set. -Info : k20.cpu: hardware has 6 breakpoints, 4 watchpoints -Info : MDM: Chip is unsecured. Continuing. -Info : MDM: Chip is unsecured. Continuing. -target state: halted -target halted due to debug-request, current mode: Thread -xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc -auto erase enabled -Info : Probing flash info for bank 0 -Warn : flash configuration field erased, please reset the device -wrote 4096 bytes from file kiibohd_bootloader.bin in 2.446902s (1.635 KiB/s) -Info : MDM: Chip is unsecured. Continuing. -Info : Halt timed out, wake up GDB. -Error: timed out while waiting for target halted -Runtime Error: tool/k20dx32_flash.cfg:81: -in procedure 'mt_flash' -in procedure 'halt' called at file "tool/k20dx32_flash.cfg", line 81 diff --git a/keyboard/infinity/tool/k20dx32_flash.cfg b/keyboard/infinity/tool/k20dx32_flash.cfg deleted file mode 100644 index 1e3deb0910..0000000000 --- a/keyboard/infinity/tool/k20dx32_flash.cfg +++ /dev/null @@ -1,139 +0,0 @@ -# FreeScale Kinetis K20 devices with 32kB Flash and 8kB Local On-Chip SRAM, -# Nemuisan's Special for MK20DN32VFT5,MK20DX32VFT5,MK10DN32VFT5,MK10DX32VFT5 - - -# 0.8.0 has no these procs -proc using_jtag {} { - set _TRANSPORT [ transport select ] - expr { [ string first "jtag" $_TRANSPORT ] != -1 } -} - -proc using_swd {} { - set _TRANSPORT [ transport select ] - expr { [ string first "swd" $_TRANSPORT ] != -1 } -} - -proc using_hla {} { - set _TRANSPORT [ transport select ] - expr { [ string first "hla" $_TRANSPORT ] != -1 } -} - -source [find target/swj-dp.tcl] - -if { [info exists CHIPNAME] } { - set _CHIPNAME $CHIPNAME -} else { - set _CHIPNAME k20 -} - -if { [info exists ENDIAN] } { - set _ENDIAN $ENDIAN -} else { - set _ENDIAN little -} - -if { [info exists CPUTAPID] } { - set _CPUTAPID $CPUTAPID -} else { - if { [using_jtag] } { - set _CPUTAPID 0x4BA00477 - } { - # this is the SW-DP tap id not the jtag tap id - set _CPUTAPID 0x2BA01477 - } -} - -# Work-area is a space in RAM used for flash programming -# By default use 8kB -if { [info exists WORKAREASIZE] == 0 } { - set _WORKAREASIZE 0x2000 -} - -# Select "srst_only", Nemuisan said so! -echo "Kinetis MUST need Hardware SRST Control to Recover Secure-State!" -adapter_nsrst_delay 200 -reset_config srst_only - -swj_newdap $_CHIPNAME cpu -irlen 4 -expected-id $_CPUTAPID -set _TARGETNAME $_CHIPNAME.cpu -target create $_TARGETNAME cortex_m -chain-position $_TARGETNAME - -# It is important that "kinetis mdm check_security" is called for -# 'examine-end' event and not 'eximine-start'. Calling it in 'examine-start' -# causes "kinetis mdm check_security" to fail the first time openocd -# calls it when it tries to connect after the CPU has been power-cycled. -$_CHIPNAME.cpu configure -event examine-end { - kinetis mdm check_security -# Uncomment when gone into s*ck'n secured state! -# kinetis mdm mass_erase -} - -# K20 has minimun 8kB of SRAM and starts at 1FFFF000. -$_TARGETNAME configure -work-area-phys 0x1FFFF000 -work-area-size $_WORKAREASIZE -work-area-backup 0 -rtos auto - -# MK20DN32VFT5,MK20DX32VFT5,MK10DN32VFT5,MK10DX32VFT5 has 32kB of flash memory. -flash bank $_CHIPNAME.pflash kinetis 0x00000000 0x8000 0 4 $_TARGETNAME - - -proc mt_flash {IMGFILE} { - flash write_image erase $IMGFILE - reset run - halt - verify_image $IMGFILE - reset run - shutdown -} - -proc mt_flash_bin {IMGFILE OFFSET} { - flash write_image erase $IMGFILE $OFFSET bin - reset run - halt - verify_image $IMGFILE $OFFSET bin - reset run - shutdown -} - -proc mt_flash_hex {IMGFILE} { - flash write_image erase $IMGFILE 0 ihex - reset run - halt - verify_image $IMGFILE 0 ihex - reset run - shutdown -} - -proc mt_flash_srec {IMGFILE} { - flash write_image erase $IMGFILE 0 s19 - reset run - halt - verify_image $IMGFILE 0 s19 - reset run - shutdown -} - -proc mass_erase {} { - kinetis mdm mass_erase -} - -proc eraser {} { -# Verbose procedure confirmed erase routine - flash info 0 -# CAUTION! "flash erase_sector 0 0 last" goes into secure state!!! -# USE "mass_erase" command instead of -# flash erase_sector 0 0 last - mass_erase - shutdown -} - -#debug_level 3 -# HLA doesn't have cortex_m commands -if {![using_hla]} { - # if srst is not fitted use SYSRESETREQ to - # perform a soft reset - cortex_m reset_config sysresetreq -} -adapter_khz 1000 -reset_config srst_only srst_nogate connect_assert_srst -gdb_target_description disable -init -reset init diff --git a/keyboard/infinity/tool/openocd.cfg b/keyboard/infinity/tool/openocd.cfg deleted file mode 100644 index 2b0a63b933..0000000000 --- a/keyboard/infinity/tool/openocd.cfg +++ /dev/null @@ -1,13 +0,0 @@ -# mchack openocd -# https://github.com/mchck/mchck/wiki/Openocd -# -# adapter: frdm-kl05z with cmsis-dap firmware -# inteface: cmsis-dap -# transport: hla_swd -# target: MK20DX128VLF5 Freescale Kinetis - -# adapter/interface -source [find interface/cmsis-dap.cfg] - -# CPU -source [find k20dx32_flash.cfg] diff --git a/keyboard/kitten_paw/Makefile.lufa b/keyboard/kitten_paw/Makefile.lufa deleted file mode 100644 index a45a3edb96..0000000000 --- a/keyboard/kitten_paw/Makefile.lufa +++ /dev/null @@ -1,117 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = kittenpaw_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# List C source files here. (C dependencies are automatically generated.) -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - -# MCU name -MCU = atmega32u2 - -# 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) - - -# Build Options -# comment out to disable the options. -# -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -#CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/kitten_paw/README.md b/keyboard/kitten_paw/README.md deleted file mode 100644 index 1cc8c1016e..0000000000 --- a/keyboard/kitten_paw/README.md +++ /dev/null @@ -1,20 +0,0 @@ -Kitten Paw controller firmware -====================== -Custom controller for the Costar Majestouch keyboard designed by bpiphany. - -*Note that this is not the official firmware* - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.lufa - -At the moment only the LUFA stack is supported. - - -Bootloader ---------- -To enter bootloader by hardware use a magnet above the controller before connecting the usb cable. - -It is still possible to use Boot Magic and Command (LSFT+RSFT+PAUS) to access the bootloader though. diff --git a/keyboard/kitten_paw/config.h b/keyboard/kitten_paw/config.h deleted file mode 100644 index a29ca313e9..0000000000 --- a/keyboard/kitten_paw/config.h +++ /dev/null @@ -1,43 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 -#define MANUFACTURER Costar -#define PRODUCT Majestouch - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for Majestouch - -/* matrix size */ -#define MATRIX_ROWS 8 -#define MATRIX_COLS 18 - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/kitten_paw/keymap.c b/keyboard/kitten_paw/keymap.c deleted file mode 100644 index e9ad9efe1a..0000000000 --- a/keyboard/kitten_paw/keymap.c +++ /dev/null @@ -1,102 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keymap.h" - -/* - Matrix col/row mapping - - ,----. ,-------------------. ,-------------------. ,-------------------. ,--------------. - |06/6| |07/4|08/4|08/2|08/6| |15/5|11/6|12/2|12/4| |14/4|14/5|14/6|14/0| |13/5|13/7|15/7| - `----' `-------------------' `-------------------' `-------------------' `--------------' - ,-------------------------------------------------------------------------. ,--------------. ,-------------------. - |06/4|06/5|07/5|08/5|09/5|09/4|10/4|10/5|11/5|12/5|05/5|05/4|11/4| 14/2| |17/4|02/4|04/4| |16/1|17/1|04/1|04/0| - |-------------------------------------------------------------------------| |--------------| |-------------------| - |06/2 |06/7|07/7|08/7|09/7|09/2|10/2|10/7|11/7|12/7|05/7|05/2|11/2| 14/3| |16/4|02/5|04/5| |16/7|17/7|04/7| | - |-------------------------------------------------------------------------| '--------------' |-------------- 02/7| - |02/7 |06/3|07/3|08/3|09/3|09/6|10/6|10/3|11/3|12/3|05/3|05/6| 14/1| |16/2|17/2|04/2| | - |-------------------------------------------------------------------------| ,----. |-------------------| - |01/2 |06/1|07/1|08/1|09/1|09/0|10/0|10/1|11/1|12/1|05/0| 01/3| |02/6| |16/3|17/3|04/3| | - |-------------------------------------------------------------------------| ,--------------. |-------------- 02/3| - |15/4|03/2|13/6| 16/6 |13/0|0/3|12/0|15/1| |02/0|16/0|17/0| | 17/6 |04/6| | - `-------------------------------------------------------------------------' `--------------' `-------------------' -*/ - -#define KEYMAP( \ - KG6, KH4, KI4, KI2, KI6, KP5, KL6, KM2, KM4, KO4, KO5, KO6, KO0, KN5, KN7, KP7, \ - KG4, KG5, KH5, KI5, KJ5, KJ4, KK4, KK5, KL5, KM5, KF5, KF4, KL4, KO2, KR4, KC4, KE4, KQ1, KR1, KE1, KE0, \ - KG2, KG7, KH7, KI7, KJ7, KJ2, KK2, KK7, KL7, KM7, KF7, KF2, KL2, KO3, KQ4, KC5, KE5, KQ7, KR7, KE7, KC7, \ - KH2, KG3, KH3, KI3, KJ3, KJ6, KK6, KK3, KL3, KM3, KF3, KF6, KO1, KQ2, KR2, KE2, \ - KB2, KH6, KG1, KH1, KI1, KJ1, KJ0, KK0, KK1, KL1, KM1, KF0, KB3, KC6, KQ3, KR3, KE3, KC3, \ - KP4, KD2, KN6, KQ6, KN0, KA3, KM0, KP1, KC0, KQ0, KR0, KR6, KE6 \ -) { \ -/* 0 1 2 3 4 5 6 7 */ \ -/* A 0 */ {KC_NO, KC_NO, KC_NO, KC_##KA3, KC_NO, KC_NO, KC_NO, KC_NO },\ -/* B 1 */ {KC_NO, KC_NO, KC_##KB2, KC_##KB3, KC_NO, KC_NO, KC_NO, KC_NO },\ -/* C 2 */ {KC_##KC0, KC_NO, KC_NO, KC_##KC3, KC_##KC4, KC_##KC5, KC_##KC6, KC_##KC7},\ -/* D 3 */ {KC_NO, KC_NO, KC_##KD2, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO },\ -/* E 4 */ {KC_##KE0, KC_##KE1, KC_##KE2, KC_##KE3, KC_##KE4, KC_##KE5, KC_##KE6, KC_##KE7},\ -/* F 5 */ {KC_##KF0, KC_NO, KC_##KF2, KC_##KF3, KC_##KF4, KC_##KF5, KC_##KF6, KC_##KF7},\ -/* G 6 */ {KC_NO, KC_##KG1, KC_##KG2, KC_##KG3, KC_##KG4, KC_##KG5, KC_##KG6, KC_##KG7},\ -/* H 7 */ {KC_NO, KC_##KH1, KC_##KH2, KC_##KH3, KC_##KH4, KC_##KH5, KC_##KH6, KC_##KH7},\ -/* I 8 */ {KC_NO, KC_##KI1, KC_##KI2, KC_##KI3, KC_##KI4, KC_##KI5, KC_##KI6, KC_##KI7},\ -/* J 9 */ {KC_##KJ0, KC_##KJ1, KC_##KJ2, KC_##KJ3, KC_##KJ4, KC_##KJ5, KC_##KJ6, KC_##KJ7},\ -/* K 10 */ {KC_##KK0, KC_##KK1, KC_##KK2, KC_##KK3, KC_##KK4, KC_##KK5, KC_##KK6, KC_##KK7},\ -/* L 11 */ {KC_NO, KC_##KL1, KC_##KL2, KC_##KL3, KC_##KL4, KC_##KL5, KC_##KL6, KC_##KL7},\ -/* M 12 */ {KC_##KM0, KC_##KM1, KC_##KM2, KC_##KM3, KC_##KM4, KC_##KM5, KC_NO, KC_##KM7},\ -/* N 13 */ {KC_##KN0, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KN5, KC_##KN6, KC_##KN7},\ -/* O 14 */ {KC_##KO0, KC_##KO1, KC_##KO2, KC_##KO3, KC_##KO4, KC_##KO5, KC_##KO6, KC_NO },\ -/* P 15 */ {KC_NO, KC_##KP1, KC_NO, KC_NO, KC_##KP4, KC_##KP5, KC_NO, KC_##KP7},\ -/* Q 16 */ {KC_##KQ0, KC_##KQ1, KC_##KQ2, KC_##KQ3, KC_##KQ4, KC_NO, KC_##KQ6, KC_##KQ7},\ -/* R 17 */ {KC_##KR0, KC_##KR1, KC_##KR2, KC_##KR3, KC_##KR4, KC_NO, KC_##KR6, KC_##KR7} \ -} - -#include "keymap_ansi.h" - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.col)][(key.row)]); - } else { - return pgm_read_byte(&keymaps[0][(key.col)][(key.row)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/kitten_paw/keymap_ansi.h b/keyboard/kitten_paw/keymap_ansi.h deleted file mode 100644 index ed1088baa9..0000000000 --- a/keyboard/kitten_paw/keymap_ansi.h +++ /dev/null @@ -1,23 +0,0 @@ - -static const uint8_t PROGMEM keymaps[][MATRIX_COLS][MATRIX_ROWS] = { - /* Layer 0: Standard ANSI layer */ - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL,BSPC, INS, HOME,PGUP, NLCK,PSLS,PAST,PMNS, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, P7, P8, P9, PPLS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, P4, P5, P6, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, P1, P2, P3, PENT, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI, FN0,RCTL, LEFT,DOWN,RGHT, P0, PDOT), \ - /* Layer 1: Function layer */ - KEYMAP(\ - CALC,MYCM,WSCH,WHOM,MAIL,VOLD,VOLU,MSEL,MSTP,MPLY,MPRV,MNXT,TRNS, WAKE, PWR,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS) -}; - -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) -}; diff --git a/keyboard/kitten_paw/led.c b/keyboard/kitten_paw/led.c deleted file mode 100644 index da5dbd7ae2..0000000000 --- a/keyboard/kitten_paw/led.c +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - -/* LED pin configuration - * - * Scroll Lock PB7 - * CAPS PC6 - * NUMLOCK PC5 - * - */ -void led_set(uint8_t usb_led) -{ - DDRB |= (1<<7); - DDRC |= (1<<5) | (1<<6); - - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - { - PORTC &= ~(1<<6); - } - else - { - PORTC |= (1<<6); - } - - if (usb_led & (1<<USB_LED_NUM_LOCK)) - { - PORTC &= ~(1<<5); - } - else - { - PORTC |= (1<<5); - } - - if (usb_led & (1<<USB_LED_SCROLL_LOCK)) - { - PORTB &= ~(1<<7); - } - else - { - PORTB |= (1<<7); - } -} diff --git a/keyboard/kitten_paw/matrix.c b/keyboard/kitten_paw/matrix.c deleted file mode 100644 index 08d64c5f4c..0000000000 --- a/keyboard/kitten_paw/matrix.c +++ /dev/null @@ -1,239 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint8_t read_rows(void); -static void init_rows(void); -static void unselect_cols(void); -static void select_col(uint8_t col); - -inline uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - unselect_cols(); - init_rows(); - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - select_col(col); - _delay_us(3); - uint8_t rows = read_rows(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - debouncing = DEBOUNCE; - } - } - unselect_cols(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop32(matrix[i]); - } - return count; -} - -/* Row pin configuration - * - * row: 0 1 2 3 4 5 6 7 - * pin: PC2 PB1 PB2 PB3 PC7 PB4 PB5 PB6 - * - */ -static void init_rows(void) -{ - DDRC &= ~0b10000100; - DDRB &= ~0b01111110; - PORTC |= 0b10000100; - PORTB |= 0b01111110; -} - -static uint8_t read_rows(void) -{ - return (PINC&(1<<2) ? 0 : (1<<0)) | - (PINB&(1<<1) ? 0 : (1<<1)) | - (PINB&(1<<2) ? 0 : (1<<2)) | - (PINB&(1<<3) ? 0 : (1<<3)) | - (PINC&(1<<7) ? 0 : (1<<4)) | - (PINB&(1<<4) ? 0 : (1<<5)) | - (PINB&(1<<5) ? 0 : (1<<6)) | - (PINB&(1<<6) ? 0 : (1<<7)); -} - -/* These columns uses two 74HC42 4 to 10 bit demultiplexers (low active). - * - * COL PD1 PD0 PD2 PD6 PD5 PD4 - * 12 1 1 0 0 0 0 - * 11 1 1 0 0 0 1 - * 10 1 1 0 0 1 0 - * 9 1 1 0 0 1 1 - * 8 1 1 0 1 0 0 - * 7 1 1 0 1 0 1 - * 6 1 1 0 1 1 0 - * 5 1 1 0 1 1 1 - * 4 1 1 1 0 0 0 - * 3 1 1 1 0 0 1 - - * COL PD2 PD6 PD1 PD0 PD5 PD4 - * 2 1 1 0 0 0 0 - * 1 1 1 0 0 0 1 - * 0 1 1 0 0 1 0 - * 17 1 1 0 0 1 1 - * 16 1 1 0 1 0 0 - * 1 1 0 1 0 1 - * 1 1 0 1 1 0 - * 15 1 1 0 1 1 1 - * 14 1 1 1 0 0 0 - * 13 1 1 1 0 0 1 - */ -static void unselect_cols(void) -{ - DDRD |= 0b01110111; - PORTD &= ~0b01110111; -} - -static void select_col(uint8_t col) -{ - switch (col) { - case 0: - PORTD |= (1<<5) | (1<<6) | (1<<2); - break; - case 1: - PORTD |= (1<<4) | (1<<6) | (1<<2); - break; - case 2: - PORTD |= (1<<6) | (1<<2); - break; - case 3: - PORTD |= (1<<4) | (1<<2) | (1<<0) | (1<<1); - break; - case 4: - PORTD |= (1<<2) | (1<<0) | (1<<1); - break; - case 5: - PORTD |= (1<<4) | (1<<5) | (1<<6) | (1<<0) | (1<<1); - break; - case 6: - PORTD |= (1<<5) | (1<<6) | (1<<0) | (1<<1); - break; - case 7: - PORTD |= (1<<4) | (1<<6) | (1<<0) | (1<<1); - break; - case 8: - PORTD |= (1<<6) | (1<<0) | (1<<1); - break; - case 9: - PORTD |= (1<<4) | (1<<5) | (1<<0) | (1<<1); - break; - case 10: - PORTD |= (1<<5) | (1<<0) | (1<<1); - break; - case 11: - PORTD |= (1<<4) | (1<<0) | (1<<1); - break; - case 12: - PORTD |= (1<<0) | (1<<1); - break; - case 13: - PORTD |= (1<<4) | (1<<1) | (1<<6) | (1<<2); - break; - case 14: - PORTD |= (1<<1) | (1<<6) | (1<<2); - break; - case 15: - PORTD |= (1<<4) | (1<<5) | (1<<0) | (1<<6) | (1<<2); - break; - case 16: - PORTD |= (1<<0) | (1<<6) | (1<<2); - break; - case 17: - PORTD |= (1<<4) | (1<<5) | (1<<6) | (1<<2); - break; - } -} diff --git a/keyboard/kmac/Makefile.lufa b/keyboard/kmac/Makefile.lufa deleted file mode 100644 index 9745f43cd4..0000000000 --- a/keyboard/kmac/Makefile.lufa +++ /dev/null @@ -1,130 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = kmac_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap.c \ - matrix.c \ - led.c \ - backlight.c - -CONFIG_H = config.h - - -# 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) - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -winkey: OPT_DEFS += -DLAYOUT_WINKEY -winkey: all - -winkeyless: OPT_DEFS += -DLAYOUT_WINKEYLESS -winkeyless: all diff --git a/keyboard/kmac/Makefile.pjrc b/keyboard/kmac/Makefile.pjrc deleted file mode 100644 index b32d935bdf..0000000000 --- a/keyboard/kmac/Makefile.pjrc +++ /dev/null @@ -1,101 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = kmac_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c \ - backlight.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 -#MCU = at90usb646 # Teensy++ 1.0 -#MCU = at90usb1286 # Teensy++ 2.0 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 8000000 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+5000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover(+500) -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -winkey: OPT_DEFS += -DLAYOUT_WINKEY -winkey: all - -winkeyless: OPT_DEFS += -DLAYOUT_WINKEYLESS -winkeyless: all diff --git a/keyboard/kmac/README.md b/keyboard/kmac/README.md deleted file mode 100644 index dc35870caa..0000000000 --- a/keyboard/kmac/README.md +++ /dev/null @@ -1,110 +0,0 @@ -KMAC keyboard firmware -====================== -Korean custom keyboard designed by Byungho Kim and KBDMania community. - -*Note that this is not the official firmware* - -Supported models ----------------- -At the moment only the TKL models is supported. - - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.[pjrc|lufa] [winkey|winkeyless] - -Use `Makefile.pjrc` if you want to use PJRC stack or use `Makefile.lufa` for LUFA stack. - - -Bootloader ---------- -The PCB is hardwired to run the bootloader if the key at the `Caps Lock` position is held down when connecting the keyboard. - -It is still possible to use Boot Magic and Command to access the bootloader though. - - -Keymap ------- -There are 2 different types of PCB. -They each have their own keymap file. - -To customize a keymap: - 1. Edit the file that corresponds to your PCB. - 2. Specify your layout when building. - -### 1. Winkey -This is the default keymap. - -See [keymap_winkey.h](keymap_winkey.h) for detail. - -#### 1.0. Winkey Default Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - |-----------------------------------------------------------| '-----------' - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return | - |-----------------------------------------------------------| ,---. - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - |-----------------------------------------------------------| ,-----------. - |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 1.1. Winkey Media Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Led| | | | | | | | | | | | | | | | | | |Slp| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt|Media| | | | | - |-----------------------------------------------------------| '-----------' - | | | | | | | | | | | | | | - |-----------------------------------------------------------| ,---. - | | | |Clc| | | | | | | |Caps | | | - |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' - - -### 2. Winkeyless -Layout with 1.5 unit modifiers. - -See [keymap_winkeyless.h](keymap_winkeyless.h) for detail. - -#### 2.0. Winkeyless Default Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - |-----------------------------------------------------------| '-----------' - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return | - |-----------------------------------------------------------| ,---. - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - |-----------------------------------------------------------| ,-----------. - |Ctl |Gui|Alt | Space |Alt |Gui|Ctl | |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 2.1. Winkeyless Media Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Led| | | | | | | | | | | | | | | | | | |Slp| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt|Media| | | | | - |-----------------------------------------------------------| '-----------' - | | | | | | | | | | | | | | - |-----------------------------------------------------------| ,---. - | | | |Clc| | | | | | | |Caps | | | - |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' diff --git a/keyboard/kmac/backlight.c b/keyboard/kmac/backlight.c deleted file mode 100644 index af38f658ae..0000000000 --- a/keyboard/kmac/backlight.c +++ /dev/null @@ -1,58 +0,0 @@ -/* -Copyright 2013 Mathias Andersson <wraul@dbox.se> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "backlight.h" - -/* Backlight pin configuration - * F-row: High PB1 - * W: Low PB4 - * A: Low PB2 - * S: Low PB3 - * D: Low PD7 - */ -void backlight_set(uint8_t level) -{ - // Set as output. - DDRB |= (1<<1) | (1<<2) | (1<<3) | (1<<4); - DDRD |= (1<<7); - - // F-row - if(level & (1<<0)) - { - PORTB |= (1<<1); - } - else - { - PORTB &= ~(1<<1); - } - // WASD - if(level & (1<<1)) - { - PORTB &= ~(1<<4); - PORTB &= ~(1<<2); - PORTB &= ~(1<<3); - PORTD &= ~(1<<7); - } - else - { - PORTB |= (1<<4); - PORTB |= (1<<2); - PORTB |= (1<<3); - PORTD |= (1<<7); - } -} diff --git a/keyboard/kmac/config.h b/keyboard/kmac/config.h deleted file mode 100644 index c88df94517..0000000000 --- a/keyboard/kmac/config.h +++ /dev/null @@ -1,50 +0,0 @@ -/* -Copyright 2013 Mathias Andersson <wraul@dbox.se> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 -#define MANUFACTURER KBDMania -#define PRODUCT KMAC - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for KMAC - -/* matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/kmac/keymap.c b/keyboard/kmac/keymap.c deleted file mode 100644 index 1ffa60387e..0000000000 --- a/keyboard/kmac/keymap.c +++ /dev/null @@ -1,97 +0,0 @@ -/* -Copyright 2013 Mathias Andersson <wraul@dbox.se> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * Keymap for KMAC controller - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keymap.h" - -// Convert physical keyboard layout to matrix array. -// This is a macro to define keymap easily in keyboard layout form. -#define KEYMAP( \ - K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1P, \ - K0A, K0B, K0C, K0G, K0K, K0L, K0M, K0N, K0O, K0P, K0Q \ -) { \ -/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ \ -/* 5 */ { KC_##K5A, KC_NO, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q}, \ -/* 4 */ { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_##K4M, KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q}, \ -/* 3 */ { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P, KC_##K3Q}, \ -/* 2 */ { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_NO, KC_##K2N, KC_NO, KC_NO, KC_NO }, \ -/* 1 */ { KC_##K1A, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_NO, KC_NO, KC_##K1N, KC_NO, KC_##K1P, KC_NO }, \ -/* 0 */ { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO, KC_NO, KC_##K0G, KC_NO, KC_NO, KC_##K0K, KC_NO, KC_##K0L, KC_NO, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P, KC_##K0Q} \ -} - -#define KEYMAP_WINKEYLESS( \ - K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1P, \ - K0A, K0B, K0C, K0G, K0L, K0M, K0N, K0O, K0P, K0Q \ -) KEYMAP( \ - K5A, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1P, \ - K0A, K0B, K0C, K0G, K0L, K0M, NO, K0N, K0O, K0P, K0Q \ -) - -#if defined(LAYOUT_WINKEYLESS) - #include "keymap_winkeyless.h" -#else - #include "keymap_winkey.h" -#endif - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/kmac/keymap_winkey.h b/keyboard/kmac/keymap_winkey.h deleted file mode 100644 index 3379789ecf..0000000000 --- a/keyboard/kmac/keymap_winkey.h +++ /dev/null @@ -1,24 +0,0 @@ -// KMAC Winkey -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP(\ - FN1, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS, TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, CAPS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_BACKLIGHT_STEP() -}; - diff --git a/keyboard/kmac/keymap_winkeyless.h b/keyboard/kmac/keymap_winkeyless.h deleted file mode 100644 index 939ee379b7..0000000000 --- a/keyboard/kmac/keymap_winkeyless.h +++ /dev/null @@ -1,24 +0,0 @@ -// KMAC Winkeyless -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KEYMAP_WINKEYLESS(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP_WINKEYLESS(\ - FN1, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS, TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, CAPS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_BACKLIGHT_STEP() -}; - diff --git a/keyboard/kmac/led.c b/keyboard/kmac/led.c deleted file mode 100644 index 7fa008a43e..0000000000 --- a/keyboard/kmac/led.c +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - - -/* LED pin configuration - * Scroll Lock: Low PE6 - * Caps Lock: Low PB0 - */ -void led_set(uint8_t usb_led) -{ - // Set as output. - DDRB |= (1<<0); - DDRE |= (1<<6); - - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - { - // Output low. - PORTB &= ~(1<<0); - } - else - { - // Output high. - PORTB |= (1<<0); - } - - if (usb_led & (1<<USB_LED_SCROLL_LOCK)) - { - // Output low. - PORTE &= ~(1<<6); - } - else - { - // Output high. - PORTE |= (1<<6); - } -} diff --git a/keyboard/kmac/matrix.c b/keyboard/kmac/matrix.c deleted file mode 100644 index 5248a29b9d..0000000000 --- a/keyboard/kmac/matrix.c +++ /dev/null @@ -1,283 +0,0 @@ -/* -Copyright 2013 Mathias Andersson <wraul@dbox.se> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint8_t read_rows(void); -static uint8_t read_caps(void); -static void init_rows(void); -static void unselect_cols(void); -static void select_col(uint8_t col); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - unselect_cols(); - init_rows(); - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { // 0-16 - select_col(col); - _delay_us(3); // TODO: Determine the correct value needed here. - uint8_t rows = read_rows(); - // Use the otherwise unused col: 0 row: 3 for caps lock. - if(col == 0) { - rows |= read_caps(); - } - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { // 0-5 - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - if (debouncing) { - dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); - } - debouncing = DEBOUNCE; - } - } - unselect_cols(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop32(matrix[i]); - } - return count; -} - -/* Row pin configuration - * row: 0 1 2 3 4 5 - * pin: D0 D1 D2 D3 D5 B7 - * - * Caps lock uses its own pin PE2 - */ -static void init_rows(void) -{ - // Input (DDR:0, PORT:0) - DDRD &= ~0b00101111; - PORTD &= ~0b00101111; - DDRB &= ~(1<<7); - PORTB &= ~(1<<7); - - // Input with pull-up (DDR:0, PORT:1) - DDRE &= ~(1<<2); - PORTE |= (1<<2); -} - -static uint8_t read_rows(void) -{ - return (PIND&(1<<0) ? (1<<0) : 0) | - (PIND&(1<<1) ? (1<<1) : 0) | - (PIND&(1<<2) ? (1<<2) : 0) | - (PIND&(1<<3) ? (1<<3) : 0) | - (PIND&(1<<5) ? (1<<4) : 0) | - (PINB&(1<<7) ? (1<<5) : 0); -} - -static uint8_t read_caps(void) -{ - return PINE&(1<<2) ? 0 : (1<<3); -} - -/* Columns 0 - 15 - * These columns uses two 74HC237D 3 to 8 bit demultiplexers. - * col / pin: PC6 PB6 PF0 PF1 PC7 - * 0: 1 0 0 0 0 - * 1: 1 0 1 0 0 - * 2: 1 0 0 1 0 - * 3: 1 0 1 1 0 - * 4: 1 0 0 0 1 - * 5: 1 0 1 0 1 - * 6: 1 0 0 1 1 - * 7: 1 0 1 1 1 - * 8: 0 1 0 0 0 - * 9: 0 1 1 0 0 - * 10: 0 1 0 1 0 - * 11: 0 1 1 1 0 - * 12: 0 1 0 0 1 - * 13: 0 1 1 0 1 - * 14: 0 1 0 1 1 - * 15: 0 1 1 1 1 - * - * col: 16 - * pin: PB5 - */ -static void unselect_cols(void) -{ - DDRB |= (1<<5) | (1<<6); - PORTB &= ~((1<<5) | (1<<6)); - - DDRC |= (1<<6) | (1<<7); - PORTC &= ~((1<<6) | (1<<7)); - - DDRF |= (1<<0) | (1<<1); - PORTF &= ~((1<<0) | (1<<1)); -} - -static void select_col(uint8_t col) -{ - // Output high (DDR:1, PORT:1) to select - switch (col) { - case 0: - PORTC |= (1<<6); - break; - case 1: - PORTC |= (1<<6); - PORTF |= (1<<0); - break; - case 2: - PORTC |= (1<<6); - PORTF |= (1<<1); - break; - case 3: - PORTC |= (1<<6); - PORTF |= (1<<0) | (1<<1); - break; - case 4: - PORTC |= (1<<6); - PORTC |= (1<<7); - break; - case 5: - PORTC |= (1<<6); - PORTF |= (1<<0); - PORTC |= (1<<7); - break; - case 6: - PORTC |= (1<<6); - PORTF |= (1<<1); - PORTC |= (1<<7); - break; - case 7: - PORTC |= (1<<6); - PORTF |= (1<<0) | (1<<1); - PORTC |= (1<<7); - break; - case 8: - PORTB |= (1<<6); - break; - case 9: - PORTB |= (1<<6); - PORTF |= (1<<0); - break; - case 10: - PORTB |= (1<<6); - PORTF |= (1<<1); - break; - case 11: - PORTB |= (1<<6); - PORTF |= (1<<0) | (1<<1); - break; - case 12: - PORTB |= (1<<6); - PORTC |= (1<<7); - break; - case 13: - PORTB |= (1<<6); - PORTF |= (1<<0); - PORTC |= (1<<7); - break; - case 14: - PORTB |= (1<<6); - PORTF |= (1<<1); - PORTC |= (1<<7); - break; - case 15: - PORTB |= (1<<6); - PORTF |= (1<<0) | (1<<1); - PORTC |= (1<<7); - break; - case 16: - PORTB |= (1<<5); - break; - } -} diff --git a/keyboard/lightpad/Makefile.lufa b/keyboard/lightpad/Makefile.lufa deleted file mode 100644 index 88fb90ec4b..0000000000 --- a/keyboard/lightpad/Makefile.lufa +++ /dev/null @@ -1,117 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = lightpad_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# List C source files here. (C dependencies are automatically generated.) -SRC = keymap.c \ - matrix.c \ - led.c \ - backlight.c - -CONFIG_H = config.h - -# 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 = 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) - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -#CONSOLE_ENABLE = yes # Console for debug(+400) -#COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/lightpad/README.md b/keyboard/lightpad/README.md deleted file mode 100644 index b21cccc6a2..0000000000 --- a/keyboard/lightpad/README.md +++ /dev/null @@ -1,24 +0,0 @@ -Lightpad keypad firmware -====================== -Korean custom keypad designed by Duck. - -*Note that this is not the official firmware* - - -Supported models ----------------- -All pcb options are supported. - - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.lufa - - -Bootloader ---------- -The PCB is hardwired to run the bootloader if the key at the `top left` position is held down when connecting the keyboard. - -It is still possible to use Boot Magic and Command to access the bootloader though. diff --git a/keyboard/lightpad/backlight.c b/keyboard/lightpad/backlight.c deleted file mode 100644 index 693c566fc5..0000000000 --- a/keyboard/lightpad/backlight.c +++ /dev/null @@ -1,129 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "backlight.h" - -/* Backlight pin configuration - * - * FN1 PB0 (low) - * FN2 PB5 (low) - * FN3 PB4 (low) - * FN4 PD7 (low) - * REAR PD6 (high) - * NUMPAD PB2 (high) - * NUMLOCK PB1 (low) - */ -void backlight_init_ports() { - DDRB |= (1<<0) | (1<<1) | (1<<2) | (1<<4) | (1<<5); - DDRD |= (1<<6) | (1<<7); - - backlight_disable_numlock(); -} - -void backlight_set(uint8_t level) { - (level & BACKLIGHT_FN1) ? backlight_enable_fn1() : backlight_disable_fn1(); - (level & BACKLIGHT_FN2) ? backlight_enable_fn2() : backlight_disable_fn2(); - (level & BACKLIGHT_FN3) ? backlight_enable_fn3() : backlight_disable_fn3(); - (level & BACKLIGHT_FN4) ? backlight_enable_fn4() : backlight_disable_fn4(); - (level & BACKLIGHT_NUMPAD) ? backlight_enable_numpad() : backlight_disable_numpad(); - (level & BACKLIGHT_REAR) ? backlight_enable_rear() : backlight_disable_rear(); -} - -void backlight_enable_fn1() { - PORTB &= ~(1<<0); -} - -void backlight_disable_fn1() { - PORTB |= (1<<0); -} - -void backlight_invert_fn1() { - PORTB ^= (1<<0); -} - -void backlight_enable_fn2() { - PORTB &= ~(1<<5); -} - -void backlight_disable_fn2() { - PORTB |= (1<<5); -} - -void backlight_invert_fn2() { - PORTB ^= (1<<5); -} - -void backlight_enable_fn3() { - PORTB &= ~(1<<4); -} - -void backlight_disable_fn3() { - PORTB |= (1<<4); -} - -void backlight_invert_fn3() { - PORTB ^= (1<<4); -} - -void backlight_enable_fn4() { - PORTD &= ~(1<<7); -} - -void backlight_disable_fn4() { - PORTD |= (1<<7); -} - -void backlight_invert_fn4() { - PORTD ^= (1<<7); -} - -void backlight_enable_numpad() { - PORTB |= (1<<2); -} - -void backlight_disable_numpad() { - PORTB &= ~(1<<2); -} - -void backlight_invert_numpad() { - PORTB ^= (1<<2); -} - -void backlight_enable_numlock() { - PORTB &= ~(1<<1); -} - -void backlight_disable_numlock() { - PORTB |= (1<<1); -} - -void backlight_invert_numlock() { - PORTB ^= (1<<1); -} - -void backlight_enable_rear() { - PORTD |= (1<<6); -} - -void backlight_disable_rear() { - PORTD &= ~(1<<6); -} - -void backlight_invert_rear() { - PORTD ^= (1<<6); -} diff --git a/keyboard/lightpad/backlight.h b/keyboard/lightpad/backlight.h deleted file mode 100644 index 3b3cfd9aea..0000000000 --- a/keyboard/lightpad/backlight.h +++ /dev/null @@ -1,39 +0,0 @@ - -enum backlight_level { - BACKLIGHT_FN1 = 0b0000001, - BACKLIGHT_FN2 = 0b0000010, - BACKLIGHT_FN3 = 0b0000100, - BACKLIGHT_FN4 = 0b0001000, - BACKLIGHT_NUMPAD = 0b0010000, - BACKLIGHT_REAR = 0b0100000, -}; - -void backlight_init_ports(void); - -void backlight_invert_fn1(void); -void backlight_enable_fn1(void); -void backlight_disable_fn1(void); - -void backlight_invert_fn2(void); -void backlight_enable_fn2(void); -void backlight_disable_fn2(void); - -void backlight_invert_fn3(void); -void backlight_enable_fn3(void); -void backlight_disable_fn3(void); - -void backlight_invert_fn4(void); -void backlight_enable_fn4(void); -void backlight_disable_fn4(void); - -void backlight_invert_numlock(void); -void backlight_enable_numlock(void); -void backlight_disable_numlock(void); - -void backlight_enable_numpad(void); -void backlight_disable_numpad(void); -void backlight_invert_numpad(void); - -void backlight_enable_rear(void); -void backlight_disable_rear(void); -void backlight_invert_rear(void); diff --git a/keyboard/lightpad/config.h b/keyboard/lightpad/config.h deleted file mode 100644 index 7f5a596c0c..0000000000 --- a/keyboard/lightpad/config.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 -#define MANUFACTURER Duck -#define PRODUCT Lightpad - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for Lightpad - -/* matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 4 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 1 - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/lightpad/keymap.c b/keyboard/lightpad/keymap.c deleted file mode 100644 index 2ca79a81b5..0000000000 --- a/keyboard/lightpad/keymap.c +++ /dev/null @@ -1,73 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keymap.h" - -/* Map physical keyboard layout to matrix array */ -#define KEYMAP( \ - K5A, K5B, K5C, K5D, \ - K4A, K4B, K4C, K4D, \ - K3A, K3B, K3C, K3D, \ - K2A, K2B, K2C, \ - K1A, K1B, K1C, K1D, \ - K0A, K0B, K0C \ -) { \ -/* 0 1 2 3 */ \ -/* 5 */ { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D}, \ -/* 4 */ { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D}, \ -/* 3 */ { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D}, \ -/* 2 */ { KC_##K2A, KC_##K2B, KC_##K2C, KC_NO}, \ -/* 1 */ { KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D}, \ -/* 0 */ { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO, } \ -} - -#include "keymap_lightpad.h" - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/lightpad/keymap_lightpad.h b/keyboard/lightpad/keymap_lightpad.h deleted file mode 100644 index 9333964e39..0000000000 --- a/keyboard/lightpad/keymap_lightpad.h +++ /dev/null @@ -1,29 +0,0 @@ -#include "backlight.h" - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP(\ - FN0, F1, DEL, BSPC, \ - NLCK,PSLS,PAST,PMNS, \ - P7, P8, P9, PPLS, \ - P4, P5, P6, \ - P1, P2, P3, PENT, \ - P0, NO, PDOT), \ - KEYMAP(\ - TRNS,PGDN,PGUP,MUTE, \ - MSEL,MPRV,MNXT,VOLD, \ - P7, P8, P9, VOLU, \ - FN4, FN5, FN6, \ - FN1, FN2, FN3, MPLY, \ - FN7, NO, MSTP) -}; - -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_FN1), - [2] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_FN2), - [3] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_FN3), - [4] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_FN4), - [5] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_NUMPAD), - [6] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_REAR), - [7] = ACTION_BACKLIGHT_TOGGLE() -}; diff --git a/keyboard/lightpad/led.c b/keyboard/lightpad/led.c deleted file mode 100644 index ebfac3af89..0000000000 --- a/keyboard/lightpad/led.c +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - -void led_set(uint8_t usb_led) { - (usb_led & (1<<USB_LED_NUM_LOCK)) ? backlight_enable_numlock() : backlight_disable_numlock(); -} diff --git a/keyboard/lightpad/matrix.c b/keyboard/lightpad/matrix.c deleted file mode 100644 index 87d338395b..0000000000 --- a/keyboard/lightpad/matrix.c +++ /dev/null @@ -1,205 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "eeconfig.h" -#include "action_layer.h" -#include "backlight.h" - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint8_t read_rows(void); -static uint8_t read_fwkey(void); -static void init_rows(void); -static void unselect_cols(void); -static void select_col(uint8_t col); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void misc_init(void) { -} - -void matrix_init(void) -{ - backlight_init_ports(); - unselect_cols(); - init_rows(); - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - select_col(col); - _delay_us(3); - uint8_t rows = read_rows(); - // Use the otherwise unused col: 0 row: 0 for firmware key - if(col == 0) { - rows |= read_fwkey(); - } - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - if (debouncing) { - dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); - } - debouncing = DEBOUNCE; - } - } - unselect_cols(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop32(matrix[i]); - } - return count; -} - -/* Row configuration - * - * row: 0 1 2 3 4 5 - * pin: PD0 PD1 PD2 PD3 PD5 PB7 - * - * Firmware uses pin PE2 - */ -static void init_rows(void) -{ - DDRD &= ~0b00101111; - PORTD |= 0b00101111; - - DDRB &= ~0b10000000; - PORTB |= 0b10000000; - - DDRE &= ~0b00000100; - PORTE |= 0b00000100; -} - -static uint8_t read_rows(void) -{ - return (PIND&(1<<0) ? (1<<0) : 0) | - (PIND&(1<<1) ? (1<<1) : 0) | - (PIND&(1<<2) ? (1<<2) : 0) | - (PIND&(1<<3) ? (1<<3) : 0) | - (PIND&(1<<5) ? (1<<4) : 0) | - (PINB&(1<<7) ? (1<<5) : 0); -} - -static uint8_t read_fwkey(void) -{ - return PINE&(1<<2) ? 0 : (1<<0); -} - -/* Column configuration - * - * col: 0 1 2 3 - * pin: PF0 PF1 PC7 PC6 - */ -static void unselect_cols(void) -{ - DDRF |= 0b00000011; - PORTF &= ~0b00000011; - DDRC |= 0b11000000; - PORTC &= ~0b11000000; -} - -static void select_col(uint8_t col) -{ - switch (col) { - case 0: - PORTF |= (1<<0); - break; - case 1: - PORTF |= (1<<1); - break; - case 2: - PORTC |= (1<<7); - break; - case 3: - PORTC |= (1<<6); - break; - } -} diff --git a/keyboard/lightsaber/Makefile.lufa b/keyboard/lightsaber/Makefile.lufa deleted file mode 100644 index 99090c4367..0000000000 --- a/keyboard/lightsaber/Makefile.lufa +++ /dev/null @@ -1,126 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = lightsaber_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC = keymap.c \ - matrix.c \ - led.c \ - backlight.c - -CONFIG_H = config.h - - -# 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 = 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) - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -winkey: OPT_DEFS += -DLAYOUT_WINKEY -winkey: all diff --git a/keyboard/lightsaber/Makefile.pjrc b/keyboard/lightsaber/Makefile.pjrc deleted file mode 100644 index 0f6d399470..0000000000 --- a/keyboard/lightsaber/Makefile.pjrc +++ /dev/null @@ -1,94 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = lightsaber_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c \ - backlight.c - -CONFIG_H = config.h - - -# MCU name -MCU = atmega32u4 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 8000000 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+5000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover(+500) -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -winkey: OPT_DEFS += -DLAYOUT_WINKEY -winkey: all diff --git a/keyboard/lightsaber/README.md b/keyboard/lightsaber/README.md deleted file mode 100644 index 9dcd693095..0000000000 --- a/keyboard/lightsaber/README.md +++ /dev/null @@ -1,26 +0,0 @@ -Lightsaber keyboard firmware -====================== -Korean custom keyboard designed by Duck. - -*Note that this is not the official firmware* - -Supported models ----------------- -All pcb options are supported. - - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.[pjrc|lufa] - -Use `Makefile.pjrc` if you want to use PJRC stack or use `Makefile.lufa` for LUFA stack. - - -Bootloader ---------- -The PCB is hardwired to run the bootloader if the key at the `one above backspace` position is held down when connecting the keyboard. - -It is still possible to use Boot Magic and Command to access the bootloader though. - diff --git a/keyboard/lightsaber/backlight.c b/keyboard/lightsaber/backlight.c deleted file mode 100644 index 59b8b4a633..0000000000 --- a/keyboard/lightsaber/backlight.c +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "backlight.h" - -/* Backlight pin configuration - * - * Alphas PB1 (high) - * Numeric PB2 (high) - * Mod+Num PB3 (high) - * Backside PD6 (high) - * TopRight PD7 (low) - * F-Row PE6 (high) - */ - -void backlight_set(uint8_t level) -{ - // Set as output. - DDRB |= (1<<1) | (1<<2) | (1<<3); - DDRD |= (1<<6) | (1<<7); - DDRE |= (1<<6); - - if (level & BACKLIGHT_ALPHA) - { - PORTB |= (1<<1); - } - else - { - PORTB &= ~(1<<1); - } - if (level & BACKLIGHT_NUMERIC) - { - PORTB |= (1<<2); - } - else - { - PORTB &= ~(1<<2); - } - if (level & BACKLIGHT_MODNUM) - { - PORTB |= (1<<3); - } - else - { - PORTB &= ~(1<<3); - } - if (level & BACKLIGHT_BACKSIDE) - { - PORTD |= (1<<6); - } - else - { - PORTD &= ~(1<<6); - } - if (level & BACKLIGHT_TOPRIGHT) - { - PORTD &= ~(1<<7); - } - else - { - PORTD |= (1<<7); - } - if (level & BACKLIGHT_FROW) - { - PORTE |= (1<<6); - } - else - { - PORTE &= ~(1<<6); - } -} diff --git a/keyboard/lightsaber/backlight.h b/keyboard/lightsaber/backlight.h deleted file mode 100644 index 6dc7967a62..0000000000 --- a/keyboard/lightsaber/backlight.h +++ /dev/null @@ -1,9 +0,0 @@ - -enum backlight_level { - BACKLIGHT_ALPHA = 0b0000001, - BACKLIGHT_NUMERIC = 0b0000010, - BACKLIGHT_MODNUM = 0b0000100, - BACKLIGHT_BACKSIDE = 0b0001000, - BACKLIGHT_TOPRIGHT = 0b0010000, - BACKLIGHT_FROW = 0b0100000, -}; diff --git a/keyboard/lightsaber/config.h b/keyboard/lightsaber/config.h deleted file mode 100644 index d971d038e3..0000000000 --- a/keyboard/lightsaber/config.h +++ /dev/null @@ -1,46 +0,0 @@ -/* -Copyright 2013 Mathias Andersson <wraul@dbox.se> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6050 -#define DEVICE_VER 0x0104 -#define MANUFACTURER Duck -#define PRODUCT Lightsaber - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for Lightsaber - -/* matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 18 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 1 - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/lightsaber/keymap.c b/keyboard/lightsaber/keymap.c deleted file mode 100644 index 477da9d865..0000000000 --- a/keyboard/lightsaber/keymap.c +++ /dev/null @@ -1,77 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * Keymap for Lightsaber controller - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keymap.h" - -// Convert physical keyboard layout to matrix array. -// This is a macro to define keymap easily in keyboard layout form. -#define KEYMAP( \ - K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3O, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2O, K2P, K2Q, K2R, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1O, K1P, K1Q, K1R, \ - K0A, K0B, K0C, K0G, K0K, K0L, K0M, K0N, K0O, K0P, K0Q, K0R \ -) { \ -/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 */ \ -/* 5 */ { KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5G, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q, KC_##K5R}, \ -/* 4 */ { KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_##K4M, KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q, KC_##K4R}, \ -/* 3 */ { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3O, KC_##K3P, KC_##K3Q, KC_##K3R}, \ -/* 2 */ { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_##K2M, KC_##K2N, KC_##K2O, KC_##K2P, KC_##K2Q, KC_##K2R}, \ -/* 1 */ { KC_##K1A, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_NO, KC_##K1M, KC_##K1N, KC_##K1O, KC_##K1P, KC_##K1Q, KC_##K1R}, \ -/* 0 */ { KC_##K0A, KC_##K0B, KC_##K0C, KC_NO, KC_NO, KC_##K0G, KC_NO, KC_NO, KC_##K0K, KC_NO, KC_##K0L, KC_NO, KC_##K0M, KC_##K0N, KC_##K0O, KC_##K0P, KC_##K0Q, KC_##K0R} \ -} - -#include "keymap_winkey.h" - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/lightsaber/keymap_winkey.h b/keyboard/lightsaber/keymap_winkey.h deleted file mode 100644 index 3e8367083c..0000000000 --- a/keyboard/lightsaber/keymap_winkey.h +++ /dev/null @@ -1,29 +0,0 @@ -#include "backlight.h" - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, INS, PSCR, SLCK, BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, NUMLOCK,KP_SLASH,KP_ASTERISK,KP_MINUS, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, KP_7, KP_8, KP_9, KP_PLUS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,FN0, ENT, KP_4, KP_5, KP_6, NO, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH,NO, RSFT, KP_1, KP_2, KP_3, KP_ENTER, \ - LCTL,LGUI,LALT, SPC, NO, RALT,RGUI,RCTL, KP_0, NO, KP_DOT, NO), \ - KEYMAP(\ - CALC,MYCM,WSCH,WHOM,MAIL,MUTE,VOLD,VOLU,MSEL,MSTP,MPLY,MPRV,MNXT,TRNS, TRNS, WAKE, PWR, SLEP, \ - FN1, FN2, FN3, FN4, FN5, FN6, FN7, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS,TRNS,TRNS,TRNS,PGDN,TRNS,LEFT,DOWN,UP ,RGHT,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS, TRNS,TRNS,TRNS,TRNS,PGUP,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS, TRNS, TRNS, TRNS) -}; - -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_BACKLIGHT_TOGGLE(), - [2] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_ALPHA), - [3] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_MODNUM), - [4] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_NUMERIC), - [5] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_FROW), - [6] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_BACKSIDE), - [7] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_TOPRIGHT) -}; diff --git a/keyboard/lightsaber/led.c b/keyboard/lightsaber/led.c deleted file mode 100644 index c3f85427f5..0000000000 --- a/keyboard/lightsaber/led.c +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - -/* LED pin configuration - * - * Caps PB0 (low) - * NumLock PB4 (low) - * - */ -void led_set(uint8_t usb_led) -{ - // Set as output. - DDRB |= (1<<0) | (1<<4); - - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - { - // Output low. - PORTB &= ~(1<<0); - } - else - { - // Output high. - PORTB |= (1<<0); - } - - if (usb_led & (1<<USB_LED_NUM_LOCK)) - { - // Output low. - PORTB &= ~(1<<4); - } - else - { - // Output high. - PORTB |= (1<<4); - } -} diff --git a/keyboard/lightsaber/matrix.c b/keyboard/lightsaber/matrix.c deleted file mode 100644 index e3eca84df8..0000000000 --- a/keyboard/lightsaber/matrix.c +++ /dev/null @@ -1,292 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint8_t read_rows(void); -static uint8_t read_fwkey(void); -static void init_rows(void); -static void unselect_cols(void); -static void select_col(uint8_t col); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - unselect_cols(); - init_rows(); - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { // 0-17 - select_col(col); - _delay_us(3); // TODO: Determine the correct value needed here. - uint8_t rows = read_rows(); - // Use the otherwise unused col: 12 row: 3 for firmware. - if(col == 12) { - rows |= read_fwkey(); - } - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { // 0-5 - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - if (debouncing) { - dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); - } - debouncing = DEBOUNCE; - } - } - unselect_cols(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop32(matrix[i]); - } - return count; -} - -/* Row pin configuration - * row: 0 1 2 3 4 5 - * pin: PD0 PD1 PD2 PD3 PD5 PB7 - * - * Firmware uses its own pin PE2 - */ -static void init_rows(void) -{ - // Input (DDR:0, PORT:0) - DDRD &= ~0b00101111; - PORTD &= ~0b00101111; - DDRB &= ~(1<<7); - PORTB &= ~(1<<7); - - // Input with pull-up (DDR:0, PORT:1) - DDRE &= ~(1<<2); - PORTE |= (1<<2); -} - -static uint8_t read_rows(void) -{ - return (PIND&(1<<0) ? (1<<0) : 0) | - (PIND&(1<<1) ? (1<<1) : 0) | - (PIND&(1<<2) ? (1<<2) : 0) | - (PIND&(1<<3) ? (1<<3) : 0) | - (PIND&(1<<5) ? (1<<4) : 0) | - (PINB&(1<<7) ? (1<<5) : 0); -} - -static uint8_t read_fwkey(void) -{ - return PINE&(1<<2) ? 0 : (1<<3); -} - -/* Columns 0 - 15 - * These columns uses two 74HC237D 3 to 8 bit demultiplexers. - * col / pin: PC6 PB6 PF0 PF1 PC7 - * 0: 1 0 0 0 0 - * 1: 1 0 1 0 0 - * 2: 1 0 0 1 0 - * 3: 1 0 1 1 0 - * 4: 1 0 0 0 1 - * 5: 1 0 1 0 1 - * 6: 1 0 0 1 1 - * 7: 1 0 1 1 1 - * 8: 0 1 0 0 0 - * 9: 0 1 1 0 0 - * 10: 0 1 0 1 0 - * 11: 0 1 1 1 0 - * 12: 0 1 0 0 1 - * 13: 0 1 1 0 1 - * 14: 0 1 0 1 1 - * 15: 0 1 1 1 1 - * - * col: 16 - * pin: PB5 - * - * col: 17 - * pin: PD4 - */ -static void unselect_cols(void) -{ - DDRB |= (1<<5) | (1<<6); - PORTB &= ~((1<<5) | (1<<6)); - - DDRC |= (1<<6) | (1<<7); - PORTC &= ~((1<<6) | (1<<7)); - - DDRD |= (1<<4); - PORTD &= ~(1<<4); - - DDRF |= (1<<0) | (1<<1); - PORTF &= ~((1<<0) | (1<<1)); -} - -static void select_col(uint8_t col) -{ - // Output high (DDR:1, PORT:1) to select - switch (col) { - case 0: - PORTC |= (1<<6); - break; - case 1: - PORTC |= (1<<6); - PORTF |= (1<<0); - break; - case 2: - PORTC |= (1<<6); - PORTF |= (1<<1); - break; - case 3: - PORTC |= (1<<6); - PORTF |= (1<<0) | (1<<1); - break; - case 4: - PORTC |= (1<<6); - PORTC |= (1<<7); - break; - case 5: - PORTC |= (1<<6); - PORTF |= (1<<0); - PORTC |= (1<<7); - break; - case 6: - PORTC |= (1<<6); - PORTF |= (1<<1); - PORTC |= (1<<7); - break; - case 7: - PORTC |= (1<<6); - PORTF |= (1<<0) | (1<<1); - PORTC |= (1<<7); - break; - case 8: - PORTB |= (1<<6); - break; - case 9: - PORTB |= (1<<6); - PORTF |= (1<<0); - break; - case 10: - PORTB |= (1<<6); - PORTF |= (1<<1); - break; - case 11: - PORTB |= (1<<6); - PORTF |= (1<<0) | (1<<1); - break; - case 12: - PORTB |= (1<<6); - PORTC |= (1<<7); - break; - case 13: - PORTB |= (1<<6); - PORTF |= (1<<0); - PORTC |= (1<<7); - break; - case 14: - PORTB |= (1<<6); - PORTF |= (1<<1); - PORTC |= (1<<7); - break; - case 15: - PORTB |= (1<<6); - PORTF |= (1<<0) | (1<<1); - PORTC |= (1<<7); - break; - case 16: - PORTB |= (1<<5); - break; - case 17: - PORTD |= (1<<4); - break; - } -} diff --git a/keyboard/macway/Makefile.lufa b/keyboard/macway/Makefile.lufa deleted file mode 100644 index 8fff93ada5..0000000000 --- a/keyboard/macway/Makefile.lufa +++ /dev/null @@ -1,121 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = macway_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# 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) - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#NKRO_ENABLE = yes # USB Nkey Rollover - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/macway/Makefile.pjrc b/keyboard/macway/Makefile.pjrc deleted file mode 100644 index 6ee25b61af..0000000000 --- a/keyboard/macway/Makefile.pjrc +++ /dev/null @@ -1,97 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = macway_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 -#MCU = at90usb646 # Teensy++ 1.0 -#MCU = at90usb1286 # Teensy++ 2.0 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -EXTRAKEY_ENABLE = yes # Audio control and System control -COMMAND_ENABLE = yes # Commands for debug and configuration -#NKRO_ENABLE = yes # USB Nkey Rollover - - - -#---------------- Programming Options -------------------------- -PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex - - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/macway/config.h b/keyboard/macway/config.h deleted file mode 100644 index e87da1ffa6..0000000000 --- a/keyboard/macway/config.h +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0xBEE0 -#define DEVICE_VER 0x0202 -#define MANUFACTURER t.m.k. -#define PRODUCT Macway mod - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for Macway mod - -/* matrix size */ -#define MATRIX_ROWS 9 -#define MATRIX_COLS 8 - -/* define if matrix has ghost */ -#define MATRIX_HAS_GHOST - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 5 - -/* legacy keymap support */ -#define USE_LEGACY_KEYMAP - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* PS/2 mouse */ -#ifdef PS2_MOUSE_ENABLE -# define PS2_CLOCK_PORT PORTF -# define PS2_CLOCK_PIN PINF -# define PS2_CLOCK_DDR DDRF -# define PS2_CLOCK_BIT 0 -# define PS2_DATA_PORT PORTF -# define PS2_DATA_PIN PINF -# define PS2_DATA_DDR DDRF -# define PS2_DATA_BIT 1 -#endif - -#endif diff --git a/keyboard/macway/doc/back.jpg b/keyboard/macway/doc/back.jpg Binary files differdeleted file mode 100644 index 0774401f69..0000000000 --- a/keyboard/macway/doc/back.jpg +++ /dev/null diff --git a/keyboard/macway/doc/case.jpg b/keyboard/macway/doc/case.jpg Binary files differdeleted file mode 100644 index c776d5e054..0000000000 --- a/keyboard/macway/doc/case.jpg +++ /dev/null diff --git a/keyboard/macway/doc/keys.jpg b/keyboard/macway/doc/keys.jpg Binary files differdeleted file mode 100644 index f340ebe8e4..0000000000 --- a/keyboard/macway/doc/keys.jpg +++ /dev/null diff --git a/keyboard/macway/doc/side.jpg b/keyboard/macway/doc/side.jpg Binary files differdeleted file mode 100644 index bdf8268f25..0000000000 --- a/keyboard/macway/doc/side.jpg +++ /dev/null diff --git a/keyboard/macway/doc/switch.jpg b/keyboard/macway/doc/switch.jpg Binary files differdeleted file mode 100644 index a1500d707d..0000000000 --- a/keyboard/macway/doc/switch.jpg +++ /dev/null diff --git a/keyboard/macway/doc/teensy.jpg b/keyboard/macway/doc/teensy.jpg Binary files differdeleted file mode 100644 index 07207475d5..0000000000 --- a/keyboard/macway/doc/teensy.jpg +++ /dev/null diff --git a/keyboard/macway/doc/wiring.jpg b/keyboard/macway/doc/wiring.jpg Binary files differdeleted file mode 100644 index 0f3490f105..0000000000 --- a/keyboard/macway/doc/wiring.jpg +++ /dev/null diff --git a/keyboard/macway/doc/withHHKB.jpg b/keyboard/macway/doc/withHHKB.jpg Binary files differdeleted file mode 100644 index 9921856e7b..0000000000 --- a/keyboard/macway/doc/withHHKB.jpg +++ /dev/null diff --git a/keyboard/macway/doc/withThinkPad.jpg b/keyboard/macway/doc/withThinkPad.jpg Binary files differdeleted file mode 100644 index 231c61d036..0000000000 --- a/keyboard/macway/doc/withThinkPad.jpg +++ /dev/null diff --git a/keyboard/macway/keymap.c b/keyboard/macway/keymap.c deleted file mode 100644 index b77348494a..0000000000 --- a/keyboard/macway/keymap.c +++ /dev/null @@ -1,195 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * Keymap for Macway mod - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "keymap.h" - - -// Convert physical keyboard layout to matrix array. -// This is a macro to define keymap easily in keyboard layout form. -#define KEYMAP( \ - K11, K10, K20, K30, K40, K41, K51, K50, K60, K70, K80, K81, K61, K02, \ - K12, K13, K23, K33, K43, K42, K52, K53, K63, K73, K83, K82, K62, K01, \ - K15, K14, K24, K34, K44, K45, K55, K54, K64, K74, K84, K85, K06, \ - K67, K16, K26, K36, K46, K47, K57, K56, K66, K76, K87, K32, K35, \ - K75, K22, K00, K07, K21, K04, K37, K27, K17 \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_NO, KC_##K04, KC_NO, 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_NO, KC_##K26, KC_##K27 }, \ - { KC_##K30, KC_NO, 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_NO, KC_##K66, KC_##K67 }, \ - { KC_##K70, KC_NO, KC_NO, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_NO }, \ - { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_NO, KC_##K87 } \ -} - -#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)])) - - -// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed. -static const uint8_t PROGMEM fn_layer[] = { - 0, // Fn0 - 1, // Fn1 - 2, // Fn2 - 3, // Fn3 - 4, // Fn4 - 0, // Fn5 - 3, // Fn6 - 3 // Fn7 -}; - -// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer. -// See layer.c for details. -static const uint8_t PROGMEM fn_keycode[] = { - KC_NO, // Fn0 - KC_NO, // Fn1 - KC_SLSH, // Fn2 - KC_SCLN, // Fn3 - KC_SPC, // Fn4 - KC_NO, // Fn5 - KC_NO, // Fn6 - KC_NO // Fn7 -}; - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | - * |-----------------------------------------------------' | - * |Contro| A| S| D| F| G| H| J| K| L|Fn3| '|Return | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn1| - * |-----------------------------------------------------------| - * |Fn7|Gui |Alt |Fn4 |Alt |Gui|Fn6|Fn6|Ctr| - * `-----------------------------------------------------------' - */ - KEYMAP(ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - LCTL,A, S, D, F, G, H, J, K, L, FN3, QUOT,ENT, \ - LSFT,Z, X, C, V, B, N, M, COMM,DOT, FN2, RSFT,FN1, \ - FN7, LGUI,LALT,FN4, RALT,GRV, FN6, FN6, RCTL), - - - /* Layer 1: HHKB mode (HHKB Fn) - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | - * |-----------------------------------------------------------| - * |Caps | | | | | | | |Psc|Slk|Pus|Up | | | - * |-----------------------------------------------------' | - * |Contro|VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | - * |-----------------------------------------------------------| - * |Shift | | | | | | +| -|End|PgD|Dow|Shift |xxx| - * |-----------------------------------------------------------| - * | |Gui |Alt | |Alt |Gui| | |Ctr| - * `-----------------------------------------------------------' - */ - KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL, \ - CAPS,NO, NO, NO, NO, NO, NO, NO, PSCR,SLCK,BRK, UP, INS, NLCK,\ - LCTL,VOLD,VOLU,MUTE,NO, NO, PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \ - LSFT,NO, NO, NO, NO, NO, PPLS,PMNS,END, PGDN,DOWN,RSFT,FN1, \ - NO, LGUI,LALT,SPC, RALT,NO, NO, NO, RCTL), - - - /* Layer 2: Vi mode (Quote/Rmeta) - * ,-----------------------------------------------------------. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| ` | - * |-----------------------------------------------------------| - * | \ |Hom|PgD|Up |PgU|End|Hom|PgD|PgU|End| | | | | - * |-----------------------------------------------------' | - * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | | \ | - * |-----------------------------------------------------------| - * |Shift | | | | | |Hom|PgD|PgU|End|xxx|Shift | | - * |-----------------------------------------------------------| - * | |Gui |Alt |Space |Alt |Gui|Fn6|Fn6|Ctr| - * `-----------------------------------------------------------' - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, GRV, \ - BSLS,HOME,PGDN,UP, PGUP,END, HOME,PGDN,PGUP,END, NO, NO, NO, NO, \ - LCTL,NO, LEFT,DOWN,RGHT,NO, LEFT,DOWN,UP, RGHT,NO, NO, BSLS, \ - LSFT,NO, NO, NO, NO, NO, HOME,PGDN,PGUP,END, FN2, RSFT,NO, \ - NO, LGUI,LALT,SPC, RALT,RGUI,FN6, FN6, RCTL), - - - /* Layer 3: Mouse mode (Semicolon) - * ,-----------------------------------------------------------. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| ` | - * |-----------------------------------------------------------| - * | \ |MwL|MwD|McU|MwU|MwR|MwL|MwD|MwU|MwR| | | | | - * |-----------------------------------------------------' | - * |Contro| |McL|McD|McR| |McL|McD|McU|McR|xxx| | \ | - * |-----------------------------------------------------------| - * |Shift | | |Mb1|Mb2|Mb3|Mb2|Mb1| | | |Shift | | - * |-----------------------------------------------------------| - * |xxx|Gui |Alt |Mb1 |Alt | | | | | - * `-----------------------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - KEYMAP(GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, GRV, \ - BSLS,WH_L,WH_D,MS_U,WH_U,WH_R,WH_L,WH_D,WH_U,WH_R,NO, NO, NO, NO, \ - LCTL,NO, MS_L,MS_D,MS_R,NO, MS_L,MS_D,MS_U,MS_R,FN3, NO, BSLS, \ - LSFT,NO, NO, BTN1,BTN2,BTN3,BTN2,BTN1,NO, NO, NO, RSFT,NO, \ - FN7, LGUI,LALT,BTN1,RALT,NO, FN6, FN6, NO), - - - /* Layer 4: Matias half keyboard style (Space) - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete | - * |-----------------------------------------------------------| - * |Backs| P| O| I| U| Y| T| R| E| W| Q|Tab|Tab| | - * |-----------------------------------------------------' | - * |Contro| ;| L| K| J| H| G| F| D| S| A|Con|Control | - * |-----------------------------------------------------------| - * |Shift | /| .| ,| M| N| B| V| C| X| Z|Shift | | - * |-----------------------------------------------------------| - * | |Gui |Alt |xxxxxxxxxxxxxxxxxxxxxx|Alt |Gui| | |Ctr| - * `-----------------------------------------------------------' - */ - KEYMAP(MINS,0, 9, 8, 7, 6, 5, 4, 3, 2, 1, NO, NO, ESC, \ - BSPC,P, O, I, U, Y, T, R, E, W, Q, TAB, TAB, TAB, \ - LCTL,SCLN,L, K, J, H, G, F, D, S, A, RCTL,RCTL, \ - LSFT,SLSH,DOT, COMM,M, N, B, V, C, X, Z, RSFT,NO, \ - NO, LGUI,LALT,FN4, RALT,RGUI,NO, NO, RCTL), -}; - - -uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col) -{ - return KEYCODE(layer, row, col); -} - -uint8_t keymap_fn_layer(uint8_t index) -{ - return pgm_read_byte(&fn_layer[index]); -} - -uint8_t keymap_fn_keycode(uint8_t index) -{ - return pgm_read_byte(&fn_keycode[index]); -} diff --git a/keyboard/macway/led.c b/keyboard/macway/led.c deleted file mode 100644 index f76545f0ba..0000000000 --- a/keyboard/macway/led.c +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ -} diff --git a/keyboard/macway/matrix.c b/keyboard/macway/matrix.c deleted file mode 100644 index 3d10b304d4..0000000000 --- a/keyboard/macway/matrix.c +++ /dev/null @@ -1,217 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#ifdef MATRIX_HAS_GHOST -static bool matrix_has_ghost_in_row(uint8_t row); -#endif -static matrix_row_t read_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - // Input with pull-up(DDR:0, PORT:1) - DDRB = 0x00; - PORTB = 0xFF; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 01234567\n"); - for (uint8_t row = 0; row < matrix_rows(); row++) { - phex(row); print(": "); - pbin_reverse(matrix_get_row(row)); -#ifdef MATRIX_HAS_GHOST - if (matrix_has_ghost_in_row(row)) { - print(" <ghost"); - } -#endif - print("\n"); - } -} - -#ifdef MATRIX_HAS_GHOST -inline -static bool matrix_has_ghost_in_row(uint8_t row) -{ - // no ghost exists in case less than 2 keys on - if (((matrix[row] - 1) & matrix[row]) == 0) - return false; - - // ghost exists in case same state as other row - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - if (i != row && (matrix[i] & matrix[row])) - return true; - } - return false; -} -#endif - -inline -static matrix_row_t read_cols(void) -{ - return ~PINB; -} - -inline -static void unselect_rows(void) -{ - // Hi-Z(DDR:0, PORT:0) to unselect - DDRC &= ~0b01000000; // PC: 6 - PORTC &= ~0b01000000; - DDRD &= ~0b11100111; // PD: 7,6,5,2,1,0 - PORTD &= ~0b11100111; - DDRF &= ~0b11000000; // PF: 7,6 - PORTF &= ~0b11000000; -} - -inline -static void select_row(uint8_t row) -{ - // Output low(DDR:1, PORT:0) to select - // row: 0 1 2 3 4 5 6 7 8 - // pin: PD0, PD5, PD7, PF6, PD6, PD1, PD2, PC6, PF7 - switch (row) { - case 0: - DDRD |= (1<<0); - PORTD &= ~(1<<0); - break; - case 1: - DDRD |= (1<<5); - PORTD &= ~(1<<5); - break; - case 2: - DDRD |= (1<<7); - PORTD &= ~(1<<7); - break; - case 3: - DDRF |= (1<<6); - PORTF &= ~(1<<6); - break; - case 4: - DDRD |= (1<<6); - PORTD &= ~(1<<6); - break; - case 5: - DDRD |= (1<<1); - PORTD &= ~(1<<1); - break; - case 6: - DDRD |= (1<<2); - PORTD &= ~(1<<2); - break; - case 7: - DDRC |= (1<<6); - PORTC &= ~(1<<6); - break; - case 8: - DDRF |= (1<<7); - PORTF &= ~(1<<7); - break; - } -} diff --git a/keyboard/mbed_onekey/Makefile b/keyboard/mbed_onekey/Makefile deleted file mode 100644 index b9c88fdd31..0000000000 --- a/keyboard/mbed_onekey/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -PROJECT = mbed_onekey - -TMK_DIR = ../../tmk_core -MBED_DIR = $(TMK_DIR)/mbed-sdk - -#VPATH += $(MBED_DIR):$(TMK_DIR) -vpath %.s .:$(MBED_DIR):$(TMK_DIR) -vpath %.c .:$(MBED_DIR):$(TMK_DIR) -vpath %.cpp .:$(MBED_DIR):$(TMK_DIR) - -OBJDIR = ./build - -OBJECTS = \ - $(OBJDIR)/./main.o - -CONFIG_H = config.h - -SYS_OBJECTS = - -INCLUDE_PATHS = -I. - -LIBRARY_PATHS = -LIBRARIES = - -# Build Options -# Comment out to disable -#BOOTMAGIC_ENABLE = yes -#MOUSEKEY_ENABLE = yes - - -include $(TMK_DIR)/tool/mbed/mbed.mk -include $(TMK_DIR)/tool/mbed/common.mk -include $(TMK_DIR)/tool/mbed/gcc.mk diff --git a/keyboard/mbed_onekey/config.h b/keyboard/mbed_onekey/config.h deleted file mode 100644 index a3aadd0389..0000000000 --- a/keyboard/mbed_onekey/config.h +++ /dev/null @@ -1,7 +0,0 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#define MATRIX_ROWS 1 -#define MATRIX_COLS 1 - -#endif diff --git a/keyboard/mbed_onekey/main.cpp b/keyboard/mbed_onekey/main.cpp deleted file mode 100644 index 71342e7ec3..0000000000 --- a/keyboard/mbed_onekey/main.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "mbed.h" -#include "action.h" -#include "keycode.h" -#include "host.h" -#include "mbed_driver.h" - - -// Button and LEDs of LPC11U35 board -DigitalIn isp(P0_1); // ISP button -DigitalOut led_red(P0_20); -DigitalOut led_green(P0_21); - - -int main(void) { - isp.mode(PullUp); - led_red = 1; - led_green = 0; - - host_set_driver(&mbed_driver); - - bool last_isp = isp; - while (1) { - if (last_isp == isp) continue; - last_isp = isp; - if (last_isp == 0) { - led_red = 0; // on - register_code(KC_A); - } else { - led_red = 1; // off - unregister_code(KC_A); - } - } -} diff --git a/keyboard/nerd/Makefile b/keyboard/nerd/Makefile deleted file mode 100644 index 30149345ce..0000000000 --- a/keyboard/nerd/Makefile +++ /dev/null @@ -1,126 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = nerd_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# project specific files -SRC = keymap_common.c \ - matrix.c \ - backlight.c - -ifdef LAYOUT - OPT_DEFS += -DNERD_LAYOUT_$(LAYOUT) -endif - -ifdef KEYMAP - SRC := keymap_$(LAYOUT)_$(KEYMAP).c $(SRC) -endif - -CONFIG_H = config.h - -# 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 = 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) - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/nerd/README.md b/keyboard/nerd/README.md deleted file mode 100644 index 5b4acd3ba9..0000000000 --- a/keyboard/nerd/README.md +++ /dev/null @@ -1,52 +0,0 @@ -NerD keyboard firmware -======================== - -Korean Keyboard designed by GON. - -*Note that this is not the official firmware* - - -Hardware revision ------------------ - -This firmware was developed and tested for NerD pcb version 1.61 and 2.0. - - -Supported features ------------------- - -* All layout options are supported -* All leds are supported -* 60% and 80% (TKL) pcbs are supported - - -Changing Bootloader -------------------- - -You can't simply just upload this firmware to a new NerD board because the original -bootloader won't accept DFU connections. - -You can change the bootloader of the keyboard with an ISP programmer of your choice. -The bootloader pins are easy to access on the NerD pcb. - -*Be aware that after changing the bootloader the official configuration software -won't work anymore and you'll lose your warrenty. GON won't provide any support for this firmware.* - - -Build ------ - -For building you have to specify two build-options, LAYOUT and KEYMAP. The layout option defines -pcb layout and can be either 60% or 80% at the momemnt. The keymap option selects your -preferred keymapping. - -Move to this directory then just run `make LAYOUT=60 KEYMAP=ansi150` - -to compile a firmware for a 60% pcb with ANSI 150 key mapping. - - -Jump to Bootloader ------------------- - -You can jump to bootloader by software if you have a macro defined for this in your keymap. The -default command is (LSFT+RSFT+PAUS) to access the bootloader by software jump. diff --git a/keyboard/nerd/backlight.c b/keyboard/nerd/backlight.c deleted file mode 100644 index 2dc85c7532..0000000000 --- a/keyboard/nerd/backlight.c +++ /dev/null @@ -1,81 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "backlight.h" -#include "led.h" - -void backlight_init_ports() -{ - DDRB |= 0b11100000; // PB7 (switch), PB6 (pcb), PB5 (caps) -} - -void led_set(uint8_t usb_led) -{ - (usb_led & (1<<USB_LED_CAPS_LOCK)) ? backlight_caps_enable() : backlight_caps_disable(); -} - -void backlight_set(uint8_t level) -{ - (level & BACKLIGHT_SWITCH) ? backlight_switch_enable() : backlight_switch_disable(); - (level & BACKLIGHT_PCB) ? backlight_pcb_enable() : backlight_pcb_disable(); -} - -void backlight_switch_enable() -{ - PORTB |= 0b10000000; -} - -void backlight_switch_disable() -{ - PORTB &= ~0b10000000; -} - -void backlight_switch_invert() -{ - PORTB ^= 0b10000000; -} - -void backlight_pcb_enable() -{ - PORTB |= 0b01000000; -} - -void backlight_pcb_disable() -{ - PORTB &= ~0b01000000; -} - -void backlight_pcb_invert() -{ - PORTB ^= 0b01000000; -} - -void backlight_caps_enable() -{ - PORTB |= 0b00100000; -} - -void backlight_caps_disable() -{ - PORTB &= ~0b00100000; -} - -void backlight_caps_invert() -{ - PORTB ^= 0b00100000; -} diff --git a/keyboard/nerd/backlight.h b/keyboard/nerd/backlight.h deleted file mode 100644 index 4c75d9db65..0000000000 --- a/keyboard/nerd/backlight.h +++ /dev/null @@ -1,40 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef BACKLIGHT_H -#define BACKLIGHT_H - -enum backlight_level { - BACKLIGHT_SWITCH = 0b0000001, - BACKLIGHT_PCB = 0b0000010, -}; - -void backlight_init_ports(void); - -void backlight_switch_invert(void); -void backlight_switch_enable(void); -void backlight_switch_disable(void); - -void backlight_pcb_invert(void); -void backlight_pcb_enable(void); -void backlight_pcb_disable(void); - -void backlight_caps_invert(void); -void backlight_caps_enable(void); -void backlight_caps_disable(void); - -#endif // BACKLIGHT_H diff --git a/keyboard/nerd/config.h b/keyboard/nerd/config.h deleted file mode 100644 index ac2e6989d6..0000000000 --- a/keyboard/nerd/config.h +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ -#ifndef CONFIG_H -#define CONFIG_H - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER GON -#define PRODUCT NerD -#define DESCRIPTION t.m.k. keyboard firmware for NerD - -/* key matrix size */ -#define MATRIX_ROWS 9 -#define MATRIX_COLS 10 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 2 - -/* 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)) \ -) - -#endif diff --git a/keyboard/nerd/keymap_60_ansi150.c b/keyboard/nerd/keymap_60_ansi150.c deleted file mode 100644 index f85836ab55..0000000000 --- a/keyboard/nerd/keymap_60_ansi150.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "keymap_common.h" -#include "backlight.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default */ - KEYMAP_ANSI150(GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - ESC, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, \ - LCTL,LGUI,LALT, SPC, RALT,FN0 ,RCTL), - /* Layer 1: Space Fn */ - KEYMAP_ANSI150(TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS, FN1, TRNS,FN0, TRNS), - /* Layer 2: Functions */ - KEYMAP_ANSI150(SLEP,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, MUTE, \ - TRNS,BTN1,MS_U,BTN3,PSCR,SLCK,PAUS,HOME,INS, END, MPLY,VOLD,VOLU,FN3, \ - CAPS,MS_L,MS_D,MS_R,PGDN,TRNS,LEFT,DOWN,UP ,RGHT,MPRV,MNXT, FN2, \ - UP, TRNS,DEL, TRNS,TRNS,PGUP,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - LEFT,DOWN,RGHT, TRNS, TRNS,TRNS,TRNS) -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(2), - [1] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), - [2] = ACTION_LAYER_TOGGLE(1), - [3] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_SWITCH) -}; diff --git a/keyboard/nerd/keymap_80_ansi150.c b/keyboard/nerd/keymap_80_ansi150.c deleted file mode 100644 index 72a7d83c9b..0000000000 --- a/keyboard/nerd/keymap_80_ansi150.c +++ /dev/null @@ -1,33 +0,0 @@ -#include "keymap_common.h" -#include "backlight.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default */ - KEYMAP_ANSI150(ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,PAUS, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,FN0, RCTL, LEFT,DOWN,RGHT), - /* Layer 1: Space Fn */ - KEYMAP_ANSI150(TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, \ - ESC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS,TRNS,TRNS, FN1, TRNS,FN0, TRNS, TRNS,TRNS,TRNS), - /* Layer 2: Functions */ - KEYMAP_ANSI150(SLEP, MYCM,WSCH,WHOM,MAIL,VOLD,VOLU,MUTE,MSEL,MPLY,MPRV,MNXT,MSTP, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,END, TRNS,TRNS,TRNS,TRNS,TRNS,HOME,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, \ - TRNS,BTN1,MS_U,BTN3,PSCR,SLCK,TRNS,TRNS,INS, TRNS,TRNS,TRNS,TRNS,FN3, TRNS,TRNS,TRNS, \ - CAPS,MS_L,MS_D,MS_R,PGDN,TRNS,LEFT,DOWN,UP ,RGHT,TRNS,TRNS, FN2, \ - TRNS, TRNS,DEL, TRNS,TRNS,PGUP,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS), -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(2), - [1] = ACTION_LAYER_TAP_KEY(2, KC_SPACE), - [2] = ACTION_LAYER_TOGGLE(1), - [3] = ACTION_BACKLIGHT_LEVEL(BACKLIGHT_SWITCH) -}; diff --git a/keyboard/nerd/keymap_common.c b/keyboard/nerd/keymap_common.c deleted file mode 100644 index 29ec4e53ef..0000000000 --- a/keyboard/nerd/keymap_common.c +++ /dev/null @@ -1,29 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ -#include "keymap_common.h" - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/nerd/keymap_common.h b/keyboard/nerd/keymap_common.h deleted file mode 100644 index e116635918..0000000000 --- a/keyboard/nerd/keymap_common.h +++ /dev/null @@ -1,89 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include <stdint.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - -#define KEYMAP( \ - K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \ - K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K71, K65, \ - K07, K79, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K67, K86, \ - K06, K05, K78, K70, K72, K73, K74, K75, K76, K77, K87 \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09 }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19 }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29 }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39 }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, KC_##K48, KC_##K49 }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, KC_##K58, KC_##K59 }, \ - { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, KC_##K68, KC_##K69 }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, KC_##K78, KC_##K79 }, \ - { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_##K87, KC_##K88, KC_##K89 } \ -} - -#ifdef NERD_LAYOUT_60 - #define KEYMAP_ANSI150( \ - K08, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K65, \ - K07, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, \ - K06, K05, K78, K70, K73, K74, K75 \ - ) KEYMAP( \ - K08, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ - NO, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, NO, NO, NO, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, NO, NO, NO, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, NO, K65, \ - K07, NO, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, NO, NO, \ - K06, K05, K78, K70, NO, K73, K74, K75, NO, NO, NO \ - ) -#endif - -#ifdef NERD_LAYOUT_80 - #define KEYMAP_ANSI150( \ - K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \ - K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, K65, \ - K07, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, K86, \ - K06, K05, K78, K70, K73, K74, K75, K76, K77, K87 \ - ) KEYMAP( \ - K08, K09, K18, K19, K28, K29, K38, K39, K48, K49, K58, K59, K68, K69, K88, K89, \ - K00, K01, K10, K11, K20, K21, K30, K31, K40, K41, K50, K51, K60, K61, K80, K81, K84, \ - K02, K03, K12, K13, K22, K23, K32, K33, K42, K43, K52, K53, K62, K63, K82, K83, K85, \ - K04, K14, K15, K24, K25, K34, K35, K44, K45, K54, K55, K64, NO, K65, \ - K07, NO, K16, K17, K26, K27, K36, K37, K46, K47, K56, K57, K66, NO, K86, \ - K06, K05, K78, K70, NO, K73, K74, K75, K76, K77, K87 \ - ) -#endif - -#endif // KEYMAP_COMMON_H diff --git a/keyboard/nerd/matrix.c b/keyboard/nerd/matrix.c deleted file mode 100644 index eb5a9ab4f1..0000000000 --- a/keyboard/nerd/matrix.c +++ /dev/null @@ -1,221 +0,0 @@ -/* -Copyright 2014 Ralf Schmitt <ralf@bunkertor.net> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "backlight.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint16_t read_inputs(void); -static void init_inputs(void); -static void init_outputs(void); -static void reset_inputs(void); -static void reset_outputs(void); -static void select_output(uint8_t col); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - backlight_init_ports(); - init_inputs(); - init_outputs(); - - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { - reset_inputs(); - reset_outputs(); - select_output(col); - _delay_us(3); - uint16_t rows = read_inputs(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - if (debouncing) { - dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); - } - debouncing = DEBOUNCE; - } - } - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - -static void init_inputs(void) -{ - DDRE &= ~0b01000000; // PE6 (Col 0) - DDRB &= ~0b00001111; // PB0 (Col 1), PB1 (Col 2), PB2 (Col 3), PB3 (Col 4) - DDRF &= ~0b00000001; // PF0 (Col 5) - DDRD &= ~0b00100011; // PD0 (Col 6), PD1 (Col 8 TKL), PD5 (Col 7) -} - -static uint16_t read_inputs(void) -{ - return (PINE&(1<<6) ? 0 : (1<<0)) | // PE6 (Col 0) - (PINB&(1<<0) ? 0 : (1<<1)) | // PB0 (Col 1) - (PINB&(1<<1) ? 0 : (1<<2)) | // PB1 (Col 2) - (PINB&(1<<2) ? 0 : (1<<3)) | // PB2 (Col 3) - (PINB&(1<<3) ? 0 : (1<<4)) | // PB3 (Col 4) - (PINF&(1<<0) ? 0 : (1<<5)) | // PF0 (Col 5) - (PIND&(1<<0) ? 0 : (1<<6)) | // PD0 (Col 6) - (PIND&(1<<5) ? 0 : (1<<7)) | // PD5 (Col 7) - (PIND&(1<<1) ? 0 : (1<<8)); // PD1 (Col 8 TKL) -} - -static void reset_inputs(void) -{ - PORTE |= 0b01000000; // PE6 (Col 0) - PORTB |= 0b00001111; // PB0 (Col 1), PB1 (Col 2), PB2 (Col 3), PB3 (Col 4) - PORTF |= 0b00000001; // PF0 (Col 5) - PORTD |= 0b00100011; // PD0 (Col 6), PD1 (Col 8 TKL), PD5 (Col 7) -} - -static void init_outputs(void) -{ - DDRB |= 0b00010000; // PB4 (Row 0) - DDRE |= 0b00000100; // PE2 (Row 1) - DDRF |= 0b11110010; // PF4 (Row 2), PF7 (Row 3), PF1 (Row 4), PF6 (Row 5), PF5 (Row 7) - DDRC |= 0b11000000; // PC6 (Row 6), PC7 (Row 9) - DDRD |= 0b10000000; // PD7 (Row 8) -} - -static void reset_outputs(void) -{ - PORTB |= 0b00010000; // PB4 (Row 0) - PORTE |= 0b00000100; // PE2 (Row 1) - PORTF |= 0b11110010; // PF4 (Row 2), PF7 (Row 3), PF1 (Row 4), PF6 (Row 5), PF5 (Row 7) - PORTC |= 0b11000000; // PC6 (Row 6), PC7 (Row 9) - PORTD |= 0b10000000; // PD7 (Row 8) -} - -static void select_output(uint8_t col) -{ - switch (col) { - case 0: - PORTB &= ~(1<<4); - break; - case 1: - PORTE &= ~(1<<2); - break; - case 2: - PORTF &= ~(1<<4); - break; - case 3: - PORTF &= ~(1<<7); - break; - case 4: - PORTF &= ~(1<<1); - break; - case 5: - PORTF &= ~(1<<6); - break; - case 6: - PORTC &= ~(1<<6); - break; - case 7: - PORTF &= ~(1<<5); - break; - case 8: - PORTD &= ~(1<<7); - break; - case 9: - PORTC &= ~(1<<7); - break; - } -} diff --git a/keyboard/onekey/Makefile b/keyboard/onekey/Makefile deleted file mode 100644 index 0b54e7d25c..0000000000 --- a/keyboard/onekey/Makefile +++ /dev/null @@ -1,132 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = onekey_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# project specific files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -#EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -#COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -#PS2_USE_BUSYWAIT = yes # uses primitive reference code -#PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin -#PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened) - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/protocol.mk -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/onekey/Makefile.pjrc b/keyboard/onekey/Makefile.pjrc deleted file mode 100644 index ebf0710f73..0000000000 --- a/keyboard/onekey/Makefile.pjrc +++ /dev/null @@ -1,103 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = onekey_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# project specific files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -MCU = atmega32u4 -#MCU = at90usb1286 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+5000) -#EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -CONSOLE_ENABLE = yes # Console for debug -#COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover(+500) - -PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support -PS2_USE_BUSYWAIT = yes # uses primitive reference code -#PS2_USE_INT = yes # uses external interrupt for falling edge of PS/2 clock pin -#PS2_USE_USART = yes # uses hardware USART engine for PS/2 signal receive(recomened) - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/protocol.mk -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/onekey/Makefile.vusb b/keyboard/onekey/Makefile.vusb deleted file mode 100644 index fb1fbdfea2..0000000000 --- a/keyboard/onekey/Makefile.vusb +++ /dev/null @@ -1,88 +0,0 @@ -# Target file name (without extension). -TARGET = onekey_vusb - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = atmega168p -MCU = atmega328p - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 12000000 - - -# Build Options -# comment out to disable the options. -# -#MOUSEKEY_ENABLE = yes # Mouse keys -#EXTRAKEY_ENABLE = yes # Audio control and System control -#NKRO_ENABLE = yes # USB Nkey Rollover - - - -#---------------- Programming Options -------------------------- -AVRDUDE = avrdude -# Type: avrdude -c ? to get a full listing. -AVRDUDE_PROGRAMMER = usbasp -AVRDUDE_PORT = -AVRDUDE_WRITE_FLASH = -U flash:w:$(TARGET).hex -#AVRDUDE_WRITE_EEPROM = -U eeprom:w:$(TARGET).eep - -# Uncomment the following if you want avrdude's erase cycle counter. -# Note that this counter needs to be initialized first using -Yn, -# see avrdude manual. -#AVRDUDE_ERASE_COUNTER = -y - -# Uncomment the following if you do /not/ wish a verification to be -# performed after programming the device. -#AVRDUDE_NO_VERIFY = -V - -# Increase verbosity level. Please use this when submitting bug -# reports about avrdude. See <http://savannah.nongnu.org/projects/avrdude> -# to submit bug reports. -#AVRDUDE_VERBOSE = -v -v - -#AVRDUDE_FLAGS = -p $(MCU) -P $(AVRDUDE_PORT) -c $(AVRDUDE_PROGRAMMER) -AVRDUDE_FLAGS = -p $(MCU) -c $(AVRDUDE_PROGRAMMER) -AVRDUDE_FLAGS += $(AVRDUDE_NO_VERIFY) -AVRDUDE_FLAGS += $(AVRDUDE_VERBOSE) -AVRDUDE_FLAGS += $(AVRDUDE_ERASE_COUNTER) - -PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE_EEPROM) - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBasp 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=2048 - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - - -include $(TMK_DIR)/protocol.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/protocol/vusb.mk -include $(TMK_DIR)/rules.mk diff --git a/keyboard/onekey/README.md b/keyboard/onekey/README.md deleted file mode 100644 index 7413f3880e..0000000000 --- a/keyboard/onekey/README.md +++ /dev/null @@ -1,5 +0,0 @@ -Onekey -====== -Just one key keyboard for example. It sends 'a' key if pins PB0 and PB1 are short-circuited. - -https://github.com/tmk/tmk_keyboard/issues/56 diff --git a/keyboard/onekey/config.h b/keyboard/onekey/config.h deleted file mode 100644 index bf1d2b1ed3..0000000000 --- a/keyboard/onekey/config.h +++ /dev/null @@ -1,156 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1111 -#define DEVICE_VER 0x0001 -#define MANUFACTURER geekhack -#define PRODUCT Onekey -#define DESCRIPTION t.m.k. keyboard firmware for Onekey - -/* key matrix size */ -#define MATRIX_ROWS 1 -#define MATRIX_COLS 1 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 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 - - -/* 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 1 -#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<<ISC11) | \ - (0<<ISC10)); \ -} while (0) -#define PS2_INT_ON() do { \ - EIMSK |= (1<<INT1); \ -} while (0) -#define PS2_INT_OFF() do { \ - EIMSK &= ~(1<<INT1); \ -} while (0) -#define PS2_INT_VECT INT1_vect -#endif - - -/* 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 -#define PS2_CLOCK_DDR DDRD -#define PS2_CLOCK_BIT 5 -#define PS2_DATA_PORT PORTD -#define PS2_DATA_PIN PIND -#define PS2_DATA_DDR DDRD -#define PS2_DATA_BIT 2 - -/* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ -/* set DDR of CLOCK as input to be slave */ -#define PS2_USART_INIT() do { \ - PS2_CLOCK_DDR &= ~(1<<PS2_CLOCK_BIT); \ - PS2_DATA_DDR &= ~(1<<PS2_DATA_BIT); \ - UCSR1C = ((1 << UMSEL10) | \ - (3 << UPM10) | \ - (0 << USBS1) | \ - (3 << UCSZ10) | \ - (0 << UCPOL1)); \ - UCSR1A = 0; \ - UBRR1H = 0; \ - UBRR1L = 0; \ -} while (0) -#define PS2_USART_RX_INT_ON() do { \ - UCSR1B = ((1 << RXCIE1) | \ - (1 << RXEN1)); \ -} while (0) -#define PS2_USART_RX_POLL_ON() do { \ - UCSR1B = (1 << RXEN1); \ -} while (0) -#define PS2_USART_OFF() do { \ - UCSR1C = 0; \ - UCSR1B &= ~((1 << RXEN1) | \ - (1 << TXEN1)); \ -} while (0) -#define PS2_USART_RX_READY (UCSR1A & (1<<RXC1)) -#define PS2_USART_RX_DATA UDR1 -#define PS2_USART_ERROR (UCSR1A & ((1<<FE1) | (1<<DOR1) | (1<<UPE1))) -#define PS2_USART_RX_VECT USART1_RX_vect -#endif -#endif - -#endif diff --git a/keyboard/onekey/keymap.c b/keyboard/onekey/keymap.c deleted file mode 100644 index dce4e9191e..0000000000 --- a/keyboard/onekey/keymap.c +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - - -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - {{KC_A}}, -}; - -/* - * Fn action definition - */ -static const uint16_t PROGMEM fn_actions[] = { -}; - - - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/onekey/led.c b/keyboard/onekey/led.c deleted file mode 100644 index 2d52fbf1c3..0000000000 --- a/keyboard/onekey/led.c +++ /dev/null @@ -1,25 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ -} diff --git a/keyboard/onekey/matrix.c b/keyboard/onekey/matrix.c deleted file mode 100644 index 29df868321..0000000000 --- a/keyboard/onekey/matrix.c +++ /dev/null @@ -1,176 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - -/* Column pin configuration - * col: 0 - * pin: B0 - */ -static void init_cols(void) -{ - // Input with pull-up(DDR:0, PORT:1) - DDRB &= ~(1<<0); - PORTB |= (1<<0); -} - -static matrix_row_t read_cols(void) -{ - return (PINB&(1<<0) ? 0 : (1<<0)); -} - -/* Row pin configuration - * row: 0 - * pin: B1 - */ -static void unselect_rows(void) -{ - // Hi-Z(DDR:0, PORT:0) to unselect - DDRB &= ~0b00000010; - PORTB &= ~0b00000010; -} - -static void select_row(uint8_t row) -{ - // Output low(DDR:1, PORT:0) to select - switch (row) { - case 0: - DDRB |= (1<<1); - PORTB &= ~(1<<1); - break; - } -} diff --git a/keyboard/onekey/usbconfig.h b/keyboard/onekey/usbconfig.h deleted file mode 100644 index d0ca4c717e..0000000000 --- a/keyboard/onekey/usbconfig.h +++ /dev/null @@ -1,377 +0,0 @@ -/* Name: usbconfig.h - * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers - * Author: Christian Starkjohann - * Creation Date: 2005-04-01 - * Tabsize: 4 - * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH - * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) - * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ - */ - -#ifndef __usbconfig_h_included__ -#define __usbconfig_h_included__ - - -/* -General Description: -This file is an example configuration (with inline documentation) for the USB -driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is -also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may -wire the lines to any other port, as long as D+ is also wired to INT0 (or any -other hardware interrupt, as long as it is the highest level interrupt, see -section at the end of this file). -*/ - -/* ---------------------------- Hardware Config ---------------------------- */ - -#define USB_CFG_IOPORTNAME D -/* This is the port where the USB bus is connected. When you configure it to - * "B", the registers PORTB, PINB and DDRB will be used. - */ -#define USB_CFG_DMINUS_BIT 3 -/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. - * This may be any bit in the port. - */ -#define USB_CFG_DPLUS_BIT 2 -/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. - * This may be any bit in the port. Please note that D+ must also be connected - * to interrupt pin INT0! [You can also use other interrupts, see section - * "Optional MCU Description" below, or you can connect D- to the interrupt, as - * it is required if you use the USB_COUNT_SOF feature. If you use D- for the - * interrupt, the USB interrupt will also be triggered at Start-Of-Frame - * markers every millisecond.] - */ -#define USB_CFG_CLOCK_KHZ (F_CPU/1000) -/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, - * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code - * require no crystal, they tolerate +/- 1% deviation from the nominal - * frequency. All other rates require a precision of 2000 ppm and thus a - * crystal! - * Since F_CPU should be defined to your actual clock rate anyway, you should - * not need to modify this setting. - */ -#define USB_CFG_CHECK_CRC 0 -/* Define this to 1 if you want that the driver checks integrity of incoming - * data packets (CRC checks). CRC checks cost quite a bit of code size and are - * currently only available for 18 MHz crystal clock. You must choose - * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. - */ - -/* ----------------------- Optional Hardware Config ------------------------ */ - -/* #define USB_CFG_PULLUP_IOPORTNAME D */ -/* If you connect the 1.5k pullup resistor from D- to a port pin instead of - * V+, you can connect and disconnect the device from firmware by calling - * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). - * This constant defines the port on which the pullup resistor is connected. - */ -/* #define USB_CFG_PULLUP_BIT 4 */ -/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined - * above) where the 1.5k pullup resistor is connected. See description - * above for details. - */ - -/* --------------------------- Functional Range ---------------------------- */ - -#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 -/* Define this to 1 if you want to compile a version with two endpoints: The - * default control endpoint 0 and an interrupt-in endpoint (any other endpoint - * number). - */ -#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 -/* Define this to 1 if you want to compile a version with three endpoints: The - * default control endpoint 0, an interrupt-in endpoint 3 (or the number - * configured below) and a catch-all default interrupt-in endpoint as above. - * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. - */ -#define USB_CFG_EP3_NUMBER 3 -/* If the so-called endpoint 3 is used, it can now be configured to any other - * endpoint number (except 0) with this macro. Default if undefined is 3. - */ -/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ -/* The above macro defines the startup condition for data toggling on the - * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. - * Since the token is toggled BEFORE sending any data, the first packet is - * sent with the oposite value of this configuration! - */ -#define USB_CFG_IMPLEMENT_HALT 0 -/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature - * for endpoint 1 (interrupt endpoint). Although you may not need this feature, - * it is required by the standard. We have made it a config option because it - * bloats the code considerably. - */ -#define USB_CFG_SUPPRESS_INTR_CODE 0 -/* Define this to 1 if you want to declare interrupt-in endpoints, but don't - * want to send any data over them. If this macro is defined to 1, functions - * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if - * you need the interrupt-in endpoints in order to comply to an interface - * (e.g. HID), but never want to send any data. This option saves a couple - * of bytes in flash memory and the transmit buffers in RAM. - */ -#define USB_CFG_INTR_POLL_INTERVAL 10 -/* If you compile a version with endpoint 1 (interrupt-in), this is the poll - * interval. The value is in milliseconds and must not be less than 10 ms for - * low speed devices. - */ -#define USB_CFG_IS_SELF_POWERED 0 -/* Define this to 1 if the device has its own power supply. Set it to 0 if the - * device is powered from the USB bus. - */ -#define USB_CFG_MAX_BUS_POWER 100 -/* Set this variable to the maximum USB bus power consumption of your device. - * The value is in milliamperes. [It will be divided by two since USB - * communicates power requirements in units of 2 mA.] - */ -#define USB_CFG_IMPLEMENT_FN_WRITE 1 -/* Set this to 1 if you want usbFunctionWrite() to be called for control-out - * transfers. Set it to 0 if you don't need it and want to save a couple of - * bytes. - */ -#define USB_CFG_IMPLEMENT_FN_READ 0 -/* Set this to 1 if you need to send control replies which are generated - * "on the fly" when usbFunctionRead() is called. If you only want to send - * data from a static buffer, set it to 0 and return the data from - * usbFunctionSetup(). This saves a couple of bytes. - */ -#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 -/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. - * You must implement the function usbFunctionWriteOut() which receives all - * interrupt/bulk data sent to any endpoint other than 0. The endpoint number - * can be found in 'usbRxToken'. - */ -#define USB_CFG_HAVE_FLOWCONTROL 0 -/* Define this to 1 if you want flowcontrol over USB data. See the definition - * of the macros usbDisableAllRequests() and usbEnableAllRequests() in - * usbdrv.h. - */ -#define USB_CFG_DRIVER_FLASH_PAGE 0 -/* If the device has more than 64 kBytes of flash, define this to the 64 k page - * where the driver's constants (descriptors) are located. Or in other words: - * Define this to 1 for boot loaders on the ATMega128. - */ -#define USB_CFG_LONG_TRANSFERS 0 -/* Define this to 1 if you want to send/receive blocks of more than 254 bytes - * in a single control-in or control-out transfer. Note that the capability - * for long transfers increases the driver size. - */ -/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ -/* This macro is a hook if you want to do unconventional things. If it is - * defined, it's inserted at the beginning of received message processing. - * If you eat the received message and don't want default processing to - * proceed, do a return after doing your things. One possible application - * (besides debugging) is to flash a status LED on each packet. - */ -/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ -/* This macro is a hook if you need to know when an USB RESET occurs. It has - * one parameter which distinguishes between the start of RESET state and its - * end. - */ -/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ -/* This macro (if defined) is executed when a USB SET_ADDRESS request was - * received. - */ -#define USB_COUNT_SOF 0 -/* define this macro to 1 if you need the global variable "usbSofCount" which - * counts SOF packets. This feature requires that the hardware interrupt is - * connected to D- instead of D+. - */ -/* #ifdef __ASSEMBLER__ - * macro myAssemblerMacro - * in YL, TCNT0 - * sts timer0Snapshot, YL - * endm - * #endif - * #define USB_SOF_HOOK myAssemblerMacro - * This macro (if defined) is executed in the assembler module when a - * Start Of Frame condition is detected. It is recommended to define it to - * the name of an assembler macro which is defined here as well so that more - * than one assembler instruction can be used. The macro may use the register - * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages - * immediately after an SOF pulse may be lost and must be retried by the host. - * What can you do with this hook? Since the SOF signal occurs exactly every - * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in - * designs running on the internal RC oscillator. - * Please note that Start Of Frame detection works only if D- is wired to the - * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! - */ -#define USB_CFG_CHECK_DATA_TOGGLING 0 -/* define this macro to 1 if you want to filter out duplicate data packets - * sent by the host. Duplicates occur only as a consequence of communication - * errors, when the host does not receive an ACK. Please note that you need to - * implement the filtering yourself in usbFunctionWriteOut() and - * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable - * for each control- and out-endpoint to check for duplicate packets. - */ -#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 -/* define this macro to 1 if you want the function usbMeasureFrameLength() - * compiled in. This function can be used to calibrate the AVR's RC oscillator. - */ -#define USB_USE_FAST_CRC 0 -/* The assembler module has two implementations for the CRC algorithm. One is - * faster, the other is smaller. This CRC routine is only used for transmitted - * messages where timing is not critical. The faster routine needs 31 cycles - * per byte while the smaller one needs 61 to 69 cycles. The faster routine - * may be worth the 32 bytes bigger code size if you transmit lots of data and - * run the AVR close to its limit. - */ - -/* -------------------------- Device Description --------------------------- */ - -#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) -/* USB vendor ID for the device, low byte first. If you have registered your - * own Vendor ID, define it here. Otherwise you may use one of obdev's free - * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) -/* This is the ID of the product, low byte first. It is interpreted in the - * scope of the vendor ID. If you have registered your own VID with usb.org - * or if you have licensed a PID from somebody else, define it here. Otherwise - * you may use one of obdev's free shared VID/PID pairs. See the file - * USB-IDs-for-free.txt for details! - * *** IMPORTANT NOTE *** - * This template uses obdev's shared VID/PID pair for Vendor Class devices - * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand - * the implications! - */ -#define USB_CFG_DEVICE_VERSION 0x00, 0x01 -/* Version number of the device: Minor number first, then major number. - */ -#define USB_CFG_VENDOR_NAME 't', '.', 'm', '.', 'k', '.' -#define USB_CFG_VENDOR_NAME_LEN 6 -/* These two values define the vendor name returned by the USB device. The name - * must be given as a list of characters under single quotes. The characters - * are interpreted as Unicode (UTF-16) entities. - * If you don't want a vendor name string, undefine these macros. - * ALWAYS define a vendor name containing your Internet domain name if you use - * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for - * details. - */ -#define USB_CFG_DEVICE_NAME 'P', 'S', '/', '2', ' ', 'k', 'e', 'y', 'b', 'o', 'a', 'r', 'd', ' ', 'c', 'o', 'n', 'v', 'e', 'r', 't', 'e', 'r' -#define USB_CFG_DEVICE_NAME_LEN 23 -/* Same as above for the device name. If you don't want a device name, undefine - * the macros. See the file USB-IDs-for-free.txt before you assign a name if - * you use a shared VID/PID. - */ -/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ -/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ -/* Same as above for the serial number. If you don't want a serial number, - * undefine the macros. - * It may be useful to provide the serial number through other means than at - * compile time. See the section about descriptor properties below for how - * to fine tune control over USB descriptors such as the string descriptor - * for the serial number. - */ -#define USB_CFG_DEVICE_CLASS 0 -#define USB_CFG_DEVICE_SUBCLASS 0 -/* See USB specification if you want to conform to an existing device class. - * Class 0xff is "vendor specific". - */ -#define USB_CFG_INTERFACE_CLASS 3 /* HID */ -#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ -#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ -/* See USB specification if you want to conform to an existing device class or - * protocol. The following classes must be set at interface level: - * HID class is 3, no subclass and protocol required (but may be useful!) - * CDC class is 2, use subclass 2 and protocol 1 for ACM - */ -#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 -/* Define this to the length of the HID report descriptor, if you implement - * an HID device. Otherwise don't define it or define it to 0. - * If you use this define, you must add a PROGMEM character array named - * "usbHidReportDescriptor" to your code which contains the report descriptor. - * Don't forget to keep the array and this define in sync! - */ - -/* #define USB_PUBLIC static */ -/* Use the define above if you #include usbdrv.c instead of linking against it. - * This technique saves a couple of bytes in flash memory. - */ - -/* ------------------- Fine Control over USB Descriptors ------------------- */ -/* If you don't want to use the driver's default USB descriptors, you can - * provide our own. These can be provided as (1) fixed length static data in - * flash memory, (2) fixed length static data in RAM or (3) dynamically at - * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more - * information about this function. - * Descriptor handling is configured through the descriptor's properties. If - * no properties are defined or if they are 0, the default descriptor is used. - * Possible properties are: - * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched - * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is - * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if - * you want RAM pointers. - * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found - * in static memory is in RAM, not in flash memory. - * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), - * the driver must know the descriptor's length. The descriptor itself is - * found at the address of a well known identifier (see below). - * List of static descriptor names (must be declared PROGMEM if in flash): - * char usbDescriptorDevice[]; - * char usbDescriptorConfiguration[]; - * char usbDescriptorHidReport[]; - * char usbDescriptorString0[]; - * int usbDescriptorStringVendor[]; - * int usbDescriptorStringDevice[]; - * int usbDescriptorStringSerialNumber[]; - * Other descriptors can't be provided statically, they must be provided - * dynamically at runtime. - * - * Descriptor properties are or-ed or added together, e.g.: - * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) - * - * The following descriptors are defined: - * USB_CFG_DESCR_PROPS_DEVICE - * USB_CFG_DESCR_PROPS_CONFIGURATION - * USB_CFG_DESCR_PROPS_STRINGS - * USB_CFG_DESCR_PROPS_STRING_0 - * USB_CFG_DESCR_PROPS_STRING_VENDOR - * USB_CFG_DESCR_PROPS_STRING_PRODUCT - * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER - * USB_CFG_DESCR_PROPS_HID - * USB_CFG_DESCR_PROPS_HID_REPORT - * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) - * - * Note about string descriptors: String descriptors are not just strings, they - * are Unicode strings prefixed with a 2 byte header. Example: - * int serialNumberDescriptor[] = { - * USB_STRING_DESCRIPTOR_HEADER(6), - * 'S', 'e', 'r', 'i', 'a', 'l' - * }; - */ - -#define USB_CFG_DESCR_PROPS_DEVICE 0 -#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 -#define USB_CFG_DESCR_PROPS_STRINGS 0 -#define USB_CFG_DESCR_PROPS_STRING_0 0 -#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 -#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 -#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 -//#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC -#define USB_CFG_DESCR_PROPS_HID 0 -#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC -//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 -#define USB_CFG_DESCR_PROPS_UNKNOWN 0 - -/* ----------------------- Optional MCU Description ------------------------ */ - -/* The following configurations have working defaults in usbdrv.h. You - * usually don't need to set them explicitly. Only if you want to run - * the driver on a device which is not yet supported or with a compiler - * which is not fully supported (such as IAR C) or if you use a differnt - * interrupt than INT0, you may have to define some of these. - */ -/* #define USB_INTR_CFG MCUCR */ -/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ -/* #define USB_INTR_CFG_CLR 0 */ -/* #define USB_INTR_ENABLE GIMSK */ -/* #define USB_INTR_ENABLE_BIT INT0 */ -/* #define USB_INTR_PENDING GIFR */ -/* #define USB_INTR_PENDING_BIT INTF0 */ -/* #define USB_INTR_VECTOR INT0_vect */ - -#endif /* __usbconfig_h_included__ */ diff --git a/keyboard/phantom/Makefile.lufa b/keyboard/phantom/Makefile.lufa deleted file mode 100644 index a0b3b1444d..0000000000 --- a/keyboard/phantom/Makefile.lufa +++ /dev/null @@ -1,137 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = phantom_lufa - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - - -# List C source files here. (C dependencies are automatically generated.) -SRC += keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# 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) - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - - -# Boot Section Size in bytes -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/lufa.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -ansi: OPT_DEFS += -DLAYOUT_ANSI -ansi: all - -ansi_150: OPT_DEFS += -DLAYOUT_ANSI_150 -ansi_150: all - -iso: OPT_DEFS += -DLAYOUT_ISO -iso: all - -iso_150: OPT_DEFS += -DLAYOUT_ISO_150 -iso_150: all - -7bit: OPT_DEFS += -DLAYOUT_7BIT -7bit: all diff --git a/keyboard/phantom/Makefile.pjrc b/keyboard/phantom/Makefile.pjrc deleted file mode 100644 index 7bf5f80f40..0000000000 --- a/keyboard/phantom/Makefile.pjrc +++ /dev/null @@ -1,108 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = phantom_pjrc - -# Directory common source filess exist -TMK_DIR = ../../tmk_core - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# keyboard dependent files -SRC = keymap.c \ - matrix.c \ - led.c - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -#MCU = at90usb162 # Teensy 1.0 -MCU = atmega32u4 # Teensy 2.0 -#MCU = at90usb646 # Teensy++ 1.0 -#MCU = at90usb1286 # Teensy++ 2.0 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -#MOUSEKEY_ENABLE = yes # Mouse keys(+5000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover(+500) -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TMK_DIR) - -include $(TMK_DIR)/protocol/pjrc.mk -include $(TMK_DIR)/common.mk -include $(TMK_DIR)/rules.mk - -ansi: OPT_DEFS += -DLAYOUT_ANSI -ansi: all - -ansi_150: OPT_DEFS += -DLAYOUT_ANSI_150 -ansi_150: all - -iso: OPT_DEFS += -DLAYOUT_ISO -iso: all - -iso_150: OPT_DEFS += -DLAYOUT_ISO_150 -iso_150: all - -7bit: OPT_DEFS += -DLAYOUT_7BIT -7bit: all diff --git a/keyboard/phantom/README.md b/keyboard/phantom/README.md deleted file mode 100644 index 368ae97e85..0000000000 --- a/keyboard/phantom/README.md +++ /dev/null @@ -1,248 +0,0 @@ -Phantom keyboard firmware -====================== -DIY keyboard developed by Geekhack and Deskthority communities. -The PCB was engineered by bpiphany from the original idea of HaveANiceDay. - -## Wiki on Deskthority.net -- [Info](http://deskthority.net/wiki/Phantom) -- [Assembly Instructions](http://deskthority.net/wiki/Phantom) - - -Build ------ -Move to this directory then just run `make` like: - - $ make -f Makefile.[pjrc|lufa] [ansi|ansi_150|iso|iso_150|7bit] - -Use `Makefile.pjrc` if you want to use PJRC stack or use `Makefile.lufa` for LUFA stack. - - -LEDs ----- -It is possible to configure the LEDs in 2 different ways. - -### 1. LED Brightness -The brightness of the LEDs can be controlled by software. - -To select brightness edit [config.h](config.h) and set `LED_BRIGHTNESS` to a value -between 0 and 255: - - #define LED_BRIGHTNESS 250 - - -### 2. Sleep LED -It is possible to have the LEDs fade in and out when the computer is suspended. - -To enable this feature, uncomment the `SLEEP_LED_ENABLE` line in the makefile you are using: - - SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend - -*Note that this will set the LEDs to full brightness as this feature can't be combined with the brightness control.* - - -Keymap ------- -The PCB supports multiple physical layouts. -Each layout have their own keymap file. - -*Note that only the ANSI keymap is tested on actual hardware.* - -To customize a keymap: - -1. Edit the file that corresponds to your layout. -2. Specify your layout when building. - -See [keymap.c](keymap.c) to define your own custom layout. - - -### 1. ANSI -This is the default keymap. - -See [keymap_ansi.h](keymap_ansi.h) for detail. - -#### 1.0. ANSI Default Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - |-----------------------------------------------------------| '-----------' - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return | - |-----------------------------------------------------------| ,---. - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - |-----------------------------------------------------------| ,-----------. - |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 1.1. ANSI Media Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - | | | | | | | | | | | | | | | | | | | |Slp| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt|Media| | | | | - |-----------------------------------------------------------| '-----------' - | | | | | | | | | | | | | | - |-----------------------------------------------------------| ,---. - | | | |Clc| | | | | | | |Caps | | | - |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' - - -### 2. ANSI 150 -Layout with 1.5 unit modifiers. - -See [keymap_ansi_150.h](keymap_ansi_150.h) for detail. - -#### 2.0. ANSI 150 Default Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |Del|End|PgD| - |-----------------------------------------------------------| '-----------' - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '|Return | - |-----------------------------------------------------------| ,---. - |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - |-----------------------------------------------------------| ,-----------. - |Ctl |Gui|Alt | Space |Alt |Gui|Ctl | |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 2.1. ANSI 150 Media Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - | | | | | | | | | | | | | | | | | | | |Slp| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt|Media| | | | | - |-----------------------------------------------------------| '-----------' - | | | | | | | | | | | | | | - |-----------------------------------------------------------| ,---. - | | | |Clc| | | | | | | |Caps | | | - |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' - - -### 3. ISO -ISO layout. - -See [keymap_iso.h](keymap_iso.h) for detail. - -#### 3.0. ISO Default Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | |Del|End|PgD| - |------------------------------------------------------` Ret| '-----------' - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '| #| | - |-----------------------------------------------------------| ,---. - |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - |-----------------------------------------------------------| ,-----------. - |Ctl|Gui|Alt| Space |Alt|Gui|App|Ctl| |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 3.1. ISO Media Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - | | | | | | | | | | | | | | | | | | | |Slp| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt| | | | | | - |------------------------------------------------------` Med| '-----------' - | | | | | | | | | | | | | | | - |-----------------------------------------------------------| ,---. - | | | | |Clc| | | | | | | |Caps | | | - |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' - - -### 4. ISO 150 -ISO layout with 1.5 unit modifiers. - -See [keymap_iso_150.h](keymap_iso_150.h) for detail. - -#### 4.0. ISO 150 Default Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| | |Del|End|PgD| - |------------------------------------------------------` Ret| '-----------' - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '| #| | - |-----------------------------------------------------------| ,---. - |Shif| \| Z| X| C| V| B| N| M| ,| .| /|Shift | |Up | - |-----------------------------------------------------------| ,-----------. - |Ctl |Gui|Alt | Space |Alt |Gui|Ctl | |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 4.1. ISO 150 Media Layer - ,---. ,---------------. ,---------------. ,---------------. ,-----------. - | | | | | | | | | | | | | | | | | | | |Slp| - `---' `---------------' `---------------' `---------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt| | | | | | - |------------------------------------------------------` Med| '-----------' - | | | | | | | | | | | | | | | - |-----------------------------------------------------------| ,---. - | | | | |Clc| | | | | | | |Caps | | | - |-----------------------------------------------------------| ,-----------. - | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' - - -### 5. 7bit -Layout using all the available keys on the PCB. - -This keymap is only provided as an example of what can be done using this layout. -No real thought has been put into this keymap. - -See [keymap_7bit.h](keymap_7bit.h) for detail. - -#### 5.0. 7bit Default Layer - ,-----------------------------------------------------------. ,-----------. - |Esc|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|V- |V+ | |PrS|ScL|Pau| - `-----------------------------------------------------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| (| )| |Ins|Hom|PgU| - |-----------------------------------------------------------| |-----------| - |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| |Del|End|PgD| - |-----------------------------------------------------------| |-----------| - |Fn0 | A| S| D| F| G| H| J| K| L| ;| '| \| Ret| |Stp|Ply|Med| - |-----------------------------------------------------------| |-----------| - |Cap|Shif| Z| X| C| V| B| N| M| ,| .| /|Shift |Cap| |Prv|Up |Nxt| - |-----------------------------------------------------------| |-----------| - |Ctrl |Gui|Alt |Spc |Bspc |Del|Ret |Alt |Gui |App|Ctrl | |Lef|Dow|Rig| - `-----------------------------------------------------------' `-----------' - -#### 5.1. 7bit Media Layer - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | | | | | | | | | |Slp| - `-----------------------------------------------------------' `-----------' - ,-----------------------------------------------------------. ,-----------. - | | | | | | | | | | |Mut|V- |V+ | | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | |Stp|Ply|Prv|Nxt|Media| | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | | | | | | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | | | | | | | | | | | - |-----------------------------------------------------------| |-----------| - | | | | | | | | | | | | | | | | - `-----------------------------------------------------------' `-----------' diff --git a/keyboard/phantom/config.h b/keyboard/phantom/config.h deleted file mode 100644 index 6f5389336e..0000000000 --- a/keyboard/phantom/config.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6057 -#define DEVICE_VER 0x0001 -#define MANUFACTURER t.m.k. -#define PRODUCT Phantom - -/* message strings */ -#define DESCRIPTION t.m.k. keyboard firmware for Phantom - -/* matrix size */ -#define MATRIX_ROWS 6 -#define MATRIX_COLS 17 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if need no debouncing */ -#define DEBOUNCE 7 - -/* Set LED brightness 0-255. - * This have no effect if sleep LED is enabled. */ -#define LED_BRIGHTNESS 250 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboard/phantom/keymap.c b/keyboard/phantom/keymap.c deleted file mode 100644 index a040434f24..0000000000 --- a/keyboard/phantom/keymap.c +++ /dev/null @@ -1,151 +0,0 @@ -/* -Copyright 2011 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * Keymap for Phantom controller - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "debug.h" -#include "keymap.h" - -// Convert physical keyboard layout to matrix array. -// This is a macro to define keymap easily in keyboard layout form. -#define KEYMAP( \ - K5A, K5B, K5C, K5D, K5E, K5F, K5G, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4N, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, K2P, K2Q, K2R, \ - K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1M, K1N, K1P, K1Q, K1R, \ - K0A, K0B, K0C, K0D, K0F, K0G, K0H, K0K, K0L, K0M, K0N, K0P, K0Q, K0R \ -) { \ -/* 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 */ \ -/* 5 */ { KC_##K5A, KC_##K4A, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F, KC_##K5H, KC_##K5I, KC_##K5J, KC_##K5K, KC_##K5L, KC_##K5M, KC_##K5N, KC_##K5O, KC_##K5P, KC_##K5Q, KC_##K5R}, \ -/* 4 */ { KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F, KC_##K4G, KC_##K4H, KC_##K4I, KC_##K4J, KC_##K4K, KC_##K4L, KC_##K4M, KC_##K4N, KC_##K4O, KC_##K4P, KC_##K4Q, KC_##K4R}, \ -/* 3 */ { KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F, KC_##K3G, KC_##K3H, KC_##K3I, KC_##K3J, KC_##K3K, KC_##K3L, KC_##K3M, KC_##K3N, KC_##K3P, KC_##K3Q, KC_##K3R}, \ -/* 2 */ { KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F, KC_##K2G, KC_##K2H, KC_##K2I, KC_##K2J, KC_##K2K, KC_##K2L, KC_##K2M, KC_##K2N, KC_##K2P, KC_##K2Q, KC_##K2R}, \ -/* 1 */ { KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F, KC_##K1G, KC_##K1H, KC_##K1I, KC_##K1J, KC_##K1K, KC_##K1L, KC_##K1M, KC_##K1N, KC_##K1P, KC_##K1Q, KC_##K1R}, \ -/* 0 */ { KC_##K0A, KC_##K0B, KC_##K0C, KC_##K5B, KC_##K0D, KC_##K0F, KC_##K5G, KC_##K0G, KC_##K0H, KC_NO, KC_##K0K, KC_##K0L, KC_##K0M, KC_##K0N, KC_##K0P, KC_##K0Q, KC_##K0R} \ -} - -#define KEYMAP_ANSI( \ - K5A, K5C, K5D, K5E, K5F, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1Q, \ - K0A, K0B, K0C, K0G, K0K, K0L, K0M, K0N, K0P, K0Q, K0R \ -) KEYMAP( \ - K5A, NO, K5C, K5D, K5E, K5F, NO, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, NO, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, NO, K2N, NO, NO, NO, \ - K1A, NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, NO, K1N, NO, K1Q, NO, \ - K0A, K0B, K0C, NO, NO, K0G, NO, K0K, K0L, K0M, K0N, K0P, K0Q, K0R \ -) - -#define KEYMAP_ANSI_150( \ - K5A, K5C, K5D, K5E, K5F, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2N, \ - K1A, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1Q, \ - K0A, K0B, K0C, K0G, K0L, K0M, K0N, K0P, K0Q, K0R \ -) KEYMAP( \ - K5A, NO, K5C, K5D, K5E, K5F, NO, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, NO, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3N, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, NO, K2N, NO, NO, NO, \ - K1A, NO, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, NO, K1N, NO, K1Q, NO, \ - K0A, K0B, K0C, NO, NO, K0G, NO, NO, K0L, K0M, K0N, K0P, K0Q, K0R \ -) - -#define KEYMAP_ISO( \ - K5A, K5C, K5D, K5E, K5F, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, \ - K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1Q, \ - K0A, K0B, K0C, K0G, K0K, K0L, K0M, K0N, K0P, K0Q, K0R \ -) KEYMAP( \ - K5A, NO, K5C, K5D, K5E, K5F, NO, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, NO, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, NO, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, NO, NO, NO, \ - K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, NO, K1N, NO, K1Q, NO, \ - K0A, K0B, K0C, NO, NO, K0G, NO, K0K, K0L, K0M, K0N, K0P, K0Q, K0R \ -) - -#define KEYMAP_ISO_150( \ - K5A, K5C, K5D, K5E, K5F, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, \ - K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, K1N, K1Q, \ - K0A, K0B, K0C, K0G, K0L, K0M, K0N, K0P, K0Q, K0R \ -) KEYMAP( \ - K5A, NO, K5C, K5D, K5E, K5F, NO, K5H, K5I, K5J, K5K, K5L, K5M, K5N, K5O, K5P, K5Q, K5R, \ - K4A, K4B, K4C, K4D, K4E, K4F, K4G, K4H, K4I, K4J, K4K, K4L, K4M, NO, K4O, K4P, K4Q, K4R, \ - K3A, K3B, K3C, K3D, K3E, K3F, K3G, K3H, K3I, K3J, K3K, K3L, K3M, NO, K3P, K3Q, K3R, \ - K2A, K2B, K2C, K2D, K2E, K2F, K2G, K2H, K2I, K2J, K2K, K2L, K2M, K2N, NO, NO, NO, \ - K1A, K1B, K1C, K1D, K1E, K1F, K1G, K1H, K1I, K1J, K1K, K1L, NO, K1N, NO, K1Q, NO, \ - K0A, K0B, K0C, NO, NO, K0G, NO, NO, K0L, K0M, K0N, K0P, K0Q, K0R \ -) - -#if defined(LAYOUT_7BIT) - #include "keymap_7bit.h" -#elif defined(LAYOUT_ISO_150) - #include "keymap_iso_150.h" -#elif defined(LAYOUT_ISO) - #include "keymap_iso.h" -#elif defined(LAYOUT_ANSI_150) - #include "keymap_ansi_150.h" -#else - #include "keymap_ansi.h" -#endif - -#define KEYMAPS_SIZE (sizeof(keymaps) / sizeof(keymaps[0])) -#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - if (layer < KEYMAPS_SIZE) { - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); - } else { - // fall back to layer 0 - return pgm_read_byte(&keymaps[0][(key.row)][(key.col)]); - } -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - action_t action; - if (FN_INDEX(keycode) < FN_ACTIONS_SIZE) { - action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]); - } else { - action.code = ACTION_NO; - } - return action; -} diff --git a/keyboard/phantom/keymap_7bit.h b/keyboard/phantom/keymap_7bit.h deleted file mode 100644 index e6c4eabb22..0000000000 --- a/keyboard/phantom/keymap_7bit.h +++ /dev/null @@ -1,42 +0,0 @@ -// Phantom 7bit -/* - * 7bit: - * - * ,-----------------------------------------------------------. ,-----------. - * |Esc|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|V- |V+ | |PrS|ScL|Pau| - * `-----------------------------------------------------------' `-----------' - * ,-----------------------------------------------------------. ,-----------. - * |~ | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| (| )| |Ins|Hom|PgU| - * |-----------------------------------------------------------| |-----------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs| |Del|End|PgD| - * |-----------------------------------------------------------| |-----------| - * |Fn0 | A| S| D| F| G| H| J| K| L| ;| '| \| Ret| |MSt|Ply|Med| - * |-----------------------------------------------------------| |-----------| - * |Cap|Shif| Z| X| C| V| B| N| M| ,| .| /|Shift |Cap| |Prv|Up |Nxt| - * |-----------------------------------------------------------| |-----------| - * |Ctrl |Gui|Alt |Spc |Bspc |Del|Ret |Alt |Gui |App|Ctrl | |Lef|Dow|Rig| - * `-----------------------------------------------------------' `-----------' - */ -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty + a few media keys */ - KEYMAP(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, VOLD,VOLU, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, FN1, FN2, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,BSLS,ENT, MSTP,MPLY,MSEL, \ - CAPS,LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,CAPS, MPRV,UP, MNXT, \ - LCTL,LGUI,LALT,SPC, BSPC,DEL, ENT, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP(\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU,TRNS,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [2] = ACTION_MODS_KEY(MOD_LSFT, KC_0) -}; diff --git a/keyboard/phantom/keymap_ansi.h b/keyboard/phantom/keymap_ansi.h deleted file mode 100644 index 96a4c9dfb3..0000000000 --- a/keyboard/phantom/keymap_ansi.h +++ /dev/null @@ -1,22 +0,0 @@ -// Phantom ANSI -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KEYMAP_ANSI(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP_ANSI(\ - TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS, TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, CAPS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) -}; diff --git a/keyboard/phantom/keymap_ansi_150.h b/keyboard/phantom/keymap_ansi_150.h deleted file mode 100644 index 7fdb9eb19a..0000000000 --- a/keyboard/phantom/keymap_ansi_150.h +++ /dev/null @@ -1,22 +0,0 @@ -// Phantom ANSI 150 -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KEYMAP_ANSI_150(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT, ENT, \ - LSFT, Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP_ANSI_150(\ - TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU,TRNS, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS, \ - TRNS, TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, CAPS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) -}; diff --git a/keyboard/phantom/keymap_iso.h b/keyboard/phantom/keymap_iso.h deleted file mode 100644 index 970f622eee..0000000000 --- a/keyboard/phantom/keymap_iso.h +++ /dev/null @@ -1,22 +0,0 @@ -// Phantom ISO -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KEYMAP_ISO(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,APP, RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP_ISO(\ - TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, CAPS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) -}; diff --git a/keyboard/phantom/keymap_iso_150.h b/keyboard/phantom/keymap_iso_150.h deleted file mode 100644 index ab9acda1c0..0000000000 --- a/keyboard/phantom/keymap_iso_150.h +++ /dev/null @@ -1,22 +0,0 @@ -// Phantom ISO 150 -static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - KEYMAP_ISO_150(\ - ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,SLCK,BRK, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, INS, HOME,PGUP, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC, DEL, END, PGDN, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH, RSFT, UP, \ - LCTL,LGUI,LALT, SPC, RALT,RGUI,RCTL, LEFT,DOWN,RGHT), - /* 1: media keys */ - KEYMAP_ISO_150(\ - TRNS, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,SLEP, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MUTE,VOLD,VOLU, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MSTP,MPLY,MPRV,MNXT,MSEL, TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, \ - TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, CAPS, TRNS, \ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS) -}; -static const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1) -}; diff --git a/keyboard/phantom/led.c b/keyboard/phantom/led.c deleted file mode 100644 index 41582b6aaf..0000000000 --- a/keyboard/phantom/led.c +++ /dev/null @@ -1,49 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - { - // Output high. - DDRB |= (1<<6); - PORTB |= (1<<6); - } - else - { - // Output low. - DDRB &= ~(1<<6); - PORTB &= ~(1<<6); - } - - if (usb_led & (1<<USB_LED_SCROLL_LOCK)) - { - // Output high. - DDRB |= (1<<7); - PORTB |= (1<<7); - } - else - { - // Output low. - DDRB &= ~(1<<7); - PORTB &= ~(1<<7); - } -} diff --git a/keyboard/phantom/matrix.c b/keyboard/phantom/matrix.c deleted file mode 100644 index 6c3ae49c3a..0000000000 --- a/keyboard/phantom/matrix.c +++ /dev/null @@ -1,274 +0,0 @@ -/* Copyright 2012 Jun Wako <wakojun@gmail.com> - * - * This is heavily based on phantom/board.{c|h}. - * https://github.com/BathroomEpiphanies/AVR-Keyboard - * - * Copyright (c) 2012 Fredrik Atmer, Bathroom Epiphanies Inc - * http://bathroomepiphanies.com - * - * As for liscensing consult with the original files or its author. - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 0 -#endif -static uint8_t debouncing = DEBOUNCE; - -// bit array of key state(1:on, 0:off) -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static uint8_t read_rows(void); -static void init_rows(void); -static void unselect_cols(void); -static void select_col(uint8_t col); - -#ifndef SLEEP_LED_ENABLE -/* LEDs are on output compare pins OC1B OC1C - This activates fast PWM mode on them. - Prescaler 256 and 8-bit counter results in - 16000000/256/256 = 244 Hz blink frequency. - LED_A: Caps Lock - LED_B: Scroll Lock */ -/* Output on PWM pins are turned off when the timer - reaches the value in the output compare register, - and are turned on when it reaches TOP (=256). */ -static -void setup_leds(void) -{ - TCCR1A |= // Timer control register 1A - (1<<WGM10) | // Fast PWM 8-bit - (1<<COM1B1)| // Clear OC1B on match, set at TOP - (1<<COM1C1); // Clear OC1C on match, set at TOP - TCCR1B |= // Timer control register 1B - (1<<WGM12) | // Fast PWM 8-bit - (1<<CS12); // Prescaler 256 - OCR1B = LED_BRIGHTNESS; // Output compare register 1B - OCR1C = LED_BRIGHTNESS; // Output compare register 1C - // LEDs: LED_A -> PORTB6, LED_B -> PORTB7 - DDRB |= (1<<6) | (1<<7); - PORTB &= ~((1<<6) | (1<<7)); -} -#endif - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // To use PORTF disable JTAG with writing JTD bit twice within four cycles. - MCUCR |= (1<<JTD); - MCUCR |= (1<<JTD); - - // initialize row and col - unselect_cols(); - init_rows(); -#ifndef SLEEP_LED_ENABLE - setup_leds(); -#endif - - // initialize matrix state: all keys off - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t col = 0; col < MATRIX_COLS; col++) { // 0-16 - select_col(col); - _delay_us(3); // without this wait it won't read stable value. - uint8_t rows = read_rows(); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { // 0-5 - bool prev_bit = matrix_debouncing[row] & ((matrix_row_t)1<<col); - bool curr_bit = rows & (1<<row); - if (prev_bit != curr_bit) { - matrix_debouncing[row] ^= ((matrix_row_t)1<<col); - if (debouncing) { - dprint("bounce!: "); dprintf("%02X", debouncing); dprintln(); - } - debouncing = DEBOUNCE; - } - } - unselect_cols(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - xprintf("%02X: %032lb\n", row, bitrev32(matrix_get_row(row))); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop32(matrix[i]); - } - return count; -} - -/* Row pin configuration - * row: 0 1 2 3 4 5 - * pin: B5 B4 B3 B2 B1 B0 - */ -static void init_rows(void) -{ - // Input with pull-up(DDR:0, PORT:1) - DDRB &= ~0b00111111; - PORTB |= 0b00111111; -} - -static uint8_t read_rows(void) -{ - return (PINB&(1<<5) ? 0 : (1<<0)) | - (PINB&(1<<4) ? 0 : (1<<1)) | - (PINB&(1<<3) ? 0 : (1<<2)) | - (PINB&(1<<2) ? 0 : (1<<3)) | - (PINB&(1<<1) ? 0 : (1<<4)) | - (PINB&(1<<0) ? 0 : (1<<5)); -} - -/* Column pin configuration - * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - * pin: D5 C7 C6 D4 D0 E6 F0 F1 F4 F5 F6 F7 D7 D6 D1 D2 D3 - */ -static void unselect_cols(void) -{ - // Hi-Z(DDR:0, PORT:0) to unselect - DDRC |= 0b11000000; // PC: 7 6 - PORTC |= 0b11000000; - DDRD |= 0b11111111; // PD: 7 6 5 4 3 2 1 0 - PORTD |= 0b11111111; - DDRE |= 0b01000000; // PE: 6 - PORTE |= 0b01000000; - DDRF |= 0b11110011; // PF: 7 6 5 4 1 0 - PORTF |= 0b11110011; -} - -static void select_col(uint8_t col) -{ - // Output low(DDR:1, PORT:0) to select - switch (col) { - case 0: - DDRD |= (1<<5); - PORTD &= ~(1<<5); - break; - case 1: - DDRC |= (1<<7); - PORTC &= ~(1<<7); - break; - case 2: - DDRC |= (1<<6); - PORTC &= ~(1<<6); - break; - case 3: - DDRD |= (1<<4); - PORTD &= ~(1<<4); - break; - case 4: - DDRD |= (1<<0); - PORTD &= ~(1<<0); - break; - case 5: - DDRE |= (1<<6); - PORTE &= ~(1<<6); - break; - case 6: - DDRF |= (1<<0); - PORTF &= ~(1<<0); - break; - case 7: - DDRF |= (1<<1); - PORTF &= ~(1<<1); - break; - case 8: - DDRF |= (1<<4); - PORTF &= ~(1<<4); - break; - case 9: - DDRF |= (1<<5); - PORTF &= ~(1<<5); - break; - case 10: - DDRF |= (1<<6); - PORTF &= ~(1<<6); - break; - case 11: - DDRF |= (1<<7); - PORTF &= ~(1<<7); - break; - case 12: - DDRD |= (1<<7); - PORTD &= ~(1<<7); - break; - case 13: - DDRD |= (1<<6); - PORTD &= ~(1<<6); - break; - case 14: - DDRD |= (1<<1); - PORTD &= ~(1<<1); - break; - case 15: - DDRD |= (1<<2); - PORTD &= ~(1<<2); - break; - case 16: - DDRD |= (1<<3); - PORTD &= ~(1<<3); - break; - } -} diff --git a/keyboard/quark/Makefile b/keyboard/quark/Makefile deleted file mode 100644 index f79445e23b..0000000000 --- a/keyboard/quark/Makefile +++ /dev/null @@ -1,155 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = quark_lufa - -# Directory common source filess exist -TOP_DIR = ../.. - -# Directory keyboard dependent files exist -TARGET_DIR = . - - - -# # project specific files -ifdef COMMON - - SRC = keymap_common.c \ - matrix.c \ - led.c \ - backlight.c - -ifdef KEYMAP - SRC := common_keymaps/keymap_$(KEYMAP).c $(SRC) -else - SRC := common_keymaps/keymap_jack.c $(SRC) -endif - -else - -SRC = extended_keymap_common.c \ - matrix.c \ - led.c \ - backlight.c - -ifdef KEYMAP - SRC := extended_keymaps/extended_keymap_$(KEYMAP).c $(SRC) -else - SRC := extended_keymaps/extended_keymap_default.c $(SRC) -endif - -endif - -CONFIG_H = config.h - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality - -# Optimize size but this may cause error "relocation truncated to fit" -#EXTRALDFLAGS = -Wl,--relax - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) - -include $(TOP_DIR)/protocol/lufa.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk diff --git a/keyboard/quark/Makefile.pjrc b/keyboard/quark/Makefile.pjrc deleted file mode 100644 index be83ba18b1..0000000000 --- a/keyboard/quark/Makefile.pjrc +++ /dev/null @@ -1,116 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - -# Target file name (without extension). -TARGET = gh60_pjrc - -# Directory common source filess exist -TOP_DIR = ../.. - -# Directory keyboard dependent files exist -TARGET_DIR = . - -# project specific files -SRC = keymap_common.c \ - matrix.c \ - led.c - -ifdef KEYMAP - SRC := keymap_$(KEYMAP).c $(SRC) -else - SRC := keymap_jack.c $(SRC) -endif - -CONFIG_H = config.h - - -# MCU name, you MUST set this to match the board you are using -# type "make clean" after changing this, so all files will be rebuilt -MCU = atmega32u4 -#MCU = at90usb1286 - - -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. -F_CPU = 16000000 - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+5000) -EXTRAKEY_ENABLE = yes # Audio control and System control(+600) -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover(+500) -#PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support - - -# Search Path -VPATH += $(TARGET_DIR) -VPATH += $(TOP_DIR) - -include $(TOP_DIR)/protocol/pjrc.mk -include $(TOP_DIR)/common.mk -include $(TOP_DIR)/rules.mk - -plain: OPT_DEFS += -DKEYMAP_PLAIN -plain: all - -poker: OPT_DEFS += -DKEYMAP_POKER -poker: all - -poker_set: OPT_DEFS += -DKEYMAP_POKER_SET -poker_set: all - -poker_bit: OPT_DEFS += -DKEYMAP_POKER_BIT -poker_bit: all diff --git a/keyboard/quark/README.md b/keyboard/quark/README.md deleted file mode 100644 index 59afbab1ae..0000000000 --- a/keyboard/quark/README.md +++ /dev/null @@ -1,53 +0,0 @@ -Quark keyboard firmware -====================== -DIY/Assembled compact 40% keyboard by [Ortholinear Keyboards](http://ortholinearkeyboards.com). - -## Extended Keymap -If you include extended_keymap_common.h instead of keymap_common.h at the top of your file, you'll have access to a bunch of goodies: - -- Use `LSFT()`, `LCTL()`, et. al. (listed in extended_keymap_common.h) as modifiers for keys (daisy-chain-able) -- Use `FUNC(1)` instead of `FN1` (etc.) to access the function layers beyond the 32 function layer limit -- Use `CM_F` instead of `KC_F` to get the ColeMak equivilent for shortcuts (maps backwards) -- Use `MACRODOWN()` instead of `MACRO()` to easily make a keydown macro (`CM_*` works here too) - -### Some notes on usage: - -- The `KEYMAP()` macro is unable to be used due to the bitwise modifications that take place - refer to extended_keymap_jack.c to see how to set things up with the `KC_` prefix -- Keep an eye on the Makefile - this needs to include the correct files to work -- Don't forget to use `const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {` instead of the 8bit equivilent - -## Build - -Follow [this guide](http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html) to setup your development environment before anything else. Abbreviated instructions are provide at the [bottom of this document](https://github.com/rswiernik/tmk_keyboard/tree/rswiernik_dev/keyboard/quark#environment-setup) - -Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/archive/master.zip) and navigate to the keyboard/quark folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex that you can load with the Teensy app onto your Planck (once you've hit reset/shorted GND & RST). - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -####Default -To build with the default keymap, simply move to the tmk\_keyboard/keyboard/quark/ and run `make` as follows: -``` -$ make -``` - -## Keymap -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 `keymap_<name>.c` and see keymap document (you can find in top README.md) and existent keymap files. - -####**Extended Keymaps** - -To build the firmware binary hex file with an extended keymap just do `make` with `KEYMAP` option like: -``` -$ make KEYMAP=[common|jack|<name>] -``` -_The only applicable keymaps will work with this option._ Extended keymaps follow the format **__extended\_keymap\_\<name\>.c__** - -####**Common Keymaps** - -Building with a common keymap is as simple as adding the COMMON option. Note that only -``` -$ make KEYMAP=[common|jack|<name>] COMMON=true -``` -_The only applicable keymaps will work with this option._ Common keymaps follow the format **__keymap\_\<name\>.c__** - -## Notable TMK forks (which some of the keymap files are from) -- (add yours) diff --git a/keyboard/quark/backlight.c b/keyboard/quark/backlight.c deleted file mode 100644 index ee7e31ee9c..0000000000 --- a/keyboard/quark/backlight.c +++ /dev/null @@ -1,46 +0,0 @@ - -#include <avr/io.h> -#include "backlight.h" - - -void backlight_init_ports() -{ - // Setup PB7 as output and output low. - DDRB |= (1<<7); - PORTB &= ~(1<<7); - - // Use full 16-bit resolution. - ICR1 = 0xFFFF; - - // I could write a wall of text here to explain... but TL;DW - // Go read the ATmega32u4 datasheet. - // And this: http://blog.saikoled.com/post/43165849837/secret-konami-cheat-code-to-high-resolution-pwm-on - - // Pin PB7 = OCR1C (Timer 1, Channel C) - // Compare Output Mode = Clear on compare match, Channel C = COM1C1=1 COM1C0=0 - // (i.e. start high, go low when counter matches.) - // WGM Mode 14 (Fast PWM) = WGM13=1 WGM12=1 WGM11=1 WGM10=0 - // Clock Select = clk/1 (no prescaling) = CS12=0 CS11=0 CS10=1 - - TCCR1A = _BV(COM1C1) | _BV(WGM11); // = 0b00001010; - TCCR1B = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; - - // Default to zero duty cycle. - OCR1C = 0x0000; -} - -void backlight_set(uint8_t level) -{ - if ( level == 0 ) - { - // Turn off PWM control on PB7, revert to output low. - TCCR1A &= ~(_BV(COM1C1)); - } - else - { - // Turn on PWM control of PB7 - TCCR1A |= _BV(COM1C1); - OCR1C = level << 12 | 0x0FFF; - } -} - diff --git a/keyboard/quark/backlight.h b/keyboard/quark/backlight.h deleted file mode 100644 index 0fe1f4a72b..0000000000 --- a/keyboard/quark/backlight.h +++ /dev/null @@ -1,2 +0,0 @@ - -void backlight_init_ports(void); diff --git a/keyboard/quark/common_keymaps/keymap_brett.c b/keyboard/quark/common_keymaps/keymap_brett.c deleted file mode 100644 index 97d832b47a..0000000000 --- a/keyboard/quark/common_keymaps/keymap_brett.c +++ /dev/null @@ -1,42 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - LCTL, A, S, D, F, G, H, J, K, L, SCLN, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - TAB, LGUI, RSFT, LALT, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( /* RAISE */ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, - TRNS, F1, F2, F3, F4, F5, F6, 4, 5, 6, QUOT, TRNS, - TRNS, F7, F8, F9, F10, F11, F12, 1, 2, 3, TRNS, PGUP, - MPRV, MNXT, TRNS, MUTE, TRNS, TRNS, FN1, 0, 0, TRNS, PGDN), -[2] = KEYMAP( /* LOWER */ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MINS, - TRNS, TRNS, TRNS, PAUSE, TRNS, TRNS, TRNS, TRNS, LBRC, RBRC, BSLS, EQL, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - MPLY, MSTP, VOLU, VOLD, FN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), - - [29] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), -}; diff --git a/keyboard/quark/common_keymaps/keymap_dotcom.c b/keyboard/quark/common_keymaps/keymap_dotcom.c deleted file mode 100644 index 347f6dea91..0000000000 --- a/keyboard/quark/common_keymaps/keymap_dotcom.c +++ /dev/null @@ -1,34 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - FN1, A, S, D, F, G, H, J, K, L, SCLN, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, LBRC, - LCTL, BSLS, QUOT, LALT, FN22, SPC, LEFT, UP, DOWN, RGHT, RBRC), -[1] = KEYMAP( - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, - TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, TRNS, TRNS, TRNS, - TRNS, FN18, FN19, FN22, EQL, MINS, FN20, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, TRNS, VOLD, VOLU, TRNS), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), -}; diff --git a/keyboard/quark/common_keymaps/keymap_jack.c b/keyboard/quark/common_keymaps/keymap_jack.c deleted file mode 100644 index c74812121f..0000000000 --- a/keyboard/quark/common_keymaps/keymap_jack.c +++ /dev/null @@ -1,50 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Jack */ - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, - ESC, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - RSFT, LCTL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( /* Jack colemak */ - TAB, Q, W, F, P, G, J, L, U, Y, SCLN, BSPC, - ESC, A, R, S, T, D, H, N, E, I, O, QUOT, - LSFT, Z, X, C, V, B, K, M, COMM, DOT, SLSH, ENT, - FN3, LCTL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), -[2] = KEYMAP( /* Jack RAISE */ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, - TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, - TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), -[3] = KEYMAP( /* Jack LOWER */ - FN22, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, - TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, - TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), - - [29] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), -}; diff --git a/keyboard/quark/common_keymaps/keymap_joe.c b/keyboard/quark/common_keymaps/keymap_joe.c deleted file mode 100644 index 07122b702c..0000000000 --- a/keyboard/quark/common_keymaps/keymap_joe.c +++ /dev/null @@ -1,107 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Joe colemak */ - ESC, Q, W, F, P, G, J, L, U, Y, SCLN, MINS, - BSPC, A, R, S, T, D, H, N, E, I, O, ENT, - TAB, Z, X, C, V, B, K, M, COMM, DOT, SLSH, QUOT, - LCTL, LGUI, LALT, LSFT, FN1, SPC, FN0, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( /* Joe qwerty */ - ESC, Q, W, E, R, T, Y, U, I, O, P, MINS, - BSPC, A, S, D, F, G, H, J, K, L, SCLN, ENT, - TAB, Z, X, C, V, B, N, M, COMM, DOT, SLSH, QUOT, - LCTL, LGUI, LALT, LSFT, FN1, SPC, FN0, LEFT, DOWN, UP, RGHT), -[2] = KEYMAP( /* Joe RAISE */ - F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, - DEL, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, TRNS, - BSLS, FN5, FN6, TRNS, TRNS, MENU, CAPS, INS, PSCR, LBRC, RBRC, FN21, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, FN0, FN26, FN27, FN28, FN29), -[3] = KEYMAP( /* Joe LOWER */ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN7, FN8, FN9, FN30, FN31, - DEL, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, TRNS, - FN25, FN3, FN4, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN23, FN24, EQL, - TRNS, TRNS, TRNS, TRNS, FN1, TRNS, FN2, HOME, PGDN, PGUP, END), -[4] = KEYMAP( /* Joe LOWER + RAISE */ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), -}; - -enum macro_id { - M_Q0, - M_Q1, - M_Q2, - M_Q3, - M_Q4 -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [1] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(4), // to Fn overlay - - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - - [5] = ACTION_MODS_KEY(MOD_LCTL, KC_PGDN), - [6] = ACTION_MODS_KEY(MOD_LCTL, KC_PGUP), - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), - - [7] = ACTION_MACRO(M_Q0), - [8] = ACTION_MACRO(M_Q1), - [9] = ACTION_MACRO(M_Q2), - [30] = ACTION_MACRO(M_Q3), - [31] = ACTION_MACRO(M_Q4), - - [26] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_LEFT), - [27] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_DOWN), - [28] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_UP), - [29] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT, KC_RGHT), - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - keyevent_t event = record->event; - switch (id) { - case M_Q0: - return event.pressed ? - MACRO( D(LSFT), T(SCLN), U(LSFT), T(SLSH), END ) : - MACRO_NONE; - case M_Q1: - return event.pressed ? - MACRO( D(LSFT), T(SCLN), T(9), U(LSFT), END ) : - MACRO_NONE; - case M_Q2: - return event.pressed ? - MACRO( D(LSFT), T(0), T(SCLN), U(LSFT), END ) : - MACRO_NONE; - case M_Q3: - return event.pressed ? - MACRO( D(LSFT), T(9), T(SCLN), U(LSFT), END ) : - MACRO_NONE; - case M_Q4: - return event.pressed ? - MACRO( D(LSFT), T(SCLN), T(0), U(LSFT), END ) : - MACRO_NONE; - - } - return MACRO_NONE; -}
\ No newline at end of file diff --git a/keyboard/quark/common_keymaps/keymap_matthew.c b/keyboard/quark/common_keymaps/keymap_matthew.c deleted file mode 100644 index 56e7003a97..0000000000 --- a/keyboard/quark/common_keymaps/keymap_matthew.c +++ /dev/null @@ -1,70 +0,0 @@ -// by Matthew Pepers - https://github.com/pepers - -/* grid planck layout - modified programmer dvorak -,-----------------------------------------------------------------------------------------------. -| pause | @ | | | ^ | | | | | * | # | $ | del | -| esc | ; : | , < | . > | P | Y | F | G | G | C | R | bkspc | -| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | -|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------| -| & | / | { | ( | [ | = | ! | ] | ) | } | \ | + | -| ` ~ | A | O | E | U | I | D | H | T | N | S | - _ | -| % | 7 | 5 | 3 | 1 | 9 | 0 | 2 | 4 | 6 | 8 | ? | -|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------| -| | | | | | | | | | | | prtsc | -| tab | ' " | Q | J | K | X | B | M | W | V | Z | retrn | -| | | | | | | | | | | | insrt | -|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------|-------| -| | | | | | | | | | | | | -| lctrl | lgui | lalt | ralt | lower | shift | space | raise | left | down | up | right | -| | | | | | | | | home | pgdn | pgup | end | -`-----------------------------------------------------------------------------------------------' -*/ - -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: dvorak */ - [0] = KEYMAP_GRID( ESC, SCLN, COMM, DOT, P, Y, F, G, C, R, L, BSPC, \ - GRV, A, O, E, U, I, D, H, T, N, S, MINS, \ - TAB, QUOT, Q, J, K, X, B, M, W, V, Z, ENT, \ - LCTL, LGUI, LALT, RALT, FN1, LSFT, SPC, FN2, LEFT, DOWN, UP, RGHT), - - /* 1: lower (FN1) */ - [1] = KEYMAP_GRID( F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, \ - FN17, 7, 5, 3, 1, 9, 0, 2, 4, 6, 8, FN18, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, INS, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGDN, PGUP, END), - - /* 2: raise (FN2) */ - [2] = KEYMAP_GRID(PAUS, FN19, FN20, FN21, TRNS, TRNS, TRNS, TRNS, FN22, FN23, FN24, DEL, \ - FN10, SLSH, FN11, FN12, LBRC, EQL, FN13, RBRC, FN14, FN15, BSLS, FN16, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, PSCR, \ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), - -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // lower Fn layer - [2] = ACTION_LAYER_MOMENTARY(2), // raise Fn layer - - // lower row1 - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_5), // % - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_SLASH), // ? - - // raise row0 - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_2), // @ - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLASH), // | - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_6), // ^ - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_8), // * - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_3), // # - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_4), // $ - - // raise row1 - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_7), // & - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRACKET), // { - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_9), // ( - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_1), // ! - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_0), // ) - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRACKET), // } - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_EQUAL), // + -}; diff --git a/keyboard/quark/common_keymaps/keymap_nathan.c b/keyboard/quark/common_keymaps/keymap_nathan.c deleted file mode 100644 index 5a0900b66d..0000000000 --- a/keyboard/quark/common_keymaps/keymap_nathan.c +++ /dev/null @@ -1,153 +0,0 @@ -// Author: Nathan Ross Powell <nathanrospowell@gmail.com> -// https://github.com/nathanrosspowell/tmk_keyboard/blob/planck-jack/keyboard/planck/keymap_nathan.c - -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: main layer - * ,-----------------------------------------------------------------------. - * |Tab | q | w | e | r | t | y | u | i | o | p | BS | - * |-----------------------------------------------------------------------| - * |Ctrl | a | s | d | f | g | h | j | k | l | ; | Ret | - * |-----------------------------------------------------------------------| - * |Shift| z | x | c | v | b | n | m | [ | ( | { | < | - * |-----------------------------------------------------------------------| - * |Meta | \ | / | Alt |Lower|Space|Space|Upper|Left |Down | Up |Right| - * `-----------------------------------------------------------------------' - */ - [0] = KEYMAP_GRID( - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, - LCTL, A, S, D, F, G, H, J, K, L, SCLN, ENT, - RSFT, Z, X, C, V, B, N, M, LBRC, FN10, FN11, FN12, - LGUI, BSLS, SLSH, LALT, FN0, SPC, SPC, FN1, LEFT, DOWN, UP, RGHT), - - /* 1: fn left/lower layer - * The top row are Visual Studio combos: - * 'Run', 'Breakpoint', 'Step over', 'Step into', 'Set cursor to line' - * 2nd row are key combos: - * 'ctrl-alt-delete', 'ctrl-shift-escape' - * 3rd row are macros keys: - * 'P0' - 'P5' execute a script on Windows machines - * ,-----------------------------------------------------------------------. - * | ESC | F5 | F9 | F10 | F11 |S+F11|CSF10|NLock|Num7 |Num8 |Num9 | Del | - * |-----------------------------------------------------------------------| - * | |C/A/D|C/S/E| Ins |Print|Pause|SLock|Num0 |Num4 |Num5 |Num6 |Num= | - * |-----------------------------------------------------------------------| - * | | P0 | P1 | P2 | P3 | P4 | P5 |Num. |Num1 |Num2 |Num3 |Num/ | - * |-----------------------------------------------------------------------| - * | |User | | | | | | |Home |PgDn |PgUp | End | - * `-----------------------------------------------------------------------' - */ - [1] = KEYMAP_GRID( - ESC, F5, F9, F10, F11, FN30, FN31, NLCK, P7, P8, P9, DEL, - TRNS, FN16, FN17, INS, PSCR, PAUS, SLCK, P0, P4, P5, P6, PEQL, - TRNS, FN2, FN3, FN4, FN5, FN6, FN7, PDOT, P1, P2, P3, PSLS, - TRNS, FN8, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, HOME, PGDN, PGUP, END ), - - /* 2: fn right/raise layer - * ,-----------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 |F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |-----------------------------------------------------------------------| - * | | ! | @ | # | $ | % | ^ | & | * | - | + | = | - * |-----------------------------------------------------------------------| - * | | _ | ' | " | ` | ~ | , | . | ] | ) | } | > | - * |-----------------------------------------------------------------------| - * | |NextT|PrevT| | | | Esc | |Mute |Vol- |Vol+ | P/P | - * `-----------------------------------------------------------------------' - */ - [2] = KEYMAP_GRID( - F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, - TRNS, FN18, FN19, FN20, FN21, FN22, FN23, FN24, FN25, MINS, FN26, PAST, - TRNS, FN27, QUOT, FN28, GRV, FN29, COMM, DOT, RBRC, FN13, FN14, FN15, - TRNS, MNXT, MPRV, TRNS, TRNS, TRNS, ESC, TRNS, MUTE, VOLD, VOLU, MPLY ), -}; - -enum macro_id { - M_P0, - M_P1, - M_P2, - M_P3, - M_P4, - M_P5, - M_USERNAME -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // left/lower layer - [1] = ACTION_LAYER_MOMENTARY(2), // right/raise layer - // Program macros - [2] = ACTION_MACRO(M_P0), - [3] = ACTION_MACRO(M_P1), - [4] = ACTION_MACRO(M_P2), - [5] = ACTION_MACRO(M_P3), - [6] = ACTION_MACRO(M_P4), - [7] = ACTION_MACRO(M_P5), - [8] = ACTION_MACRO(M_USERNAME), - // Braces - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_9), // ( - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // { - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_COMMA), // < - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_0), // ) - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // } - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_DOT), // > - // Combo - [16] = ACTION_MODS_KEY(MOD_LALT | MOD_LCTL, KC_DEL), // Ctrl+Alt+Delete - [17] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_ESC), // Ctrl+Shft+Escape - // Symbols - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_1), // ! - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_2), // @ - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_3), // # - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_4), // $ - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_5), // % - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_6), // ^ - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_7), // & - [25] = ACTION_MODS_KEY(MOD_LSFT, KC_8), // * - [26] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // + - [27] = ACTION_MODS_KEY(MOD_LSFT, KC_MINUS), // _ - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOTE), // " - [29] = ACTION_MODS_KEY(MOD_LSFT, KC_GRAVE), // ~ - // Debugging - [30] = ACTION_MODS_KEY(MOD_LSFT, KC_F11), // Step into - [31] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_F10), // Set cursor to line - }; - -// Run a script and pass a key number to it. This is Windows specific and the script needs to be on your path. -// *open run dialog* keypress.py [PRG_NUM] -#define ADD_PYTHON_PROGRAM_ON_WIN( PRG_NUM ) MACRO( D(LGUI), T(R), U(LGUI), W(100), T(K), T(E), T(Y), T(P), T(R), T(E), T(S), T(S), T(DOT), T(P), T(Y), T(SPC), T(PRG_NUM), END ) -// *return* -#define RUN_PYTHON_PROGRAM_ON_WIN MACRO( T(ENT), END ) - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; - switch (id) { - case M_P0: - return event.pressed ? - ADD_PYTHON_PROGRAM_ON_WIN( 0 ) : - RUN_PYTHON_PROGRAM_ON_WIN; - case M_P1: - return event.pressed ? - ADD_PYTHON_PROGRAM_ON_WIN( 1 ) : - RUN_PYTHON_PROGRAM_ON_WIN; - case M_P2: - return event.pressed ? - ADD_PYTHON_PROGRAM_ON_WIN( 2 ) : - RUN_PYTHON_PROGRAM_ON_WIN; - case M_P3: - return event.pressed ? - ADD_PYTHON_PROGRAM_ON_WIN( 3 ) : - RUN_PYTHON_PROGRAM_ON_WIN; - case M_P4: - return event.pressed ? - ADD_PYTHON_PROGRAM_ON_WIN( 4 ) : - RUN_PYTHON_PROGRAM_ON_WIN; - case M_P5: - return event.pressed ? - ADD_PYTHON_PROGRAM_ON_WIN( 5 ) : - RUN_PYTHON_PROGRAM_ON_WIN; - case M_USERNAME: - return event.pressed ? - MACRO( T(N), T(A), T(T), T(H), T(A), T(N), T(R), T(O), T(S), T(S), T(P), T(O), T(W), T(E), T(L), T(L), END ) : - MACRO_NONE; - } - return MACRO_NONE; -} diff --git a/keyboard/quark/common_keymaps/keymap_peasant.c b/keyboard/quark/common_keymaps/keymap_peasant.c deleted file mode 100644 index ddacb614e6..0000000000 --- a/keyboard/quark/common_keymaps/keymap_peasant.c +++ /dev/null @@ -1,51 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( /* Native */ - ESC, Q, W, E, R, T, Y, U, I, O, P, FN2, - BSPC, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - TAB, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - DEL, LCTL, NO, LSFT, LALT, SPC, NO, LEFT, DOWN, UP, RGHT), - [1] = KEYMAP( /* QWERTY->PHOTOSHOP */ - DELETE, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, FN1, - O, G, S, U, T, FN27, F21, F10, F11, F7, F8, F9, - TAB, FN4, FN5, FN6, F1, FN7, F18, F19, F23, F20, F22, FN9, - COMM, DOT, FN10, FN11, FN3, SPC, FN12, F2, FN8, F3, F14), - [2] = KEYMAP( /* 2: FN3 PHOTOSHOP */ - ESC, FN25, FN26, NO, NO, NO, NO, NO, NO, NO, NO, NO, - NO, NO, NO, NO, NO, NO, NO, NO, NO, FN19, FN20, FN21, - C, NO, FN22, FN5, NO, FN23, NO, NO, NO, NO, FN13, NO, - FN14, FN15, FN16, FN17, FN3, SPC, FN18, NO, NO, F24, NO), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_DEFAULT_LAYER_SET(0), // set Qwerty layout - [2] = ACTION_DEFAULT_LAYER_SET(1), // set Photoshop presets - [3] = ACTION_LAYER_ON_OFF(2), // Photoshop function layer - - [4] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F9), // photo folder AHK - [5] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_I), // select inverse - [6] = ACTION_MODS_KEY(MOD_LSFT, KC_M), // marquee select - [7] = ACTION_MODS_KEY(MOD_LALT, KC_BSPC), // fill - [8] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_X), // warp - [9] = ACTION_MODS_KEY(MOD_LCTL | MOD_LALT | MOD_LSFT, KC_F12), // merge all new layer - [10] = ACTION_MODS_KEY(MOD_LCTL, KC_MINS), // zoom out - [11] = ACTION_MODS_KEY(MOD_LCTL, KC_H), // RBG sliders - [12] = ACTION_MODS_KEY(MOD_LCTL, KC_S), // save - [13] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_F5), // layer mask from transparancy - [14] = ACTION_MODS_KEY(MOD_LALT, KC_LBRC), // prev layer - [15] = ACTION_MODS_KEY(MOD_LALT, KC_RBRC), // next layer - [16] = ACTION_MODS_KEY(MOD_LCTL, KC_EQL), // zoom in - [17] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_H), // HSV sliders - [18] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F11), // save as PNG - [19] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F7), // gaussian blur - [20] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL | MOD_LALT, KC_F8), // motion blur - [21] = ACTION_MODS_KEY(MOD_LSFT | MOD_LCTL, KC_X), // liquify filter - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // prev layer blending - [23] = ACTION_MODS_KEY(MOD_LSFT | MOD_LALT, KC_N), // normal layer blending - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // next layer blending - [25] = ACTION_MODS_KEY(MOD_LCTL, KC_Z), // step back - [26] = ACTION_MODS_KEY(MOD_LCTL, KC_Y), // step forward - [27] = ACTION_MODS_KEY(MOD_LCTL, KC_R), // rasterize - -}; diff --git a/keyboard/quark/common_keymaps/keymap_reed.c b/keyboard/quark/common_keymaps/keymap_reed.c deleted file mode 100644 index 1aa24e10de..0000000000 --- a/keyboard/quark/common_keymaps/keymap_reed.c +++ /dev/null @@ -1,74 +0,0 @@ -#include "keymap_common.h" - -/* - * BUILD: - * Simply run the command below in the keyboard/planck directory - * to build against this keymap - * - * make KEYMAP=reed COMMON_KEYMAP=true - * - * - * DETAILS: - * - * This layout works off of Jack's layout, making some changes that I - * feel significantly improve the function of the keyboard. Major changes - * include adding a "gaming mode" that will allow users to still access - * the number keys 1 through 4 easily for games that require it. Also - * included is the ability to use the tap/hold function for easy use of - * right shift and thumb shift with their tapped companions. - * - */ -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP_GRID( /* Reed */ - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, - LCTL, CAPS, LALT, LGUI, FN2, FN7, SPC, FN1, LEFT, DOWN, UP, RGHT), - -[1] = KEYMAP_GRID( /* Reed EXTREME GAMING */ - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, - LCTL, 1, 2, 3, 4, SPC, FN2, FN1, LEFT, DOWN, UP, RGHT), - -[2] = KEYMAP_GRID( /* Reed RAISE */ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, - TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, - TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), - -[3] = KEYMAP_GRID( /* Reed LOWER */ - TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, DEL, - TRNS, TRNS, INS, HOME, PGUP, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, - TRNS, TRNS, DEL, END, PGDN, F11, F12, F13, TRNS, VOLD, VOLU, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, MPRV, MUTE, MPLY, MNXT), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - LOWER - - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - // Actions for the tap/hold modifiers listed above - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [7] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPC), - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), - - [29] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), -}; diff --git a/keyboard/quark/common_keymaps/keymap_sean.c b/keyboard/quark/common_keymaps/keymap_sean.c deleted file mode 100644 index 4fe07f701a..0000000000 --- a/keyboard/quark/common_keymaps/keymap_sean.c +++ /dev/null @@ -1,57 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( /* Matrix Dvorak */ - QUOT, COMM, DOT, P, Y, SLSH, EQL, F, G, C, R, L, - A, O, E, U, I, ESC, BSPC, D, H, T, N, S, - SCLN, Q, J, K, X, TAB, ENT, B, M, W, V, Z, - LSFT, LCTL, LALT, LGUI, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), - - [1] = KEYMAP( /* Matrix Qwerty */ - Q, W, E, R, T, QUOT, EQL, Y, U, I, O, P, - A, S, D, F, G, ESC, BSPC, H, J, K, L, SCLN, - Z, X, C, V, B, TAB, ENT, N, M, COMM, DOT, SLSH, - LSFT, LCTL, LALT, LGUI, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), - - [2] = KEYMAP( /* fn1 lower */ - F1, F2, F3, F4, F5, TRNS, TRNS, F6, F7, F8, F9, F10, - 1, 2, 3, 4, 5, F18, DEL, 6, 7, 8, 9, 0, - FN3, FN4, TRNS, GRV, MINS, TRNS, TRNS, BSLS, LBRC, RBRC, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN5, HOME, PGDN, PGUP, END), - - [3] = KEYMAP( /* fn2 raise */ - F1, F2, F3, F4, F5, TRNS, TRNS, F6, F7, F8, F9, F10, - F11, F12, F13, F14, F15, F18, DEL, F16, F17, F18, F19, F20, - FN3, FN4, TRNS, TRNS, TRNS, TRNS, TRNS, EJCT, PWR, LSFT,PAUSE, RSFT, - LEFT, DOWN, UP, RGHT, FN5, TRNS, TRNS, MNXT, VOLD, VOLU, MUTE), - - [4] = KEYMAP( /* lower + raise */ - LEFT, DOWN, UP, RGHT, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, UP, RGHT, - HOME, PGDN, PGUP, END, TRNS, F18, DEL, TRNS, HOME, PGDN, PGUP, END, - FN3, FN4, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, EJCT, PWR, MPLY, RSFT, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MNXT, VOLD, VOLU, MUTE), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay LOWER - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay RAISE - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - [5] = ACTION_LAYER_MOMENTARY(4), // to Fn overlay LOWER + RAISE - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), -}; diff --git a/keyboard/quark/common_keymaps/keymap_shane.c b/keyboard/quark/common_keymaps/keymap_shane.c deleted file mode 100644 index d4e40fe63a..0000000000 --- a/keyboard/quark/common_keymaps/keymap_shane.c +++ /dev/null @@ -1,100 +0,0 @@ -// https://github.com/shanecelis/tmk_keyboard/blob/master/keyboard/planck/keymap_shane.c - -#include "keymap_common.h" -#include "action_layer.h" -#include "action.h" -#include "action_util.h" - -/* - Shane's Planck Layout - http://www.keyboard-layout-editor.com/#/layouts/015d9011102619d7695c86ffe57cf441 -*/ -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP_AND_SWAP( /* Base */ - TAB, Q, W, E, R, T, Y, U, I, O, P, MINS, - LCTL, A, S, D, F, G, H, J, K, L, SCLN, BSPC, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, - /*ALPHA*/FN3, /*HYPER*/ /*SUPER*/LGUI, /*META*/LALT, LCTL, FN2, FN6, FN1, LEFT, DOWN, UP, RGHT), - [2] = KEYMAP_AND_SWAP( /* More modifiers */ - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RCTL, RALT, RGUI, TRNS), - [4] = KEYMAP_AND_SWAP( /* WASD */ - TRNS, TRNS, UP, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, LEFT, DOWN, RIGHT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), - [6] = KEYMAP_AND_SWAP( /* Raise/FN1 */ - FN23, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, EQL, - TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, ENT, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, BSLS, TRNS, - PAUS, TRNS, TRNS, TRNS, TRNS, BSPC, TRNS, MUTE, PGUP, PGDN, MNXT), - [8] = KEYMAP_AND_SWAP( /* Lower/FN2 */ - ESC, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN19, FN20, TRNS, - TRNS, TRNS, TRNS, TRNS, CAPS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, QUOT, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN24, FN25, LBRC, RBRC, TRNS, TRNS, - FN4, TRNS, TRNS, TRNS, TRNS, ENT, TRNS, MPLY, VOLD, VOLU, MPRV), -}; - -enum function_id { - SPACE_FN, -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch (id) { - case SPACE_FN: - if (record->event.pressed) { - // Change the keyboard maps. - // Whatever even layer's are on, turn on the odd one's too. - for (uint8_t i = 0; i < 9; i += 2) { - if (layer_state & (1UL << i)) - layer_on(i + 1); - } - layer_on(1); - } else { - // turn off all the even layers. - for (uint8_t i = 0; i < 9; i += 2) - layer_off(i + 1); - - if (record->tap.count != 0) { - // Space was tapped rather than used like a modifier. - // So send a space up and down event. - add_key(KC_SPC); - send_keyboard_report(); - del_key(KC_SPC); - send_keyboard_report(); - } - } - break; - } -} - - - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(6), // to fist Fn overlay - [2] = ACTION_LAYER_MOMENTARY(8), // to second Fn overlay - [3] = ACTION_LAYER_TOGGLE(2), // toggle more modifiers - [4] = ACTION_LAYER_TOGGLE(4), // toggle wasd - [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), - [6] = ACTION_FUNCTION_TAP(SPACE_FN), - - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [25] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [26] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), -}; diff --git a/keyboard/quark/common_keymaps/keymap_simon.c b/keyboard/quark/common_keymaps/keymap_simon.c deleted file mode 100644 index 37951364be..0000000000 --- a/keyboard/quark/common_keymaps/keymap_simon.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Jack */ - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, DOT, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SCLN, DEL, - LCTL, ENT, LALT, CAPS, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( /* Jack RAISE */ - TRNS, F1, F2, F3, F4, NO, FN11, FN9, FN12, NO, FN14, TRNS, - TRNS, F5, F6, F7, F8, FN16, SLSH, MINS, EQL, LBRC, FN8, TRNS, - TRNS, F9, F10, F11, F12, F15, F16, FN22, SCLN, MINS, QUOT, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), -[2] = KEYMAP( /* Jack LOWER */ - FN22, 1, 2, 3, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, - TRNS, 4, 5, 6, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, - TRNS, 7, 8, 9, 0, FN28, FN15, F7, F8, F9, F10, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - - [8] = ACTION_MODS_KEY(MOD_LSFT, KC_SLSH), - [9] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), - - [29] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), -}; diff --git a/keyboard/quark/common_keymaps/keymap_tim.c b/keyboard/quark/common_keymaps/keymap_tim.c deleted file mode 100644 index 7444f3877b..0000000000 --- a/keyboard/quark/common_keymaps/keymap_tim.c +++ /dev/null @@ -1,44 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, ENT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, - LCTL, LALT, DEL, LGUI, FN2, SPC, FN1, F2, F5, F9, F12), -[2] = KEYMAP( /* RAISE */ - TRNS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, - GRV, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, QUOT, FN29, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, TRNS, TRNS, TRNS, TRNS), -[3] = KEYMAP( /* LOWER */ - TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, - FN22, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, QUOT, FN29, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), - [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), - [29] = ACTION_MODS_KEY(MOD_LSFT, KC_QUOT), -}; diff --git a/keyboard/quark/common_keymaps/keymap_wilba.c b/keyboard/quark/common_keymaps/keymap_wilba.c deleted file mode 100644 index 9781f8fcd8..0000000000 --- a/keyboard/quark/common_keymaps/keymap_wilba.c +++ /dev/null @@ -1,56 +0,0 @@ -#include "keymap_common.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( /* Wilba */ - FN27, FN28, FN29, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - LCTL, LGUI, LALT, RSFT, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( /* Wilba Alternate */ - ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, - TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, - LCTL, LGUI, LALT, RSFT, FN1, SPC, FN2, LEFT, DOWN, UP, RGHT), -[2] = KEYMAP( /* Wilba LOWER */ - TRNS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, TRNS, - TRNS, F11, F12, LBRC, RBRC, FN20, EQL, FN23, FN24, MINS, FN21, TRNS, - TRNS, BSLS, GRV, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, FN1, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), -[3] = KEYMAP( /* Wilba RAISE */ - TRNS, FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, TRNS, - TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, - TRNS, FN25, FN22, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, TRNS), -}; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // LOWER - [2] = ACTION_LAYER_MOMENTARY(3), // RAISE - - [3] = ACTION_DEFAULT_LAYER_SET(0), - [4] = ACTION_DEFAULT_LAYER_SET(1), - - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), // ! - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), // @ - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), // # - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), // $ - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), // % - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), // ^ - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), // & - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), // * - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), // ( - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), // ) - - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // _ - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // + - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // ~ - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // { - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // } - [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // | - - [26] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), - - [27] = ACTION_BACKLIGHT_TOGGLE(), - [28] = ACTION_BACKLIGHT_INCREASE(), - [29] = ACTION_BACKLIGHT_DECREASE() - -}; diff --git a/keyboard/quark/config.h b/keyboard/quark/config.h deleted file mode 100644 index 7f9a48ce4d..0000000000 --- a/keyboard/quark/config.h +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_H -#define CONFIG_H - - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER jackhumbert -#define PRODUCT Quark -#define DESCRIPTION t.m.k. keyboard firmware for the Quark - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -/* NOTE: this is the max value of 0..BACKLIGHT_LEVELS so really 16 levels. */ -#define BACKLIGHT_LEVELS 15 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 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/keyboard/quark/extended_keymap_common.c b/keyboard/quark/extended_keymap_common.c deleted file mode 100644 index f8fc3209fb..0000000000 --- a/keyboard/quark/extended_keymap_common.c +++ /dev/null @@ -1,184 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include "extended_keymap_common.h" -#include "report.h" -#include "keycode.h" -#include "action_layer.h" -#include "action.h" -#include "action_macro.h" -#include "debug.h" - - -static action_t keycode_to_action(uint16_t keycode); - - -/* converts key to action */ -action_t action_for_key(uint8_t layer, keypos_t key) -{ - // 16bit keycodes - important - uint16_t keycode = keymap_key_to_keycode(layer, key); - - if (keycode >= 0x0100 && keycode < 0x2000) { - // Has a modifier - action_t action; - // Split it up - action.code = ACTION_MODS_KEY(keycode >> 8, keycode & 0xFF); - return action; - } else if (keycode >= 0x2000 && keycode < 0x3000) { - // Is a shortcut for function layer, pull last 12bits - return keymap_func_to_action(keycode & 0xFFF); - } else if (keycode >= 0x3000 && keycode < 0x4000) { - action_t action; - action.code = ACTION_MACRO(keycode & 0xFF); - return action; - } - - switch (keycode) { - case KC_FN0 ... KC_FN31: - return keymap_fn_to_action(keycode); -#ifdef BOOTMAGIC_ENABLE - case KC_CAPSLOCK: - case KC_LOCKING_CAPS: - if (keymap_config.swap_control_capslock || keymap_config.capslock_to_control) { - return keycode_to_action(KC_LCTL); - } - return keycode_to_action(keycode); - case KC_LCTL: - if (keymap_config.swap_control_capslock) { - return keycode_to_action(KC_CAPSLOCK); - } - return keycode_to_action(KC_LCTL); - case KC_LALT: - if (keymap_config.swap_lalt_lgui) { - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_LGUI); - } - return keycode_to_action(KC_LALT); - case KC_LGUI: - if (keymap_config.swap_lalt_lgui) { - return keycode_to_action(KC_LALT); - } - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_LGUI); - case KC_RALT: - if (keymap_config.swap_ralt_rgui) { - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_RGUI); - } - return keycode_to_action(KC_RALT); - case KC_RGUI: - if (keymap_config.swap_ralt_rgui) { - return keycode_to_action(KC_RALT); - } - if (keymap_config.no_gui) { - return keycode_to_action(ACTION_NO); - } - return keycode_to_action(KC_RGUI); - case KC_GRAVE: - if (keymap_config.swap_grave_esc) { - return keycode_to_action(KC_ESC); - } - return keycode_to_action(KC_GRAVE); - case KC_ESC: - if (keymap_config.swap_grave_esc) { - return keycode_to_action(KC_GRAVE); - } - return keycode_to_action(KC_ESC); - case KC_BSLASH: - if (keymap_config.swap_backslash_backspace) { - return keycode_to_action(KC_BSPACE); - } - return keycode_to_action(KC_BSLASH); - case KC_BSPACE: - if (keymap_config.swap_backslash_backspace) { - return keycode_to_action(KC_BSLASH); - } - return keycode_to_action(KC_BSPACE); -#endif - default: - return keycode_to_action(keycode); - } -} - - -/* Macro */ -__attribute__ ((weak)) -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - return MACRO_NONE; -} - -/* Function */ -__attribute__ ((weak)) -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) -{ -} - -/* translates keycode to action */ -static action_t keycode_to_action(uint16_t keycode) -{ - action_t action; - switch (keycode) { - case KC_A ... KC_EXSEL: - case KC_LCTRL ... KC_RGUI: - action.code = ACTION_KEY(keycode); - break; - case KC_SYSTEM_POWER ... KC_SYSTEM_WAKE: - action.code = ACTION_USAGE_SYSTEM(KEYCODE2SYSTEM(keycode)); - break; - case KC_AUDIO_MUTE ... KC_WWW_FAVORITES: - action.code = ACTION_USAGE_CONSUMER(KEYCODE2CONSUMER(keycode)); - break; - case KC_MS_UP ... KC_MS_ACCEL2: - action.code = ACTION_MOUSEKEY(keycode); - break; - case KC_TRNS: - action.code = ACTION_TRANSPARENT; - break; - default: - action.code = ACTION_NO; - break; - } - return action; -} - - -/* translates key to keycode */ -uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - // Read entire word (16bits) - return pgm_read_word(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint16_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} - -action_t keymap_func_to_action(uint16_t keycode) -{ - // For FUNC without 8bit limit - return (action_t){ .code = pgm_read_word(&fn_actions[(int)keycode]) }; -} diff --git a/keyboard/quark/extended_keymap_common.h b/keyboard/quark/extended_keymap_common.h deleted file mode 100644 index 66712459c6..0000000000 --- a/keyboard/quark/extended_keymap_common.h +++ /dev/null @@ -1,152 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#ifndef KEYMAP_H -#define KEYMAP_H - -#include <stdint.h> -#include <stdbool.h> -#include "action.h" -#include <avr/pgmspace.h> -#include "keycode.h" -#include "keymap.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" - -#ifdef BOOTMAGIC_ENABLE -/* NOTE: Not portable. Bit field order depends on implementation */ -typedef union { - uint16_t raw; - struct { - bool swap_control_capslock:1; - bool capslock_to_control:1; - bool swap_lalt_lgui:1; - bool swap_ralt_rgui:1; - bool no_gui:1; - bool swap_grave_esc:1; - bool swap_backslash_backspace:1; - bool nkro:1; - }; -} keymap_config_t; -keymap_config_t keymap_config; -#endif - -/* translates key to keycode */ -uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key); - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint16_t keycode); - -/* translates Fn keycode to action */ -action_t keymap_func_to_action(uint16_t keycode); - -extern const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - -// Ability to use mods in layouts -#define LCTL(kc) kc | 0x0100 -#define LSFT(kc) kc | 0x0200 -#define LALT(kc) kc | 0x0400 -#define LGUI(kc) kc | 0x0800 -#define RCTL(kc) kc | 0x1100 -#define RSFT(kc) kc | 0x1200 -#define RALT(kc) kc | 0x1400 -#define RGUI(kc) kc | 0x1800 - -// Alias for function layers than expand past FN31 -#define FUNC(kc) kc | 0x2000 - -// Aliases -#define S(kc) LSFT(kc) -#define F(kc) FUNC(kc) - -// For software implementation of colemak -#define CM_Q KC_Q -#define CM_W KC_W -#define CM_F KC_E -#define CM_P KC_R -#define CM_G KC_T -#define CM_J KC_Y -#define CM_L KC_U -#define CM_U KC_I -#define CM_Y KC_O -#define CM_SCLN KC_P - -#define CM_A KC_A -#define CM_R KC_S -#define CM_S KC_D -#define CM_T KC_F -#define CM_D KC_G -#define CM_H KC_H -#define CM_N KC_J -#define CM_E KC_K -#define CM_I KC_L -#define CM_O KC_SCLN - -#define CM_Z KC_Z -#define CM_X KC_X -#define CM_C KC_C -#define CM_V KC_V -#define CM_B KC_B -#define CM_K KC_N -#define CM_M KC_M -#define CM_COMM KC_COMM -#define CM_DOT KC_DOT -#define CM_SLSH KC_SLSH - -// Make it easy to support these in macros -#define KC_CM_Q CM_Q -#define KC_CM_W CM_W -#define KC_CM_F CM_F -#define KC_CM_P CM_P -#define KC_CM_G CM_G -#define KC_CM_J CM_J -#define KC_CM_L CM_L -#define KC_CM_U CM_U -#define KC_CM_Y CM_Y -#define KC_CM_SCLN CM_SCLN - -#define KC_CM_A CM_A -#define KC_CM_R CM_R -#define KC_CM_S CM_S -#define KC_CM_T CM_T -#define KC_CM_D CM_D -#define KC_CM_H CM_H -#define KC_CM_N CM_N -#define KC_CM_E CM_E -#define KC_CM_I CM_I -#define KC_CM_O CM_O - -#define KC_CM_Z CM_Z -#define KC_CM_X CM_X -#define KC_CM_C CM_C -#define KC_CM_V CM_V -#define KC_CM_B CM_B -#define KC_CM_K CM_K -#define KC_CM_M CM_M -#define KC_CM_COMM CM_COMM -#define KC_CM_DOT CM_DOT -#define KC_CM_SLSH CM_SLSH - -#define M(kc) kc | 0x3000 - -#define MACRODOWN(...) (record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE) - -#endif diff --git a/keyboard/quark/extended_keymaps/extended_keymap_default.c b/keyboard/quark/extended_keymaps/extended_keymap_default.c deleted file mode 100644 index 7ddc1aad96..0000000000 --- a/keyboard/quark/extended_keymaps/extended_keymap_default.c +++ /dev/null @@ -1,40 +0,0 @@ -#include "extended_keymap_common.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = { - {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, KC_NO, KC_ENT}, - {KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT}, - { KC_LCTL, KC_LALT, KC_LGUI, KC_NO, FUNC(2), KC_SPC, KC_NO, KC_NO, FUNC(1), KC_LEFT, KC_DOWN, KC_RGHT} -}, -[1] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, - { KC_TAB, KC_A, KC_S,S(KC_BSLS), S(KC_COMM),S(KC_DOT),S(KC_MINS),S(KC_GRV),S(KC_LBRC), S(KC_RBRC), KC_NO, KC_ENT}, - {KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SCLN, S(KC_SCLN), KC_HOME, KC_PGUP, KC_RSFT}, - { KC_LCTL, KC_LALT, KC_LGUI, KC_NO, FUNC(2), KC_SPC, KC_NO, KC_NO, FUNC(1), KC_SCLN, KC_QUOT, KC_SLSH} -}, -[2] = { - {KC_ESC, 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_TAB, KC_A, KC_S, KC_D, KC_BSLS, KC_SLSH, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_ENT}, - {KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_7), S(KC_EQL), KC_COMM, KC_UP, KC_RSFT}, - { KC_LCTL, KC_LALT, KC_LGUI, KC_NO, FUNC(2), KC_SPC, KC_NO, KC_NO, FUNC(1), KC_LEFT, KC_DOWN, KC_RGHT} -} -}; - - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [2] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - -}; - -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: - return MACRO_NONE; - break; - } - return MACRO_NONE; -}; diff --git a/keyboard/quark/keymap_common.c b/keyboard/quark/keymap_common.c deleted file mode 100644 index fdb1769e1c..0000000000 --- a/keyboard/quark/keymap_common.c +++ /dev/null @@ -1,30 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#include "keymap_common.h" - - -/* translates key to keycode */ -uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key) -{ - return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); -} - -/* translates Fn keycode to action */ -action_t keymap_fn_to_action(uint8_t keycode) -{ - return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) }; -} diff --git a/keyboard/quark/keymap_common.h b/keyboard/quark/keymap_common.h deleted file mode 100644 index c74c7e9a28..0000000000 --- a/keyboard/quark/keymap_common.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include <stdint.h> -#include <stdbool.h> -#include <avr/pgmspace.h> -#include "keycode.h" -#include "action.h" -#include "action_macro.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - - -extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS]; -extern const uint16_t fn_actions[]; - - -// MIT Layout -/* - * ,-----------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ -#define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K37, K38, K39, K3A, K3B \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_NO, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B } \ -} - -// Grid Layout -/* - * ,-----------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | | | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------' - */ -#define KEYMAP_GRID( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B \ -) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, KC_##K08, KC_##K09, KC_##K0A, KC_##K0B }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, KC_##K18, KC_##K19, KC_##K1A, KC_##K1B }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, KC_##K28, KC_##K29, KC_##K2A, KC_##K2B }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_##K3A, KC_##K3B } \ -} - - -#endif diff --git a/keyboard/quark/led.c b/keyboard/quark/led.c deleted file mode 100644 index 1f36434883..0000000000 --- a/keyboard/quark/led.c +++ /dev/null @@ -1,38 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -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 <http://www.gnu.org/licenses/>. -*/ - -#include <avr/io.h> -#include "stdint.h" -#include "led.h" - - -void led_set(uint8_t usb_led) -{ - // Using PE6 Caps Lock LED - if (usb_led & (1<<USB_LED_CAPS_LOCK)) - { - // Output high. - DDRE |= (1<<6); - PORTE |= (1<<6); - } - else - { - // Output low. - DDRE &= ~(1<<6); - PORTE &= ~(1<<6); - } -} diff --git a/keyboard/quark/matrix.c b/keyboard/quark/matrix.c deleted file mode 100644 index 2f2dbdb108..0000000000 --- a/keyboard/quark/matrix.c +++ /dev/null @@ -1,193 +0,0 @@ -/* -Copyright 2012 Jun Wako -Generated by planckkeyboard.com (2014 Jack Humbert) - -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 <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include <util/delay.h> -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" - - -#ifndef DEBOUNCE -# define DEBOUNCE 10 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(void); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } -} - -uint8_t matrix_scan(void) -{ - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - _delay_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - _delay_ms(1); - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - -static void init_cols(void) -{ - DDRB &= ~(1<<6 | 1<<5 | 1<<4); - PORTB |= (1<<6 | 1<<5 | 1<<4); - DDRD &= ~(1<<7 | 1<<6 | 1<<4); - PORTD |= (1<<7 | 1<<6 | 1<<4); - DDRF &= ~(1<<0 | 1<<1 | 1<<4 | 1<<5 | 1<<6 | 1<<7); - PORTF |= (1<<0 | 1<<1 | 1<<4 | 1<<5 | 1<<6 | 1<<7); - -} - -static matrix_row_t read_cols(void) -{ - return (PIND&(1<<4) ? 0 : (1<<0)) | - (PIND&(1<<6) ? 0 : (1<<1)) | - (PIND&(1<<7) ? 0 : (1<<2)) | - (PINB&(1<<4) ? 0 : (1<<3)) | - (PINB&(1<<5) ? 0 : (1<<4)) | - (PINB&(1<<6) ? 0 : (1<<5)) | - (PINF&(1<<7) ? 0 : (1<<6)) | - (PINF&(1<<6) ? 0 : (1<<7)) | - (PINF&(1<<5) ? 0 : (1<<8)) | - (PINF&(1<<4) ? 0 : (1<<9)) | - (PINF&(1<<1) ? 0 : (1<<10)) | - (PINF&(1<<0) ? 0 : (1<<11)); - -} - -static void unselect_rows(void) -{ - DDRB &= ~(1<<0 | 1<<1 | 1<<2 | 1<<3); - PORTB |= (1<<0 | 1<<1 | 1<<2 | 1<<3); - -} - -static void select_row(uint8_t row) -{ - switch (row) { - case 0: - DDRB |= (1<<0); - PORTB &= ~(1<<0); - break; - case 1: - DDRB |= (1<<1); - PORTB &= ~(1<<1); - break; - case 2: - DDRB |= (1<<2); - PORTB &= ~(1<<2); - break; - case 3: - DDRB |= (1<<3); - PORTB &= ~(1<<3); - break; - - } -} diff --git a/quantum/keymap_common.h b/quantum/keymap_common.h index 91d5c09c1c..db14e7d8ac 100644 --- a/quantum/keymap_common.h +++ b/quantum/keymap_common.h @@ -119,6 +119,8 @@ extern const uint16_t fn_actions[]; #define KC_PLUS LSFT(KC_EQL) // + +#define KC_DQUO LSFT(KC_QUOT) // " +#define KC_DOUBLE_QUOTE KC_DQUO #define KC_LCBR LSFT(KC_LBRC) // { #define KC_LEFT_CURLY_BRACE KC_LCBR @@ -240,6 +242,8 @@ extern const uint16_t fn_actions[]; #define BL_TOGG 0x5082 #define BL_STEP 0x5083 +#define KC_LSPO 0x5084 // Left shift, open parens when tapped +#define KC_RSPC 0x5085 // Right shift, close parens when tapped // GOTO layer - 16 layers max // when: // ON_PRESS = 1 diff --git a/quantum/quantum.c b/quantum/quantum.c index eb64a99a4d..c53fb19b4b 100644 --- a/quantum/quantum.c +++ b/quantum/quantum.c @@ -21,6 +21,7 @@ void leader_end(void) {} uint8_t starting_note = 0x0C; int offset = 7; + #ifdef AUDIO_ENABLE bool music_activated = false; @@ -59,6 +60,8 @@ uint8_t chord_key_down = 0; static uint8_t input_mode; #endif +static bool shift_interrupted[2] = {0, 0}; + bool keys_chord(uint8_t keys[]) { uint8_t keys_size = sizeof(keys)/sizeof(keys[0]); bool pass = true; @@ -415,6 +418,45 @@ bool process_record_quantum(keyrecord_t *record) { #endif + switch(keycode) { + case KC_LSPO: { + if (record->event.pressed) { + shift_interrupted[0] = false; + register_mods(MOD_BIT(KC_LSFT)); + } + else { + if (!shift_interrupted[0]) { + register_code(KC_9); + unregister_code(KC_9); + } + unregister_mods(MOD_BIT(KC_LSFT)); + } + return false; + break; + } + + case KC_RSPC: { + if (record->event.pressed) { + shift_interrupted[1] = false; + register_mods(MOD_BIT(KC_RSFT)); + } + else { + if (!shift_interrupted[1]) { + register_code(KC_0); + unregister_code(KC_0); + } + unregister_mods(MOD_BIT(KC_RSFT)); + } + return false; + break; + } + default: { + shift_interrupted[0] = true; + shift_interrupted[1] = true; + break; + } + } + return process_action_kb(record); } @@ -481,4 +523,4 @@ void audio_on_user() {} __attribute__ ((weak)) void music_scale_user() {} -//------------------------------------------------------------------------------
\ No newline at end of file +//------------------------------------------------------------------------------ |