]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
[Erez & Jack] Removes keyboards which are not active on qmk
authorErez Zukerman <ezuk@madmimi.com>
Wed, 25 May 2016 03:55:29 +0000 (23:55 -0400)
committerErez Zukerman <ezuk@madmimi.com>
Wed, 25 May 2016 03:55:29 +0000 (23:55 -0400)
237 files changed:
keyboard/Bantam44/Bantam44.c [deleted file]
keyboard/Bantam44/Bantam44.h [deleted file]
keyboard/Bantam44/Makefile [deleted file]
keyboard/Bantam44/README.md [deleted file]
keyboard/Bantam44/config.h [deleted file]
keyboard/Bantam44/keymaps/default.c [deleted file]
keyboard/IIgs/Makefile [deleted file]
keyboard/IIgs/README [deleted file]
keyboard/IIgs/config.h [deleted file]
keyboard/IIgs/doc/PIN_BYPASS.jpg [deleted file]
keyboard/IIgs/doc/Teensy++_Mod.jpg [deleted file]
keyboard/IIgs/hid_listen.mac [deleted file]
keyboard/IIgs/keymap.c [deleted file]
keyboard/IIgs/led.c [deleted file]
keyboard/IIgs/matrix.c [deleted file]
keyboard/bantam44/Bantam44.c [new file with mode: 0644]
keyboard/bantam44/Bantam44.h [new file with mode: 0644]
keyboard/bantam44/Makefile [new file with mode: 0644]
keyboard/bantam44/README.md [new file with mode: 0644]
keyboard/bantam44/config.h [new file with mode: 0644]
keyboard/bantam44/keymaps/default.c [new file with mode: 0644]
keyboard/ghost_squid/Makefile.lufa [deleted file]
keyboard/ghost_squid/README.md [deleted file]
keyboard/ghost_squid/config.h [deleted file]
keyboard/ghost_squid/keymap.c [deleted file]
keyboard/ghost_squid/keymap_ansi.h [deleted file]
keyboard/ghost_squid/led.c [deleted file]
keyboard/ghost_squid/matrix.c [deleted file]
keyboard/hbkb/Makefile.lufa [deleted file]
keyboard/hbkb/config.h [deleted file]
keyboard/hbkb/keymap.c [deleted file]
keyboard/hbkb/led.c [deleted file]
keyboard/hbkb/matrix.c [deleted file]
keyboard/hhkb/Makefile
keyboard/hhkb/Makefile.jp [deleted file]
keyboard/hhkb/Makefile.pjrc [deleted file]
keyboard/hhkb/Makefile.rn42 [deleted file]
keyboard/hhkb/README.md
keyboard/hhkb/config.h
keyboard/hhkb/config_rn42.h [deleted file]
keyboard/hhkb/doc/Bluetooth.txt [deleted file]
keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg [deleted file]
keyboard/hhkb/doc/HHKB.txt [deleted file]
keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/connector_contact.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/probe_contact.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/teensy_install.jpg [deleted file]
keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg [deleted file]
keyboard/hhkb/doc/HHKB_keycodes.txt [deleted file]
keyboard/hhkb/doc/Power.txt [deleted file]
keyboard/hhkb/doc/V-USB.md [deleted file]
keyboard/hhkb/hhkb_qmk.c [new file with mode: 0644]
keyboard/hhkb/hhkb_qmk.h [new file with mode: 0644]
keyboard/hhkb/keymap_common.c [deleted file]
keyboard/hhkb/keymap_common.h [deleted file]
keyboard/hhkb/keymaps/default.c [new file with mode: 0644]
keyboard/hhkb/keymaps/hasu.c [deleted file]
keyboard/hhkb/keymaps/hhkb.c [deleted file]
keyboard/hhkb/keymaps/jp.c [deleted file]
keyboard/hhkb/keymaps/lxol.c [new file with mode: 0644]
keyboard/hhkb/keymaps/spacefn.c [deleted file]
keyboard/hhkb/led.c [deleted file]
keyboard/hhkb/not_supported/Makefile.iwrap [deleted file]
keyboard/hhkb/not_supported/Makefile.vusb [deleted file]
keyboard/hhkb/not_supported/config_iwrap.h [deleted file]
keyboard/hhkb/not_supported/config_vusb.h [deleted file]
keyboard/hhkb/not_supported/iwrap.txt [deleted file]
keyboard/hhkb/not_supported/usbconfig.h [deleted file]
keyboard/hhkb/rn42.mk [deleted file]
keyboard/hhkb/rn42/MEMO.txt [deleted file]
keyboard/hhkb/rn42/PowerSave.txt [deleted file]
keyboard/hhkb/rn42/RN42.txt [deleted file]
keyboard/hhkb/rn42/battery.c [deleted file]
keyboard/hhkb/rn42/battery.h [deleted file]
keyboard/hhkb/rn42/main.c [deleted file]
keyboard/hhkb/rn42/rn42.c [deleted file]
keyboard/hhkb/rn42/rn42.h [deleted file]
keyboard/hhkb/rn42/rn42_task.c [deleted file]
keyboard/hhkb/rn42/rn42_task.h [deleted file]
keyboard/hhkb/rn42/suart.S [deleted file]
keyboard/hhkb/rn42/suart.h [deleted file]
keyboard/hhkb_qmk/Makefile [deleted file]
keyboard/hhkb_qmk/README.md [deleted file]
keyboard/hhkb_qmk/config.h [deleted file]
keyboard/hhkb_qmk/hhkb_avr.h [deleted file]
keyboard/hhkb_qmk/hhkb_qmk.c [deleted file]
keyboard/hhkb_qmk/hhkb_qmk.h [deleted file]
keyboard/hhkb_qmk/keymaps/default.c [deleted file]
keyboard/hhkb_qmk/keymaps/lxol.c [deleted file]
keyboard/hhkb_qmk/matrix.c [deleted file]
keyboard/hid_liber/Makefile.lufa [deleted file]
keyboard/hid_liber/Makefile.pjrc [deleted file]
keyboard/hid_liber/README.md [deleted file]
keyboard/hid_liber/config.h [deleted file]
keyboard/hid_liber/keymap.c [deleted file]
keyboard/hid_liber/keymap_alaricljs.h [deleted file]
keyboard/hid_liber/keymap_ansi.h [deleted file]
keyboard/hid_liber/keymap_custom.h [deleted file]
keyboard/hid_liber/keymap_iso.h [deleted file]
keyboard/hid_liber/led.c [deleted file]
keyboard/hid_liber/matrix.c [deleted file]
keyboard/infinity/Makefile [deleted file]
keyboard/infinity/README [deleted file]
keyboard/infinity/config.h [deleted file]
keyboard/infinity/keymap.c [deleted file]
keyboard/infinity/keymap_common.c [deleted file]
keyboard/infinity/keymap_common.h [deleted file]
keyboard/infinity/led.c [deleted file]
keyboard/infinity/main.cpp [deleted file]
keyboard/infinity/matrix.c [deleted file]
keyboard/infinity/mbed-infinity.mk [deleted file]
keyboard/infinity/mbed-infinity/README [deleted file]
keyboard/infinity/mbed-infinity/USBHAL_KL25Z.cpp [deleted file]
keyboard/infinity/mbed-infinity/cmsis_nvic.c [deleted file]
keyboard/infinity/mbed-infinity/infinity.ld [deleted file]
keyboard/infinity/mbed-infinity/startup_MK20D5.s [deleted file]
keyboard/infinity/mbed-infinity/system_MK20D5.c [deleted file]
keyboard/infinity/tool/README [deleted file]
keyboard/infinity/tool/k20dx32_flash.cfg [deleted file]
keyboard/infinity/tool/openocd.cfg [deleted file]
keyboard/kitten_paw/Makefile.lufa [deleted file]
keyboard/kitten_paw/README.md [deleted file]
keyboard/kitten_paw/config.h [deleted file]
keyboard/kitten_paw/keymap.c [deleted file]
keyboard/kitten_paw/keymap_ansi.h [deleted file]
keyboard/kitten_paw/led.c [deleted file]
keyboard/kitten_paw/matrix.c [deleted file]
keyboard/kmac/Makefile.lufa [deleted file]
keyboard/kmac/Makefile.pjrc [deleted file]
keyboard/kmac/README.md [deleted file]
keyboard/kmac/backlight.c [deleted file]
keyboard/kmac/config.h [deleted file]
keyboard/kmac/keymap.c [deleted file]
keyboard/kmac/keymap_winkey.h [deleted file]
keyboard/kmac/keymap_winkeyless.h [deleted file]
keyboard/kmac/led.c [deleted file]
keyboard/kmac/matrix.c [deleted file]
keyboard/lightpad/Makefile.lufa [deleted file]
keyboard/lightpad/README.md [deleted file]
keyboard/lightpad/backlight.c [deleted file]
keyboard/lightpad/backlight.h [deleted file]
keyboard/lightpad/config.h [deleted file]
keyboard/lightpad/keymap.c [deleted file]
keyboard/lightpad/keymap_lightpad.h [deleted file]
keyboard/lightpad/led.c [deleted file]
keyboard/lightpad/matrix.c [deleted file]
keyboard/lightsaber/Makefile.lufa [deleted file]
keyboard/lightsaber/Makefile.pjrc [deleted file]
keyboard/lightsaber/README.md [deleted file]
keyboard/lightsaber/backlight.c [deleted file]
keyboard/lightsaber/backlight.h [deleted file]
keyboard/lightsaber/config.h [deleted file]
keyboard/lightsaber/keymap.c [deleted file]
keyboard/lightsaber/keymap_winkey.h [deleted file]
keyboard/lightsaber/led.c [deleted file]
keyboard/lightsaber/matrix.c [deleted file]
keyboard/macway/Makefile.lufa [deleted file]
keyboard/macway/Makefile.pjrc [deleted file]
keyboard/macway/config.h [deleted file]
keyboard/macway/doc/back.jpg [deleted file]
keyboard/macway/doc/case.jpg [deleted file]
keyboard/macway/doc/keys.jpg [deleted file]
keyboard/macway/doc/side.jpg [deleted file]
keyboard/macway/doc/switch.jpg [deleted file]
keyboard/macway/doc/teensy.jpg [deleted file]
keyboard/macway/doc/wiring.jpg [deleted file]
keyboard/macway/doc/withHHKB.jpg [deleted file]
keyboard/macway/doc/withThinkPad.jpg [deleted file]
keyboard/macway/keymap.c [deleted file]
keyboard/macway/led.c [deleted file]
keyboard/macway/matrix.c [deleted file]
keyboard/mbed_onekey/Makefile [deleted file]
keyboard/mbed_onekey/config.h [deleted file]
keyboard/mbed_onekey/main.cpp [deleted file]
keyboard/nerd/Makefile [deleted file]
keyboard/nerd/README.md [deleted file]
keyboard/nerd/backlight.c [deleted file]
keyboard/nerd/backlight.h [deleted file]
keyboard/nerd/config.h [deleted file]
keyboard/nerd/keymap_60_ansi150.c [deleted file]
keyboard/nerd/keymap_80_ansi150.c [deleted file]
keyboard/nerd/keymap_common.c [deleted file]
keyboard/nerd/keymap_common.h [deleted file]
keyboard/nerd/matrix.c [deleted file]
keyboard/onekey/Makefile [deleted file]
keyboard/onekey/Makefile.pjrc [deleted file]
keyboard/onekey/Makefile.vusb [deleted file]
keyboard/onekey/README.md [deleted file]
keyboard/onekey/config.h [deleted file]
keyboard/onekey/keymap.c [deleted file]
keyboard/onekey/led.c [deleted file]
keyboard/onekey/matrix.c [deleted file]
keyboard/onekey/usbconfig.h [deleted file]
keyboard/phantom/Makefile.lufa [deleted file]
keyboard/phantom/Makefile.pjrc [deleted file]
keyboard/phantom/README.md [deleted file]
keyboard/phantom/config.h [deleted file]
keyboard/phantom/keymap.c [deleted file]
keyboard/phantom/keymap_7bit.h [deleted file]
keyboard/phantom/keymap_ansi.h [deleted file]
keyboard/phantom/keymap_ansi_150.h [deleted file]
keyboard/phantom/keymap_iso.h [deleted file]
keyboard/phantom/keymap_iso_150.h [deleted file]
keyboard/phantom/led.c [deleted file]
keyboard/phantom/matrix.c [deleted file]
keyboard/quark/Makefile [deleted file]
keyboard/quark/Makefile.pjrc [deleted file]
keyboard/quark/README.md [deleted file]
keyboard/quark/backlight.c [deleted file]
keyboard/quark/backlight.h [deleted file]
keyboard/quark/common_keymaps/keymap_brett.c [deleted file]
keyboard/quark/common_keymaps/keymap_dotcom.c [deleted file]
keyboard/quark/common_keymaps/keymap_jack.c [deleted file]
keyboard/quark/common_keymaps/keymap_joe.c [deleted file]
keyboard/quark/common_keymaps/keymap_matthew.c [deleted file]
keyboard/quark/common_keymaps/keymap_nathan.c [deleted file]
keyboard/quark/common_keymaps/keymap_peasant.c [deleted file]
keyboard/quark/common_keymaps/keymap_reed.c [deleted file]
keyboard/quark/common_keymaps/keymap_sean.c [deleted file]
keyboard/quark/common_keymaps/keymap_shane.c [deleted file]
keyboard/quark/common_keymaps/keymap_simon.c [deleted file]
keyboard/quark/common_keymaps/keymap_tim.c [deleted file]
keyboard/quark/common_keymaps/keymap_wilba.c [deleted file]
keyboard/quark/config.h [deleted file]
keyboard/quark/extended_keymap_common.c [deleted file]
keyboard/quark/extended_keymap_common.h [deleted file]
keyboard/quark/extended_keymaps/extended_keymap_default.c [deleted file]
keyboard/quark/keymap_common.c [deleted file]
keyboard/quark/keymap_common.h [deleted file]
keyboard/quark/led.c [deleted file]
keyboard/quark/matrix.c [deleted file]

diff --git a/keyboard/Bantam44/Bantam44.c b/keyboard/Bantam44/Bantam44.c
deleted file mode 100644 (file)
index ad91401..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "Bantam44.h"
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-       // leave these blank
-}
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-       // leave these blank
-}
-
-void matrix_init_kb(void) {
-       // put your keyboard start-up code here
-       // runs once when the firmware starts up
-
-       matrix_init_user();
-}
-
-void matrix_scan_kb(void) {
-       // put your looping keyboard code here
-       // runs every cycle (a lot)
-
-       matrix_scan_user();
-}
\ No newline at end of file
diff --git a/keyboard/Bantam44/Bantam44.h b/keyboard/Bantam44/Bantam44.h
deleted file mode 100644 (file)
index fa5b9df..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef BANTAM44_H
-#define BANTAM44_H
-
-#include "matrix.h"
-#include "keymap_common.h"
-#include "backlight.h"
-#include <stddef.h>
-
-// This a shortcut to help you visually see your layout.
-// The following is an example using the Planck MIT layout
-// The first section contains all of the arguements
-// The second converts the arguments into a two-dimensional array
-#define KEYMAP( \
-    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
-    K10,   K11, K12, K13, K14, K15, K16, K17, K18, K19,    K1A, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
-    K30,   K31,   K32,   K33,     K34,    K35,   K36, K37, K38  \
-) \
-{ \
-    { K00, K01, K02, K03,   K04, K05,   K06, K07,   K08, K09, K0A,   K0B   }, \
-    { K10, K11, K12, K13,   K14, K15,   K16, K17,   K18, K19, KC_NO, K2A }, \
-       { K20, K21, K22, K23,   K24, K25,   K26, K27,   K28, K29, K2A,   K2B   }, \
-       { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37,   K38   }, \
-}
-
-void matrix_init_user(void);
-void matrix_scan_user(void);
-
-#endif
diff --git a/keyboard/Bantam44/Makefile b/keyboard/Bantam44/Makefile
deleted file mode 100644 (file)
index e7dea9f..0000000
+++ /dev/null
@@ -1,139 +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 = Bantam44
-
-
-# Directory common source filess exist
-TOP_DIR = ../..
-TMK_DIR = ../../tmk_core
-
-# Directory keyboard dependent files exist
-TARGET_DIR = .
-
-# # project specific files
-SRC = Bantam44.c
-
-ifdef KEYMAP
-    SRC := keymaps/$(KEYMAP).c $(SRC)
-else
-    SRC := 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=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
-# 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)
-
-include $(TOP_DIR)/quantum/quantum.mk
-
diff --git a/keyboard/Bantam44/README.md b/keyboard/Bantam44/README.md
deleted file mode 100644 (file)
index cd059a6..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-Bantam44 keyboard firmware
-======================
-
-## Quantum MK Firmware
-
-For the full Quantum feature list, see [the parent README.md](/README.md).
-
-## Building
-
-Download or clone the whole firmware and navigate to the keyboard/Bantam44 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 
-
-Depending on which keymap you would like to use, you will have to compile slightly differently.
-
-### Default
-To build with the default keymap, simply run `make`.
-
-### Other Keymaps
-Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<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.
\ No newline at end of file
diff --git a/keyboard/Bantam44/config.h b/keyboard/Bantam44/config.h
deleted file mode 100644 (file)
index a55f629..0000000
+++ /dev/null
@@ -1,82 +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      0x6060
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    Bantam Keyboards
-#define PRODUCT         Bantam44
-#define DESCRIPTION     A custom keyboard
-
-/* key matrix size */
-#define MATRIX_ROWS 4
-#define MATRIX_COLS 12
-
-// Planck PCB default pin-out
-// Change this to how you wired your keyboard
-// COLS: Left to right, ROWS: Top to bottom
-#define MATRIX_ROW_PINS { F0, D6, D4, D5 }
-#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, B6, F7, F6, F5, F4, F1 }
-#define UNUSED_PINS
-
-/* COL2ROW or ROW2COL */
-#define DIODE_DIRECTION COL2ROW
-
-/* define if matrix has ghost */
-//#define MATRIX_HAS_GHOST
-
-/* number of backlight levels */
-#define BACKLIGHT_LEVELS 3
-
-/* Set 0 if debouncing isn't needed */
-#define DEBOUNCING_DELAY 5
-
-/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
-#define LOCKING_SUPPORT_ENABLE
-/* Locking resynchronize hack */
-#define LOCKING_RESYNC_ENABLE
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/*
- * Feature disable options
- *  These options are also useful to firmware size reduction.
- */
-
-/* disable debug print */
-//#define NO_DEBUG
-
-/* disable print */
-//#define NO_PRINT
-
-/* disable action features */
-//#define NO_ACTION_LAYER
-//#define NO_ACTION_TAPPING
-//#define NO_ACTION_ONESHOT
-//#define NO_ACTION_MACRO
-//#define NO_ACTION_FUNCTION
-
-#endif
diff --git a/keyboard/Bantam44/keymaps/default.c b/keyboard/Bantam44/keymaps/default.c
deleted file mode 100644 (file)
index 17ade62..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#include "Bantam44.h"
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [0] = { /* Base */
-        {KC_ESC,  KC_Q,    KC_W,     KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC },
-        {KC_TAB,  KC_A,    KC_S,     KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    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_LGUI, KC_LALT,  KC_NO,   MO(1),   KC_NO,   KC_SPC,  KC_NO,   MO(2),   KC_SCLN, KC_QUOT, KC_SLSH }
-    },
-    [1] = { /* LOWER */
-        {KC_ESC,  KC_1,    KC_2,     KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DELT },
-        {KC_TAB,  KC_MPRV, KC_MPLY,  KC_MNXT, KC_GRV,  KC_BSLS, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_NO,   KC_ENT  },
-        {KC_CAPS, KC_LSFT, KC_F1,    KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_NO,   KC_HOME, KC_PGUP, KC_RSFT },
-        {KC_LCTL, KC_LGUI, KC_LALT,  KC_NO,   KC_TRNS, KC_NO,   KC_SPC,  KC_NO,   KC_TRNS, KC_END,  KC_PGDN, KC_EXLM }
-    },
-    [2] = { /* RAISE */
-        {KC_ESC,  KC_EXLM, KC_AT,    KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT },
-        {KC_TAB,  KC_MUTE, KC_VOLD,  KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO,   KC_ENT  },
-        {KC_CAPS, KC_LSFT, KC_F7,    KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NO,   KC_NO,   KC_UP,   KC_RSFT },
-        {KC_LCTL, KC_LGUI, KC_LALT,  KC_NO,   KC_TRNS, KC_NO,   KC_SPC,  KC_NO,   KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }
-    }
-};
-const uint16_t PROGMEM fn_actions[] = {
-};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function
-{
-    return MACRO_NONE;
-};
\ No newline at end of file
diff --git a/keyboard/IIgs/Makefile b/keyboard/IIgs/Makefile
deleted file mode 100644 (file)
index 3bf380e..0000000
+++ /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 (file)
index 820d771..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-Replaceable USB Controller for Apple IIgs/Standard(M0116)\r
-JeffreySung(nattyman@gmail.com)\r
-\r
-===============================\r
-\r
-Feature\r
--------\r
-- Replaceable keyboard controller for Apple IIgs(A9M0330)/Standard(M0116)\r
-- Teensy++ 2.0 required\r
-- Some signal bypass required\r
-- ADB keyboard doesn't use matrix for modifier keys. With virtual row for modifier keys, \r
-  these keys are merged into key matrix using virtual row.\r
-  \r
-History\r
-=======\r
-- 2012.09.17 First Release\r
-- 2012.09.17 CapsLock support\r
-- 2012.09.19 Power button added\r
-Build\r
-=====\r
-0. Just Type "Make" and return.\r
-\r
-Hardware\r
-========\r
-PJRC Teensy\r
------------\r
-0. The following ports should not be connected to board.\r
-   From top view of Teensy++, from GND and counter clock wise.\r
-    -7,26(in keyboard PCB, these pins are VDD,GND)\r
-       -30,31(in Teensy++, these pins are Ref,GND respectively)\r
-       -5,6(D2,D3  for bluetooth in future)\r
-1. Bypass #31 pin(from board) to E4(Teensy)\r
-2. Bypass #30 pin(from board) to F2(Teensy)\r
-3. Bypass #6  pin(from board) to A0(Teensy)\r
-4. Refer to documentation directory\r
-\r
-To Do\r
-=====\r
-0. When DEBOUNCE defined, there is a errors.\r
-1. Layer Change by toggling Clear Key\r
-2. Eject Key add. (following files should be modified.)\r
-               common/keycode.h\r
-               common/keyboard.c\r
-3. Use bluetooth\r
-EOF\r
diff --git a/keyboard/IIgs/config.h b/keyboard/IIgs/config.h
deleted file mode 100644 (file)
index bc8bf75..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-/*\r
-Copyright 2011 Jun Wako <wakojun@gmail.com>\r
-\r
-This program is free software: you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation, either version 2 of the License, or\r
-(at your option) any later version.\r
-\r
-This program is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-*/\r
-\r
-#ifndef CONFIG_H\r
-#define CONFIG_H\r
-\r
-\r
-/* USB Device descriptor parameter */\r
-/* for Apple \r
-#define VENDOR_ID       0x05AC\r
-#define PRODUCT_ID      0xBEE0\r
-*/\r
-#define VENDOR_ID       0xFEED\r
-#define PRODUCT_ID      0xBEE0\r
-#define DEVICE_VER      0x0202\r
-#define MANUFACTURER    t.m.k.\r
-#define PRODUCT         Apple Desktop Bus Keyboard\r
-\r
-\r
-/* message strings */\r
-#define DESCRIPTION     Apple M0116/A9M0660 keyboard firmware\r
-\r
-\r
-/* matrix size */\r
-#define MATRIX_ROWS 11 // last row is virtual for modifier\r
-#define MATRIX_COLS 8\r
-/* define if matrix has ghost */\r
-#define MATRIX_HAS_GHOST\r
-/* Set 0 if need no debouncing */\r
-#define DEBOUNCE    5\r
-\r
-\r
-/* key combination for command */\r
-#define IS_COMMAND() ( \\r
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \\r
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \\r
-)\r
-\r
-\r
-/* layer switching */\r
-#define LAYER_SWITCH_DELAY 100\r
-#define LAYER_SEND_FN_TERM 300\r
-\r
-\r
-/* legacy keymap support */\r
-#define USE_LEGACY_KEYMAP\r
-\r
-\r
-#endif\r
diff --git a/keyboard/IIgs/doc/PIN_BYPASS.jpg b/keyboard/IIgs/doc/PIN_BYPASS.jpg
deleted file mode 100644 (file)
index 2998f0c..0000000
Binary files a/keyboard/IIgs/doc/PIN_BYPASS.jpg and /dev/null differ
diff --git a/keyboard/IIgs/doc/Teensy++_Mod.jpg b/keyboard/IIgs/doc/Teensy++_Mod.jpg
deleted file mode 100644 (file)
index 146c1ab..0000000
Binary files a/keyboard/IIgs/doc/Teensy++_Mod.jpg and /dev/null differ
diff --git a/keyboard/IIgs/hid_listen.mac b/keyboard/IIgs/hid_listen.mac
deleted file mode 100755 (executable)
index 8758fdf..0000000
Binary files a/keyboard/IIgs/hid_listen.mac and /dev/null differ
diff --git a/keyboard/IIgs/keymap.c b/keyboard/IIgs/keymap.c
deleted file mode 100644 (file)
index cd33e22..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*\r
-Copyright 2012 Jeffrey Sung <nattyman@gmail.com>\r
-\r
-This program is free software: you can redistribute it and/or modify\r
-it under the terms of the GNU General Public License as published by\r
-the Free Software Foundation, either version 2 of the License, or\r
-(at your option) any later version.\r
-\r
-This program is distributed in the hope that it will be useful,\r
-but WITHOUT ANY WARRANTY; without even the implied warranty of\r
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
-GNU General Public License for more details.\r
-\r
-You should have received a copy of the GNU General Public License\r
-along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
-*/\r
-\r
-/* \r
- * Keymap for Apple IIgs/Standard Keyboard\r
- */\r
-#include <stdint.h>\r
-#include <stdbool.h>\r
-#include <avr/pgmspace.h>\r
-#include "keycode.h"\r
-#include "print.h"\r
-#include "debug.h"\r
-#include "util.h"\r
-#include "keymap.h"\r
-\r
-\r
-// Convert physical keyboard layout to matrix array.\r
-// This is a macro to define keymap easily in keyboard layout form.\r
-#define KEYMAP( R10C5, \\r
-    R3C7, R3C6, R3C5, R3C4, R3C3, R3C2, R3C1, R8C1, R8C0, R3C0, R0C0, R0C1, R0C2, R0C3, R4C4, R4C5, R4C6, R4C7, \\r
-    R9C7, R9C6, R9C5, R9C4, R9C3, R9C2, R9C1, R9C0, R1C0, R1C1, R1C2, R1C3, R1C4,       R2C4, R2C5, R2C6, R2C3, \\r
-    R10C0,R7C7, R7C6, R7C5, R7C4, R7C3, R7C2, R7C1, R7C0, R0C4, R1C6, R1C7, R1C5,       R2C0, R2C1, R2C2, R2C7, \\r
-    R10C1,R6C7, R6C6, R6C5, R6C4, R6C3, R6C2, R6C1, R6C0, R0C5, R0C6,                                  R4C0, R4C1, R4C2, \\r
-    R10C4,R10C2,R10C3,R5C4, R5C7, R5C5, R5C6, R5C0, R5C2, R0C7,                                                        R5C1, R5C3, R4C3 \\r
-) { \\r
-    { R0C0, R0C1,  R0C2,  R0C3,  R0C4, R0C5,  R0C6,  R0C7 }, \\r
-    { R1C0, R1C1,  R1C2,  R1C3,  R1C4, R1C5,  R1C6,  R1C7 }, \\r
-    { R2C0, R2C1,  R2C2,  R2C3,  R2C4, R2C5,  R2C6,  R2C7 }, \\r
-    { R3C0, R3C1,  R3C2,  R3C3,  R3C4, R3C5,  R3C6,  R3C7 }, \\r
-    { R4C0, R4C1,  R4C2,  R4C3,  R4C4, R4C5,  R4C6,  R4C7 }, \\r
-    { R5C0, R5C1,  R5C2,  R5C3,  R5C4, R5C5,  R5C6,  R5C7 }, \\r
-    { R6C0, R6C1,  R6C2,  R6C3,  R6C4, R6C5,  R6C6,  R6C7 }, \\r
-    { R7C0, R7C1,  R7C2,  R7C3,  R7C4, R7C5,  R7C6,  R7C7 }, \\r
-    { R8C0, R8C1,  KC_NO, KC_NO, KC_NO,KC_NO, KC_NO, KC_NO }, \\r
-    { R9C0, R9C1,  R9C2,  R9C3,  R9C4, R9C5,  R9C6,  R9C7 }, \\r
-       { R10C0,R10C1, R10C2, R10C3, R10C4,R10C5, KC_NO, KC_NO} \\r
-}\r
-\r
-#define KEYCODE(layer, row, col) (pgm_read_byte(&keymaps[(layer)][(row)][(col)]))\r
-\r
-\r
-// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.\r
-static const uint8_t PROGMEM fn_layer[] = {\r
-    0,              // Fn0\r
-    1,              // Fn1\r
-    2,              // Fn2\r
-    3,              // Fn3\r
-    4,              // Fn4\r
-    0,              // Fn5\r
-    3,              // Fn6\r
-    3               // Fn7\r
-};\r
-\r
-// Assign Fn key(0-7) to a keycode sent when release Fn key without use of the layer.\r
-// See layer.c for details.\r
-static const uint8_t PROGMEM fn_keycode[] = {\r
-    KC_NO,          // Fn0\r
-    KC_NO,          // Fn1\r
-    KC_SLSH,        // Fn2\r
-    KC_SCLN,        // Fn3\r
-    KC_SPC,         // Fn4\r
-    KC_NO,          // Fn5\r
-    KC_NO,          // Fn6\r
-    KC_NO           // Fn7\r
-};\r
-\r
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\r
-    /* Layer 0: Default Layer\r
-     * ,-----------------------------------------------------------. ,---------------,\r
-     * |                    POWER                                  | |               |  \r
-     * |-----------------------------------------------------------| |---------------|\r
-     * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |FN0| = | / | * |\r
-     * |-----------------------------------------------------------| |---------------|\r
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|     | | 7 | 8 | 9 | + |\r
-     * |-----------------------------------------------------'     | |---------------|\r
-     * |Contro|  A|  S|  D|  F|  G|  H|  J|  K|  L|Fn3|  '|Return  | | 4 | 5 | 6 | - |\r
-     * |-----------------------------------------------------------| |---------------|\r
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|   /   |Shift | | 1 | 2 | 3 | E |\r
-     * |-----------------------------------------------------------| |-----------| N |\r
-     * |CAPS|Alt |Gui  |`  |SPC               |BSLS  |LFT|RGT|DN|UP| |   0   | . | T |\r
-     * `-----------------------------------------------------------' |---------------'\r
-     */\r
-    KEYMAP(                                                    KC_PWR,\r
-                  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, \\r
-           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, \\r
-           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, \\r
-           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, \\r
-           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),\r
-\r
-\r
-    /* Layer 1: Tenkey use Layer\r
-     * ,-----------------------------------------------------------. ,---------------,\r
-     * |                    POWER                                  | |               |  \r
-     * |-----------------------------------------------------------| |---------------|\r
-     * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backsp | |NLK| = | / | * |\r
-     * |-----------------------------------------------------------| |---------------|\r
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|     | |INS| 8 |PGU|V+ |\r
-     * |-----------------------------------------------------'     | |---------------|\r
-     * |Contro|  A|  S|  D|  F|  G|  H|  J|  K|  L|Fn3|  '|Return  | |DEL|UP |PGD|V- |\r
-     * |-----------------------------------------------------------| |---------------|\r
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|   /   |Shift | |LFT|DN |RGT| E |\r
-     * |-----------------------------------------------------------| |-----------| N |\r
-     * |CAPS|Alt |Gui  |`  |SPC               |BSLS  |LFT|RGT|DN|UP| |   0   | . | T |\r
-     * `-----------------------------------------------------------' `---------------'\r
-     */\r
-    KEYMAP(                                            KC_PWR, \\r
-                  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, \\r
-           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, \\r
-           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, \\r
-           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, \\r
-           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),\r
-};\r
-\r
-\r
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)\r
-{\r
-    return KEYCODE(layer, row, col);\r
-}\r
-\r
-uint8_t keymap_fn_layer(uint8_t index)\r
-{\r
-    return pgm_read_byte(&fn_layer[index]);\r
-}\r
-\r
-uint8_t keymap_fn_keycode(uint8_t index)\r
-{\r
-    return pgm_read_byte(&fn_keycode[index]);\r
-}\r
diff --git a/keyboard/IIgs/led.c b/keyboard/IIgs/led.c
deleted file mode 100644 (file)
index f76545f..0000000
+++ /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 (file)
index 6ca55b7..0000000
+++ /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
new file mode 100644 (file)
index 0000000..ad91401
--- /dev/null
@@ -0,0 +1,25 @@
+#include "Bantam44.h"
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+       // leave these blank
+}
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+       // leave these blank
+}
+
+void matrix_init_kb(void) {
+       // put your keyboard start-up code here
+       // runs once when the firmware starts up
+
+       matrix_init_user();
+}
+
+void matrix_scan_kb(void) {
+       // put your looping keyboard code here
+       // runs every cycle (a lot)
+
+       matrix_scan_user();
+}
\ No newline at end of file
diff --git a/keyboard/bantam44/Bantam44.h b/keyboard/bantam44/Bantam44.h
new file mode 100644 (file)
index 0000000..fa5b9df
--- /dev/null
@@ -0,0 +1,29 @@
+#ifndef BANTAM44_H
+#define BANTAM44_H
+
+#include "matrix.h"
+#include "keymap_common.h"
+#include "backlight.h"
+#include <stddef.h>
+
+// This a shortcut to help you visually see your layout.
+// The following is an example using the Planck MIT layout
+// The first section contains all of the arguements
+// The second converts the arguments into a two-dimensional array
+#define KEYMAP( \
+    K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \
+    K10,   K11, K12, K13, K14, K15, K16, K17, K18, K19,    K1A, \
+    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \
+    K30,   K31,   K32,   K33,     K34,    K35,   K36, K37, K38  \
+) \
+{ \
+    { K00, K01, K02, K03,   K04, K05,   K06, K07,   K08, K09, K0A,   K0B   }, \
+    { K10, K11, K12, K13,   K14, K15,   K16, K17,   K18, K19, KC_NO, K2A }, \
+       { K20, K21, K22, K23,   K24, K25,   K26, K27,   K28, K29, K2A,   K2B   }, \
+       { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37,   K38   }, \
+}
+
+void matrix_init_user(void);
+void matrix_scan_user(void);
+
+#endif
diff --git a/keyboard/bantam44/Makefile b/keyboard/bantam44/Makefile
new file mode 100644 (file)
index 0000000..e7dea9f
--- /dev/null
@@ -0,0 +1,139 @@
+#----------------------------------------------------------------------------
+# 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 = Bantam44
+
+
+# Directory common source filess exist
+TOP_DIR = ../..
+TMK_DIR = ../../tmk_core
+
+# Directory keyboard dependent files exist
+TARGET_DIR = .
+
+# # project specific files
+SRC = Bantam44.c
+
+ifdef KEYMAP
+    SRC := keymaps/$(KEYMAP).c $(SRC)
+else
+    SRC := 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=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
+# 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)
+
+include $(TOP_DIR)/quantum/quantum.mk
+
diff --git a/keyboard/bantam44/README.md b/keyboard/bantam44/README.md
new file mode 100644 (file)
index 0000000..cd059a6
--- /dev/null
@@ -0,0 +1,24 @@
+Bantam44 keyboard firmware
+======================
+
+## Quantum MK Firmware
+
+For the full Quantum feature list, see [the parent README.md](/README.md).
+
+## Building
+
+Download or clone the whole firmware and navigate to the keyboard/Bantam44 folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 
+
+Depending on which keymap you would like to use, you will have to compile slightly differently.
+
+### Default
+To build with the default keymap, simply run `make`.
+
+### Other Keymaps
+Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `<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.
\ No newline at end of file
diff --git a/keyboard/bantam44/config.h b/keyboard/bantam44/config.h
new file mode 100644 (file)
index 0000000..a55f629
--- /dev/null
@@ -0,0 +1,82 @@
+/*
+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      0x6060
+#define DEVICE_VER      0x0001
+#define MANUFACTURER    Bantam Keyboards
+#define PRODUCT         Bantam44
+#define DESCRIPTION     A custom keyboard
+
+/* key matrix size */
+#define MATRIX_ROWS 4
+#define MATRIX_COLS 12
+
+// Planck PCB default pin-out
+// Change this to how you wired your keyboard
+// COLS: Left to right, ROWS: Top to bottom
+#define MATRIX_ROW_PINS { F0, D6, D4, D5 }
+#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, B6, F7, F6, F5, F4, F1 }
+#define UNUSED_PINS
+
+/* COL2ROW or ROW2COL */
+#define DIODE_DIRECTION COL2ROW
+
+/* define if matrix has ghost */
+//#define MATRIX_HAS_GHOST
+
+/* number of backlight levels */
+#define BACKLIGHT_LEVELS 3
+
+/* Set 0 if debouncing isn't needed */
+#define DEBOUNCING_DELAY 5
+
+/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
+#define LOCKING_SUPPORT_ENABLE
+/* Locking resynchronize hack */
+#define LOCKING_RESYNC_ENABLE
+
+/* key combination for command */
+#define IS_COMMAND() ( \
+    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
+)
+
+/*
+ * Feature disable options
+ *  These options are also useful to firmware size reduction.
+ */
+
+/* disable debug print */
+//#define NO_DEBUG
+
+/* disable print */
+//#define NO_PRINT
+
+/* disable action features */
+//#define NO_ACTION_LAYER
+//#define NO_ACTION_TAPPING
+//#define NO_ACTION_ONESHOT
+//#define NO_ACTION_MACRO
+//#define NO_ACTION_FUNCTION
+
+#endif
diff --git a/keyboard/bantam44/keymaps/default.c b/keyboard/bantam44/keymaps/default.c
new file mode 100644 (file)
index 0000000..17ade62
--- /dev/null
@@ -0,0 +1,30 @@
+#include "Bantam44.h"
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = { /* Base */
+        {KC_ESC,  KC_Q,    KC_W,     KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_BSPC },
+        {KC_TAB,  KC_A,    KC_S,     KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    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_LGUI, KC_LALT,  KC_NO,   MO(1),   KC_NO,   KC_SPC,  KC_NO,   MO(2),   KC_SCLN, KC_QUOT, KC_SLSH }
+    },
+    [1] = { /* LOWER */
+        {KC_ESC,  KC_1,    KC_2,     KC_3,    KC_4,    KC_5,    KC_6,    KC_7,    KC_8,    KC_9,    KC_0,    KC_DELT },
+        {KC_TAB,  KC_MPRV, KC_MPLY,  KC_MNXT, KC_GRV,  KC_BSLS, KC_MINS, KC_EQL,  KC_LBRC, KC_RBRC, KC_NO,   KC_ENT  },
+        {KC_CAPS, KC_LSFT, KC_F1,    KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_NO,   KC_HOME, KC_PGUP, KC_RSFT },
+        {KC_LCTL, KC_LGUI, KC_LALT,  KC_NO,   KC_TRNS, KC_NO,   KC_SPC,  KC_NO,   KC_TRNS, KC_END,  KC_PGDN, KC_EXLM }
+    },
+    [2] = { /* RAISE */
+        {KC_ESC,  KC_EXLM, KC_AT,    KC_HASH, KC_DLR,  KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT },
+        {KC_TAB,  KC_MUTE, KC_VOLD,  KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO,   KC_ENT  },
+        {KC_CAPS, KC_LSFT, KC_F7,    KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  KC_NO,   KC_NO,   KC_UP,   KC_RSFT },
+        {KC_LCTL, KC_LGUI, KC_LALT,  KC_NO,   KC_TRNS, KC_NO,   KC_SPC,  KC_NO,   KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT }
+    }
+};
+const uint16_t PROGMEM fn_actions[] = {
+};
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function
+{
+    return MACRO_NONE;
+};
\ No newline at end of file
diff --git a/keyboard/ghost_squid/Makefile.lufa b/keyboard/ghost_squid/Makefile.lufa
deleted file mode 100644 (file)
index 54adb1e..0000000
+++ /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 (file)
index dda67e6..0000000
+++ /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 (file)
index 54f0314..0000000
+++ /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 (file)
index e9ad9ef..0000000
+++ /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 (file)
index ed1088b..0000000
+++ /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 (file)
index da5dbd7..0000000
+++ /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 (file)
index d6a82ef..0000000
+++ /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 (file)
index 322f219..0000000
+++ /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 (file)
index fef8c05..0000000
+++ /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 (file)
index b89bdf8..0000000
+++ /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 (file)
index fc0eeb0..0000000
+++ /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 (file)
index ee32312..0000000
+++ /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;
-    }
-}
index d434246cef3d22618d996aeaea550b4ed02c8023..21ba261a2315b68a719f233bda576141f2ddfec5 100644 (file)
@@ -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.
 #----------------------------------------------------------------------------
 
 # 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 (file)
index e04dbb2..0000000
+++ /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 (file)
index 403a8ec..0000000
+++ /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 (file)
index a730442..0000000
+++ /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
index e20c23d8236d886d4869e14e51678ee07b2ef281..389407b3aaf3d5d73c20afffea918855ff897b38 100644 (file)
-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.
index c0acc0a7edb806bf19f114c8e185d2a85aa48801..ee66e44571f63b68b386070ccd370ad71518bcb6 100644 (file)
@@ -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 (file)
index 21e73f1..0000000
+++ /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 (file)
index 24243af..0000000
+++ /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
deleted file mode 100644 (file)
index 2e5a25e..0000000
Binary files a/keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB.txt b/keyboard/hhkb/doc/HHKB.txt
deleted file mode 100644 (file)
index 3d08ceb..0000000
+++ /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
deleted file mode 100644 (file)
index 0a03164..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg
deleted file mode 100644 (file)
index 1f09bd1..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg
deleted file mode 100644 (file)
index 45f5ada..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg
deleted file mode 100644 (file)
index e8a09e9..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg
deleted file mode 100644 (file)
index e3dae8e..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg
deleted file mode 100644 (file)
index 3afc269..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg b/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg
deleted file mode 100644 (file)
index 5304bc8..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg b/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg
deleted file mode 100644 (file)
index f1b438a..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg b/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg
deleted file mode 100644 (file)
index dc79afa..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg b/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg
deleted file mode 100644 (file)
index 873d988..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg b/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg
deleted file mode 100644 (file)
index 1c4eb67..0000000
Binary files a/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg and /dev/null differ
diff --git a/keyboard/hhkb/doc/HHKB_keycodes.txt b/keyboard/hhkb/doc/HHKB_keycodes.txt
deleted file mode 100644 (file)
index 9ec8590..0000000
+++ /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 (file)
index 1287053..0000000
+++ /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 (file)
index 7ae86f4..0000000
+++ /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/hhkb_qmk.c b/keyboard/hhkb/hhkb_qmk.c
new file mode 100644 (file)
index 0000000..36dc3f2
--- /dev/null
@@ -0,0 +1,29 @@
+#include "hhkb_qmk.h"
+
+__attribute__ ((weak))
+void matrix_init_user(void) {
+       // leave these blank
+};
+
+__attribute__ ((weak))
+void matrix_scan_user(void) {
+       // leave these blank
+};
+
+void matrix_init_kb(void) {
+       // put your keyboard start-up code here
+       // runs once when the firmware starts up
+
+       if (matrix_init_user) {
+               (*matrix_init_user)();
+       }
+};
+
+void matrix_scan_kb(void) {
+       // put your looping keyboard code here
+       // runs every cycle (a lot)
+
+       if (matrix_scan_user) {
+               (*matrix_scan_user)();
+       }
+};
diff --git a/keyboard/hhkb/hhkb_qmk.h b/keyboard/hhkb/hhkb_qmk.h
new file mode 100644 (file)
index 0000000..1bac33c
--- /dev/null
@@ -0,0 +1,30 @@
+#ifndef HHKB_QMK_H
+#define HHKB_QMK_H
+
+#include "matrix.h"
+#include "keymap_common.h"
+//#include "backlight.h"
+#include <stddef.h>
+
+#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)                     \
+                                                                               \
+{                                                                              \
+    { K00, K01, K02, K03, K04, K05, K06, K07   },                              \
+    { K10, K11, K12, K13, K14, K15, K16, K17   },                              \
+    { K20, K21, K22, K23, K24, K25, K26, KC_NO },                              \
+    { K30, K31, K32, K33, K34, K35, K36, K37   },                              \
+    { K40, K41, K42, K43, K44, K45, K46, KC_NO },                              \
+    { K50, K51, K52, K53, K54, K55, K56, K57   },                              \
+    { K60, K61, K62, K63, K64, K65, K66, KC_NO },                              \
+    { K70, K71, K72, K73, K74, K75, K76, KC_NO }                               \
+}
+
+void matrix_init_user(void);
+void matrix_scan_user(void);
+
+#endif
diff --git a/keyboard/hhkb/keymap_common.c b/keyboard/hhkb/keymap_common.c
deleted file mode 100644 (file)
index e938fb6..0000000
+++ /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 (file)
index 3622665..0000000
+++ /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/keymaps/default.c b/keyboard/hhkb/keymaps/default.c
new file mode 100644 (file)
index 0000000..bcd8ead
--- /dev/null
@@ -0,0 +1,78 @@
+/*  -*-  eval: (turn-on-orgtbl); -*-
+ * default HHKB Layout
+ */
+#include "hhkb_qmk.h"
+
+#define BASE 0
+#define HHKB 1
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+    /* BASE Level: 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 |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Cont  | A | S | D | F | G | H | J | K | L | ; | '     | Ent |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+     | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 |       |   |
+     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
+
+            |------+------+-----------------------+------+------|
+            | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
+            |------+------+-----------------------+------+------|
+    */
+
+  [BASE] = KEYMAP(  //  default layer
+  KC_ESC,   KC_1,  KC_2,  KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,    KC_0,     KC_MINS,  KC_EQL,    KC_BSLS,  KC_GRV, \
+  KC_TAB,   KC_Q,  KC_W,  KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,    KC_P,     KC_LBRC,  KC_RBRC,   KC_BSPC,          \
+  KC_LCTL,  KC_A,  KC_S,  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     KC_L,    KC_SCLN,  KC_QUOT,  KC_ENT,                      \
+  KC_LSFT,  KC_Z,  KC_X,  KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,  KC_SLSH,  KC_RSFT,  MO(HHKB),                    \
+                    KC_LALT,  KC_LGUI,  /*        */ KC_SPC,      KC_RGUI,  KC_RALT),
+
+
+
+    /* Layer HHKB: 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 |     |       |       |     |
+      |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+                 |------+------+----------------------+------+------+
+                 | **** | **** | ******************** | **** | **** |
+                 |------+------+----------------------+------+------+
+
+     */
+
+  [HHKB] = KEYMAP(
+  KC_PWR,   KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   KC_INS,   KC_DEL, \
+  KC_CAPS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    KC_TRNS,  KC_BSPC,          \
+  KC_TRNS,  KC_VOLD,  KC_VOLU,  KC_MUTE,  KC_TRNS,  KC_TRNS,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_PENT,                    \
+  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  KC_TRNS,  KC_TRNS,                    \
+                     KC_TRNS, KC_TRNS,           KC_TRNS,                KC_TRNS, KC_TRNS)};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
diff --git a/keyboard/hhkb/keymaps/hasu.c b/keyboard/hhkb/keymaps/hasu.c
deleted file mode 100644 (file)
index a5602de..0000000
+++ /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 (file)
index 86ad0f5..0000000
+++ /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 (file)
index 48d0ee7..0000000
+++ /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/keymaps/lxol.c b/keyboard/hhkb/keymaps/lxol.c
new file mode 100644 (file)
index 0000000..3256fda
--- /dev/null
@@ -0,0 +1,208 @@
+/*  -*-  eval: (turn-on-orgtbl); -*-
+ * lxol HHKB Layout
+ */
+#include "hhkb_qmk.h"
+
+#define BASE 0
+#define WIN 1
+#define HHKB 2
+#define RGUILEV 3
+#define LGUILEV 4
+#define RALTLEV 5
+#define LALTLEV 6
+
+
+const uint16_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   | [     | ]        | Backs |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | Contro | A | S | D | F | G | H | J | K | L | ;   | '     | RCtl/Ent |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+                 |------+------+-------+------+------|
+                 | LAlt | LGUI | Space | RGUI | RAlt |
+                 |------+------+-------+------+------|
+    */
+
+  [BASE] = KEYMAP(  // layer 0 : default
+
+
+  KC_ESC,   KC_1,              KC_2,              KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,              KC_0,                 KC_MINS,  KC_EQL,    KC_BSLS,  KC_GRV,  \
+  KC_TAB,   KC_Q,              KC_W,              KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,              KC_P,                 KC_LBRC,  KC_RBRC,   KC_BSPC,  \
+  KC_LCTL,  LT(LALTLEV,KC_A),  LT(LGUILEV,KC_S),  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     LT(RGUILEV,KC_L),  LT(RALTLEV,KC_SCLN),  KC_QUOT,  KC_FN0,    \
+  KC_LSFT,  KC_Z,              KC_X,              KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,            KC_SLSH,              KC_RSFT,  MO(HHKB),  \
+      KC_LALT, KC_LGUI, KC_SPC,                KC_RGUI, KC_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 |     |       |       |     |
+      |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
+
+                      |---+---+---+---+---|
+                      |   |   |   |   |   |
+                      |---+---+---+---+---|
+     */
+
+  [HHKB] = KEYMAP(
+  KC_PWR,   KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   KC_INS,   KC_DEL, \
+  KC_CAPS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    KC_TRNS,  KC_BSPC,          \
+  KC_TRNS,  KC_VOLD,  KC_VOLU,  KC_MUTE,  KC_TRNS,  KC_TRNS,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_PENT,                    \
+  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  KC_TRNS,  KC_TRNS,                    \
+  KC_TRNS, KC_TRNS,           KC_TRNS,                KC_TRNS, KC_TRNS),
+
+
+    /* Layer LGUI: All keys with RGUI modifier
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | 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 |   | ;   | '     | RCtl/Ent |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+                 |------+------+-------+------+------|
+                 | LAlt | LGUI | Space | RGUI | RAlt |
+                 |------+------+-------+------+------|
+    */
+
+  [RGUILEV] = KEYMAP(  // Right GUI layer  by KC_L
+
+  RGUI(KC_ESC),   RGUI(KC_1),  RGUI(KC_2),  RGUI(KC_3),  RGUI(KC_4),  RGUI(KC_5),  RGUI(KC_6),  RGUI(KC_7),  RGUI(KC_8),     RGUI(KC_9),    RGUI(KC_0),     RGUI(KC_MINS),  RGUI(KC_EQL),   RGUI(KC_BSLS),  RGUI(KC_GRV),  \
+  RGUI(KC_TAB),   RGUI(KC_Q),  RGUI(KC_W),  RGUI(KC_E),  RGUI(KC_R),  RGUI(KC_T),  RGUI(KC_Y),  RGUI(KC_U),  RGUI(KC_I),     RGUI(KC_O),    RGUI(KC_P),     RGUI(KC_LBRC),  RGUI(KC_RBRC),  RGUI(KC_BSPC),  \
+  RGUI(KC_LCTL),  RGUI(KC_A),  RGUI(KC_S),  RGUI(KC_D),  RGUI(KC_F),  RGUI(KC_G),  RGUI(KC_H),  RGUI(KC_J),  RGUI(KC_K),     KC_TRNS,       KC_TRNS,        RGUI(KC_QUOT),  KC_FN0,         \
+  RGUI(KC_LSFT),  RGUI(KC_Z),  RGUI(KC_X),  RGUI(KC_C),  RGUI(KC_V),  RGUI(KC_B),  RGUI(KC_N),  RGUI(KC_M),  RGUI(KC_COMM),  RGUI(KC_DOT),  RGUI(KC_SLSH),  RGUI(KC_RSFT),  KC_TRNS,        \
+      KC_LALT, KC_LGUI, RGUI(KC_SPC),               KC_RGUI, KC_RALT),
+
+    /* Layer LGUI: All keys with LGUI modifier
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | 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 |   | ;   | '     | RCtl/Ent |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+                 |------+------+-------+------+------|
+                 | LAlt | LGUI | Space | LGUI | RAlt |
+                 |------+------+-------+------+------|
+    */
+
+  [LGUILEV] = KEYMAP(  // Right GUI layer  by KC_L
+
+  LGUI(KC_ESC),   LGUI(KC_1),  LGUI(KC_2),  LGUI(KC_3),  LGUI(KC_4),  LGUI(KC_5),  LGUI(KC_6),  LGUI(KC_7),  LGUI(KC_8),     LGUI(KC_9),    LGUI(KC_0),     LGUI(KC_MINS),  LGUI(KC_EQL),   LGUI(KC_BSLS),  LGUI(KC_GRV),  \
+  LGUI(KC_TAB),   LGUI(KC_Q),  LGUI(KC_W),  LGUI(KC_E),  LGUI(KC_R),  LGUI(KC_T),  LGUI(KC_Y),  LGUI(KC_U),  LGUI(KC_I),     LGUI(KC_O),    LGUI(KC_P),     LGUI(KC_LBRC),  LGUI(KC_RBRC),  LGUI(KC_BSPC),  \
+  LGUI(KC_LCTL),  KC_TRNS,     KC_TRNS,     LGUI(KC_D),  LGUI(KC_F),  LGUI(KC_G),  LGUI(KC_H),  LGUI(KC_J),  LGUI(KC_K),     LGUI(KC_L),    LGUI(KC_SCLN),  LGUI(KC_QUOT),  KC_FN0,         \
+  KC_LSFT,        LGUI(KC_Z),  LGUI(KC_X),  LGUI(KC_C),  LGUI(KC_V),  LGUI(KC_B),  LGUI(KC_N),  LGUI(KC_M),  LGUI(KC_COMM),  LGUI(KC_DOT),  LGUI(KC_SLSH),  KC_RSFT,        KC_TRNS,        \
+      KC_LALT, KC_LGUI, LGUI(KC_SPC),               KC_LGUI, KC_RALT),
+
+    /* Layer LALT: All keys with RALT modifier
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | 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 |   | ;   | '     | RCtl/Ent |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+                 |------+------+-------+------+------|
+                 | LAlt | LGUI | Space | RGUI | RAlt |
+                 |------+------+-------+------+------|
+    */
+
+  [RALTLEV] = KEYMAP(  // Right ALT layer  by KC_L
+
+  RALT(KC_ESC),   RALT(KC_1),  RALT(KC_2),  RALT(KC_3),  RALT(KC_4),  RALT(KC_5),  RALT(KC_6),  RALT(KC_7),  RALT(KC_8),     RALT(KC_9),    RALT(KC_0),     RALT(KC_MINS),  RALT(KC_EQL),   RALT(KC_BSLS),  RALT(KC_GRV),  \
+  RALT(KC_TAB),   RALT(KC_Q),  RALT(KC_W),  RALT(KC_E),  RALT(KC_R),  RALT(KC_T),  RALT(KC_Y),  RALT(KC_U),  RALT(KC_I),     RALT(KC_O),    RALT(KC_P),     RALT(KC_LBRC),  RALT(KC_RBRC),  RALT(KC_BSPC),  \
+  RALT(KC_LCTL),  RALT(KC_A),  RALT(KC_S),  RALT(KC_D),  RALT(KC_F),  RALT(KC_G),  RALT(KC_H),  RALT(KC_J),  RALT(KC_K),     KC_TRNS,       KC_TRNS,        RALT(KC_QUOT),  KC_FN0,         \
+  RALT(KC_LSFT),  RALT(KC_Z),  RALT(KC_X),  RALT(KC_C),  RALT(KC_V),  RALT(KC_B),  RALT(KC_N),  RALT(KC_M),  RALT(KC_COMM),  RALT(KC_DOT),  RALT(KC_SLSH),  RALT(KC_RSFT),  KC_TRNS,        \
+      KC_LALT, KC_LGUI, RALT(KC_SPC),               KC_RGUI, KC_RALT),
+
+    /* Layer LALT: All keys with LALT modifier
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | 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 |   | ;   | '     | RCtl/Ent |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
+
+                 |------+------+-------+------+------|
+                 | LAlt | LGUI | Space | LGUI | RAlt |
+                 |------+------+-------+------+------|
+    */
+
+  [LALTLEV] = KEYMAP(  // Right ALT layer  by KC_L
+
+  LALT(KC_ESC),   LALT(KC_1),  LALT(KC_2),  LALT(KC_3),  LALT(KC_4),  LALT(KC_5),  LALT(KC_6),  LALT(KC_7),  LALT(KC_8),     LALT(KC_9),    LALT(KC_0),     LALT(KC_MINS),  LALT(KC_EQL),   LALT(KC_BSLS),  LALT(KC_GRV),  \
+  LALT(KC_TAB),   LALT(KC_Q),  LALT(KC_W),  LALT(KC_E),  LALT(KC_R),  LALT(KC_T),  LALT(KC_Y),  LALT(KC_U),  LALT(KC_I),     LALT(KC_O),    LALT(KC_P),     LALT(KC_LBRC),  LALT(KC_RBRC),  LALT(KC_BSPC),  \
+  LALT(KC_LCTL),  KC_TRNS,     KC_TRNS,     LALT(KC_D),  LALT(KC_F),  LALT(KC_G),  LALT(KC_H),  LALT(KC_J),  LALT(KC_K),     LALT(KC_L),    LALT(KC_SCLN),  LALT(KC_QUOT),  KC_FN0,         \
+  KC_LSFT,        LALT(KC_Z),  LALT(KC_X),  LALT(KC_C),  LALT(KC_V),  LALT(KC_B),  LALT(KC_N),  LALT(KC_M),  LALT(KC_COMM),  LALT(KC_DOT),  LALT(KC_SLSH),  KC_RSFT,        KC_TRNS,        \
+      KC_LALT, KC_LGUI, LALT(KC_SPC),               KC_LGUI, KC_RALT),
+
+
+    /* Layer WIN: Win 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 | ; | '     | RCtl/Ent |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+     | Shift  | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0      |       |   |
+     |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
+
+                 |------+------+-------+------+------|
+                 | LGui | LAlt | Space | RGui | Ralt |
+                 |------+------+-------+------+------|
+    */
+
+  [WIN] = KEYMAP(  // BASE level with swapped GUI/ALT
+
+
+  KC_ESC,   KC_1,              KC_2,              KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,              KC_0,                 KC_MINS,  KC_EQL,    KC_BSLS,  KC_GRV,  \
+  KC_TAB,   KC_Q,              KC_W,              KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,              KC_P,                 KC_LBRC,  KC_RBRC,   KC_BSPC,  \
+  KC_LCTL,  LT(LGUILEV,KC_A),  LT(LALTLEV,KC_S),  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     LT(RALTLEV,KC_L),  LT(RGUILEV,KC_SCLN),  KC_QUOT,  KC_FN0,    \
+  KC_LSFT,  KC_Z,              KC_X,              KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,            KC_SLSH,              KC_RSFT,  MO(HHKB),  \
+                 KC_RGUI, KC_RALT, KC_SPC,                KC_RALT, KC_RGUI)};
+
+
+const uint16_t PROGMEM fn_actions[] = {
+    [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)      // RControl with tap Enter*
+};
+
+const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
+{
+  // MACRODOWN only works in this function
+      switch(id) {
+        case 0:
+          if (record->event.pressed) {
+            register_code(KC_RSFT);
+          } else {
+            unregister_code(KC_RSFT);
+          }
+        break;
+      }
+    return MACRO_NONE;
+};
diff --git a/keyboard/hhkb/keymaps/spacefn.c b/keyboard/hhkb/keymaps/spacefn.c
deleted file mode 100644 (file)
index deff920..0000000
+++ /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 (file)
index 8a08fe2..0000000
+++ /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 (file)
index 1614c21..0000000
+++ /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 (file)
index 1f8d846..0000000
+++ /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 (file)
index 747c755..0000000
+++ /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 (file)
index 44f7acd..0000000
+++ /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 (file)
index 20a2420..0000000
+++ /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 (file)
index c3aad34..0000000
+++ /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 (file)
index fd6f7db..0000000
+++ /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 (file)
index 0363c2f..0000000
+++ /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 (file)
index 4b9c8f4..0000000
+++ /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 (file)
index 64c3fdd..0000000
+++ /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 (file)
index 7e868c9..0000000
+++ /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 (file)
index 180d4dc..0000000
+++ /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 (file)
index 83d9950..0000000
+++ /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 (file)
index 756285d..0000000
+++ /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 (file)
index db6916f..0000000
+++ /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 (file)
index 84001b3..0000000
+++ /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 (file)
index 8f6c3ab..0000000
+++ /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 (file)
index 9fa5452..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-;---------------------------------------------------------------------------;\r
-; Software implemented UART module                                          ;\r
-; (C)ChaN, 2005 (http://elm-chan.org/)                                      ;\r
-;---------------------------------------------------------------------------;\r
-; Bit rate settings:\r
-;\r
-;            1MHz  2MHz  4MHz  6MHz  8MHz  10MHz  12MHz  16MHz  20MHz\r
-;   2.4kbps   138     -     -     -     -      -      -      -      -\r
-;   4.8kbps    68   138     -     -     -      -      -      -      -\r
-;   9.6kbps    33    68   138   208     -      -      -      -      -\r
-;  19.2kbps     -    33    68   102   138    173    208      -      -\r
-;  38.4kbps     -     -    33    50    68     85    102    138    172\r
-;  57.6kbps     -     -    21    33    44     56     68     91    114\r
-; 115.2kbps     -     -     -     -    21     27     33     44     56\r
-\r
-.nolist\r
-#include <avr/io.h>\r
-.list\r
-\r
-#define        BPS     44      /* Bit delay. (see above table) */\r
-#define        BIDIR   0       /* 0:Separated Tx/Rx, 1:Shared Tx/Rx */\r
-\r
-#define        OUT_1           sbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 1 */\r
-#define        OUT_0           cbi _SFR_IO_ADDR(SUART_OUT_PORT), SUART_OUT_BIT /* Output 0 */\r
-#define        SKIP_IN_1       sbis _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT   /* Skip if 1 */\r
-#define        SKIP_IN_0       sbic _SFR_IO_ADDR(SUART_IN_PIN), SUART_IN_BIT   /* Skip if 0 */\r
-\r
-\r
-\r
-#ifdef SPM_PAGESIZE\r
-.macro _LPMI   reg\r
-       lpm     \reg, Z+\r
-.endm\r
-.macro _MOVW   dh,dl, sh,sl\r
-       movw    \dl, \sl\r
-.endm\r
-#else\r
-.macro _LPMI   reg\r
-       lpm\r
-       mov     \reg, r0\r
-       adiw    ZL, 1\r
-.endm\r
-.macro _MOVW   dh,dl, sh,sl\r
-       mov     \dl, \sl\r
-       mov     \dh, \sh\r
-.endm\r
-#endif\r
-\r
-\r
-\r
-;---------------------------------------------------------------------------;\r
-; Transmit a byte in serial format of N81\r
-;\r
-;Prototype: void xmit (uint8_t data);\r
-;Size: 16 words\r
-\r
-.global xmit\r
-.func xmit\r
-xmit:\r
-#if BIDIR\r
-       ldi     r23, BPS-1      ;Pre-idle time for bidirectional data line\r
-5:     dec     r23             ;\r
-       brne    5b              ;/\r
-#endif\r
-       in      r0, _SFR_IO_ADDR(SREG)  ;Save flags\r
-\r
-       com     r24             ;C = start bit\r
-       ldi     r25, 10         ;Bit counter\r
-       cli                     ;Start critical section\r
-\r
-1:     ldi     r23, BPS-1      ;----- Bit transferring loop \r
-2:     dec     r23             ;Wait for a bit time\r
-       brne    2b              ;/\r
-       brcs    3f              ;MISO = bit to be sent\r
-       OUT_1                   ;\r
-3:     brcc    4f              ;\r
-       OUT_0                   ;/\r
-4:     lsr     r24             ;Get next bit into C\r
-       dec     r25             ;All bits sent?\r
-       brne    1b              ;  no, coutinue\r
-\r
-       out     _SFR_IO_ADDR(SREG), r0  ;End of critical section\r
-       ret\r
-.endfunc\r
-\r
-\r
-\r
-;---------------------------------------------------------------------------;\r
-; Receive a byte\r
-;\r
-;Prototype: uint8_t rcvr (void);\r
-;Size: 19 words\r
-\r
-.global rcvr\r
-.func rcvr\r
-rcvr:\r
-       in      r0, _SFR_IO_ADDR(SREG)  ;Save flags\r
-\r
-       ldi     r24, 0x80       ;Receiving shift reg\r
-       cli                     ;Start critical section\r
-\r
-1:     SKIP_IN_1               ;Wait for idle\r
-       rjmp    1b\r
-2:     SKIP_IN_0               ;Wait for start bit\r
-       rjmp    2b\r
-       ldi     r25, BPS/2      ;Wait for half bit time\r
-3:     dec     r25\r
-       brne    3b\r
-\r
-4:     ldi     r25, BPS        ;----- Bit receiving loop\r
-5:     dec     r25             ;Wait for a bit time\r
-       brne    5b              ;/\r
-       lsr     r24             ;Next bit\r
-       SKIP_IN_0               ;Get a data bit into r24.7\r
-       ori     r24, 0x80\r
-       brcc    4b              ;All bits received?  no, continue\r
-\r
-       out     _SFR_IO_ADDR(SREG), r0  ;End of critical section\r
-       ret\r
-.endfunc\r
-\r
-\r
-; Not wait for start bit. This should be called after detecting start bit.\r
-.global recv\r
-.func recv\r
-recv:\r
-       in      r0, _SFR_IO_ADDR(SREG)  ;Save flags\r
-\r
-       ldi     r24, 0x80       ;Receiving shift reg\r
-       cli                     ;Start critical section\r
-\r
-;1:    SKIP_IN_1               ;Wait for idle\r
-;      rjmp    1b\r
-;2:    SKIP_IN_0               ;Wait for start bit\r
-;      rjmp    2b\r
-       ldi     r25, BPS/2      ;Wait for half bit time\r
-3:     dec     r25\r
-       brne    3b\r
-\r
-4:     ldi     r25, BPS        ;----- Bit receiving loop\r
-5:     dec     r25             ;Wait for a bit time\r
-       brne    5b              ;/\r
-       lsr     r24             ;Next bit\r
-       SKIP_IN_0               ;Get a data bit into r24.7\r
-       ori     r24, 0x80\r
-       brcc    4b              ;All bits received?  no, continue\r
-\r
-       ldi     r25, BPS/2      ;Wait for half bit time\r
-6:     dec     r25\r
-       brne    6b\r
-7:     SKIP_IN_1               ;Wait for stop bit\r
-       rjmp    7b\r
-\r
-       out     _SFR_IO_ADDR(SREG), r0  ;End of critical section\r
-       ret\r
-.endfunc\r
diff --git a/keyboard/hhkb/rn42/suart.h b/keyboard/hhkb/rn42/suart.h
deleted file mode 100644 (file)
index 72725b9..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef SUART\r
-#define SUART\r
-\r
-void xmit(uint8_t);\r
-uint8_t rcvr(void);\r
-uint8_t recv(void);\r
-\r
-#endif /* SUART */\r
diff --git a/keyboard/hhkb_qmk/Makefile b/keyboard/hhkb_qmk/Makefile
deleted file mode 100644 (file)
index 21ba261..0000000
+++ /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 (file)
index 389407b..0000000
+++ /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 (file)
index ee66e44..0000000
+++ /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 (file)
index 7ea6322..0000000
+++ /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/hhkb_qmk.c b/keyboard/hhkb_qmk/hhkb_qmk.c
deleted file mode 100644 (file)
index 36dc3f2..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "hhkb_qmk.h"
-
-__attribute__ ((weak))
-void matrix_init_user(void) {
-       // leave these blank
-};
-
-__attribute__ ((weak))
-void matrix_scan_user(void) {
-       // leave these blank
-};
-
-void matrix_init_kb(void) {
-       // put your keyboard start-up code here
-       // runs once when the firmware starts up
-
-       if (matrix_init_user) {
-               (*matrix_init_user)();
-       }
-};
-
-void matrix_scan_kb(void) {
-       // put your looping keyboard code here
-       // runs every cycle (a lot)
-
-       if (matrix_scan_user) {
-               (*matrix_scan_user)();
-       }
-};
diff --git a/keyboard/hhkb_qmk/hhkb_qmk.h b/keyboard/hhkb_qmk/hhkb_qmk.h
deleted file mode 100644 (file)
index 1bac33c..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef HHKB_QMK_H
-#define HHKB_QMK_H
-
-#include "matrix.h"
-#include "keymap_common.h"
-//#include "backlight.h"
-#include <stddef.h>
-
-#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)                     \
-                                                                               \
-{                                                                              \
-    { K00, K01, K02, K03, K04, K05, K06, K07   },                              \
-    { K10, K11, K12, K13, K14, K15, K16, K17   },                              \
-    { K20, K21, K22, K23, K24, K25, K26, KC_NO },                              \
-    { K30, K31, K32, K33, K34, K35, K36, K37   },                              \
-    { K40, K41, K42, K43, K44, K45, K46, KC_NO },                              \
-    { K50, K51, K52, K53, K54, K55, K56, K57   },                              \
-    { K60, K61, K62, K63, K64, K65, K66, KC_NO },                              \
-    { K70, K71, K72, K73, K74, K75, K76, KC_NO }                               \
-}
-
-void matrix_init_user(void);
-void matrix_scan_user(void);
-
-#endif
diff --git a/keyboard/hhkb_qmk/keymaps/default.c b/keyboard/hhkb_qmk/keymaps/default.c
deleted file mode 100644 (file)
index bcd8ead..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-/*  -*-  eval: (turn-on-orgtbl); -*-
- * default HHKB Layout
- */
-#include "hhkb_qmk.h"
-
-#define BASE 0
-#define HHKB 1
-
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-    /* BASE Level: 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 |   |
-     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
-     | Cont  | A | S | D | F | G | H | J | K | L | ; | '     | Ent |       |   |
-     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
-     | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0 |       |   |
-     |-------+---+---+---+---+---+---+---+---+---+---+-------+-----+-------+---|
-
-            |------+------+-----------------------+------+------|
-            | LAlt | LGUI | ******* Space ******* | RGUI | RAlt |
-            |------+------+-----------------------+------+------|
-    */
-
-  [BASE] = KEYMAP(  //  default layer
-  KC_ESC,   KC_1,  KC_2,  KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,    KC_0,     KC_MINS,  KC_EQL,    KC_BSLS,  KC_GRV, \
-  KC_TAB,   KC_Q,  KC_W,  KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,    KC_P,     KC_LBRC,  KC_RBRC,   KC_BSPC,          \
-  KC_LCTL,  KC_A,  KC_S,  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     KC_L,    KC_SCLN,  KC_QUOT,  KC_ENT,                      \
-  KC_LSFT,  KC_Z,  KC_X,  KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,  KC_SLSH,  KC_RSFT,  MO(HHKB),                    \
-                    KC_LALT,  KC_LGUI,  /*        */ KC_SPC,      KC_RGUI,  KC_RALT),
-
-
-
-    /* Layer HHKB: 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 |     |       |       |     |
-      |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
-
-                 |------+------+----------------------+------+------+
-                 | **** | **** | ******************** | **** | **** |
-                 |------+------+----------------------+------+------+
-
-     */
-
-  [HHKB] = KEYMAP(
-  KC_PWR,   KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   KC_INS,   KC_DEL, \
-  KC_CAPS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    KC_TRNS,  KC_BSPC,          \
-  KC_TRNS,  KC_VOLD,  KC_VOLU,  KC_MUTE,  KC_TRNS,  KC_TRNS,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_PENT,                    \
-  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  KC_TRNS,  KC_TRNS,                    \
-                     KC_TRNS, KC_TRNS,           KC_TRNS,                KC_TRNS, KC_TRNS)};
-
-
-const uint16_t PROGMEM fn_actions[] = {
-
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-  // MACRODOWN only works in this function
-      switch(id) {
-        case 0:
-          if (record->event.pressed) {
-            register_code(KC_RSFT);
-          } else {
-            unregister_code(KC_RSFT);
-          }
-        break;
-      }
-    return MACRO_NONE;
-};
diff --git a/keyboard/hhkb_qmk/keymaps/lxol.c b/keyboard/hhkb_qmk/keymaps/lxol.c
deleted file mode 100644 (file)
index 3256fda..0000000
+++ /dev/null
@@ -1,208 +0,0 @@
-/*  -*-  eval: (turn-on-orgtbl); -*-
- * lxol HHKB Layout
- */
-#include "hhkb_qmk.h"
-
-#define BASE 0
-#define WIN 1
-#define HHKB 2
-#define RGUILEV 3
-#define LGUILEV 4
-#define RALTLEV 5
-#define LALTLEV 6
-
-
-const uint16_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   | [     | ]        | Backs |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | Contro | A | S | D | F | G | H | J | K | L | ;   | '     | RCtl/Ent |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-
-                 |------+------+-------+------+------|
-                 | LAlt | LGUI | Space | RGUI | RAlt |
-                 |------+------+-------+------+------|
-    */
-
-  [BASE] = KEYMAP(  // layer 0 : default
-
-
-  KC_ESC,   KC_1,              KC_2,              KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,              KC_0,                 KC_MINS,  KC_EQL,    KC_BSLS,  KC_GRV,  \
-  KC_TAB,   KC_Q,              KC_W,              KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,              KC_P,                 KC_LBRC,  KC_RBRC,   KC_BSPC,  \
-  KC_LCTL,  LT(LALTLEV,KC_A),  LT(LGUILEV,KC_S),  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     LT(RGUILEV,KC_L),  LT(RALTLEV,KC_SCLN),  KC_QUOT,  KC_FN0,    \
-  KC_LSFT,  KC_Z,              KC_X,              KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,            KC_SLSH,              KC_RSFT,  MO(HHKB),  \
-      KC_LALT, KC_LGUI, KC_SPC,                KC_RGUI, KC_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 |     |       |       |     |
-      |------+-----+-----+-----+----+----+----+----+-----+-----+-----+-----+-------+-------+-----|
-
-                      |---+---+---+---+---|
-                      |   |   |   |   |   |
-                      |---+---+---+---+---|
-     */
-
-  [HHKB] = KEYMAP(
-  KC_PWR,   KC_F1,    KC_F2,    KC_F3,    KC_F4,    KC_F5,    KC_F6,    KC_F7,    KC_F8,    KC_F9,    KC_F10,   KC_F11,   KC_F12,   KC_INS,   KC_DEL, \
-  KC_CAPS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PSCR,  KC_SLCK,  KC_PAUS,  KC_UP,    KC_TRNS,  KC_BSPC,          \
-  KC_TRNS,  KC_VOLD,  KC_VOLU,  KC_MUTE,  KC_TRNS,  KC_TRNS,  KC_PAST,  KC_PSLS,  KC_HOME,  KC_PGUP,  KC_LEFT,  KC_RGHT,  KC_PENT,                    \
-  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_TRNS,  KC_PPLS,  KC_PMNS,  KC_END,   KC_PGDN,  KC_DOWN,  KC_TRNS,  KC_TRNS,                    \
-  KC_TRNS, KC_TRNS,           KC_TRNS,                KC_TRNS, KC_TRNS),
-
-
-    /* Layer LGUI: All keys with RGUI modifier
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | 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 |   | ;   | '     | RCtl/Ent |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-
-                 |------+------+-------+------+------|
-                 | LAlt | LGUI | Space | RGUI | RAlt |
-                 |------+------+-------+------+------|
-    */
-
-  [RGUILEV] = KEYMAP(  // Right GUI layer  by KC_L
-
-  RGUI(KC_ESC),   RGUI(KC_1),  RGUI(KC_2),  RGUI(KC_3),  RGUI(KC_4),  RGUI(KC_5),  RGUI(KC_6),  RGUI(KC_7),  RGUI(KC_8),     RGUI(KC_9),    RGUI(KC_0),     RGUI(KC_MINS),  RGUI(KC_EQL),   RGUI(KC_BSLS),  RGUI(KC_GRV),  \
-  RGUI(KC_TAB),   RGUI(KC_Q),  RGUI(KC_W),  RGUI(KC_E),  RGUI(KC_R),  RGUI(KC_T),  RGUI(KC_Y),  RGUI(KC_U),  RGUI(KC_I),     RGUI(KC_O),    RGUI(KC_P),     RGUI(KC_LBRC),  RGUI(KC_RBRC),  RGUI(KC_BSPC),  \
-  RGUI(KC_LCTL),  RGUI(KC_A),  RGUI(KC_S),  RGUI(KC_D),  RGUI(KC_F),  RGUI(KC_G),  RGUI(KC_H),  RGUI(KC_J),  RGUI(KC_K),     KC_TRNS,       KC_TRNS,        RGUI(KC_QUOT),  KC_FN0,         \
-  RGUI(KC_LSFT),  RGUI(KC_Z),  RGUI(KC_X),  RGUI(KC_C),  RGUI(KC_V),  RGUI(KC_B),  RGUI(KC_N),  RGUI(KC_M),  RGUI(KC_COMM),  RGUI(KC_DOT),  RGUI(KC_SLSH),  RGUI(KC_RSFT),  KC_TRNS,        \
-      KC_LALT, KC_LGUI, RGUI(KC_SPC),               KC_RGUI, KC_RALT),
-
-    /* Layer LGUI: All keys with LGUI modifier
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | 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 |   | ;   | '     | RCtl/Ent |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-
-                 |------+------+-------+------+------|
-                 | LAlt | LGUI | Space | LGUI | RAlt |
-                 |------+------+-------+------+------|
-    */
-
-  [LGUILEV] = KEYMAP(  // Right GUI layer  by KC_L
-
-  LGUI(KC_ESC),   LGUI(KC_1),  LGUI(KC_2),  LGUI(KC_3),  LGUI(KC_4),  LGUI(KC_5),  LGUI(KC_6),  LGUI(KC_7),  LGUI(KC_8),     LGUI(KC_9),    LGUI(KC_0),     LGUI(KC_MINS),  LGUI(KC_EQL),   LGUI(KC_BSLS),  LGUI(KC_GRV),  \
-  LGUI(KC_TAB),   LGUI(KC_Q),  LGUI(KC_W),  LGUI(KC_E),  LGUI(KC_R),  LGUI(KC_T),  LGUI(KC_Y),  LGUI(KC_U),  LGUI(KC_I),     LGUI(KC_O),    LGUI(KC_P),     LGUI(KC_LBRC),  LGUI(KC_RBRC),  LGUI(KC_BSPC),  \
-  LGUI(KC_LCTL),  KC_TRNS,     KC_TRNS,     LGUI(KC_D),  LGUI(KC_F),  LGUI(KC_G),  LGUI(KC_H),  LGUI(KC_J),  LGUI(KC_K),     LGUI(KC_L),    LGUI(KC_SCLN),  LGUI(KC_QUOT),  KC_FN0,         \
-  KC_LSFT,        LGUI(KC_Z),  LGUI(KC_X),  LGUI(KC_C),  LGUI(KC_V),  LGUI(KC_B),  LGUI(KC_N),  LGUI(KC_M),  LGUI(KC_COMM),  LGUI(KC_DOT),  LGUI(KC_SLSH),  KC_RSFT,        KC_TRNS,        \
-      KC_LALT, KC_LGUI, LGUI(KC_SPC),               KC_LGUI, KC_RALT),
-
-    /* Layer LALT: All keys with RALT modifier
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | 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 |   | ;   | '     | RCtl/Ent |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-
-                 |------+------+-------+------+------|
-                 | LAlt | LGUI | Space | RGUI | RAlt |
-                 |------+------+-------+------+------|
-    */
-
-  [RALTLEV] = KEYMAP(  // Right ALT layer  by KC_L
-
-  RALT(KC_ESC),   RALT(KC_1),  RALT(KC_2),  RALT(KC_3),  RALT(KC_4),  RALT(KC_5),  RALT(KC_6),  RALT(KC_7),  RALT(KC_8),     RALT(KC_9),    RALT(KC_0),     RALT(KC_MINS),  RALT(KC_EQL),   RALT(KC_BSLS),  RALT(KC_GRV),  \
-  RALT(KC_TAB),   RALT(KC_Q),  RALT(KC_W),  RALT(KC_E),  RALT(KC_R),  RALT(KC_T),  RALT(KC_Y),  RALT(KC_U),  RALT(KC_I),     RALT(KC_O),    RALT(KC_P),     RALT(KC_LBRC),  RALT(KC_RBRC),  RALT(KC_BSPC),  \
-  RALT(KC_LCTL),  RALT(KC_A),  RALT(KC_S),  RALT(KC_D),  RALT(KC_F),  RALT(KC_G),  RALT(KC_H),  RALT(KC_J),  RALT(KC_K),     KC_TRNS,       KC_TRNS,        RALT(KC_QUOT),  KC_FN0,         \
-  RALT(KC_LSFT),  RALT(KC_Z),  RALT(KC_X),  RALT(KC_C),  RALT(KC_V),  RALT(KC_B),  RALT(KC_N),  RALT(KC_M),  RALT(KC_COMM),  RALT(KC_DOT),  RALT(KC_SLSH),  RALT(KC_RSFT),  KC_TRNS,        \
-      KC_LALT, KC_LGUI, RALT(KC_SPC),               KC_RGUI, KC_RALT),
-
-    /* Layer LALT: All keys with LALT modifier
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | 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 |   | ;   | '     | RCtl/Ent |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-     | Shift  | Z | X | C | V | B | N | M | , | . | Fn2 | Shift | Fn0      |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+-----+-------+----------+-------+---|
-
-                 |------+------+-------+------+------|
-                 | LAlt | LGUI | Space | LGUI | RAlt |
-                 |------+------+-------+------+------|
-    */
-
-  [LALTLEV] = KEYMAP(  // Right ALT layer  by KC_L
-
-  LALT(KC_ESC),   LALT(KC_1),  LALT(KC_2),  LALT(KC_3),  LALT(KC_4),  LALT(KC_5),  LALT(KC_6),  LALT(KC_7),  LALT(KC_8),     LALT(KC_9),    LALT(KC_0),     LALT(KC_MINS),  LALT(KC_EQL),   LALT(KC_BSLS),  LALT(KC_GRV),  \
-  LALT(KC_TAB),   LALT(KC_Q),  LALT(KC_W),  LALT(KC_E),  LALT(KC_R),  LALT(KC_T),  LALT(KC_Y),  LALT(KC_U),  LALT(KC_I),     LALT(KC_O),    LALT(KC_P),     LALT(KC_LBRC),  LALT(KC_RBRC),  LALT(KC_BSPC),  \
-  LALT(KC_LCTL),  KC_TRNS,     KC_TRNS,     LALT(KC_D),  LALT(KC_F),  LALT(KC_G),  LALT(KC_H),  LALT(KC_J),  LALT(KC_K),     LALT(KC_L),    LALT(KC_SCLN),  LALT(KC_QUOT),  KC_FN0,         \
-  KC_LSFT,        LALT(KC_Z),  LALT(KC_X),  LALT(KC_C),  LALT(KC_V),  LALT(KC_B),  LALT(KC_N),  LALT(KC_M),  LALT(KC_COMM),  LALT(KC_DOT),  LALT(KC_SLSH),  KC_RSFT,        KC_TRNS,        \
-      KC_LALT, KC_LGUI, LALT(KC_SPC),               KC_LGUI, KC_RALT),
-
-
-    /* Layer WIN: Win 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 | ; | '     | RCtl/Ent |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
-     | Shift  | Z | X | C | V | B | N | M | , | . | / | Shift | Fn0      |       |   |
-     |--------+---+---+---+---+---+---+---+---+---+---+-------+----------+-------+---|
-
-                 |------+------+-------+------+------|
-                 | LGui | LAlt | Space | RGui | Ralt |
-                 |------+------+-------+------+------|
-    */
-
-  [WIN] = KEYMAP(  // BASE level with swapped GUI/ALT
-
-
-  KC_ESC,   KC_1,              KC_2,              KC_3,  KC_4,  KC_5,  KC_6,  KC_7,  KC_8,     KC_9,              KC_0,                 KC_MINS,  KC_EQL,    KC_BSLS,  KC_GRV,  \
-  KC_TAB,   KC_Q,              KC_W,              KC_E,  KC_R,  KC_T,  KC_Y,  KC_U,  KC_I,     KC_O,              KC_P,                 KC_LBRC,  KC_RBRC,   KC_BSPC,  \
-  KC_LCTL,  LT(LGUILEV,KC_A),  LT(LALTLEV,KC_S),  KC_D,  KC_F,  KC_G,  KC_H,  KC_J,  KC_K,     LT(RALTLEV,KC_L),  LT(RGUILEV,KC_SCLN),  KC_QUOT,  KC_FN0,    \
-  KC_LSFT,  KC_Z,              KC_X,              KC_C,  KC_V,  KC_B,  KC_N,  KC_M,  KC_COMM,  KC_DOT,            KC_SLSH,              KC_RSFT,  MO(HHKB),  \
-                 KC_RGUI, KC_RALT, KC_SPC,                KC_RALT, KC_RGUI)};
-
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)      // RControl with tap Enter*
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-  // MACRODOWN only works in this function
-      switch(id) {
-        case 0:
-          if (record->event.pressed) {
-            register_code(KC_RSFT);
-          } else {
-            unregister_code(KC_RSFT);
-          }
-        break;
-      }
-    return MACRO_NONE;
-};
diff --git a/keyboard/hhkb_qmk/matrix.c b/keyboard/hhkb_qmk/matrix.c
deleted file mode 100644 (file)
index 14fae0b..0000000
+++ /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 (file)
index 5fc4156..0000000
+++ /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 (file)
index 326bbe8..0000000
+++ /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 (file)
index a5534ce..0000000
+++ /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 (file)
index 968ccf5..0000000
+++ /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 (file)
index 433a620..0000000
+++ /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 (file)
index 8903fc6..0000000
+++ /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 (file)
index 8ce85a4..0000000
+++ /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 (file)
index 03e1a1b..0000000
+++ /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 (file)
index c184536..0000000
+++ /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 (file)
index e577424..0000000
+++ /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 (file)
index adf6ac8..0000000
+++ /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 (file)
index e740b6a..0000000
+++ /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 (file)
index 53d1c91..0000000
+++ /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 (file)
index dc734db..0000000
+++ /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 (file)
index 4726cee..0000000
+++ /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 (file)
index fdb1769..0000000
+++ /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 (file)
index b0f765b..0000000
+++ /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 (file)
index b7e638b..0000000
+++ /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 (file)
index 847668a..0000000
+++ /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 (file)
index 478a40f..0000000
+++ /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 (file)
index 2c8d2e4..0000000
+++ /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 (file)
index 43051c9..0000000
+++ /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 (file)
index 90f02fa..0000000
+++ /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 (file)
index 985c1d3..0000000
+++ /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 (file)
index decdaa2..0000000
+++ /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 (file)
index 7a8d7ba..0000000
+++ /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 (file)
index 4f4e2a2..0000000
+++ /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 (file)
index 698314e..0000000
+++ /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 (file)
index 1e3deb0..0000000
+++ /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 (file)
index 2b0a63b..0000000
+++ /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 (file)
index a45a3ed..0000000
+++ /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 (file)
index 1cc8c10..0000000
+++ /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 (file)
index a29ca31..0000000
+++ /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 (file)
index e9ad9ef..0000000
+++ /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 (file)
index ed1088b..0000000
+++ /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 (file)
index da5dbd7..0000000
+++ /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 (file)
index 08d64c5..0000000
+++ /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 (file)
index 9745f43..0000000
+++ /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 (file)
index b32d935..0000000
+++ /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 (file)
index dc35870..0000000
+++ /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 (file)
index af38f65..0000000
+++ /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 (file)
index c88df94..0000000
+++ /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 (file)
index 1ffa603..0000000
+++ /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 (file)
index 3379789..0000000
+++ /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 (file)
index 939ee37..0000000
+++ /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 (file)
index 7fa008a..0000000
+++ /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 (file)
index 5248a29..0000000
+++ /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 (file)
index 88fb90e..0000000
+++ /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 (file)
index b21cccc..0000000
+++ /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 (file)
index 693c566..0000000
+++ /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 (file)
index 3b3cfd9..0000000
+++ /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 (file)
index 7f5a596..0000000
+++ /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 (file)
index 2ca79a8..0000000
+++ /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 (file)
index 9333964..0000000
+++ /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 (file)
index ebfac3a..0000000
+++ /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 (file)
index 87d3383..0000000
+++ /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 (file)
index 99090c4..0000000
+++ /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 (file)
index 0f6d399..0000000
+++ /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 (file)
index 9dcd693..0000000
+++ /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 (file)
index 59b8b4a..0000000
+++ /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 (file)
index 6dc7967..0000000
+++ /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 (file)
index d971d03..0000000
+++ /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 (file)
index 477da9d..0000000
+++ /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 (file)
index 3e83670..0000000
+++ /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 (file)
index c3f8542..0000000
+++ /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 (file)
index e3eca84..0000000
+++ /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 (file)
index 8fff93a..0000000
+++ /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 (file)
index 6ee25b6..0000000
+++ /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 (file)
index e87da1f..0000000
+++ /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
deleted file mode 100644 (file)
index 0774401..0000000
Binary files a/keyboard/macway/doc/back.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/case.jpg b/keyboard/macway/doc/case.jpg
deleted file mode 100644 (file)
index c776d5e..0000000
Binary files a/keyboard/macway/doc/case.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/keys.jpg b/keyboard/macway/doc/keys.jpg
deleted file mode 100644 (file)
index f340ebe..0000000
Binary files a/keyboard/macway/doc/keys.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/side.jpg b/keyboard/macway/doc/side.jpg
deleted file mode 100644 (file)
index bdf8268..0000000
Binary files a/keyboard/macway/doc/side.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/switch.jpg b/keyboard/macway/doc/switch.jpg
deleted file mode 100644 (file)
index a1500d7..0000000
Binary files a/keyboard/macway/doc/switch.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/teensy.jpg b/keyboard/macway/doc/teensy.jpg
deleted file mode 100644 (file)
index 0720747..0000000
Binary files a/keyboard/macway/doc/teensy.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/wiring.jpg b/keyboard/macway/doc/wiring.jpg
deleted file mode 100644 (file)
index 0f3490f..0000000
Binary files a/keyboard/macway/doc/wiring.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/withHHKB.jpg b/keyboard/macway/doc/withHHKB.jpg
deleted file mode 100644 (file)
index 9921856..0000000
Binary files a/keyboard/macway/doc/withHHKB.jpg and /dev/null differ
diff --git a/keyboard/macway/doc/withThinkPad.jpg b/keyboard/macway/doc/withThinkPad.jpg
deleted file mode 100644 (file)
index 231c61d..0000000
Binary files a/keyboard/macway/doc/withThinkPad.jpg and /dev/null differ
diff --git a/keyboard/macway/keymap.c b/keyboard/macway/keymap.c
deleted file mode 100644 (file)
index b773484..0000000
+++ /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 (file)
index f76545f..0000000
+++ /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 (file)
index 3d10b30..0000000
+++ /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 (file)
index b9c88fd..0000000
+++ /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 (file)
index a3aadd0..0000000
+++ /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 (file)
index 71342e7..0000000
+++ /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 (file)
index 3014934..0000000
+++ /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 (file)
index 5b4acd3..0000000
+++ /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 (file)
index 2dc85c7..0000000
+++ /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 (file)
index 4c75d9d..0000000
+++ /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 (file)
index ac2e698..0000000
+++ /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 (file)
index f85836a..0000000
+++ /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 (file)
index 72a7d83..0000000
+++ /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 (file)
index 29ec4e5..0000000
+++ /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 (file)
index e116635..0000000
+++ /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 (file)
index eb5a9ab..0000000
+++ /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 (file)
index 0b54e7d..0000000
+++ /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 (file)
index ebf0710..0000000
+++ /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 (file)
index fb1fbdf..0000000
+++ /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 (file)
index 7413f38..0000000
+++ /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 (file)
index bf1d2b1..0000000
+++ /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 (file)
index dce4e91..0000000
+++ /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 (file)
index 2d52fbf..0000000
+++ /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 (file)
index 29df868..0000000
+++ /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 (file)
index d0ca4c7..0000000
+++ /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 (file)
index a0b3b14..0000000
+++ /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 (file)
index 7bf5f80..0000000
+++ /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 (file)
index 368ae97..0000000
+++ /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 (file)
index 6f53893..0000000
+++ /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 (file)
index a040434..0000000
+++ /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 (file)
index e6c4eab..0000000
+++ /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 (file)
index 96a4c9d..0000000
+++ /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 (file)
index 7fdb9eb..0000000
+++ /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 (file)
index 970f622..0000000
+++ /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 (file)
index ab9acda..0000000
+++ /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 (file)
index 41582b6..0000000
+++ /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 (file)
index 6c3ae49..0000000
+++ /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 (file)
index f79445e..0000000
+++ /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 (file)
index be83ba1..0000000
+++ /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 (file)
index 59afbab..0000000
+++ /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 (file)
index ee7e31e..0000000
+++ /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 (file)
index 0fe1f4a..0000000
+++ /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 (file)
index 97d832b..0000000
+++ /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 (file)
index 347f6de..0000000
+++ /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 (file)
index c748121..0000000
+++ /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 (file)
index 07122b7..0000000
+++ /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 (file)
index 56e7003..0000000
+++ /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 (file)
index 5a0900b..0000000
+++ /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 (file)
index ddacb61..0000000
+++ /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 (file)
index 1aa24e1..0000000
+++ /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 (file)
index 4fe07f7..0000000
+++ /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 (file)
index d4e40fe..0000000
+++ /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 (file)
index 3795136..0000000
+++ /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 (file)
index 7444f38..0000000
+++ /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 (file)
index 9781f8f..0000000
+++ /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 (file)
index 7f9a48c..0000000
+++ /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 (file)
index f8fc320..0000000
+++ /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 (file)
index 6671245..0000000
+++ /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 (file)
index 7ddc1aa..0000000
+++ /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 (file)
index fdb1769..0000000
+++ /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 (file)
index c74c7e9..0000000
+++ /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 (file)
index 1f36434..0000000
+++ /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 (file)
index 2f2dbdb..0000000
+++ /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;
-        
-    }
-}