]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
cleans up folder structure
authorJack Humbert <jack.humb@gmail.com>
Sat, 4 Jun 2016 04:10:47 +0000 (00:10 -0400)
committerJack Humbert <jack.humb@gmail.com>
Sat, 4 Jun 2016 04:10:47 +0000 (00:10 -0400)
* consolidates docs
* deletes converter/
* updates .md references (most)

171 files changed:
1-setup-path-win.bat [deleted file]
2-setup-environment-win.bat [deleted file]
BUILD_GUIDE.md [deleted file]
HAND_WIRE.md [deleted file]
README.md
TMK_README.md [deleted file]
VAGRANT_GUIDE.md [deleted file]
Vagrantfile [deleted file]
avr_setup.sh [deleted file]
converter/adb_usb/Makefile [deleted file]
converter/adb_usb/Makefile.pjrc [deleted file]
converter/adb_usb/README.md [deleted file]
converter/adb_usb/config.h [deleted file]
converter/adb_usb/keymap_ansi.c [deleted file]
converter/adb_usb/keymap_common.c [deleted file]
converter/adb_usb/keymap_common.h [deleted file]
converter/adb_usb/keymap_hasu.c [deleted file]
converter/adb_usb/keymap_iso.c [deleted file]
converter/adb_usb/led.c [deleted file]
converter/adb_usb/matrix.c [deleted file]
converter/ascii_usb/Makefile [deleted file]
converter/ascii_usb/README [deleted file]
converter/ascii_usb/config.h [deleted file]
converter/ascii_usb/keymap.c [deleted file]
converter/ascii_usb/led.c [deleted file]
converter/ascii_usb/matrix.c [deleted file]
converter/ibm4704_usb/Makefile [deleted file]
converter/ibm4704_usb/README.md [deleted file]
converter/ibm4704_usb/config.h [deleted file]
converter/ibm4704_usb/ibm4704.txt [deleted file]
converter/ibm4704_usb/keymap_50key.c [deleted file]
converter/ibm4704_usb/keymap_alps102key.c [deleted file]
converter/ibm4704_usb/keymap_common.c [deleted file]
converter/ibm4704_usb/keymap_common.h [deleted file]
converter/ibm4704_usb/keymap_hasu.c [deleted file]
converter/ibm4704_usb/keymap_plain.c [deleted file]
converter/ibm4704_usb/led.c [deleted file]
converter/ibm4704_usb/matrix.c [deleted file]
converter/m0110_usb/Makefile [deleted file]
converter/m0110_usb/Makefile.teensy [deleted file]
converter/m0110_usb/Makefile.tmk_rev1 [deleted file]
converter/m0110_usb/Makefile.tmk_rev2 [deleted file]
converter/m0110_usb/README.md [deleted file]
converter/m0110_usb/config.h [deleted file]
converter/m0110_usb/keymap_common.c [deleted file]
converter/m0110_usb/keymap_common.h [deleted file]
converter/m0110_usb/keymap_default.c [deleted file]
converter/m0110_usb/keymap_hasu.c [deleted file]
converter/m0110_usb/keymap_intl.c [deleted file]
converter/m0110_usb/keymap_spacefn.c [deleted file]
converter/m0110_usb/led.c [deleted file]
converter/m0110_usb/matrix.c [deleted file]
converter/news_usb/Makefile.pjrc [deleted file]
converter/news_usb/config_pjrc.h [deleted file]
converter/news_usb/keymap.c [deleted file]
converter/news_usb/led.c [deleted file]
converter/news_usb/matrix.c [deleted file]
converter/next_usb/Makefile [deleted file]
converter/next_usb/Makefile.pjrc [deleted file]
converter/next_usb/README [deleted file]
converter/next_usb/config.h [deleted file]
converter/next_usb/keymap.c [deleted file]
converter/next_usb/led.c [deleted file]
converter/next_usb/matrix.c [deleted file]
converter/next_usb/next_timings.jpg [deleted file]
converter/pc98_usb/Makefile [deleted file]
converter/pc98_usb/README [deleted file]
converter/pc98_usb/config.h [deleted file]
converter/pc98_usb/keymap.c [deleted file]
converter/pc98_usb/led.c [deleted file]
converter/pc98_usb/matrix.c [deleted file]
converter/ps2_usb/Makefile [deleted file]
converter/ps2_usb/Makefile.mbed [deleted file]
converter/ps2_usb/Makefile.pjrc [deleted file]
converter/ps2_usb/Makefile.tmk_rev1 [deleted file]
converter/ps2_usb/Makefile.tmk_rev2 [deleted file]
converter/ps2_usb/Makefile.vusb [deleted file]
converter/ps2_usb/README.md [deleted file]
converter/ps2_usb/config.h [deleted file]
converter/ps2_usb/config_mbed.h [deleted file]
converter/ps2_usb/config_tmk_rev1.h [deleted file]
converter/ps2_usb/config_tmk_rev2.h [deleted file]
converter/ps2_usb/keymap_common.c [deleted file]
converter/ps2_usb/keymap_common.h [deleted file]
converter/ps2_usb/keymap_jis.c [deleted file]
converter/ps2_usb/keymap_plain.c [deleted file]
converter/ps2_usb/keymap_spacefn.c [deleted file]
converter/ps2_usb/led.c [deleted file]
converter/ps2_usb/main.cpp [deleted file]
converter/ps2_usb/matrix.c [deleted file]
converter/ps2_usb/usbconfig.h [deleted file]
converter/serialmouse_usb/Makefile [deleted file]
converter/serialmouse_usb/README.md [deleted file]
converter/serialmouse_usb/config.h [deleted file]
converter/serialmouse_usb/keymap.c [deleted file]
converter/serialmouse_usb/keymap_common.c [deleted file]
converter/serialmouse_usb/keymap_common.h [deleted file]
converter/serialmouse_usb/led.c [deleted file]
converter/serialmouse_usb/matrix.c [deleted file]
converter/sun_usb/Makefile [deleted file]
converter/sun_usb/README [deleted file]
converter/sun_usb/command_extra.c [deleted file]
converter/sun_usb/config.h [deleted file]
converter/sun_usb/keymap.c [deleted file]
converter/sun_usb/keymap_sun3.c [deleted file]
converter/sun_usb/led.c [deleted file]
converter/sun_usb/matrix.c [deleted file]
converter/terminal_bluefruit/Makefile [deleted file]
converter/terminal_bluefruit/README [deleted file]
converter/terminal_bluefruit/config.h [deleted file]
converter/terminal_bluefruit/keymap.c [deleted file]
converter/terminal_bluefruit/led.c [deleted file]
converter/terminal_bluefruit/matrix.c [deleted file]
converter/terminal_usb/Makefile [deleted file]
converter/terminal_usb/README [deleted file]
converter/terminal_usb/config.h [deleted file]
converter/terminal_usb/keymap.c [deleted file]
converter/terminal_usb/led.c [deleted file]
converter/terminal_usb/matrix.c [deleted file]
converter/usb_usb/Makefile [deleted file]
converter/usb_usb/README [deleted file]
converter/usb_usb/config.h [deleted file]
converter/usb_usb/keymap.c [deleted file]
converter/usb_usb/keymap_common.c [deleted file]
converter/usb_usb/keymap_common.h [deleted file]
converter/usb_usb/keymap_hasu.c [deleted file]
converter/usb_usb/keymap_spacefn.c [deleted file]
converter/usb_usb/main.cpp [deleted file]
converter/usb_usb/matrix.c [deleted file]
converter/x68k_usb/Makefile [deleted file]
converter/x68k_usb/README [deleted file]
converter/x68k_usb/config_pjrc.h [deleted file]
converter/x68k_usb/keymap.c [deleted file]
converter/x68k_usb/led.c [deleted file]
converter/x68k_usb/matrix.c [deleted file]
doc/BUILD_GUIDE.md [new file with mode: 0644]
doc/COPYING.GPLv2 [new file with mode: 0644]
doc/COPYING.GPLv3 [new file with mode: 0644]
doc/CYGWIN_GUIDE.md [new file with mode: 0755]
doc/FUSE.txt [new file with mode: 0644]
doc/HAND_WIRE.md [new file with mode: 0644]
doc/PCB_GUIDE.md [new file with mode: 0644]
doc/POWER.txt [new file with mode: 0644]
doc/TMK_README.md [new file with mode: 0644]
doc/USB_NKRO.txt [new file with mode: 0644]
doc/VAGRANT_GUIDE.md [new file with mode: 0644]
doc/build_old.md [new file with mode: 0644]
doc/keycode.txt [new file with mode: 0644]
doc/keymap.md [new file with mode: 0644]
doc/other_projects.md [new file with mode: 0644]
keyboard/atomic/flash-pcb.sh [deleted file]
keyboard/ergodox_ez/readme.md
keyboard/planck/CYGWIN_GUIDE.md [deleted file]
keyboard/planck/PCB_GUIDE.md [deleted file]
keyboard/planck/flash-pcb.sh [deleted file]
keyboard/preonic/flash-pcb.sh [deleted file]
new_project.sh [deleted file]
tmk_core/doc/COPYING.GPLv2 [deleted file]
tmk_core/doc/COPYING.GPLv3 [deleted file]
tmk_core/doc/FUSE.txt [deleted file]
tmk_core/doc/POWER.txt [deleted file]
tmk_core/doc/USB_NKRO.txt [deleted file]
tmk_core/doc/build.md [deleted file]
tmk_core/doc/keycode.txt [deleted file]
tmk_core/doc/keymap.md [deleted file]
tmk_core/doc/other_projects.md [deleted file]
util/1-setup-path-win.bat [new file with mode: 0644]
util/2-setup-environment-win.bat [new file with mode: 0644]
util/Vagrantfile [new file with mode: 0644]
util/avr_setup.sh [new file with mode: 0644]
util/new_project.sh [new file with mode: 0755]

diff --git a/1-setup-path-win.bat b/1-setup-path-win.bat
deleted file mode 100644 (file)
index 92e91be..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
-@ECHO OFF
-SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe
-
-CD UTIL
-DEL add-paths.log > NUL 2>&1
-DEL add-paths-detail.log > NUL 2>&1
-DEL UPDATE > NUL 2>&1
-
-ELEVATE -wait %cd%\add-paths.bat > NUL 2>&1
-
-IF ERRORLEVEL 1 (
-       ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time.
-) ELSE (
-       TYPE add-paths.log 2> NUL
-)
-ECHO.
-
-:: Branch to UpdateEnv if we need to update
-IF EXIST UPDATE (
-       DEL UPDATE
-       GOTO UpdateEnv
-)
-
-GOTO ExitBatch
-
-:: -----------------------------------------------------------------------------
-
-:UpdateEnv
-ECHO Making updated PATH go live . . .
-REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
-setx TEMPVAR 1 > NUL
-REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
-IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer)
-GOTO ExitBatch
-
-:: -----------------------------------------------------------------------------
-
-:ExitBatch
-ENDLOCAL
-PAUSE
-EXIT /b
-
-:: -----------------------------------------------------------------------------
-
-:KillExplorer
-ECHO Your desktop will be restarted. 
-ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED.
-ECHO Press enter when ready, or close this window if you would rather do a full restart of your computer at a later time.
-PAUSE
-ping -n 5 127.0.0.1 > NUL 2>&1
-ECHO Killing process Explorer.exe. . . 
-ECHO.  
-taskkill /f /im explorer.exe > NUL
-ECHO.   
-ECHO Your desktop is now loading. . . 
-ECHO.   
-ping -n 5 127.0.0.1 > NUL 2>&1
-START explorer.exe
-START explorer.exe %CD%\..
-EXIT /b
\ No newline at end of file
diff --git a/2-setup-environment-win.bat b/2-setup-environment-win.bat
deleted file mode 100644 (file)
index 9053380..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
-@ECHO OFF
-
-SET STARTINGDIR=%CD%
-
-:: Check for admin privilages
-SETX /M test test > nul 2>&1
-IF NOT ["%ERRORLEVEL%"]==["0"] (
-       ECHO FAILED. Rerun with administrator privileges.
-       GOTO ExitBatch
-) 
-
-:: Make sure path to MinGW exists - if so, CD to it
-SET MINGWPATH="C:\MinGW\bin"
-IF NOT EXIST !MINGWPATH! (ECHO Path not found: %MINGWPATH% && GOTO ExitBatch)
-CD /D %MINGWPATH%
-
-
-ECHO ------------------------------------------
-ECHO Installing wget and unzip
-ECHO ------------------------------------------
-mingw-get install msys-wget-bin msys-unzip-bin
-
-MKDIR temp
-CD temp
-
-ECHO ------------------------------------------
-ECHO Installing dfu-programmer.
-ECHO ------------------------------------------
-wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
-unzip dfu-programmer-win-0.7.2.zip
-COPY dfu-programmer.exe ..
-
-ECHO ------------------------------------------
-ECHO Downloading driver
-ECHO ------------------------------------------
-wget http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip
-unzip libusb-win32-bin-1.2.6.0.zip
-COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll
-
-ECHO ------------------------------------------
-ECHO Installing driver. Accept prompt.
-ECHO ------------------------------------------
-IF EXIST "%WinDir%\System32\PnPUtil.exe" (%WinDir%\System32\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND)
-IF EXIST "%WinDir%\Sysnative\PnPUtil.exe" (%WinDir%\Sysnative\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND)
-
-ECHO FAILED. Could not find PnPUtil.exe in "%WinDir%\System32" or "%WinDir%\Sysnative".
-
-:PNPUTILFOUND
-
-:: Wait then delete directory
-ping -n 5 127.0.0.1 > NUL 2>&1
-CD ..
-RD /s /q temp
-
-ECHO ------------------------------------------
-ECHO Finished!
-
-:ExitBatch
-CD /D %STARTINGDIR%
-ENDLOCAL
-PAUSE
-EXIT /b
\ No newline at end of file
diff --git a/BUILD_GUIDE.md b/BUILD_GUIDE.md
deleted file mode 100644 (file)
index 089d638..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-# Build Guide
-
-## Build Environment Setup
-
-### Windows (Vista and later)
-1. If you have ever installed WinAVR, uninstall it.
-2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
-3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
-4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
-5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
-6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
-7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".
-
-### Mac
-If you're using [homebrew,](http://brew.sh/) you can use the following commands:
-
-    brew tap osx-cross/avr
-    brew install avr-libc
-    brew install dfu-programmer
-
-This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line.
-
-You can also try these instructions:
-
-1. Install Xcode from the App Store.
-2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
-3. Install [DFU-Programmer][dfu-prog].
-
-### Linux
-Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
-
-Debian/Ubuntu example: 
-
-    sudo apt-get update
-    sudo apt-get install gcc-avr avr-libc dfu-programmer
-
-### Vagrant
-If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
-
-## Verify Your Installation
-1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 
-2. Open up a terminal or command prompt and navigate to the qmk_firmware folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 
-3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `README.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboard/`. For example, if you're building for a Planck, run `cd keyboard/planck`.
-4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process.
-
-## Customizing, Building, and Deploying Your Firmware
-
-Note: Some keyboard folders have non-standard organizations, and may not even support specifying alternate keymaps. Until these get reorganized, you will need to edit their default keymaps directly.
-
-1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, duplicate the folder `keymaps/default`, and rename it with your name, for example `jack`. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides. 
-2. To build a keymap other than the default, type `KEYMAP=<name>` after `make`. So if I've named my keymap `jack`, the full command would be `make KEYMAP=jack`.
-3. How you deploy the firmware will depend on whether you are using a PCB or a Teensy. In both cases, you'll need to put the keyboard in bootloader mode, either by pressing a button on the PCB/Teensy or pressing the key with the `RESET` keycode. Then, if you're using a PCB, just run `make KEYMAP=<name> dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the <keyboardname>.hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html)
-
-## Helpful Tips
-1. On Linux or OS X, you can run `sleep 5; make KEYMAP=<name> dfu` to delay building/deploying the firmware until for 5 seconds, giving you a chance to put the firmware into bootloader mode. You can change the 5 to any number of seconds.
-
-## Troubleshooting
-1. Try running `make clean` if the make command fails.
-
-       WIP
diff --git a/HAND_WIRE.md b/HAND_WIRE.md
deleted file mode 100644 (file)
index 0b7367e..0000000
+++ /dev/null
@@ -1,321 +0,0 @@
-# Quantum Hand-wiring Guide
-
-Parts list:
-* *x* keyswitches (MX, Matias, Gateron, etc)
-* *x* diodes
-* Keyboard plate (metal, plastic, cardboard, etc)
-* Wire (strained for wiring to the Teensy, anything for the rows/columns)
-* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
-* Resin-cored solder (leaded or lead-free)
-* Adequate ventilation/a fan
-* Tweezers (optional)
-* Wire cutters/snippers
-
-## How the matrix works (why we need diodes)
-
-The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
-
-        Column 0 being scanned     Column 1 being scanned
-                  x                                   x
-                 col0     col1              col0     col1
-                  |        |                 |        |
-        row0 ---(key0)---(key1)    row0 ---(key0)---(key1)
-                  |        |                 |        |
-        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
-
-The `x` represents that the column/row associated has a value of 1, or is HIGH. Here, we see that no keys are being pressed, so no rows get an `x`. For one keyswitch, keep in mind that one side of the contacts is connected to its row, and the other, its column.
-
-When we press `key0`, `col0` gets connected to `row0`, so the values that the firmware receives for that row is `0b01` (the `0b` here means that this is a bit value, meaning all of the following digits are bits - 0 or 1 - and represent the keys in that column). We'll use this notation to show when a keyswitch has been pressed, to show that the column and row are being connected:
-
-        Column 0 being scanned     Column 1 being scanned
-                  x                                   x
-                 col0     col1              col0     col1
-                  |        |                 |        |
-      x row0 ---(-+-0)---(key1)    row0 ---(-+-0)---(key1)
-                  |        |                 |        |
-        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
-
-We can now see that `row0` has an `x`, so has the value of 1. As a whole, the data the firmware receives when `key0` is pressed is
-
-    col0: 0b01
-    col1: 0b00
-            │└row0
-            └row1
-
-A problem arises when you start pressing more than one key at a time. Looking at our matrix again, it should become pretty obvious:
-
-        Column 0 being scanned     Column 1 being scanned
-                  x                                   x
-                 col0     col1              col0     col1
-                  |        |                 |        |
-      x row0 ---(-+-0)---(-+-1)  x row0 ---(-+-0)---(-+-1)
-                  |        |                 |        |
-      x row1 ---(key2)---(-+-3)  x row1 ---(key2)---(-+-3)
-
-      Remember that this ^ is still connected to row1
-
-The data we get from that is:
-
-    col0: 0b11
-    col1: 0b11
-            │└row0
-            └row1
-
-Which isn't accurate, since we only have 3 keys pressed down, not all 4. This behavior is called ghosting, and only happens in odd scenarios like this, but can be much more common on a bigger keyboard. The way we can get around this is by placing a diode after the keyswitch, but before it connects to its row. A diode only allows current to pass through one way, which will protect our other columns/rows from being activated in the previous example. We'll represent a dioded matrix like this;
-
-        Column 0 being scanned     Column 1 being scanned
-                    x                                   x
-                  col0      col1              col0     col1
-                    │        │                 |        │
-                 (key0)   (key1)            (key0)   (key1)
-                  ! │      ! │               ! |      ! │
-        row0 ─────┴────────┘ │     row0 ─────┴────────┘ │
-                    │        │                 |        │
-                 (key2)   (key3)            (key2)   (key3)
-                  !        !                 !        !
-        row1 ─────┴────────┘       row1 ─────┴────────┘
-
-In practical applications, the black line of the diode will be placed facing the row, and away from the keyswitch - the `!` in this case is the diode, where the gap represents the black line. A good way to remember this is to think of this symbol: `>|`
-
-Now when we press the three keys, invoking what would be a ghosting scenario:
-
-        Column 0 being scanned     Column 1 being scanned
-                    x                                   x
-                  col0      col1              col0     col1
-                    │        │                 │        │
-                 (┌─┤0)   (┌─┤1)            (┌─┤0)   (┌─┤1)
-                  ! │      ! │               ! │      ! │
-      x row0 ─────┴────────┘ │   x row0 ─────┴────────┘ │
-                    │        │                 │        │
-                 (key2)   (┌─┘3)            (key2)   (┌─┘3)
-                  !        !                 !        !
-        row1 ─────┴────────┘     x row1 ─────┴────────┘
-
-Things act as they should! Which will get us the following data:
-
-    col0: 0b01
-    col1: 0b11
-            │└row0
-            └row1
-
-The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
-
-## The actual hand-wiring
-
-### Getting things in place
-
-When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
-
-To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns.
-
-Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps.
-
-Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
-
-### Preparing the diodes
-
-It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
-
-       ┌─────┬─┐
-    ───┤     │ ├─┐
-       └─────┴─┘ │
-                 │
-
-We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
-
-### Soldering the diodes
-
-Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this:
-
-     │o
-    ┌┴┐         o
-    │ │    O
-    ├─┤      
-    └┬┘
-     └─────────────
-
-Letting the diode rest, grab your solder, and touch both it and the soldering iron to the left contact at the same time - the rosin in the solder should make it easy for the solder to flow over both the diode and the keyswitch contact. The diode may move a little, and if it does, carefully position it back it place by grabbing the bent end of the diode - the other end will become hot very quickly. If you find that it's moving too much, using needle-nose pliers of some sort may help to keep the diode still when soldering.
-
-The smoke that the rosin releases is harmful, so be careful not to breath it or get it in your eyes/face.
-
-After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiney) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
-
-When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this:
-
-     │o               │o
-    ┌┴┐         o    ┌┴┐         o
-    │ │    O         │ │    O
-    ├─┤              ├─┤      
-    └┬┘              └┬┘
-     └────────────────┴─────────────
-
-After completing a row, use the wire cutters to trim the excess wire from the tops of the diodes, and from the right side on the final switch. This process will need to completed for each row you have.
-
-When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult.
-
-### Soldering the columns
-
-You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
-
-If you're using stranded wire, it's probably easiest to just use a lot of small wires to connect each keyswitch along the column. It's possible to use one and melt through the insulation, but this isn't recommended, will produce even more harmful fumes, and can ruin your soldering iron.
-
-Before beginning to solder, it helps to have your wire pre-bent (if using single-cored), or at least have an idea of how you're going to route the column (especially if you're making a staggered board). Where you go in particular doesn't matter too much, as we'll be basing our keymap definitions on how it was wired - just make sure every key in a particular row is in a unique column, and that they're in order from left to right.
-
-If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
-
-### Wiring things to the Teensy
-
-Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
-
-The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware.
-
-Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach.
-
-Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering.
-
-As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future.
-
-When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work.
-
-As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
-
-### Getting some basic firmware set-up
-
-From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
-
-To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
-
-The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboard/` folder:
-
-    ./new_project.sh <project_name>
-
-You'll want to navigate to the `keyboard/<project_name>/` folder by typing, like the print-out from the script specifies:
-
-    cd keyboard/<project_name>
-
-#### config.h
-
-The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and them to match the dimensions of your keyboard's matrix.
-
-Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
-
-#### \<project_name\>.h
-
-The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
-
-We'll dive into how this will work with the following example. Say we have a keyboard like this:
-
-    ┌───┬───┬───┐
-    │   │   │   │
-    ├───┴─┬─┴───┤
-    │     │     │
-    └─────┴─────┘
-
-This can be described by saying the top row is 3 1u keys, and the bottom row is 2 1.5u keys. The difference between the two rows is important, because the bottom row has an unused column spot (3 v 2). Let's say that this is how we wired the columns:
-
-    ┌───┬───┬───┐
-    │ ┋ │ ┋ │ ┋ │
-    ├─┋─┴─┬─┴─┋─┤
-    │ ┋   │   ┋ │
-    └─────┴─────┘
-
-The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this:
-
-    #define KEYMAP( \
-        k00, k01, k02, \
-          k10,  k11,   \
-    ) \
-    { \
-        { k00, k01,   k02 }, \
-        { k10, KC_NO, k11 }, \
-    }
-
-Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring.
-
-Let's say that instead, we wired our keyboard like this (a fair thing to do):
-
-    ┌───┬───┬───┐
-    │ ┋ │  ┋│ ┋ │
-    ├─┋─┴─┬┋┴───┤
-    │ ┋   │┋    │
-    └─────┴─────┘
-
-This would require our `KEYMAP` definition to look like this:
-
-    #define KEYMAP( \
-        k00, k01, k02, \
-          k10,  k11,   \
-    ) \
-    { \
-        { k00, k01, k02   }, \
-        { k10, k11, KC_NO }, \
-    }
-
-Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
-
-#### keymaps/default.c
-
-This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
-
-The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
-
-Using our previous example, let's say we want to create the following layout:
-
-    ┌───┬───┬───┐
-    │ A │ 1 │ H │
-    ├───┴─┬─┴───┤
-    │ TAB │ SPC │
-    └─────┴─────┘
-
-This can be accomplished by using the following `keymaps` definition:
-
-    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    [0] = KEYMAP( /* Base */
-      KC_A,  KC_1,  KC_H, \
-        KC_TAB,  KC_SPC   \
-    ),
-    };
-
-Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
-
-It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
-
-#### Compiling your firmware
-
-After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboard/planck/PCB_GUIDE.md#setting-up-the-environment) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
-
-Once everything is installed, running `make` in the terminal should get you some output, and eventually a `<project_name>.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section.
-
-Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboard/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
-
-#### Testing your firmware
-
-Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
-
-0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced.
-1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough.
-2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
-3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
-4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
-5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
-6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
-
-If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
-
-#### Securing the Teensy, finishing your hardware, getting fancier firmware
-
-Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
-
-There are a lot of possibilities inside the firmware - check out the [README](https://github.com/jackhumbert/qmk_firmware/blob/master/README.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
-
-## Trouble-shooting compiling
-
-### Windows
-
-#### fork: Resource temporarily unavailable
-
-http://www.avrfreaks.net/forum/windows-81-compilation-error
-
-### Mac
-
-### Linux
index c848d477d6b720d6d0fcd4d7070cb11dc037e083..a6bd3c495e71c5369878dd428dc522a2861fa370 100644 (file)
--- a/README.md
+++ b/README.md
@@ -14,18 +14,18 @@ The OLKB product firmwares are maintained by Jack, the Ergodox EZ by Erez, and t
 This is not a tiny project. While this is the main Readme, there are many other files you might want to consult. Here are some points of interest:
 
 * The Readme for your own keyboard: This is found under `keyboards/<your keyboards's name>/`. So for the ErgoDox EZ, it's [here](keyboard/ergodox_ez/); for the Atomic, it's [here](keyboard/atomic/) and so on.
-* The [build guide](BUILD_GUIDE.md), also mentioned in the next section. This is how you put your development environment together so you can compile the firmware.
+* The [build guide](doc/BUILD_GUIDE.md), also mentioned in the next section. This is how you put your development environment together so you can compile the firmware.
 * The list of possible keycodes you can use in your keymap is actually spread out in a few different places:
   * [tmk_core/common/keycode.h](tmk_core/common/keycode.h) - the base TMK keycodes. This is the actual source file.
-  * [tmk_core/doc/keycode.txt](tmk_core/doc/keycode.txt) - an explanation of those same keycodes.
+  * [doc/keycode.txt](doc/keycode.txt) - an explanation of those same keycodes.
   * [quantum/keymap_common.h](quantum/keymap_common.h) - this is where the QMK-specific aliases are all set up. Things like the Hyper and Meh key, the Leader key, and all of the other QMK innovations. These are also explained and documented below, but `keymap_common.h` is where they're actually defined.
-* The [TMK documentation](tmk_core/doc). QMK is based on TMK, and this explains how it works internally.
+* The [TMK documentation](doc/TMK_README.md). QMK is based on TMK, and this explains how it works internally.
 
 ## Getting started
 
-* [BUILD_GUIDE.md](BUILD_GUIDE.md) contains instructions to set up a build environment, build the firmware, and deploy it to a keyboard. Once your build environment has been set up, all `make` commands to actually build the firmware must be run from a folder in `keyboard/`.
+* [BUILD_GUIDE.md](doc/BUILD_GUIDE.md) contains instructions to set up a build environment, build the firmware, and deploy it to a keyboard. Once your build environment has been set up, all `make` commands to actually build the firmware must be run from a folder in `keyboard/`.
 * If you're looking to customize a keyboard that currently runs QMK or TMK, find your keyboard's directory under `keyboard/` and run the make commands from there.
-* If you're looking to apply this firmware to an entirely new hardware project (a new kind of keyboard), you can create your own Quantum-based project by using `./new_project.sh <project_name>`, which will create `/keyboard/<project_name>` with all the necessary components for a Quantum project.
+* If you're looking to apply this firmware to an entirely new hardware project (a new kind of keyboard), you can create your own Quantum-based project by using `util/new_project.sh <project_name>`, which will create `/keyboard/<project_name>` with all the necessary components for a Quantum project.
 
 ### Makefile Options
 
@@ -205,7 +205,7 @@ rounded up (5 bits per key). For example on Planck (48 keys) it uses
 
 ### 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).
+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/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.
 
diff --git a/TMK_README.md b/TMK_README.md
deleted file mode 100644 (file)
index 36ef84a..0000000
+++ /dev/null
@@ -1,243 +0,0 @@
-# TMK Documenation
-
-Features
---------
-These features can be used in your keyboard.
-
-* Multi-layer Keymap  - Multiple keyboard layouts with layer switching
-* Mouse key           - Mouse control with keyboard
-* System Control Key  - Power Down, Sleep, Wake Up and USB Remote Wake up
-* Media Control Key   - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
-* USB NKRO            - 120 keys(+ 8 modifiers) simultaneously
-* PS/2 mouse support  - PS/2 mouse(TrackPoint) as composite device
-* Keyboard protocols  - PS/2, ADB, M0110, Sun and other old keyboard protocols
-* User Function       - Customizable function of key with writing code
-* Macro               - Very primitive at this time
-* Keyboard Tricks     - Oneshot modifier and modifier with tapping feature
-* Debug Console       - Messages for debug and interaction with firmware
-* Virtual DIP Switch  - Configurations stored EEPROM(Boot Magic)
-* Locking CapsLock    - Mechanical switch support for CapsLock
-* Breathing Sleep LED - Sleep indicator with charm during USB suspend
-* Backlight           - Control backlight levels
-
-
-
-Projects
---------
-You can find some keyboard specific projects under `converter` and `keyboard` directory.
-
-## Main projects
-
-### OLKB products
-* [planck](keyboard/planck/)                - [Planck] Ortholinear 40% keyboard
-* [preonic](keyboard/preonic/)              - [Preonic] Ortholinear 50% keyboard
-* [atomic](keyboard/atomic/)                - [Atomic] Ortholinear 60% keyboard
-
-### Ergodox EZ
-* [ergodox_ez](keyboard/ergodox_ez)         - [Ergodox_EZ] Assembled split keyboard
-
-## Other projects
-
-### converter
-* [ps2_usb](converter/ps2_usb/)             - [PS/2 keyboard to USB][GH_ps2]
-* [adb_usb](converter/adb_usb/)             - [ADB keyboard to USB][GH_adb]
-* [m0110_usb](converter/m0110_usb)          - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
-* [terminal_usb](converter/terminal_usb/)   - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
-* [news_usb](converter/news_usb/)           - [Sony NEWS keyboard to USB][GH_news]
-* [x68k_usb](converter/x68k_usb/)           - [Sharp X68000 keyboard to USB][GH_x68k]
-* [sun_usb](converter/sun_usb/)             - [Sun] to USB(type4, 5 and 3?)
-* [pc98_usb](converter/pc98_usb/)           - [PC98] to USB
-* [usb_usb](converter/usb_usb/)             - USB to USB(experimental)
-* [ascii_usb](converter/ascii_usb/)         - ASCII(Serial console terminal) to USB
-* [ibm4704_usb](converter/ibm4704_usb)      - [IBM 4704 keyboard Converter][GH_ibm4704]
-
-### keyboard
-* [hhkb](keyboard/hhkb/)                    - [Happy Hacking Keyboard pro][GH_hhkb] hasu's main board
-* [gh60](keyboard/gh60/)                    - [GH60] DIY 60% keyboard [prototype][GH60_proto] hasu's second board
-* [hbkb](keyboard/hbkb/)                    - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
-* [hid_liber](keyboard/hid_liber/)          - [HID liberation][HID_liber] controller (by alaricljs)
-* [phantom](keyboard/phantom/)              - [Phantom] keyboard (by Tranquilite)
-* [IIgs_Standard](keyboard/IIgs/)           - Apple [IIGS] keyboard mod(by JeffreySung)
-* [macway](keyboard/macway/)                - [Compact keyboard mod][GH_macway] [retired]
-* [KMAC](keyboard/kmac/)                    - Korean custom keyboard
-* [Lightsaber](keyboard/lightsaber/)        - Korean custom keyboard
-* [Infinity](keyboard/infinity/)            - Massdrop [Infinity keyboard][Infinity]
-* [NerD](keyboard/nerd/)                    - Korean custom keyboard
-* [KittenPaw](keyboard/kitten_paw)          - Custom Majestouch controller
-* [Lightpad](keyboard/lightpad)             - Korean custom keypad
-* [ghost_squid](keyboard/ghost_squid/)      - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]
-
-### Extenal projects using tmk_keyboard
-* [ErgoDox_cub-uanic][cub-uanic]            - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
-* [mcdox][mcdox_tmk]                        - [mcdox][mcdox]
-
-
-[GH_macway]:    http://geekhack.org/showwiki.php?title=Island:11930
-[GH_hhkb]:      http://geekhack.org/showwiki.php?title=Island:12047
-[GH_ps2]:       http://geekhack.org/showwiki.php?title=Island:14618
-[GH_adb]:       http://geekhack.org/showwiki.php?title=Island:14290
-[GH_hhkb_bt]:   http://geekhack.org/showwiki.php?title=Island:20851
-[GH_m0110]:     http://geekhack.org/showwiki.php?title=Island:24965
-[GH_news]:      http://geekhack.org/showwiki.php?title=Island:25759
-[GH_terminal]:  http://geekhack.org/showwiki.php?title=Island:27272
-[GH_x68k]:      http://geekhack.org/showwiki.php?title=Island:29060
-[GH_hbkb]:      http://geekhack.org/showwiki.php?title=Island:29483
-[GH_ibm4704]:   http://geekhack.org/index.php?topic=54706.0
-[HID_liber]:    http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
-[Phantom]:      http://geekhack.org/index.php?topic=26742
-[GH60]:         http://geekhack.org/index.php?topic=34959
-[GH60_proto]:   http://geekhack.org/index.php?topic=37570.0
-[PC98]:         http://en.wikipedia.org/wiki/NEC_PC-9801
-[Sun]:          http://en.wikipedia.org/wiki/Sun-3
-[IIGS]:         http://en.wikipedia.org/wiki/Apple_IIGS
-[Infinity]:     https://www.massdrop.com/buy/infinity-keyboard-kit
-[ghost_squid]:  http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
-[cmxt]:         http://gaming.coolermaster.com/en/products/keyboards/quickfirext/
-[ergodox_org]:  http://ergodox.org/
-[cub-uanic]:    https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
-[mcdox]:        https://github.com/DavidMcEwan/mcdox
-[mcdox_tmk]:    https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
-[Planck]:       http://olkb.co/planck
-[Preonic]:      http://olkb.co/preonic
-[Atomic]:       http://olkb.co/atomic
-[Ergodox_EZ]:   https://www.indiegogo.com/projects/ergodox-ez-an-incredible-mechanical-keyboard
-
-
-License
--------
-**GPLv2** or later. Some protocol files are under **Modified BSD License**.
-
-Third party libraries like LUFA, PJRC and V-USB have their own license respectively.
-
-
-
-Build Firmware and Program Controller
--------------------------------------
-See [doc/build.md](tmk_core/doc/build.md), or the README in the particular keyboard/* folder.
-
-
-
-Change your keymap
-------------------
-See [doc/keymap.md](tmk_core/doc/keymap.md).
-
-
-
-Magic Commands
---------------
-To see help press `Magic` + `H`.
-
-`Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter. 
-`Magic` keybind can be vary on each project, check `config.h` in project directory.
-
-Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
-
-    ----- Command Help -----
-    c:      enter console mode
-    d:      toggle debug enable
-    x:      toggle matrix debug
-    k:      toggle keyboard debug
-    m:      toggle mouse debug
-    v:      print device version & info
-    t:      print timer count
-    s:      print status
-    e:     print eeprom config
-    n:     toggle NKRO
-    0/F10:  switch to Layer0
-    1/F1:   switch to Layer1
-    2/F2:   switch to Layer2
-    3/F3:   switch to Layer3
-    4/F4:   switch to Layer4
-    PScr:   power down/remote wake-up
-    Caps:   Lock Keyboard(Child Proof)
-    Paus:   jump to bootloader
-
-
-
-Boot Magic Configuration - Virtual DIP Switch
----------------------------------------------
-Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable.
-Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles.
-
-To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](tmk_core/common/bootmagic.h).
-
-#### General
-- Skip reading EEPROM to start with default configuration(`ESC`)
-- Clear configuration stored in EEPROM to reset configuration(`Backspace`)
-
-#### Bootloader
-- Kick up Bootloader(`B`)
-
-#### Debug
-- Debug enable(`D`)
-- Debug matrix enable(`D`+`X`)
-- Debug keyboard enable(`D`+`K`)
-- Debug mouse enable(`D`+`M`)
-
-#### Keymap
-- Swap Control and CapsLock(`Left Control`)
-- Change CapsLock to Control(`Caps Lock`)
-- Swap LeftAlt and Gui(`Left Alt`)
-- Swap RightAlt and Gui(`Right Alt`)
-- Disable Gui(`Left Gui`)
-- Swap Grave and Escape(`Grave`)
-- Swap BackSlash and BackSpace(`Back Slash`)
-- Enable NKRO on boot(`N`)
-
-#### Default Layer
-- Set Default Layer to 0(`0`)
-- Set Default Layer to 1(`1`)
-- Set Default Layer to 2(`2`)
-- Set Default Layer to 3(`3`)
-- Set Default Layer to 4(`4`)
-- Set Default Layer to 5(`5`)
-- Set Default Layer to 6(`6`)
-- Set Default Layer to 7(`7`)
-
-
-
-Mechanical Locking support
---------------------------
-This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` 
-or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN
-UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res
-ync option tries to keep switch state consistent with keyboard LED state.
-    #define LOCKING_SUPPORT_ENABLE
-    #define LOCKING_RESYNC_ENABLE
-
-
-
-Start Your Own Project
------------------------
-**TBD**
-
-
-
-Debugging
---------
-Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
-
-You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`.
-
-
-
-Files and Directories
--------------------
-### Top
-* tmk_core/     - core library
-* keyboard/     - keyboard projects
-* converter/    - protocol converter projects
-* doc/          - documents
-
-
-
-Coding Style
--------------
-- Doesn't use Tab to indent, use 4-spaces instead.
-
-
-
-Other Keyboard Firmware Projects
-------------------
-You can learn a lot about keyboard firmware from these. See [doc/other_projects.md](tmk_core/doc/other_projects.md).
diff --git a/VAGRANT_GUIDE.md b/VAGRANT_GUIDE.md
deleted file mode 100644 (file)
index 922848f..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-# Quick Start Directions
-
-This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
-
-## Requirements
-
-Using the Vagrantfile in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
-
-*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12.
-
-Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
-
-Build Firmware and Program Controller
--------------------------------------
-See [doc/build.md](tmk_core/doc/build.md), or the README in the particular keyboard/* folder.
-
-Change your keymap
-------------------
-See [doc/keymap.md](tmk_core/doc/keymap.md).
-
-## Flashing the firmware
-
-The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](keyboard/ergodox_ez/readme.md) gives a great example.
-
-If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
-       
\ No newline at end of file
diff --git a/Vagrantfile b/Vagrantfile
deleted file mode 100644 (file)
index 1abe8ff..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-# -*- mode: ruby -*-\r
-# vi: set ft=ruby :\r
-\r
-Vagrant.configure(2) do |config|\r
-  # You can only have one config.vm.box uncommented at a time\r
-\r
-  # Comment this and uncomment another if you don't want to use the minimal Arch box\r
-  config.vm.box = "dragon788/arch-ala-elasticdog"\r
-\r
-  # VMware/Virtualbox 64 bit\r
-  # config.vm.box = "phusion/ubuntu-14.04-amd64"\r
-  #\r
-  # VMware/Virtualbox 64 bit\r
-  #config.vm.box = "puphpet/centos65-x64"\r
-  #\r
-  # The opensuse boxes don't have dfu-util in their default repositories\r
-  #\r
-  # The virtualbox version has tools issues\r
-  # VMware/Virtualbox 64 bit\r
-  #config.vm.box = "bento/opensuse-13.2-x86_64"\r
-  #\r
-  # Virtualbox only\r
-  #config.vm.box = "bento/opensuse-13.2-i386"\r
-  # config.vm.box = ""\r
-  # config.vm.box = ""\r
-\r
-  # This section allows you to customize the Virtualbox VM\r
-  # settings, ie showing the GUI or upping the memory\r
-  # or cores if desired\r
-  config.vm.provider "virtualbox" do |vb|\r
-    # Hide the VirtualBox GUI when booting the machine\r
-    vb.gui = false\r
-    # Uncomment the below lines if you want to program\r
-    # your Teensy via the VM rather than your host OS\r
-    #vb.customize ['modifyvm', :id, '--usb', 'on']\r
-    #vb.customize ['usbfilter', 'add', '0',\r
-    #            '--target', :id,\r
-    #            '--name', 'teensy',\r
-    #            '--vendorid', '0x16c0',\r
-    #            '--productid','0x0478'\r
-    #           ] \r
-    # Customize the amount of memory on the VM:\r
-    vb.memory = "512"\r
-  end\r
-\r
-  # This section allows you to customize the VMware VM\r
-  # settings, ie showing the GUI or upping the memory\r
-  # or cores if desired\r
-  config.vm.provider "vmware_workstation" do |vmw|\r
-    # Hide the VMware GUI when booting the machine\r
-    vmw.gui = false \r
\r
-    # Customize the amount of memory on the VM:\r
-    vmw.memory = "512"\r
-  end\r
-\r
-  config.vm.provider "vmware_fusion" do |vmf|\r
-    # Hide the vmfare GUI when booting the machine\r
-    vmf.gui = false\r
\r
-    # Customize the amount of memory on the VM:\r
-    vmf.memory = "512"\r
-  end\r
-  \r
-  # This script ensures the required packages for AVR programming are installed\r
-  # It also ensures the system always gets the latest updates when powered on\r
-  # If this causes issues you can run a 'vagrant destroy' and then\r
-  # add a # before ,args: and run 'vagrant up' to get a working\r
-  # non-updated box and then attempt to troubleshoot or open a Github issue \r
-  \r
-  config.vm.provision "shell", run: "always", path: "avr_setup.sh", args: "-update"\r
-\r
-  config.vm.post_up_message = """\r
-  Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)\r
-  or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool\r
-\r
-  Change directory (cd) to the keyboard you wish to program \r
-  (Optionally) modify your layout, \r
-  then run 'make clean' \r
-  and then 'make' to compile the .eep and .hex files.\r
-\r
-  Or you can copy and paste the example line below. \r
\r
-  cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make\r
-  \r
-\r
-  """\r
-end\r
diff --git a/avr_setup.sh b/avr_setup.sh
deleted file mode 100644 (file)
index 34a8a32..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/usr/bin/env bash
-# This script will attempt to setup the Linux dependencies for compiling QMK/TMK
-
-# This could probably go much lower, but since we are including an Arch vagrant,
-# making it the first match makes sense
-
-if [[ -n "$(type -P pacman )" ]]; then
-  # Arch linux and derivatives like Apricity
-  # Future improvements:
-  # Allow user to speed up package installs using powerpill/wget tweaks
-  # Always run the pacman mirror update script if possible when vagrant comes up
-  # This will ensure that users never get stalled on a horribly slow mirror
-  pacman -Syyu --needed --noconfirm
-  pacman -S --needed --noconfirm \
-    base-devel \
-    avr-gcc \
-    avr-binutils \
-    avr-libc \
-    dfu-util
-
-elif [[ -n "$(type -P apt-get)" ]]; then
-  # Debian and derivatives
-  # This block performs completely non-interactive updates {{
-  export DEBIAN_FRONTEND=noninteractive
-  export DEBCONF_NONINTERACTIVE_SEEN=true
-  echo "grub-pc hold" | dpkg --set-selections
-  apt-get -y update
-  apt-get -y --allow-unauthenticated upgrade \
-         -o Dpkg::Options::="--force-confdef" \
-         -o Dpkg::Options::="--force-confold"
-  # }}
-  apt-get install -y \
-    build-essential \
-    gcc \
-    unzip \
-    wget \
-    zip \
-    gcc-avr \
-    binutils-avr \
-    avr-libc \
-    dfu-util
-  
-elif [[ -n "$(type -P yum)" ]]; then
-  # Fedora, CentOS or RHEL and derivatives
-  yum -y makecache && yum -y update
-  yum -y install \
-    gcc \
-    glibc-headers \
-    kernel-devel \
-    kernel-headers \
-    make \
-    perl \
-    git \
-    wget \
-    avr-binutils \
-    avr-gcc \
-    avr-libc \
-    dfu-util
-
-elif [[ -n "$(type -P zypper)" ]]; then
-  # openSUSE
-  zypper --non-interactive refresh  && zypper --non-interactive update
-  zypper --non-interactive install \
-    git \
-    make \
-    gcc \
-    kernel-devel \
-    patch \
-    wget \
-    dfu-programmer
-
-fi
diff --git a/converter/adb_usb/Makefile b/converter/adb_usb/Makefile
deleted file mode 100644 (file)
index 2369ee7..0000000
+++ /dev/null
@@ -1,141 +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 = adb_usb_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 \
-       led.c \
-       adb.c
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_ansi.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
-
-
-# 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
-ADB_MOUSE_ENABLE = yes
-
-# ADB Mice need acceleration for todays much bigger screens. 
-OPT_DEFS += -DADB_MOUSE_MAXACC=8
-
-
-# Optimize size but this may cause error "relocation truncated to fit"
-#EXTRALDFLAGS = -Wl,--relax
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/adb_usb/Makefile.pjrc b/converter/adb_usb/Makefile.pjrc
deleted file mode 100644 (file)
index c320c09..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-# Target file name (without extension).
-TARGET = adb_usb_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 \
-       adb.c
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_ansi.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
-
-
-# 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(+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)
-ADB_MOUSE_ENABLE = yes
-
-# ADB Mice need acceleration for todays much bigger screens. 
-OPT_DEFS += -DADB_MOUSE_MAXACC=8
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol/pjrc.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/adb_usb/README.md b/converter/adb_usb/README.md
deleted file mode 100644 (file)
index 46082ff..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-ADB to USB keyboard converter
-=============================
-This firmware converts ADB keyboard protocol to USB.
-You can use PJRC Teensy for this converter, though, other USB AVR(ATMega32U4, AT90USB64/128 or etc) should work.
-But binary size is about 10KB or more it doesn't fit into 8K flash like ATMega8U2.
-
-Discuss: http://geekhack.org/showwiki.php?title=Island:14290
-
-
-
-README FIRST
-------------
-https://github.com/tmk/tmk_keyboard
-https://github.com/tmk/tmk_keyboard/tree/master/converter/adb_usb
-
-Also check these when you are in trouble.
-
-https://github.com/tmk/tmk_keyboard/wiki
-https://github.com/tmk/tmk_keyboard/labels/NOTE
-
-
-Wiring
-------
-Connect ADB pins to controller just by 3 lines(Vcc, GND, Data). By default Data line uses port PD0.
-
-ADB female socket from the front:
-
-      ,--_--.
-     / o4 3o \      1: DATA
-    | o2   1o |     2: Power SW
-     -  ===  -      3: VCC
-      `-___-'       4: GND
-
-This converter uses AVR's internal pull-up, but it seems to be too weak, in particular when you want to use a long or coiled cable. The external pull-up resistor(1K-10K Ohm) on Data is strongly recommended.(It is almost must!)
-https://github.com/tmk/tmk_keyboard/wiki/FAQ#pull-up-resistor
-
-Pull-up resister:
-
-    Keyboard       Conveter
-                   ,------.
-    5V------+------|VCC   |
-            |      |      |
-           [R]     |      |
-            |      |      |
-    Signal--+------|PD0   |
-                   |      |
-    GND------------|GND   |
-                   `------'
-    R: 1K Ohm resistor
-
-
-Define following macros for ADB connection in config.h if you use other than port PD0.
-
-    ADB_PORT, ADB_PIN, ADB_DDR, ADB_DATA_BIT
-
-
-Build
------
-See doc/build.md. In short,
-
-    $ make clean
-    $ make
-
-You can select keymap(ansi is default) like this:
-
-    $ make KEYMAP=[ansi|iso|hasu]
-
-
-Keymap
-------
-You can change a keymap by editing code of keymap_[ansi|iso|hasu|yours].c.
-How to define the keymap is probably obvious. You can find key symbols in common/keycode.h. And see doc/keymap.md for more detail.
-
-
-Magic command
--------------
-To get help press `h` holding Magic key. Magic key is `Power key`.
-
-
-Locking CapsLock
-----------------
-Many of old ADB keyboards have mechanical push-lock switch for Capslock key and this converter supports the locking Capslock key by default. See README in top directory for more detail about this feature.
-https://github.com/tmk/tmk_keyboard/blob/master/README.md#mechanical-locking-support
-
-Also you may want to remove locking pin from the push-lock switch to use capslock as a normal momentary switch.
-
-
-Notes
------
-Not-extended ADB keyboards have no discrimination between right modifier and left one,
-you will always see left control even if you press right control key.
-Apple Extended Keyboard and Apple Extended Keyboard II can discriminate both side
-modifiers except for GUI key(Windows/Command).
-
-And most ADB keyboard has no diodes in its matrix so they are not NKRO,
-though ADB protocol itself supports it. See protocol/adb.c for more info.
-
-If keyboard has ISO layout you need to use ISO keymap with `make KEYMAP=iso`. With ANSI
-keymap you will suffer from swapped keys problem.
-
-https://github.com/tmk/tmk_keyboard/issues/35
-
-EOF
diff --git a/converter/adb_usb/config.h b/converter/adb_usb/config.h
deleted file mode 100644 (file)
index 5ce5c22..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
-
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x0ADB
-#define DEVICE_VER      0x0101
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         ADB keyboard converter
-#define DESCRIPTION     convert ADB keyboard to USB
-
-/* matrix size */
-#define MATRIX_ROWS 16  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-#define MATRIX_ROW(code)    ((code)>>3&0x0F)
-#define MATRIX_COL(code)    ((code)&0x07)
-
-
-/* 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
-
-
-/* legacy keymap support */
-#define USE_LEGACY_KEYMAP
-
-
-/* ADB port setting */
-#define ADB_PORT        PORTD
-#define ADB_PIN         PIND
-#define ADB_DDR         DDRD
-#define ADB_DATA_BIT    0
-//#define ADB_PSW_BIT     1       // optional
-
-/* key combination for command */
-#ifndef __ASSEMBLER__
-#include "adb.h"
-#include "matrix.h"
-#define IS_COMMAND() ( \
-    matrix_is_on(MATRIX_ROW(ADB_POWER), MATRIX_COL(ADB_POWER)) \
-)
-#endif
-
-#endif
diff --git a/converter/adb_usb/keymap_ansi.c b/converter/adb_usb/keymap_ansi.c
deleted file mode 100644 (file)
index 4ea601b..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    KEYMAP_EXT_ANSI(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,                   NO,
-    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,PEQL,PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
-    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LALT,LGUI,          SPC,                               RALT,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-};
diff --git a/converter/adb_usb/keymap_common.c b/converter/adb_usb/keymap_common.c
deleted file mode 100644 (file)
index 55a1379..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2011,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/converter/adb_usb/keymap_common.h b/converter/adb_usb/keymap_common.h
deleted file mode 100644 (file)
index bdca38e..0000000
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
-Copyright 2011,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 "print.h"
-#include "debug.h"
-#include "keymap.h"
-
-
-extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-extern const uint16_t fn_actions[];
-
-
-/* M0115 Apple Extended Keyboard ANSI
- * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.             ,---.
- * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|             |Pwr|
- * `---'   `---------------' `---------------' `---------------' `-----------'             `---'
- * ,-----------------------------------------------------------. ,-----------. ,---------------.
- * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  =|  /|  *|
- * |-----------------------------------------------------------| |-----------| |---------------|
- * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|  -|
- * |-----------------------------------------------------------| `-----------' |---------------|
- * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|  +|
- * |-----------------------------------------------------------|     ,---.     |---------------|
- * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
- * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
- * |Ctrl |Opt |Cmd |         Space           |     |Opt |Ctrl  | |Lef|Dow|Rig| |      0|  .|   |
- * `-----------------------------------------------------------' `-----------' `---------------'
- */
-#define KEYMAP_EXT_ANSI( \
-    K35,  K7A,K78,K63,K76, K60,K61,K62,K64, K65,K6D,K67,K6F, K69,K6B,K71,              K7F, \
-    K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74,  K47,K51,K4B,K43, \
-    K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A, K75,K77,K79,  K59,K5B,K5C,K4E, \
-    K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,    K24,               K56,K57,K58,K45, \
-    K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,        K7B,     K3E,      K53,K54,K55,     \
-    K36,K3A,K37,        K31,                        K7C,K7D, K3B,K3D,K3C,  K52,    K41,K4C  \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_NUBS,  KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_PENT,  KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO    }, \
-    { KC_F17,   KC_##K41, KC_NO,    KC_##K43, KC_F18,   KC_##K45, KC_NO,    KC_##K47 }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K4B, KC_##K4C, KC_NO,    KC_##K4E, KC_F18   }, \
-    { KC_F19,   KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_F20,   KC_##K5B, KC_##K5C, KC_INT3,  KC_INT1,  KC_PCMM  }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_LANG2, KC_##K67 }, \
-    { KC_LANG1, KC_##K69, KC_F16,   KC_##K6B, KC_NO,    KC_##K6D, KC_APP,   KC_##K6F }, \
-    { KC_NO,    KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_NO,    KC_##K7F }  \
-}
-
-/* M0115 Apple Extended Keyboard ISO
- * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.             ,---.
- * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|             |Pwr|
- * `---'   `---------------' `---------------' `---------------' `-----------'             `---'
- * ,-----------------------------------------------------------. ,-----------. ,---------------.
- * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  =|  /|  *|
- * |-----------------------------------------------------------| |-----------| |---------------|
- * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Retur| |Del|End|PgD| |  7|  8|  9|  -|
- * |------------------------------------------------------`    | `-----------' |---------------|
- * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #|    |               |  4|  5|  6|  +|
- * |-----------------------------------------------------------|     ,---.     |---------------|
- * |Shif|  \|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
- * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
- * |Ctrl |Opt |Cmd |         Space           |     |Opt |Ctrl  | |Lef|Dow|Rig| |      0|  .|   |
- * `-----------------------------------------------------------' `-----------' `---------------'
- */
-#define KEYMAP_EXT_ISO( \
-    K35,  K7A,K78,K63,K76, K60,K61,K62,K64, K65,K6D,K67,K6F, K69,K6B,K71,              K7F, \
-    K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K72,K73,K74,  K47,K51,K4B,K43, \
-    K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K24, K75,K77,K79,  K59,K5B,K5C,K4E, \
-    K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,K2A,                   K56,K57,K58,K45, \
-    K38,K0A,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,    K7B,     K3E,      K53,K54,K55,     \
-    K36,K3A,K37,        K31,                        K7C,K7D, K3B,K3D,K3C,  K52,    K41,K4C  \
-) { \
-    { 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_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_PENT,  KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO    }, \
-    { KC_F17,   KC_##K41, KC_NO,    KC_##K43, KC_F18,   KC_##K45, KC_NO,    KC_##K47 }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K4B, KC_##K4C, KC_NO,    KC_##K4E, KC_F18   }, \
-    { KC_F19,   KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_F20,   KC_##K5B, KC_##K5C, KC_INT3,  KC_INT1,  KC_PCMM  }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_LANG2, KC_##K67 }, \
-    { KC_LANG1, KC_##K69, KC_F16,   KC_##K6B, KC_NO,    KC_##K6D, KC_APP,   KC_##K6F }, \
-    { KC_NO,    KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_NO,    KC_##K7F }  \
-}
-
-
-
-
-/* M0116 Apple Standard Keyboard ANSI
-*                     +-------+
-*                     | power |
-*                     +-------+
-* +---+---+---+---+---+---+---+---+---+---+---+---+---+-----+ +---+---+---+---+
-* |esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | bks | |clr| = | / | * |
-* +---------------------------------------------------------+ +---+---+---+---+
-* | tab | q | w | e | r | t | y | u | i | o | p | [ | ] |   | | 7 | 8 | 9 | + |
-* +-----------------------------------------------------+   | +---+---+---+---+
-* | ctrl | a | s | d | f | g | h | j | k | l | ; | ' |return| | 4 | 5 | 6 | - |
-* +---------------------------------------------------------+ +---+---+---+---+
-* | shift  | z | x | c | v | b | n | m | , | . | / |  shift | | 1 | 2 | 3 |   |
-* +---------------------------------------------------------+ +-------+---|ent|
-* |cap|opt|comnd| ` |                   | \ |lef|rig|dwn|up | |   0   | . |   |
-* +---------------------------------------------------------+ +-------+---+---+
-*/
-#define KEYMAP_M0116_ANSI( \
-                           K7F,                                              \
-   K35,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33, K47,K51,K4B,K43, \
-   K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,     K59,K5B,K5C,K45, \
-   K36,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,    K24, K56,K57,K58,K4E, \
-   K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,        K7B, K53,K54,K55,     \
-   K39,K3A,K37,K32,        K31,        K2A,K3B,K3C,K3D,K3E, K52,    K41,K4C  \
-) { \
-  { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-  { KC_##K08, KC_##K09, KC_NO,    KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-  { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-  { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-  { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_NO,    KC_##K35, KC_##K36, KC_##K37 }, \
-  { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO    }, \
-  { KC_NO,    KC_##K41, KC_NO,    KC_##K43, KC_NO,    KC_##K45, KC_NO,    KC_##K47 }, \
-  { KC_NO,    KC_NO,    KC_NO,    KC_##K4B, KC_##K4C, KC_NO,    KC_##K4E, KC_NO    }, \
-  { KC_NO,    KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-  { KC_##K58, KC_##K59, KC_NO,    KC_##K5B, KC_##K5C, 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_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_NO    }, \
-  { KC_NO   , KC_NO,    KC_NO   , KC_##K7B, KC_NO,    KC_NO,    KC_NO,    KC_##K7F }  \
-}
-
-#endif
-
-
-/*
-ADB ANSI/ISO Keymapping Note
-============================
-ANSI
-,-----------    ----------.
-| *a|  1|  2     =|Backspa|
-|-----------    ----------|
-|Tab  |  Q|     |  ]|   *c|
-|-----------    ----------|
-|CapsLo|  A|    '|Return  |
-|-----------    ----------|
-|Shift   |      Shift     |
-`-----------    ----------'
-
-ISO
-,-----------    ----------.
-| *a|  1|  2     =|Backspa|
-|-----------    ----------|
-|Tab  |  Q|     |  ]|Retur|
-|-----------    -----`    |
-|CapsLo|  A|    '| *c|    |
-|-----------    ----------|
-|Shif| *b|      Shift     |
-`-----------    ----------'
-
-ADB Keyboard scan code:
-        ADB scan code   USB usage
-        -------------   ---------
-Key     ANSI    ISO     ANSI    ISO
----------------------------------------------
-*a      0x32    0x0A    0x35    0x35
-*b      ----    0x32    ----    0x64
-*c      0x2A    0x2A    0x31    0x31(or 0x32)
-
-
-TMK ADB-USB mapping:
-ADB     USB(ANSI)   USB(ISO)
----------------------------------
-0x32    0x35        0x64
-0x0A    ----        0x35
-0x2A    0x31        0x31(or 0x32)
-
-Note that mappings of ADB code 0x32 are diffrent between ANSI and ISO keyboard.
-https://github.com/tmk/tmk_keyboard/issues/35
- */
diff --git a/converter/adb_usb/keymap_hasu.c b/converter/adb_usb/keymap_hasu.c
deleted file mode 100644 (file)
index a0b3f1f..0000000
+++ /dev/null
@@ -1,58 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* Default Layer: plain keymap
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.             ,---.
-     * |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|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  =|  /|  *|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  Fn0| |Del|End|PgD| |  7|  8|  9|  -|
-     * |-----------------------------------------------------------| `-----------' |---------------|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|  +|
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl |Gui |Alt |         Space             |Alt |Gui |Ctrl | |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP_EXT_ANSI(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,                    NO,
-    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,EQL, PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,FN0,      DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
-    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                               RGUI,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* Default Layer: plain keymap
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.             ,---.
-     * |`  |   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|             |   |
-     * `---'   `---------------' `---------------' `---------------' `-----------'             `---'
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |Esc|F1 |F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Delete | |Ins|Hom|PgU| |NmL|Mb1|Mb2|Mb3|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|PrS|ScL|Pau|Up |Ins|  Fn0| |Del|End|PgD| |MwD|McU|MwU|MwD|
-     * |-----------------------------------------------------------| `-----------' |---------------|
-     * |CapsLo|VoD|VoU|Mut|  F|  G|  H|  J|Hom|PgU|Lef|Rig|Return  |               |McL|McD|McR|MwU|
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|End|PgD|Dow|Shift     |     |PgU|     |MwL|McD|MwR|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Mb3|
-     * |Ctrl |Gui |Alt |         Space             |Alt |Gui |Ctrl | |Hom|PgD|End| |    Mb1|Mb2|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP_EXT_ANSI(
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,                    NO, 
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,      INS, HOME,PGUP,    NLCK,BTN1,BTN2,BTN3,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   PSCR,SLCK,PAUS,UP,  INS, FN0,      DEL, END, PGDN,    WH_D,MS_U,WH_U,WH_D,
-    LCAP,VOLD,VOLU,MUTE,F,   G,   H,   J,   HOME,PGUP,LEFT,RGHT,     ENT,                         MS_L,MS_D,MS_R,WH_U,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   END, PGDN,DOWN,          RSFT,          PGUP,         WH_L,MS_D,WH_R,
-    LCTL,LGUI,LALT,          SPC,                               RGUI,RCTL,     HOME,PGDN,END,     BTN1,     BTN2,BTN3
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_LAYER_TAP_KEY(1, KC_BSLS),
-};
diff --git a/converter/adb_usb/keymap_iso.c b/converter/adb_usb/keymap_iso.c
deleted file mode 100644 (file)
index a1b1a5e..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    KEYMAP_EXT_ISO(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,PAUS,                   NO,
-    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,     INS, HOME,PGUP,    NLCK,PEQL,PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,ENT,      DEL, END, PGDN,    P7,  P8,  P9,  PMNS,
-    LCAP,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,                             P4,  P5,  P6,  PPLS,
-    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LALT,LGUI,          SPC,                               RALT,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-};
diff --git a/converter/adb_usb/led.c b/converter/adb_usb/led.c
deleted file mode 100644 (file)
index 3ee64a8..0000000
+++ /dev/null
@@ -1,27 +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 <util/delay.h>
-#include "adb.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    adb_host_kbd_led(~usb_led);
-}
diff --git a/converter/adb_usb/matrix.c b/converter/adb_usb/matrix.c
deleted file mode 100644 (file)
index 6220ee6..0000000
+++ /dev/null
@@ -1,296 +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 "util.h"
-#include "debug.h"
-#include "adb.h"
-#include "matrix.h"
-#include "report.h"
-#include "host.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
-
-
-static bool is_modified = false;
-static report_mouse_t mouse_report = {};
-
-// matrix state buffer(1:on, 0:off)
-#if (MATRIX_COLS <= 8)
-static uint8_t matrix[MATRIX_ROWS];
-#else
-static uint16_t matrix[MATRIX_ROWS];
-#endif
-
-#ifdef MATRIX_HAS_GHOST
-static bool matrix_has_ghost_in_row(uint8_t row);
-#endif
-static void register_key(uint8_t key);
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-    adb_host_init();
-    // wait for keyboard to boot up and receive command
-    _delay_ms(1000);
-    // Enable keyboard left/right modifier distinction
-    // Addr:Keyboard(0010), Cmd:Listen(10), Register3(11)
-    // upper byte: reserved bits 0000, device address 0010
-    // lower byte: device handler 00000011
-    adb_host_listen(0x2B,0x02,0x03);
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    debug_enable = true;
-    //debug_matrix = true;
-    //debug_keyboard = true;
-    //debug_mouse = true;
-    print("debug enabled.\n");
-    return;
-}
-
-#ifdef ADB_MOUSE_ENABLE
-
-#ifdef MAX
-#undef MAX
-#endif
-#define MAX(X, Y) ((X) > (Y) ? (X) : (Y))
-
-void adb_mouse_task(void)
-{
-    uint16_t codes;
-    int16_t x, y;
-    static int8_t mouseacc; 
-    _delay_ms(12);  // delay for preventing overload of poor ADB keyboard controller
-    codes = adb_host_mouse_recv();
-    // If nothing received reset mouse acceleration, and quit. 
-    if (!codes) {
-        mouseacc = 1;
-        return;
-    };
-    // Bit sixteen is button.
-    if (~codes & (1 << 15))
-        mouse_report.buttons |= MOUSE_BTN1;
-    if (codes & (1 << 15))
-        mouse_report.buttons &= ~MOUSE_BTN1;
-    // lower seven bits are movement, as signed int_7. 
-    // low byte is X-axis, high byte is Y. 
-    y = (codes>>8 & 0x3F);
-    x = (codes>>0 & 0x3F);
-    // bit seven and fifteen is negative
-    // usb does not use int_8, but int_7 (measuring distance) with sign-bit. 
-    if (codes & (1 << 6))
-          x = (x-0x40);
-    if (codes & (1 << 14))
-         y = (y-0x40);
-    // Accelerate mouse. (They weren't meant to be used on screens larger than 320x200).
-    x *= mouseacc;
-    y *= mouseacc;
-    // Cap our two bytes per axis to one byte. 
-    // Easier with a MIN-function, but since -MAX(-a,-b) = MIN(a,b)...
-        // I.E. MIN(MAX(x,-127),127) = -MAX(-MAX(x, -127), -127) = MIN(-MIN(-x,127),127)
-    mouse_report.x = -MAX(-MAX(x, -127), -127);
-    mouse_report.y = -MAX(-MAX(y, -127), -127);
-    if (debug_mouse) {
-            print("adb_host_mouse_recv: "); print_bin16(codes); print("\n");
-            print("adb_mouse raw: [");
-            phex(mouseacc); print(" ");
-            phex(mouse_report.buttons); print("|");
-            print_decs(mouse_report.x); print(" ");
-            print_decs(mouse_report.y); print("]\n");
-    }
-    // Send result by usb. 
-    host_mouse_send(&mouse_report);
-    // increase acceleration of mouse
-    mouseacc += ( mouseacc < ADB_MOUSE_MAXACC ? 1 : 0 );
-    return;
-}
-#endif
-
-uint8_t matrix_scan(void)
-{
-    /* extra_key is volatile and more convoluted than necessary because gcc refused
-    to generate valid code otherwise. Making extra_key uint8_t and constructing codes
-    here via codes = extra_key<<8 | 0xFF; would consistently fail to even LOAD
-    extra_key from memory, and leave garbage in the high byte of codes. I tried
-    dozens of code variations and it kept generating broken assembly output. So
-    beware if attempting to make extra_key code more logical and efficient. */
-    static volatile uint16_t extra_key = 0xFFFF;
-    uint16_t codes;
-    uint8_t key0, key1;
-
-    is_modified = false;
-
-    codes = extra_key;
-    extra_key = 0xFFFF;
-
-    if ( codes == 0xFFFF )
-    {
-        _delay_ms(12);  // delay for preventing overload of poor ADB keyboard controller
-        codes = adb_host_kbd_recv();
-    }
-    key0 = codes>>8;
-    key1 = codes&0xFF;
-
-    if (debug_matrix && codes) {
-        print("adb_host_kbd_recv: "); phex16(codes); print("\n");
-    }
-
-    if (codes == 0) {                           // no keys
-        return 0;
-    } else if (codes == 0x7F7F) {   // power key press
-        register_key(0x7F);
-    } else if (codes == 0xFFFF) {   // power key release
-        register_key(0xFF);
-    } else if (key0 == 0xFF) {      // error
-        xprintf("adb_host_kbd_recv: ERROR(%d)\n", codes);
-        return key1;
-    } else {
-        register_key(key0);
-        if (key1 != 0xFF)       // key1 is 0xFF when no second key.
-            extra_key = key1<<8 | 0xFF; // process in a separate call
-    }
-
-    return 1;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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)
-{
-    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)
-{
-    if (!debug_matrix) return;
-#if (MATRIX_COLS <= 8)
-    print("r/c 01234567\n");
-#else
-    print("r/c 0123456789ABCDEF\n");
-#endif
-    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 void register_key(uint8_t key)
-{
-    uint8_t col, row;
-    col = key&0x07;
-    row = (key>>3)&0x0F;
-    if (key&0x80) {
-        matrix[row] &= ~(1<<col);
-    } else {
-        matrix[row] |=  (1<<col);
-    }
-    is_modified = true;
-}
diff --git a/converter/ascii_usb/Makefile b/converter/ascii_usb/Makefile
deleted file mode 100644 (file)
index 6d977af..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-# Target file name (without extension).
-TARGET = ascii_usb
-
-# 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 \
-       protocol/serial_uart.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
-
-
-#
-# 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
-
-
-# Build Options
-#   *Comment out* to disable the options.
-#
-#MOUSEKEY_ENABLE = yes # Mouse keys
-#EXTRAKEY_ENABLE = yes # Audio control and System control
-CONSOLE_ENABLE = yes   # Console for debug
-#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)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/ascii_usb/README b/converter/ascii_usb/README
deleted file mode 100644 (file)
index 02fa064..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-ASCII to USB keyboard protocol converter
-========================================
-This converts serial console terminal into USB keyboard, tested with TRS-80 model 100 TELCOM application.
-Target MCU is ATMega32u4 but other USB capable AVR will also work.
-
-
-Hardware
---------
-Connect RX, TX and GND to UART pin of AVR. Note that you may need line driver/level shifter like MAX232 to interface high voltage of RS-232C.
-
-
-
-Build Firmware
---------------
-Configure UART setting and Just use 'make'
-
-    $ cd ascii_usb
-    $ make
-
-Then, load the binary to MCU with your favorite programmer.
-
-
-
-Limitation
-----------
-- This cannot see key up event, you cannot hold a key.
-- Alt, Gui(Win/Mac) modifier key are not available.
-
-
-
-TRS-80 model 100
-----------------
-Use TELCOM program with setting: 19200bps/8bit/odd parity/1stop bit
-To set this configuration push Stat(F3) and input '9801D,10'. Then push Term(F4) to connect.
-
-
-
-
diff --git a/converter/ascii_usb/config.h b/converter/ascii_usb/config.h
deleted file mode 100644 (file)
index 0908997..0000000
+++ /dev/null
@@ -1,70 +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
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x5C01
-#define DEVICE_VER      0x0100
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         ASCII keyboard converter
-#define DESCRIPTION     converts Serial Console Terminal into USB keyboard
-
-
-/* matrix size */
-#define MATRIX_ROWS     16
-#define MATRIX_COLS     16
-
-/* key combination for command */
-#define IS_COMMAND()    ( \
-    host_get_first_key() == KC_BRK \
-)
-
-
-/*
- * Serial(USART) configuration
- *     asynchronous, positive logic, 19200baud, bit order: LSB first
- *     1-start bit, 8-data bit, odd parity, 1-stop bit
- */
-#ifdef __AVR_ATmega32U4__
-    #define SERIAL_UART_BAUD       19200
-    #define SERIAL_UART_DATA       UDR1
-    #define SERIAL_UART_UBRR       ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
-    #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 = (uint8_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 |= (1<<UPM11) | (1<<UPM10);  /* parity: none(00), even(01), odd(11) */ \
-        sei(); \
-    } while(0)
-#else
-    #error "USART configuration is needed."
-#endif
-
-/* 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/converter/ascii_usb/keymap.c b/converter/ascii_usb/keymap.c
deleted file mode 100644 (file)
index a0c61ce..0000000
+++ /dev/null
@@ -1,42 +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/pgmspace.h>
-#include "keycode.h"
-#include "action.h"
-#include "action_macro.h"
-#include "action_util.h"
-#include "util.h"
-#include "print.h"
-#include "keymap.h"
-
-
-// Keymap is not used. See matrix.c.
-
-/* translates key to keycode */
-uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
-{
-    return KC_NO;
-}
-
-/* translates Fn keycode to action */
-action_t keymap_fn_to_action(uint8_t keycode)
-{
-    return (action_t) { .code = ACTION_NO };
-}
diff --git a/converter/ascii_usb/led.c b/converter/ascii_usb/led.c
deleted file mode 100644 (file)
index d1c39bc..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 "stdint.h"
-#include "serial.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-}
diff --git a/converter/ascii_usb/matrix.c b/converter/ascii_usb/matrix.c
deleted file mode 100644 (file)
index e1ea8e0..0000000
+++ /dev/null
@@ -1,195 +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/>.
-*/
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "print.h"
-#include "util.h"
-#include "matrix.h"
-#include "debug.h"
-#include "action_util.h"
-#include "protocol/serial.h"
-
-
-/*
- * Not use Matrix.
- *
- * ROW: 16(4bits)
- * COL: 16(4bits)
- *
- *    8bit wide
- *   +---------+
- *  0|00 ... 0F|
- *  1|08 ... 1F|
- *  :|   ...   |
- *  :|   ...   |
- *  E|E0 ... EF|
- *  F|F0 ... FF|
- *   +---------+
- */
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-    debug_matrix = true;
-    serial_init();
-
-    debug("init\n");
-    return;
-}
-
-static void type_key(uint16_t keycode)
-{
-    if (keycode == 0) return;
-
-    uint8_t mods = keycode>>8;
-    uint8_t key = keycode&0xFF;
-    if (mods) {
-        add_mods(mods);
-        send_keyboard_report();
-    }
-
-    add_key(key);
-    send_keyboard_report();
-
-    del_key(key);
-    send_keyboard_report();
-
-    if (mods) {
-        del_mods(mods);
-        send_keyboard_report();
-    }
-}
-static uint16_t code2key(uint8_t code)
-{
-    // ASCII to key combination in US laout
-    switch (code) {
-        case 0x01 ... 0x08:                                 // Ctrl-[a-z]
-            return MOD_BIT(KC_LCTRL)<<8 | (KC_A + (code-0x01));
-        case 0x09: return KC_TAB;                           // TAB(Ctrl-i)
-        case 0x0A ... 0x0C:                                 // Ctrl-[a-z]
-            return MOD_BIT(KC_LCTRL)<<8 | (KC_A + (code-0x01));
-        case 0x0D: return KC_ENTER;                         // Enter(Ctrl-m)
-        case 0x0E ... 0x1A:                                 // Ctrl-[a-z]
-            return MOD_BIT(KC_LCTRL)<<8 | (KC_A + (code-0x01));
-        case 0x1B: return KC_ESC;
-        case 0x1C: return KC_RIGHT;
-        case 0x1D: return KC_LEFT;
-        case 0x1E: return KC_UP;
-        case 0x1F: return KC_DOWN;
-        case 0x20: return KC_SPACE;
-        case 0x21: return MOD_BIT(KC_LSHIFT)<<8 | KC_1;     // !
-        case 0x22: return MOD_BIT(KC_LSHIFT)<<8 | KC_QUOTE; // "
-        case 0x23: return MOD_BIT(KC_LSHIFT)<<8 | KC_3;     // #
-        case 0x24: return MOD_BIT(KC_LSHIFT)<<8 | KC_4;     // $
-        case 0x25: return MOD_BIT(KC_LSHIFT)<<8 | KC_5;     // %
-        case 0x26: return MOD_BIT(KC_LSHIFT)<<8 | KC_7;     // &
-        case 0x27: return KC_QUOTE;                         // '
-        case 0x28: return MOD_BIT(KC_LSHIFT)<<8 | KC_9;     // (
-        case 0x29: return MOD_BIT(KC_LSHIFT)<<8 | KC_0;     // )
-        case 0x2A: return MOD_BIT(KC_LSHIFT)<<8 | KC_8;     // *
-        case 0x2B: return MOD_BIT(KC_LSHIFT)<<8 | KC_EQUAL; // +
-        case 0x2C: return KC_COMMA;                         // ,
-        case 0x2D: return KC_MINUS;                         // -
-        case 0x2E: return KC_DOT;                           // .
-        case 0x2F: return KC_SLASH;                         // /
-        case 0x30: return KC_0;
-        case 0x31 ... 0x39: // 1-9
-            return KC_1 + (code-0x31);
-        case 0x3A: return MOD_BIT(KC_LSHIFT)<<8 | KC_SCLN;  // :
-        case 0x3B: return KC_SCLN;                          // ;
-        case 0x3C: return MOD_BIT(KC_LSHIFT)<<8 | KC_COMMA; // <
-        case 0x3D: return KC_EQUAL;                         // =
-        case 0x3E: return MOD_BIT(KC_LSHIFT)<<8 | KC_DOT;   // >
-        case 0x3F: return MOD_BIT(KC_LSHIFT)<<8 | KC_SLASH; // ?
-        case 0x40: return MOD_BIT(KC_LSHIFT)<<8 | KC_2;     // @
-        case 0x41 ... 0x5A: // A-Z
-            return MOD_BIT(KC_LSHIFT)<<8 | (KC_A + (code-0x41));
-        case 0x5B: return KC_LBRACKET;                      // [
-        case 0x5C: return KC_BSLASH;                        //
-        case 0x5D: return KC_RBRACKET;                      // ]
-        case 0x5E: return MOD_BIT(KC_LSHIFT)<<8 | KC_6;     // ^
-        case 0x5F: return MOD_BIT(KC_LSHIFT)<<8 | KC_MINUS; // _
-        case 0x61 ... 0x7A: // a-z
-            return KC_A + (code-0x61);
-        case 0x7B: return MOD_BIT(KC_LSHIFT)<<8 | KC_LBRACKET; // {
-        case 0x7C: return MOD_BIT(KC_LSHIFT)<<8 | KC_BSLASH;   // |
-        case 0x7D: return MOD_BIT(KC_LSHIFT)<<8 | KC_RBRACKET; // }
-        case 0x7E: return MOD_BIT(KC_LSHIFT)<<8 | KC_GRAVE; // }
-        case 0x7F: return KC_DELETE;                        //
-    }
-    return 0;
-}
-
-uint8_t matrix_scan(void)
-{
-    uint16_t code = serial_recv2();
-    if (code == -1) {
-        return 0;
-    }
-
-    print_hex8(code); print(" ");
-
-    // echo back
-    serial_send(code);
-    type_key(code2key(code));
-    
-
-    return code;
-}
-
-inline
-bool matrix_has_ghost(void)
-{
-    return false;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
-    return false;
-}
-
-inline
-matrix_row_t matrix_get_row(uint8_t row)
-{
-    return 0;
-}
-
-void matrix_print(void)
-{
-    print("\nr/c 0123456789ABCDEF\n");
-    for (uint8_t row = 0; row < matrix_rows(); row++) {
-        phex(row); print(": ");
-        pbin_reverse(matrix_get_row(row));
-        print("\n");
-    }
-}
diff --git a/converter/ibm4704_usb/Makefile b/converter/ibm4704_usb/Makefile
deleted file mode 100644 (file)
index b5c97d2..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-# Target file name (without extension).
-TARGET = ibm4704_usb
-
-# 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 \
-       led.c \
-       protocol/ibm4704.c
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_plain.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
-
-
-# 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
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/ibm4704_usb/README.md b/converter/ibm4704_usb/README.md
deleted file mode 100644 (file)
index 68db4bd..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-IBM 4704 to USB keyboard converter
-==================================
-This firmware converts IBM 4704 keyboard protocol to USB HID.
-
-Keyboard initialization process takes a few seconds at start up. During that you will hear buzzer from the keyboard. **You need to plug USB cable after hooking up your keyboard to the converter.**
-
-
-Update
-------
-2015/09/07  Added keymap for Alps 102-key. Thanks, tai @ geekhack!
-2015/05/05  Added keymaps for 107-key, 77-key and 50-key. Thanks, orihalcon @ geekhack!
-2015/05/19  Fixed a protocol handling bug.
-
-
-
-Supported Keyboard
-------------------
-### IBM capacitive switch models:
-- 6019273 Model 100 50-key (grid layout)      http://kishy.ca/?p=894
-- 6019284 Model 200 62-key Alpha(60% layout)  http://kishy.ca/?p=894
-- 6019303 Model 300 77-key Expanded Alpha     http://deskthority.net/photos-f62/ibm-6019303-t8502.html
-- 6020218 Model 400 107-key Full key          http://kishy.ca/?p=894
-
-### Alps switch(vintage Green) models:
-
-- 5954339 Japanese 102-key    http://deskthority.net/post87127.html#p87127
-- 6112883 Japanese 102-key    http://geekhack.org/index.php?topic=52888.msg1194489#msg1194489
-- 6112884 Japanese 102-key    http://geekhack.org/index.php?topic=50437.msg1193047#msg1193047
-- 6341739 Chinese 102-key     http://geekhack.org/index.php?topic=52888.msg1176566#msg1176566
-
-
-Connector
----------
-Keyboard Plug from front:
-
-    DSUB-9
-    -------------
-    \ N 2 3 4 5 /
-     \ N N N N /
-      ---------
-    2   GND
-    3   VCC 5V
-    4   DATA
-    5   CLOCK
-    N   No connection/No pin.
-
-
-Connection
-----------
-In case of using ATMega32U4(Teensy2.0):
-
-1. Supply power with VCC and GND.
-2. Connect CLOCK to PD1 and DATA to PD0. You can change pin with config.h.
-3. Optionally you may need pull-up register. 1KOhm probably work.
-
-
-Build Firmware
---------------
-Just run `make`:
-
-    $ make
-
-To select keymap:
-
-    $ make KEYMAP=[plain|...]
-
-
-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.
-
-Use `KEYMAP_ALPS102()` to define your keymap for Alps models.
diff --git a/converter/ibm4704_usb/config.h b/converter/ibm4704_usb/config.h
deleted file mode 100644 (file)
index 2fee10f..0000000
+++ /dev/null
@@ -1,61 +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
-
-#include <avr/interrupt.h>
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x4707
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         IBM 4704 keyboard converter
-#define DESCRIPTION     convert IBM 4704 keyboard to USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 16  // keycode bit3-6 
-#define MATRIX_COLS 8   // keycode bit0-2
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-
-/* Pin configuration */
-#define IBM4704_CLOCK_PORT  PORTD
-#define IBM4704_CLOCK_PIN   PIND
-#define IBM4704_CLOCK_DDR   DDRD
-#define IBM4704_CLOCK_BIT   1
-#define IBM4704_DATA_PORT   PORTD
-#define IBM4704_DATA_PIN    PIND
-#define IBM4704_DATA_DDR    DDRD
-#define IBM4704_DATA_BIT    0
-
-/* Pin interrupt on rising edge of clock */
-#define IBM4704_INT_INIT()  do { EICRA |= ((1<<ISC11)|(1<<ISC10)); } while (0)
-#define IBM4704_INT_ON()    do { EIFR |= (1<<INTF1); EIMSK |= (1<<INT1); } while (0)
-#define IBM4704_INT_OFF()   do { EIMSK &= ~(1<<INT1); } while (0)
-#define IBM4704_INT_VECT    INT1_vect
-
-
-#endif
diff --git a/converter/ibm4704_usb/ibm4704.txt b/converter/ibm4704_usb/ibm4704.txt
deleted file mode 100644 (file)
index e2d42f0..0000000
+++ /dev/null
@@ -1,182 +0,0 @@
-IBM 4704 Keyboard
-=================
-IBM capacitive switch models:
-    6019273 Model 100 50-key (grid layout)      http://kishy.ca/?p=894
-    6019284 Model 200 62-key Alpha(60% layout)  http://kishy.ca/?p=894
-    6019303 Model 300 77-key Expanded Alpha     http://deskthority.net/photos-f62/ibm-6019303-t8502.html
-    6020218 Model 400 107-key Full key          http://kishy.ca/?p=894
-
-Alps switch(vintage Green) models:
-    5954339 Japanese 102-key    http://deskthority.net/post87127.html#p87127
-    6112883 Japanese 102-key    http://geekhack.org/index.php?topic=52888.msg1194489#msg1194489
-    6112884 Japanese 102-key    http://geekhack.org/index.php?topic=50437.msg1193047#msg1193047
-    6341739 Chinese 102-key     http://geekhack.org/index.php?topic=52888.msg1176566#msg1176566
-
-Resourse
---------
-The IBM 4704: lots of pictures and info
-http://kishy.dyndns.org/?p=648#more-648 
-
-Brochure:
-http://ed-thelen.org/comp-hist/IBM-ProdAnn/4700.pdf
-
-
-
-IBM 4704 Keyboard Protocol
-==========================
-On powering up keyboard sends keyboard ID; A3h for 6019284(62-key), for example.
-After that the keyboard enters FC command mode and waits for parameter data from host
-so that it doesn't send any scancode until you send 'FF'(End of FC command mode).
-
-    Keyboard                    ID
-    -------------------------------
-    Model 100 50-key            A2h
-    Model 200 62-key            A3h
-    Model 300 77-key            A4h
-    Model 400 107-key           A5h
-    Japanese/Chinese 102-key    A6h
-
-
-Connector
----------
-    Keyboard Plug from front
-
-    DSUB-9
-    -------------
-    \ N 2 3 4 5 /
-     \ N N N N /
-      ---------
-    2   GND
-    3   VCC 5V
-    4   DATA
-    5   CLOCK
-    N   No connection/No pin.
-
-
-Keyboard to Host
-----------------
-Data bits are LSB first and Pairty is odd. Clock has around 60us high and 30us low part.
-
-            ____       __   __   __   __   __   __   __   __   __   _______
-    Clock       \_____/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/
-                 ____ ____ ____ ____ ____ ____ ____ ____ ____ ____    
-    Data    ____/    X____X____X____X____X____X____X____X____X____X________
-                Start   0    1    2    3    4    5    6    7    P  Stop
-
-Start bit:  can be long as 300-350us.
-Inhibit:    Pull Data line down to inhibit keyboard to send.
-Timing:     Host reads bit while Clock is hi.(rising edge)
-Stop bit:   Keyboard pulls down Data line to lo after 9th clock.
-
-
-Host to Keyboard
-----------------
-Data bits are LSB first and Pairty is odd. Clock has around 60us high and 30us low part.
-
-            ____        __   __   __   __   __   __   __   __   __   ________
-    Clock       \______/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/  \_/
-                ^   ____ ____ ____ ____ ____ ____ ____ ____ ____ ____ ___
-    Data    ____|__/    X____X____X____X____X____X____X____X____X____X   \___
-                |  Start   0    1    2    3    4    5    6    7    P   Stop
-                Request by host
-
-Start bit:  can be long as 300-350us.
-Request:    Host pulls Clock line down to request to send a command.
-Timing:     After Request keyboard pull up Data and down Clock line to low for start bit.
-            After request host release Clock line once Data line becomes hi.
-            Host wirtes a bit while Clock is hi and Keyboard reads while low.
-Stop bit:   Host releases or pulls up Data line to hi after 9th clock and waits for keybaord pull down the line to lo.
-
-
-Scancodes
----------
-Keyboard doesn't send Break code for all keys except for Alt by default.
-
-    6019284 62-key:
-    ,-----------------------------------------------------------.
-    |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|???|BS |
-    |-----------------------------------------------------------|
-    |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P| ¢|  \|  PD2|
-    |-----------------------------------------------------------|
-    |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '| {}| PD3|
-    |-----------------------------------------------------------|
-    |Shif| <>|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|???|Shift |
-    |-----------------------------------------------------------|
-    |Reset|blk|Alt  |         Space             |Alt  |blk|Enter|
-    `-----------------------------------------------------------'
-    +----------+---------------------+----------+----------+
-    |`       00|PD1     04|Caps    20|LShift  30|Reset   31|
-    |1       18|q       05|a       21|<>      3E|Rblank  41|
-    |2       19|w       06|s       22|z       32|Alt     3F|
-    |3       1A|e       13|d       23|x       33|Space   40|
-    |4       10|r       14|f       24|c       34|Alt     3F|
-    |5       11|t       15|g       25|v       35|Lblank  42|
-    |6       12|y       16|h       26|b       36|Enter   2F|
-    |7       08|u       17|j       27|n       37|          |
-    |8       09|i       01|k       28|m       38|          |
-    |9       0A|o       02|l       29|,       39|          |
-    |0       0F|p       03|;       2A|.       3A|          |
-    |-       1F|¢      1B|'       2B|/       3B|          |
-    |=       0D|\       1C|{}      2C|???     3C|          |
-    |???     0C|PD2     1D|PD3     2D|RShift  3D|          |
-    |BS      0E|          |          |          |          |
-    +----------+---------------------+----------+----------+
-    Bit7 is 'press flag' which set 1 on press and 0 on release when break code is enabled.
-
-NOTE: When break code is enabled the key sends scancode with setting 7th bit on press
-and without it on release. That is, '`' sends 80h on press and 00h on release.
-
-
-Keyboard command
-----------------
-Keyboard accepts these commands from host.
-
-        Description                             Entry point
-    -----------------------------------------------------------
-    FF  Soft Reset                              0008h
-    FE  Resend                                  00e8h
-    FD  Buzzer(emits a short beep)              00edh
-    FC  Set Key Flag                            00f6h
-    FB  Soft Reset                              0008h
-    FA  Reset                                   0000h
-    
-
-Keyboard response
------------------
-Keyobard sends these bytes to host.
-
-        Description                             Entry point
-    -----------------------------------------------------------
-    FE  Overflow(key event/receive data)        00c5h, 0346h
-        Memory test error                       0224h
-    FD  Command out of bound                    00d8h
-        Key out of bound
-    7E  Read/Parity error in receive from host  00bch
-
-
-Set Key Flag command(FC)
-------------------------
-After 'Power on Reset' firmware enters this command mode and waits for data from host,
-so that you don't need to send 'FC' and it doesn't send any scancode until you send 'FF'.
-
-Data sent from host:
-
-    bit: 7   6 ... 0
-         en  |     |
-         |   `-----`--- scan code
-         `------------- enable bit(0: enable repeat, 1: enable break)
-
-    00-79   Enable repeat
-    80-F9   Enable break(FA-FF are used as other commands, see above.)
-    FE      Resend(011ah) no need to use
-    FF      End(0114h) exits FC command mode.
-
-Response from keyboard:
-    FD      Out of bound - Invalid scancode
-    --      OK - No response means that command is accepted.
-
-Examples:
-    To enable break code of all keys.
-
-    FC 80 81 ... F7 FF
-
diff --git a/converter/ibm4704_usb/keymap_50key.c b/converter/ibm4704_usb/keymap_50key.c
deleted file mode 100644 (file)
index 97294fb..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    KEYMAP_50(
-    F1,  F2,  F3,   F4,  F5,  F6,   F7,  F8,  F9,  F10,  \
-    1,   2,   3,    4,   5,   6,    7,   8,   9,   0,    \
-    Q,   W,   E,    R,   T,   Y,    U,   I,   O,   P,    \
-    A,   S,   D,    F,   G,   H,    J,   K,   L,   SCLN, \
-    Z,   X,   C,    V,   B,   N,    M,   COMM,DOT, SLSH  \
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-};
-
-
diff --git a/converter/ibm4704_usb/keymap_alps102key.c b/converter/ibm4704_usb/keymap_alps102key.c
deleted file mode 100644 (file)
index f3dda71..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* Layer 0:
-     * ,---------------------------------------------------------------.  ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|BS |BS |F21|  |PSC|SLK|PAU| |F1 |F2 |F3 |F4 |
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \|F22|  |Ins|Hom|PgU| |F5 |F6 |F7 |F8 |
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Ret|Ret |F23|  |Del|End|PgD| |F9 |F10|F11|F12|
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shf|Shift |F24|  |   |Up |   | |F13|F14|F15|F16|
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Fn0  |Gui|Alt  |         Space             |Alt* |Gui|Fn0      |  |Lef|Dow|Rig| |F17|F18|F19|F20|
-     * `---------------------------------------------------------------'  `-----------' `---------------'
-     */
-    KEYMAP_ALPS102(
-    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,BSPC,F21,      PSCR,SLCK,PAUS,     F1,  F2,  F3,  F4,  \
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     F22,      INS, HOME,PGUP,     F5,  F6,  F7,  F8,  \
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,GRV, ENT,      F23,      DEL, END, PGDN,     F9,  F10, F11, F12, \
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,RSFT,          F24,      NO,  UP,  NO,       F13, F14, F15, F16, \
-    FN0, LGUI,LALT,          SPC,                     RALT,RGUI,               FN0,      LEFT,DOWN,RGHT,     F17, F18, F19, F20  \
-    ),
-
-    /* Layer 1:
-     * ,---------------------------------------------------------------.  ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|BS |BS |F21|  |VoD|VoU|Mut| |F1 |F2 |F3 |F4 |
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \|F22|  |Ins|Hom|PgU| |F5 |F6 |F7 |F8 |
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Ret|Ret |F23|  |Del|End|PgD| |F9 |F10|F11|F12|
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shf|Shift |F24|  |   |PgU|   | |F13|F14|F15|F16|
-     * |---------------------------------------------------------------|  |-----------| |---------------|
-     * |Fn0  |Gui|Alt  |         Space             |Alt* |Gui|Fn0      |  |Hom|PgD|End| |F17|F18|F19|F20|
-     * `---------------------------------------------------------------'  `-----------' `---------------'
-     */
-    KEYMAP_ALPS102(
-    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     VOLD,VOLU,MUTE,     TRNS,TRNS,TRNS,TRNS, \
-    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,     TRNS,TRNS,TRNS,     TRNS,TRNS,TRNS,TRNS, \
-    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,     TRNS,TRNS,TRNS,     TRNS,TRNS,TRNS,TRNS, \
-    TRNS,TRNS,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,     HOME,PGDN,END,      TRNS,TRNS,TRNS,TRNS  \
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_LAYER_MOMENTARY(1),
-};
diff --git a/converter/ibm4704_usb/keymap_common.c b/converter/ibm4704_usb/keymap_common.c
deleted file mode 100644 (file)
index 55a1379..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2011,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/converter/ibm4704_usb/keymap_common.h b/converter/ibm4704_usb/keymap_common.h
deleted file mode 100644 (file)
index 9cb23b0..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*
-Copyright 2011,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 "print.h"
-#include "debug.h"
-#include "keymap.h"
-
-
-// 32*8(256) byte array which converts PS/2 code into USB code
-extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-extern const uint16_t fn_actions[];
-
-
-/* 107-key */
-#define KEYMAP( \
-    K46,K64,     K00,K18,K19,K1A,K10,K11,K12,K08,K09,K0A,K0F,K1F,K0D,K0C,K0E,   K6A,K6B,K6C,    K47,K48,K49,K4A, \
-    K56,K66,     K04,K05,K06,K13,K14,K15,K16,K17,K01,K02,K03,K1B,K1C,K1D,       K6D,K6E,K6F,    K4B,K4C,K4D,K4E, \
-    K71,K77,     K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K2A,K2B,K2C,K2D,       K70,K65,K72,    K50,K51,K52,K53, \
-    K44,K45,     K30,K3E,K32,K33,K34,K35,K36,K37,K38,K39,K3A,K3B,K3C,K3D,       K74,K75,K76,    K5E,K58,K59,K5A, \
-    K54,K55,     K31,K41,K3F,        K40,                        K42,K2F,       K78,K67,K79,    K5B,K5C,K5D,K57  \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_NO    }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_NO,    KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_NO,    KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_NO,    KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_NO    }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_NO,    KC_NO,    KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_NO,    KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }  \
-}
-
-/* 77-key */
-#define KEYMAP_77( \
-    K00,K18,K19,K1A,K10,K11,K12,K08,K09,K0A,K0F,K1F,K0D,K0C,K0E,   K6A,K6B,K6C, \
-    K04,K05,K06,K13,K14,K15,K16,K17,K01,K02,K03,K1B,K1C,K1D,       K6D,K6E,K6F, \
-    K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K2A,K2B,K2C,K2D,       K70,K65,K72, \
-    K30,K3E,K32,K33,K34,K35,K36,K37,K38,K39,K3A,K3B,K3C,K3D,       K74,K75,K76, \
-    K31,K41,K3F,        K40,                        K42,K2F,       K78,K67,K79  \
-) KEYMAP( \
-    F1,  F2,    K00,K18,K19,K1A,K10,K11,K12,K08,K09,K0A,K0F,K1F,K0D,K0C,K0E,    K6A,K6B,K6C,    NLCK,PSLS,PAST,PMNS, \
-    F3,  F4,    K04,K05,K06,K13,K14,K15,K16,K17,K01,K02,K03,K1B,K1C,K1D,        K6D,K6E,K6F,    P7,  P8,  P9,  PPLS, \
-    F5,  F6,    K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K2A,K2B,K2C,K2D,        K70,K65,K72,    P4,  P5,  P6,  PPLS, \
-    F7,  F8,    K30,K3E,K32,K33,K34,K35,K36,K37,K38,K39,K3A,K3B,K3C,K3D,        K74,K75,K76,    P1,  P2,  P3,  PENT, \
-    F9,  F10,   K31,K41,K3F,        K40,                        K42,K2F,        K78,K67,K79     P0,  P0,  PDOT,PENT  \
-)
-
-/* 62-key */
-#define KEYMAP_62( \
-    K00,K18,K19,K1A,K10,K11,K12,K08,K09,K0A,K0F,K1F,K0D,K0C,K0E, \
-    K04,K05,K06,K13,K14,K15,K16,K17,K01,K02,K03,K1B,K1C,K1D, \
-    K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K2A,K2B,K2C,K2D, \
-    K30,K3E,K32,K33,K34,K35,K36,K37,K38,K39,K3A,K3B,K3C,K3D, \
-    K31,K41,K3F,        K40,                        K42,K2F  \
-) KEYMAP( \
-    F1,  F2,    K00,K18,K19,K1A,K10,K11,K12,K08,K09,K0A,K0F,K1F,K0D,K0C,K0E,   INS, HOME,PGUP,     NLCK,PSLS,PAST,PMNS, \
-    F3,  F4,    K04,K05,K06,K13,K14,K15,K16,K17,K01,K02,K03,K1B,K1C,K1D,       DEL, END, PGDN,     P7,  P8,  P9,  PPLS, \
-    F5,  F6,    K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K2A,K2B,K2C,K2D,       PSCR,SLCK,PAUS,     P4,  P5,  P6,  PPLS, \
-    F7,  F8,    K30,K3E,K32,K33,K34,K35,K36,K37,K38,K39,K3A,K3B,K3C,K3D,       F11, UP,  F12,      P1,  P2,  P3,  PENT, \
-    F9,  F10,   K31,K41,K3F,        K40,                        K42,K2F,       LEFT,DOWN,RGHT,     P0,  P0,  PDOT,PENT  \
-)
-
-/* 50-key */
-#define KEYMAP_50( \
-    K00,K01,K02,    K03,K04,K05,    K20,K21,K22,K23, \
-    K08,K09,K0A,    K0B,K0C,K0D,    K28,K29,K2A,K35, \
-    K10,K11,K12,    K13,K14,K15,    K30,K31,K32,K36, \
-    K18,K19,K1A,    K1B,K1C,K1D,    K38,K39,K3A,K37, \
-    K16,K1E,K0E,    K0F,K1F,K17,    K33,K3B,K2B,K3F  \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_NO,    KC_NO,   }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_NO,    KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_NO,    KC_NO,    KC_NO,    KC_##K3F }, \
-    { 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_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_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_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_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,   }  \
-}
-
-/* Alps 102-key */
-#define KEYMAP_ALPS102( \
-    K00, K0F, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E,   K44, K45, K46,   K43, K41, K42, K4A, \
-    K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D,      K1E,   K54, K55, K56,   K50, K51, K52, K5A, \
-    K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D,      K2E,   K64, K65, K66,   K60, K61, K62, K6B, \
-    K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D,           K3E,   K74, K75, K76,   K70, K71, K72, K7B, \
-    K31, K47, K3F,                 K40,               K4F, K48,                K2F,   K77, K67, K57,   K73, K63, K53, K4E  \
-) { \
-    { 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_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_NO,   }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_NO,    KC_##K4A, KC_NO,    KC_NO,    KC_NO,    KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_NO,    KC_NO,    KC_##K5A, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K6B, KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K7B, KC_NO,    KC_NO,    KC_NO,    KC_NO,   }  \
-}
-
-
-#endif
diff --git a/converter/ibm4704_usb/keymap_hasu.c b/converter/ibm4704_usb/keymap_hasu.c
deleted file mode 100644 (file)
index 14c1711..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,-----------------------------------------------------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|???|BS |
-     * |-----------------------------------------------------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \|
-     * |-----------------------------------------------------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|xxx|Ret |
-     * |-----------------------------------------------------------|
-     * |Shif|xxx|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|xxx|Shift |
-     * |-----------------------------------------------------------|
-     * |Ctrl |Gui|Alt  |         Space             |Alt  |Gui|Ctrl |
-     * `-----------------------------------------------------------'
-     */
-    KEYMAP_62(
-    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,   FN1, QUOT,NO,  ENT, \
-    LSFT,NO,  Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, FN2, NO,  FN0, \
-    LCTL,LGUI,LALT,          FN3,                               RGUI,RCTL \
-    ),
-
-    KEYMAP_62(
-    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,PAUS, UP, NO,  BSPC, \
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  PAST,PSLS,HOME,PGUP,LEFT,RGHT,NO,  ENT, \
-    LSFT,NO,  NO,  NO,  NO,  NO,  NO,  PPLS,PMNS,END, PGDN,DOWN,NO,  TRNS, \
-    LCTL,LGUI,LALT,          SPC,                               RGUI,RCTL \
-    ),
-
-    KEYMAP_62(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
-    TAB, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,WH_U,WH_R,WSTP,WBAK,WFWD,BSPC, \
-    LCTL,NO,  ACL0,ACL1,ACL2,NO,  MS_L,MS_D,MS_U,MS_R,TRNS,NO,  NO,  ENT, \
-    LSFT,NO,  NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,BTN4,BTN5,NO,  NO,  RSFT,\
-    LCTL,LGUI,LALT,          BTN1,                              RGUI,RCTL \
-    ),
-
-    KEYMAP_62(
-    ESC, 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,  NO,  ENT, \
-    LSFT,NO,  NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, TRNS,NO,  RSFT, \
-    LCTL,LGUI,LALT,          SPC,                               RGUI,RCTL \
-    ),
-
-    KEYMAP_62(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
-    TAB, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,MS_U,WH_U,WH_R,BTN4,BTN5,FN4, \
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  BTN2,MS_L,MS_D,MS_R,BTN1,NO,  NO,  ENT, \
-    LSFT,NO,  NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,BTN4,BTN5,NO,  NO,  NO, \
-    LCTL,LGUI,LALT,          TRNS,                              RGUI,RCTL \
-    ),
-};
-
-enum macro_id {
-    ALT_TAB,
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_LAYER_MOMENTARY(1),
-    [1] = ACTION_LAYER_TAP_KEY(2, KC_SCLN),
-    [2] = ACTION_LAYER_TAP_KEY(3, KC_SLASH),
-    [3] = ACTION_LAYER_TAP_KEY(4, KC_SPC),
-    [4] = ACTION_MACRO(ALT_TAB),
-};
-
-/*
- * Macro definition
- */
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-    keyevent_t event = record->event;
-
-    switch (id) {
-        case ALT_TAB:
-            return (event.pressed ?
-                    MACRO( D(LALT), D(TAB), END ) :
-                    MACRO( U(TAB), END ));
-    }
-    return MACRO_NONE;
-}
diff --git a/converter/ibm4704_usb/keymap_plain.c b/converter/ibm4704_usb/keymap_plain.c
deleted file mode 100644 (file)
index 4aed684..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,-----------------------------------------------------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|???|BS |
-     * |-----------------------------------------------------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \|
-     * |-----------------------------------------------------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Ret|Ret |
-     * |-----------------------------------------------------------|
-     * |Shif|Shf|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|???|Shift |
-     * |-----------------------------------------------------------|
-     * |Ctrl |Gui|Alt  |         Space             |Alt* |Gui|Fn   |
-     * `-----------------------------------------------------------'
-     */
-    KEYMAP(
-    F1,  F2,    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NO,  BSPC,     INS, HOME,PGUP,     NLCK,PSLS,PAST,PMNS, \
-    F3,  F4,    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,          DEL, END, PGDN,     P7,  P8,  P9,  PPLS, \
-    F5,  F6,    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,ENT, ENT,           PSCR,SLCK,PAUS,     P4,  P5,  P6,  PPLS, \
-    F7,  F8,    LSFT,LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,NO,  RSFT,          F11, UP,  F12,      P1,  P2,  P3,  PENT, \
-    F9,  F10,   LCTL,LGUI,LALT,          SPC,                               RGUI,FN0,           LEFT,DOWN,RGHT,     P0,  P0,  PDOT,PENT  \
-    ),
-
-    /* 1: HHKB
-     * ,-----------------------------------------------------------.
-     * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|???|Del|
-     * |-----------------------------------------------------------|
-     * |Caps |   |   |   |   |   |   |   |Psc|Slk|Pau| Up|   |  Ins|
-     * |-----------------------------------------------------------|
-     * |Ctrl  |VoD|VoU|VoM|   |   |  *|  /|Hom|PgU|Lef|Rig|Ret|Ret |
-     * |-----------------------------------------------------------|
-     * |Shif|Shi|   |   |   |   |   |  +|  -|End|PgD|Dow|???|Shift |
-     * |-----------------------------------------------------------|
-     * |Ctrl |Gui|Alt  |         Space             |Alt* |Gui|Fn   |
-     * `-----------------------------------------------------------'
-     */
-    KEYMAP(
-    F1,  F2,    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, NO,  DEL,      INS, HOME,PGUP,     NLCK,PSLS,PAST,PMNS, \
-    F3,  F4,    CAPS,NO,  NO,  NO,  NO,  NO,  NO,  NO,  PSCR,SLCK,PAUS, UP, NO,  INS,           DEL, END, PGDN,     P7,  P8,  P9,  PPLS, \
-    F5,  F6,    TRNS,VOLD,VOLU,MUTE,NO,  NO,  PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, ENT,           PSCR,SLCK,PAUS,     P4,  P5,  P6,  PPLS, \
-    F7,  F8,    TRNS,TRNS,NO,  NO,  NO,  NO,  NO,  PPLS,PMNS,END, PGDN,DOWN,NO,  TRNS,          F11, UP,  F12,      P1,  P2,  P3,  PENT, \
-    F9,  F10,   TRNS,TRNS,TRNS,          TRNS,                              TRNS,TRNS,          LEFT,DOWN,RGHT,     P0,  P0,  PDOT,PENT  \
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_LAYER_MOMENTARY(1),
-};
diff --git a/converter/ibm4704_usb/led.c b/converter/ibm4704_usb/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/converter/ibm4704_usb/matrix.c b/converter/ibm4704_usb/matrix.c
deleted file mode 100644 (file)
index 5b91d49..0000000
+++ /dev/null
@@ -1,162 +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/>.
-*/
-
-#include <stdint.h>
-#include <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "action.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "ibm4704.h"
-#include "matrix.h"
-
-
-static void matrix_make(uint8_t code);
-static void matrix_break(uint8_t code);
-static void matrix_clear(void);
-
-
-/*
- * Matrix Array usage:
- * IBM 4704 scan codes are assigned into 128(16x8)-cell matrix.
- *
- *    8bit wide
- *   +---------+
- *  0|         |
- *  :|   XX    | 00-7F
- *  f|         |
- *   +---------+
- *
- * Exceptions:
- */
-static uint8_t matrix[MATRIX_ROWS];
-
-// scan code bits  7654 3210
-// R:row/C:column  -RRR RCCC
-#define ROW(code)      ((code>>3)&0x0f)
-#define COL(code)      (code&0x07)
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-static void enable_break(void)
-{
-    print("Enable break: ");
-    while (ibm4704_send(0xFC)) { _delay_ms(10); }
-    // valid scancode: 00-79h
-    for (uint8_t code = 0; code < 0x7F; code++) {
-        while (ibm4704_send(0x80|code)) _delay_ms(10);
-        _delay_ms(5);   // wait for response
-        // No response(FF) when ok, FD when out of bound
-        xprintf("s%02X:r%02X ", code, ibm4704_recv());
-    }
-    while (ibm4704_send(0xFF)) { _delay_ms(10); } // End
-    print("End\n");
-}
-
-
-void matrix_setup(void)
-{
-    ibm4704_init();
-}
-
-void matrix_init(void)
-{
-    debug_enable = true;
-
-    print("IBM 4704 converter\n");
-    matrix_clear();
-    _delay_ms(2000);    // wait for keyboard starting up
-    xprintf("Keyboard ID: %02X\n", ibm4704_recv());
-    enable_break();
-}
-
-/*
- * IBM 4704 Scan Code
- */
-uint8_t matrix_scan(void)
-{
-    uint8_t code = ibm4704_recv();
-    if (code==0xFF) {
-        // Not receivd
-        return 0;
-    } else if ((code&0x7F) >= 0x7A) {
-        // 0xFF-FA and 0x7F-7A is not scancode
-        xprintf("Error: %02X\n", code);
-        matrix_clear();
-        return 0;
-    } else if (code&0x80) {
-        dprintf("%02X\n", code);
-        matrix_make(code);
-    } else {
-        dprintf("%02X\n", code);
-        matrix_break(code);
-    }
-    return 1;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
-    return (matrix[row] & (1<<col));
-}
-
-inline
-uint8_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)));
-    }
-}
-
-
-
-inline
-static void matrix_make(uint8_t code)
-{
-    matrix[ROW(code)] |= 1<<COL(code);
-}
-
-inline
-static void matrix_break(uint8_t code)
-{
-    matrix[ROW(code)] &= ~(1<<COL(code));
-}
-
-inline
-static void matrix_clear(void)
-{
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-}
diff --git a/converter/m0110_usb/Makefile b/converter/m0110_usb/Makefile
deleted file mode 100644 (file)
index e836456..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Target file name (without extension).
-TARGET = m0110_lufa
-
-# Directory common source filess exist
-TMK_DIR = ../../tmk_core
-
-# Directory keyboard dependent files exist
-TARGET_DIR = .
-
-# keyboard dependent files
-SRC =  matrix.c \
-       led.c \
-       keymap_common.c \
-       m0110.c
-
-# To use own keymap file run make like: make keymap=hasu
-ifdef KEYMAP
-    SRC += keymap_$(KEYMAP).c
-else
-    SRC += keymap_default.c
-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 = atmega32u2       # TMK converter rev2
-#MCU = atmega32u4       # TMK converter rev1
-
-
-# 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
-
-
-#
-# 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
-#   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
-#KEYMAP_SECTION_ENABLE = yes   # fixed address keymap for keymap editor
-
-
-
-#---------------- 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/lufa.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/m0110_usb/Makefile.teensy b/converter/m0110_usb/Makefile.teensy
deleted file mode 100644 (file)
index 394b660..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# Target file name (without extension).
-TARGET = m0110_lufa
-
-# Directory common source filess exist
-TMK_DIR = ../../tmk_core
-
-# Directory keyboard dependent files exist
-TARGET_DIR = .
-
-# keyboard dependent files
-SRC =  matrix.c \
-       led.c \
-       keymap_common.c \
-       m0110.c
-
-# To use own keymap file run make like: make keymap=hasu
-ifdef KEYMAP
-    SRC += keymap_$(KEYMAP).c
-else
-    SRC += keymap_default.c
-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
-
-
-#
-# 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
-#   Atmel DFU loader 4096
-#   LUFA bootloader  4096
-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
-#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-#KEYMAP_SECTION_ENABLE = yes   # fixed address keymap for keymap editor
-
-
-
-#---------------- 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/lufa.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/m0110_usb/Makefile.tmk_rev1 b/converter/m0110_usb/Makefile.tmk_rev1
deleted file mode 100644 (file)
index f36fcc4..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Target file name (without extension).
-TARGET = m0110_lufa
-
-# Directory common source filess exist
-TMK_DIR = ../../tmk_core
-
-# Directory keyboard dependent files exist
-TARGET_DIR = .
-
-# keyboard dependent files
-SRC =  matrix.c \
-       led.c \
-       keymap_common.c \
-       m0110.c
-
-# To use own keymap file run make like: make keymap=hasu
-ifdef KEYMAP
-    SRC += keymap_$(KEYMAP).c
-else
-    SRC += keymap_default.c
-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 = atmega32u2       # TMK converter rev2
-MCU = atmega32u4       # TMK converter rev1
-
-
-# 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
-
-
-#
-# 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
-#   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
-#KEYMAP_SECTION_ENABLE = yes   # fixed address keymap for keymap editor
-
-
-
-#---------------- 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/lufa.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/m0110_usb/Makefile.tmk_rev2 b/converter/m0110_usb/Makefile.tmk_rev2
deleted file mode 100644 (file)
index e836456..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-# Target file name (without extension).
-TARGET = m0110_lufa
-
-# Directory common source filess exist
-TMK_DIR = ../../tmk_core
-
-# Directory keyboard dependent files exist
-TARGET_DIR = .
-
-# keyboard dependent files
-SRC =  matrix.c \
-       led.c \
-       keymap_common.c \
-       m0110.c
-
-# To use own keymap file run make like: make keymap=hasu
-ifdef KEYMAP
-    SRC += keymap_$(KEYMAP).c
-else
-    SRC += keymap_default.c
-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 = atmega32u2       # TMK converter rev2
-#MCU = atmega32u4       # TMK converter rev1
-
-
-# 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
-
-
-#
-# 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
-#   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
-#KEYMAP_SECTION_ENABLE = yes   # fixed address keymap for keymap editor
-
-
-
-#---------------- 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/lufa.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/m0110_usb/README.md b/converter/m0110_usb/README.md
deleted file mode 100644 (file)
index bfd3261..0000000
+++ /dev/null
@@ -1,79 +0,0 @@
-M0110/M0110A to USB keyboard converter
-======================================
-This firmware converts the protocol of Apple Macintosh keyboard **M0110**, **M0110A** and **M0120** into USB. Target of this project is USB AVR controller like **ATmega32U2** and **ATmega32U4**. Using this converter you can revive these retro keyboards with modern computer.
-
-Read README of top directory too.
-
-Pictures of **M0110 + M0120** and **M0110A**.
-
-![M0110+M0120](http://i.imgur.com/dyvXb2Tm.jpg)
-![M0110A](http://i.imgur.com/HuHOEoHm.jpg)
-
-
-- M0110A support was contributed by [skagon@github](https://github.com/skagon).
-- M0120 also is supported. keys(+ * / and ,) on M0120 are recognized as cursor keys.
-
-
-
-Update
-------
-- 2013/08: Change port for signals `PF` to `PD`
-- 2013/09: Change port again, it uses inversely `PD0` for data and `PD1` for clock line now.
-- 2014/06: Change keymaps
-- 2015/03: Add support for "International"(ISO) keyboard(keymap_intl.c)
-
-
-
-Building Hardware
------------------
-You need [TMK converter] or AVR dev board like PJRC [Teensy]. Port of the MCU `PD1` is assigned to `CLOCK` line and `PD0` to `DATA` by default, you can change pin configuration with editing `config.h`.
-
-[![M0110 Converter](http://i.imgur.com/4G2ZOegm.jpg)](http://i.imgur.com/4G2ZOeg.jpg)
-
-### 4P4C phone handset cable
-Note that original cable used with Mac is **straight** while phone handset cable is **crossover**.
-
-<http://en.wikipedia.org/wiki/Modular_connector#4P4C>
-
-Close-up picture of handset cable. You can see one end of plug has reverse color codes against the other. Click to enlarge.
-[![4P4C cable](http://i.imgur.com/3S9P1mYm.jpg?1)](http://i.imgur.com/3S9P1mY.jpg?1)
-
-[Teensy]: http://www.pjrc.com/teensy/
-[TMK converter]: https://github.com/tmk/keyboard_converter
-
-
-### Socket Pinout
-- <http://pinouts.ru/Inputs/MacKeyboard_pinout.shtml>
-
-![Jack fig](http://www.kbdbabel.org/conn/kbd_connector_macplus.png)
-
-
-### Pull-up Resistor
-You may need pull-up resistors on signal lines(`CLOCK`, `DATA`) in particular when you have long or coiled cable. **1k-10k Ohm** will be OK for this purpose. In that case the converter may not read signal from keyboard correctly without pull-up resistors.
-
-
-
-Building Firmware
------------------
-To compile firmware you need AVR GCC. You can edit *Makefile* and *config.h* to change compile options and pin configuration. Also `KEYMAP` option can be used to select keymap.
-
-    $ git clone git://github.com/tmk/tmk_keyboard.git (or download source)
-    $ cd m0110_usb
-    $ make -f Makefile.rev2 clean
-    $ make -f Makefile.rev2 [KEYMAP={default|intl|spacefn|hasu}]
-
-Use `Maefile.tmk_rev1` for TMK converter Rev.1, `Makefile.teensy` for Teensy instead.
-
-
-
-Keymap
-------
-To create your own keymap copy existent keymap file to `keymap_name.c` and edit it.
-
-
-
-Debug
------
-You can use [PJRC HID listen](http://www.pjrc.com/teensy/hid_listen.html) to see debug output. The converter has some functions for debug, press `<Magic>+H` simultaneously to get help.
-
-- Magic combo: `Shift+Option+⌘` or `Shift+Option+Ctrl`(`Shift+Alt+Gui` or `Shift+Alt+Control`)
diff --git a/converter/m0110_usb/config.h b/converter/m0110_usb/config.h
deleted file mode 100644 (file)
index 801bc4e..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-Copyright 2011,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      0x0110
-#define DEVICE_VER      0x0101
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         M0110 keyboard converter
-#define DESCRIPTION     convert M0110 keyboard to USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 14
-#define MATRIX_COLS 8
-
-
-/* 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
-
-
-/* magic key */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \
-)
-
-/* boot magic key */
-#define BOOTMAGIC_KEY_SALT                      KC_FN0
-#define BOOTMAGIC_KEY_CAPSLOCK_TO_CONTROL       KC_LCAP
-
-
-/* ports */
-#define M0110_CLOCK_PORT        PORTD
-#define M0110_CLOCK_PIN         PIND
-#define M0110_CLOCK_DDR         DDRD
-#define M0110_CLOCK_BIT         1
-#define M0110_DATA_PORT         PORTD
-#define M0110_DATA_PIN          PIND
-#define M0110_DATA_DDR          DDRD
-#define M0110_DATA_BIT          0
-
-#endif
diff --git a/converter/m0110_usb/keymap_common.c b/converter/m0110_usb/keymap_common.c
deleted file mode 100644 (file)
index 4ac2d71..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-Copyright 2011,2012,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/>.
-*/
-#include <stdint.h>
-#include <avr/pgmspace.h>
-#include "action.h"
-#include "keycode.h"
-#include "keymap.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 index to action */
-action_t keymap_fn_to_action(uint8_t keycode)
-{
-    action_t action;
-    action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
-    return action;
-}
diff --git a/converter/m0110_usb/keymap_common.h b/converter/m0110_usb/keymap_common.h
deleted file mode 100644 (file)
index 925556d..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*
-Copyright 2011,2012,2014,2015 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 <avr/pgmspace.h>
-#include "keycode.h"
-#include "keymap.h"
-
-
-extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-extern const uint16_t fn_actions[];
-
-
-/* Common layout for M0110 and M0110A
- * This keymap works with both keyboards. As you can see, the M0110A is 
- * a superset of M0110 keyboard, only one exception is 'Enter'(34) of M0110
- * does not exist on the M0110A.
- *
- * ,---------------------------------------------------------. ,---------------.
- * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Clr|  =|  /|  *|
- * |---------------------------------------------------------| |---------------|
- * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|   | |  7|  8|  9|  -|
- * |-----------------------------------------------------'   | |---------------|
- * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  +|
- * |---------------------------------------------------------| |---------------|
- * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shft|Up | |  1|  2|  3|   |
- * |---------------------------------------------------------| |-----------|Ent|
- * |Opt  |Mac    |         Space         |Ent|  \|Lft|Rgt|Dn | |      0|  .|   |
- * `---------------------------------------------------------' `---------------'
- *
- * M0110A scan codes
- * ,---------------------------------------------------------. ,---------------.
- * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33| | 47| 68| 6D| 62|
- * |---------------------------------------------------------| |---------------|
- * |   30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E|   | | 59| 5B| 5C| 4E|
- * |-----------------------------------------------------'   | |---------------|
- * |    39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27|    24| | 56| 57| 58| 66|
- * |---------------------------------------------------------| |---------------|
- * |      38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|  38| 4D| | 53| 54| 55|   |
- * `---------------------------------------------------------' |-----------| 4C|
- * |   3A|     37|             31            | 2A| 46| 42| 48| |     52| 41|   |
- * `---------------------------------------------------------' `---------------'
- *
- * M0110 + M0120 scan codes
- * ,---------------------------------------------------------. ,---------------.
- * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33| | 47| 68| 6D| 62|
- * |---------------------------------------------------------| |---------------|
- * |   30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A| | 59| 5B| 5C| 4E|
- * |---------------------------------------------------------| |---------------|
- * |    39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27|    24| | 56| 57| 58| 66|
- * |---------------------------------------------------------| |---------------|
- * |      38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|      38| | 53| 54| 55|   |
- * `---------------------------------------------------------' |-----------| 4C|
- *      | 3A|  37|             31              |   34| 3A|     |     52| 41|   |
- *      `------------------------------------------------'     `---------------'
- * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two.
- */
-#define KEYMAP( \
-    K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33,  K47,K68,K6D,K62, \
-    K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,      K59,K5B,K5C,K4E, \
-    K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,    K24,  K56,K57,K58,K66, \
-    K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,        K4D,  K53,K54,K55,K4C, \
-    K3A,K37,            K31,            K34,K2A,K46,K42,K48,  K52,    K41      \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_NO,    KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO,    KC_NO,    KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_##K41, KC_##K42, KC_NO,    KC_NO,    KC_NO,    KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_NO,    KC_NO,    KC_NO,    KC_##K4C, KC_##K4D, KC_##K4E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_NO,    KC_##K5B, KC_##K5C, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##K62, KC_NO,    KC_NO,    KC_NO,    KC_##K66, KC_NO    }, \
-    { KC_##K68, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K6D, KC_NO,    KC_NO    }, \
-}
-
-/* International keyboard layout for M0110 + M0120
- * https://en.wikipedia.org/wiki/File:Apple_Macintosh_Plus_Keyboard.jpg
- * Probably International keyboard layout of M0110A doesn't exist.
- *
- * M0110 + M0120 scan codes
- * ,---------------------------------------------------------. ,---------------.
- * | 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33| | 47| 68| 6D| 62|
- * |---------------------------------------------------------| |---------------|
- * |   30| 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A| | 59| 5B| 5C| 4E|
- * |------------------------------------------------------,  | |---------------|
- * |    39| 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 24|  | | 56| 57| 58| 66|
- * |---------------------------------------------------------| |---------------|
- * |  38| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 0A|      38| | 53| 54| 55|   |
- * `---------------------------------------------------------' |-----------| 4C|
- *      | 3A|  37|             34              |   31| 3A|     |     52| 41|   |
- *      `------------------------------------------------'     `---------------'
- * Two right and left keys of 38 and 3A are identical, you cannot discriminate those two.
- */
-#define KEYMAP_INTL( \
-    K32,K12,K13,K14,K15,K17,K16,K1A,K1C,K19,K1D,K1B,K18,K33,  K47,K68,K6D,K62, \
-    K30,K0C,K0D,K0E,K0F,K11,K10,K20,K22,K1F,K23,K21,K1E,K2A,  K59,K5B,K5C,K4E, \
-    K39,K00,K01,K02,K03,K05,K04,K26,K28,K25,K29,K27,K24,      K56,K57,K58,K66, \
-    K38,K06,K07,K08,K09,K0B,K2D,K2E,K2B,K2F,K2C,K0A,          K53,K54,K55,K4C, \
-        K3A,K37,            K34,                K31,          K52,    K41      \
-) { \
-    { 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_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_NO,    KC_NO,    KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_##K41, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K47 }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K4C, KC_NO,    KC_##K4E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_NO,    KC_##K5B, KC_##K5C, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##K62, KC_NO,    KC_NO,    KC_NO,    KC_##K66, KC_NO    }, \
-    { KC_##K68, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K6D, KC_NO,    KC_NO    }, \
-}
diff --git a/converter/m0110_usb/keymap_default.c b/converter/m0110_usb/keymap_default.c
deleted file mode 100644 (file)
index ff7478d..0000000
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
-Copyright 2011,2012,2015 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 "keycode.h"
-#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
-    /* Default:
-     * M0110                                                       M0120
-     * ,---------------------------------------------------------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Nlk|  =|  /|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \| |  7|  8|  9|  -|
-     * |---------------------------------------------------------| |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  +|
-     * |---------------------------------------------------------| |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift   | |  1|  2|  3|   |
-     * `---------------------------------------------------------' |-----------|Ent|
-     *      |Opt|Mac |         Space               |Fn  |Opt|      |      0|  .|   |
-     *      `-----------------------------------------------'      `---------------'
-     * M0110A
-     * ,---------------------------------------------------------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Nlk|  =|  /|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|   | |  7|  8|  9|  -|
-     * |-----------------------------------------------------'   | |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  +|
-     * |---------------------------------------------------------| |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shft|Up | |  1|  2|  3|   |
-     * |---------------------------------------------------------| |-----------|Ent|
-     * |Opt  |Mac    |         Space             |  \|Lft|Rgt|Dn | |      0|  .|   |
-     * `---------------------------------------------------------' `---------------'
-     */
-    [0] = KEYMAP(
-    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,    NLCK,EQL, PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,         P7,  P8,  P9,  PMNS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          UP,      P1,  P2,  P3,  PENT,
-    LALT,LGUI,               SPC,                FN0, FN13,LEFT,RGHT,DOWN,    P0,       PDOT
-    ),
-    /* Cursor Layer:
-     * M0110                                                       M0120
-     * ,---------------------------------------------------------. ,---------------.
-     * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|  =|  /|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Caps |Hom| Up|PgU|   |   |   |   |Psc|Slk|Pau|Up |INS|   | |  7|  8|  9|  -|
-     * |---------------------------------------------------------| |---------------|
-     * |Ctrl  |Lef|Dow|Rig|   |   |   |   |Hom|PgU|Lef|Rig|Return| |  4|  5|  6|  +|
-     * |---------------------------------------------------------| |---------------|
-     * |Shift   |End|   |PgD|   |   |   |   |End|PgD|Dow|Shift   | |  1|  2|  3|   |
-     * `---------------------------------------------------------' |-----------|Ent|
-     *      |Opt|Mac |         Space               |Fn  |Opt|      |      0|  .|   |
-     *      `-----------------------------------------------'      `---------------'
-     * M0110A
-     * ,---------------------------------------------------------. ,---------------.
-     * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|  =|  /|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Caps |Hom| Up|PgU|   |   |   |   |Psc|Slk|Pau|Up |INS|   | |  7|  8|  9|  -|
-     * |-----------------------------------------------------'   | |---------------|
-     * |Ctrl  |Lef|Dow|Rig|   |   |   |   |Hom|PgU|Lef|Rig|Return| |  4|  5|  6|  +|
-     * |---------------------------------------------------------| |---------------|
-     * |Shift   |End|   |PgD|   |   |   |   |End|PgD|Dow|Shft|PgU| |  1|  2|  3|   |
-     * |---------------------------------------------------------| |-----------|Ent|
-     * |Opt  |Mac    |         Space             |  \|Hom|End|PgD| |      0|  .|   |
-     * `---------------------------------------------------------' `---------------'
-     */
-    [1] = KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    CAPS,HOME,UP,  PGUP,NO,  NO,  NO,  NO,  PSCR,SLCK,PAUS,UP,  INS,          P7,  P8,  P9,  PMNS,
-    LCTL,LEFT,DOWN,RGHT,NO,  NO,  NO,  NO,  HOME,PGUP,LEFT,RGHT,     ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,END, NO,  PGDN,NO,  NO,  NO,  NO,  END, PGDN,DOWN,          PGUP,    P1,  P2,  P3,  PENT,
-    LALT,LGUI,               SPC,                FN0, FN13,HOME,END, PGDN,    P0,       PDOT
-    ),
-};
-
-
-/*
- * 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),
-    [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_BSLASH),
-    [14] = ACTION_LAYER_TAP_KEY(2, KC_TAB),
-    [15] = ACTION_LAYER_TAP_KEY(3, KC_ENTER),
-    [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_GRAVE),
-    [31] = ACTION_MODS_TAP_KEY(MOD_RALT, KC_BSLASH),
-};
diff --git a/converter/m0110_usb/keymap_hasu.c b/converter/m0110_usb/keymap_hasu.c
deleted file mode 100644 (file)
index 11f1a4f..0000000
+++ /dev/null
@@ -1,87 +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/>.
-*/
-#include <stdint.h>
-#include "keycode.h"
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* Default:
-     * M0110
-     * ,---------------------------------------------------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs|
-     * |---------------------------------------------------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \|
-     * |---------------------------------------------------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L| Fn|  '|Return|
-     * |---------------------------------------------------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,| Fn|Shift   |
-     * `---------------------------------------------------------'
-     *      |Fn |alt |           Fn                |Gui |Fn |
-     *      `-----------------------------------------------'
-     */
-    [0] = KEYMAP(
-    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,    NLCK,EQL, PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,         P7,  P8,  P9,  PMNS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   FN3, QUOT,     ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, FN1,           UP,      P1,  P2,  P3,  PENT,
-    FN0, LALT,               FN2,                LGUI,BSLS,LEFT,RGHT,DOWN,    P0,       PDOT
-    ),
-    // IJKL cursor
-    [1] = KEYMAP(
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    CAPS,NO,  NO,  NO,  NO,  NO,  HOME,PGDN,UP,  PGUP,END, NO,  NO,           P7,  P8,  P9,  PMNS,
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  HOME,LEFT,DOWN,RGHT,END, NO,       ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, NO,            PGUP,    P1,  P2,  P3,  PENT,
-    TRNS,LALT,               SPC,                LGUI,BSLS,HOME,END, PGDN,    P0,       PDOT
-    ),
-    // HJKL cursor
-    [2] = KEYMAP(
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    CAPS,NO,  NO,  NO,  NO,  NO,  HOME,PGDN,UP,  PGUP,END, NO,  NO,           P7,  P8,  P9,  PMNS,
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  LEFT,DOWN,UP,  RGHT,NO,  NO,       ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, TRNS,          PGUP,    P1,  P2,  P3,  PENT,
-    TRNS,LALT,               SPC,                LGUI,BSLS,HOME,END, PGDN,    P0,       PDOT
-    ),
-    // Mousekey
-    [3] = KEYMAP(
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    CAPS,Q,   W,   E,   R,   T,   WH_L,WH_D,MS_U,WH_U,WH_R,WBAK,WFWD,         P7,  P8,  P9,  PMNS,
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  BTN2,MS_L,MS_D,MS_R,BTN1,NO,       ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   BTN2,BTN1,BTN4,BTN5,NO,            PGUP,    P1,  P2,  P3,  PENT,
-    NO,  LALT,               TRNS,               LGUI,BSLS,HOME,END, PGDN,    P0,       PDOT
-    ),
-    // Mousekey
-    [4] = KEYMAP(
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    CAPS,Q,   W,   E,   R,   T,   WH_L,WH_D,MS_U,WH_U,WH_R,WBAK,WFWD,         P7,  P8,  P9,  PMNS,
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  BTN2,MS_L,MS_D,MS_R,TRNS,NO,       ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   BTN2,BTN1,BTN4,BTN5,NO,            PGUP,    P1,  P2,  P3,  PENT,
-    NO,  LALT,               BTN1,               LGUI,BSLS,HOME,END, PGDN,    P0,       PDOT
-    ),
-};
-
-
-/*
- * Fn action definition
- */
-const uint16_t fn_actions[] PROGMEM = {
-    [0]  = ACTION_LAYER_MOMENTARY(1),
-    [1]  = ACTION_LAYER_TAP_KEY(2, KC_SLASH),
-    [2]  = ACTION_LAYER_TAP_KEY(3, KC_SPACE),
-    [3]  = ACTION_LAYER_TAP_KEY(4, KC_SCOLON),
-};
diff --git a/converter/m0110_usb/keymap_intl.c b/converter/m0110_usb/keymap_intl.c
deleted file mode 100644 (file)
index 6cc251a..0000000
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Copyright 2015 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 "keycode.h"
-#include "keymap_common.h"
-
-
-
-const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
-    /* International keyboard
-     * M0110                                                       M0120
-     * ,---------------------------------------------------------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Nlk|  -|  +|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Ret| |  7|  8|  9|  /|
-     * |------------------------------------------------------,  | |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  \|  | |  4|  5|  6|  ,|
-     * |---------------------------------------------------------| |---------------|
-     * |Shif|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|        | |  1|  2|  3|   |
-     * `---------------------------------------------------------' |-----------|Ent|
-     *      |Opt|Mac |         Space               |Fn  |   |      |      0|  .|   |
-     *      `-----------------------------------------------'      `---------------'
-     */
-    [0] = KEYMAP_INTL(
-    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,    NLCK,EQL, PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,ENT,     P7,  P8,  P9,  PMNS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,BSLS,         P4,  P5,  P6,  PPLS,
-    LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,              P1,  P2,  P3,  PENT,
-         LALT,LGUI,               SPC,                     FN0,               P0,       PDOT
-    ),
-    /* Cursor Layer
-     * ,---------------------------------------------------------. ,---------------.
-     * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delet| |Nlk|  -|  +|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Caps |Hom| Up|PgU|   |   |   |   |Psc|Slk|Pau|Up |   |Ret| |  7|  8|  9|  /|
-     * |------------------------------------------------------,  | |---------------|
-     * |Ctrl  |Lef|Dow|Rig|   |   |   |   |Hom|PgU|Lef|Rig|Ins|  | |  4|  5|  6|  ,|
-     * |---------------------------------------------------------| |---------------|
-     * |Shif|  <|End|   |PgD|   |   |   |   |End|PgD|Dow|        | |  1|  2|  3|   |
-     * `---------------------------------------------------------' |-----------|Ent|
-     *      |Opt|Mac |         Space               |Fn  |   |      |      0|  .|   |
-     *      `-----------------------------------------------'      `---------------'
-     */
-    [1] = KEYMAP_INTL(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    CAPS,HOME,UP,  PGUP,NO,  NO,  NO,  NO,  PSCR,SLCK,PAUS,UP,  NO,  ENT,     P7,  P8,  P9,  PMNS,
-    LCTL,LEFT,DOWN,RGHT,NO,  NO,  NO,  NO,  HOME,PGUP,LEFT,RGHT,INS,          P4,  P5,  P6,  PPLS,
-    LSFT,NO,  END, NO,  PGDN,NO,  NO,  NO,  NO,  END, PGDN,DOWN,              P1,  P2,  P3,  PENT,
-         LALT,LGUI,               SPC,                     FN0,               P0,       PDOT
-    ),
-};
-
-
-/*
- * Fn action definition
- */
-const uint16_t fn_actions[] PROGMEM = {
-    [0]  = ACTION_LAYER_MOMENTARY(1),
-};
diff --git a/converter/m0110_usb/keymap_spacefn.c b/converter/m0110_usb/keymap_spacefn.c
deleted file mode 100644 (file)
index 5017861..0000000
+++ /dev/null
@@ -1,71 +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/>.
-*/
-#include <stdint.h>
-#include "keycode.h"
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* Default:
-     * M0110                                                       M0120
-     * ,---------------------------------------------------------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backs| |Nlk|  -|  +|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \| |  7|  8|  9|  /|
-     * |---------------------------------------------------------| |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  ,|
-     * |---------------------------------------------------------| |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift   | |  1|  2|  3|   |
-     * `---------------------------------------------------------' |-----------|Ent|
-     *      |Opt|Mac |         Space               |Mac |Opt|      |      0|  .|   |
-     *      `-----------------------------------------------'      `---------------'
-     *  M0110A
-     * ,---------------------------------------------------------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Bcksp| |Nlk|  =|  /|  *|
-     * |---------------------------------------------------------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|   | |  7|  8|  9|  -|
-     * |-----------------------------------------------------'   | |---------------|
-     * |Caps  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return| |  4|  5|  6|  +|
-     * |---------------------------------------------------------| |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shft|Up | |  1|  2|  3|   |
-     * |---------------------------------------------------------' |-----------|Ent|
-     * |Opt  |Mac    |           Space           |  \|Lft|Rgt|Dn | |      0|  .|   |
-     * `---------------------------------------------------------' `---------------'
-     */
-    [0] = KEYMAP(
-    GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,    NLCK,PEQL,PSLS,PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,         P7,  P8,  P9,  PMNS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,     P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          UP,      P1,  P2,  P3,  PENT,
-    LALT,LGUI,               FN0,                RGUI,BSLS,LEFT,RGHT,DOWN,    P0,       PDOT
-    ),
-    [1] = KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,     NLCK,EQL, PSLS,PAST,
-    TRNS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP,  END, PSCR,SLCK,PAUS,         P7,  P8,  P9,  PMNS,
-    LCTL,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS,     TRNS,    P4,  P5,  P6,  PPLS,
-    TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP,           PGUP,    P1,  P2,  P3,  PENT,
-    TRNS,TRNS,               TRNS,               TRNS,INS, HOME,END, PGDN,    P0,       PDOT
-    ),
-};
-
-/*
- * Fn action definition
- */
-const uint16_t fn_actions[] PROGMEM = {
-    [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE),
-    [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV),    // tilde
-};
diff --git a/converter/m0110_usb/led.c b/converter/m0110_usb/led.c
deleted file mode 100644 (file)
index 3822a13..0000000
+++ /dev/null
@@ -1,32 +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 <avr/io.h>
-#include "led.h"
-
-
-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/converter/m0110_usb/matrix.c b/converter/m0110_usb/matrix.c
deleted file mode 100644 (file)
index 2189c0b..0000000
+++ /dev/null
@@ -1,142 +0,0 @@
-/*
-Copyright 2011,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 "util.h"
-#include "debug.h"
-#include "host.h"
-#include "led.h"
-#include "m0110.h"
-#include "matrix.h"
-
-
-#define CAPS        0x39
-#define CAPS_BREAK  (CAPS | 0x80)
-#define ROW(key)    ((key)>>3&0x0F)
-#define COL(key)    ((key)&0x07)
-
-
-static bool is_modified = false;
-
-// matrix state buffer(1:on, 0:off)
-static uint8_t *matrix;
-static uint8_t _matrix0[MATRIX_ROWS];
-
-static void register_key(uint8_t key);
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-    m0110_init();
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) _matrix0[i] = 0x00;
-    matrix = _matrix0;
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-    uint8_t key;
-
-    is_modified = false;
-    key = m0110_recv_key();
-
-    if (key == M0110_NULL) {
-        return 0;
-    } else if (key == M0110_ERROR) {
-        return 0;
-    } else {
-        is_modified = true;
-        register_key(key);
-    }
-
-    if (debug_enable) {
-        print("["); phex(key); print("]\n");
-    }
-    return 1;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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
-uint8_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++) {
-        count += bitpop(matrix[i]);
-    }
-    return count;
-}
-
-inline
-static void register_key(uint8_t key)
-{
-    if (key&0x80) {
-        matrix[ROW(key)] &= ~(1<<COL(key));
-    } else {
-        matrix[ROW(key)] |=  (1<<COL(key));
-    }
-}
diff --git a/converter/news_usb/Makefile.pjrc b/converter/news_usb/Makefile.pjrc
deleted file mode 100644 (file)
index 80cadcc..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-#
-# Makefile for PJRC Teensy
-#
-
-
-# Target file name (without extension).
-TARGET = news_usb_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 \
-       news.c
-
-CONFIG_H = config_pjrc.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
-#   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(+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)
-
-
-
-#---------------- 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)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/news_usb/config_pjrc.h b/converter/news_usb/config_pjrc.h
deleted file mode 100644 (file)
index adce014..0000000
+++ /dev/null
@@ -1,62 +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      0x5021
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         SONY NEWS keyboard converter
-#define DESCRIPTION     converts SONY NEWS protocol into USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 16  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* legacy keymap support */
-#define USE_LEGACY_KEYMAP
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-/* Asynchronous USART
- * 8-data bit, non parity, 1-stop bit, no flow control
- */
-#ifdef __AVR_ATmega32U4__
-#   define NEWS_KBD_RX_VECT        USART1_RX_vect
-#   define NEWS_KBD_RX_DATA        UDR1
-#   define NEWS_KBD_RX_BAUD        9600
-#   define NEWS_KBD_RX_UBBR        ((F_CPU/(16UL*NEWS_KBD_RX_BAUD))-1)
-#   define NEWS_KBD_RX_INIT()      do { \
-        UBRR1L = (uint8_t) NEWS_KBD_RX_UBBR; \
-        UBRR1H = (uint8_t) (NEWS_KBD_RX_UBBR>>8); \
-        UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); \
-    } while(0)
-#else
-#   error "USART configuration is needed."
-#endif
-
-#endif
diff --git a/converter/news_usb/keymap.c b/converter/news_usb/keymap.c
deleted file mode 100644 (file)
index 058f291..0000000
+++ /dev/null
@@ -1,125 +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/pgmspace.h>
-#include "keycode.h"
-#include "util.h"
-#include "keymap.h"
-
-
-
-
-// Following macros help you to define a keymap with the form of actual keyboard layout.
-
-/* SONY NEWS NWP-5461 */
-#define KEYMAP( \
-    K7A,    K01,K02,K03,K04,K05,  K06,K07,K08,K09,K0A,  K68,K69,          K64,K65,K52, \
-    K0B,K0C,K0D,K0E,K0F,K10,K11,K12,K13,K14,K15,K16,K17,K18,K19, K6A, K4B,K4C,K4D,K4E, \
-    K1A,K1B,K1C,K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,     K6B, K4F,K50,K51,K56, \
-    K28,K29,K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,    K35, K6C, K53,K54,K55,K5A, \
-    K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,        K42, K6D, K57,K59,K58,     \
-    K43,K44,K45,        K46,        K47,            K48,K49,K4A, K6E, K66,K5B,K5C,K5D  \
-) { \
-    { KC_NO,    KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K64, KC_##K65, KC_##K66, KC_NO    }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_NO,    KC_NO,    KC_##K7A, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }  \
-}
-
-
-// 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
-    0,              // Fn1
-    0,              // Fn2
-    0,              // Fn3
-    0,              // 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_NO,          // Fn2
-    KC_NO,          // Fn3
-    KC_NO,          // Fn4
-    KC_NO,          // Fn5
-    KC_NO,          // Fn6
-    KC_NO           // Fn7
-};
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,---.   ,------------------------, ,------------------------. ,---------.
-     * |Pow|   | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10| | F11| F12| ,-----------.
-     * `---'   `------------------------' `------------------------' `---------' |  *|  /|  +|
-     * ,-------------------------------------------------------------. ,---. ,---------------|
-     * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  BS | |Hlp| |  7|  8|  9|  -|
-     * |-------------------------------------------------------------| |---| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Del|   | |Ins| |  4|  5|  6|  ,|
-     * |---------------------------------------------------------'   | |---| |---------------|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  `|Return| |Clr| |  1|  2|  3|   |
-     * |-------------------------------------------------------------| |---| |-----------|Ent|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|   |Shift   | |PgU| |  0|  .| Up|   |
-     * |-------------------------------------------------------------| |---| |---------------|
-     * |Alt  |Gui |Alt |         Space     |          |Gui|App|Ctrl  | |PgD| |Tab|Lef|Dow|Rig|
-     * `-------------------------------------------------------------' `---' `---------------'
-     */
-    KEYMAP(
-    PWR,      F1,  F2,  F3,  F4,  F5,       F6,  F7,  F8,  F9,  F10,      F11, F12,            PAST,PSLS,PPLS,
-    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSLS,BSPC,   HELP,   P7,  P8,  P9,  PMNS,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,DEL,         INS,    P4,  P5,  P6,  PCMM,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,GRV,      ENT,    CLR,    P1,  P2,  P3,  PENT,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RO,            RSFT,   PGUP,   P0,  PDOT,UP,
-    LALT,CAPS,LALT,          SPC,      ERAS,                    RALT,RGUI,RCTL,   PGDN,   TAB, LEFT,DOWN,RGHT
-    ),
-};
-
-
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
-{
-    return pgm_read_byte(&keymaps[(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/converter/news_usb/led.c b/converter/news_usb/led.c
deleted file mode 100644 (file)
index 51e6013..0000000
+++ /dev/null
@@ -1,26 +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 "news.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    // not supported now
-}
diff --git a/converter/news_usb/matrix.c b/converter/news_usb/matrix.c
deleted file mode 100644 (file)
index f0d5b58..0000000
+++ /dev/null
@@ -1,142 +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 "util.h"
-#include "news.h"
-#include "matrix.h"
-#include "debug.h"
-
-
-/*
- * Matrix Array usage:
- *
- * ROW: 16
- * COL:8
- *
- *    8bit wide
- *   +---------+
- *  0|00 ... 07|
- *  1|08 ... 0F|
- *  :|   ...   |
- *  :|   ...   |
- *  E|70 ... 77|
- *  F|78 ... 7F|
- *   +---------+
- *
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      ((code>>3)&0xF)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-    news_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-    is_modified = false;
-
-    uint8_t code;
-    code = news_recv();
-    if (code == 0) {
-        return 0;
-    }
-
-    phex(code); print(" ");
-    if (code&0x80) {
-        // break code
-        if (matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] &= ~(1<<COL(code));
-            is_modified = true;
-        }
-    } else {
-        // make code
-        if (!matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] |=  (1<<COL(code));
-            is_modified = true;
-        }
-    }
-    return code;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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
-uint8_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++) {
-        count += bitpop(matrix[i]);
-    }
-    return count;
-}
diff --git a/converter/next_usb/Makefile b/converter/next_usb/Makefile
deleted file mode 100644 (file)
index 7190f1e..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-# Target file name (without extension).
-TARGET = next_usb
-
-# 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
-MCU = atmega32u2       # TMK converter
-
-
-# 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
-
-
-#
-# 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
-EXTRAKEY_ENABLE = yes  # Audio control and System control
-CONSOLE_ENABLE = yes   # Console for debug(+400)
-COMMAND_ENABLE = yes    # Commands for debug and configuration
-#NKRO_ENABLE = yes     # USB Nkey Rollover
-
-SRC += next_kbd.c
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/next_usb/Makefile.pjrc b/converter/next_usb/Makefile.pjrc
deleted file mode 100644 (file)
index 5813c9d..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-# Target file name (without extension).
-TARGET = next_usb
-
-# 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
-#   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
-EXTRAKEY_ENABLE = yes  # Audio control and System control
-CONSOLE_ENABLE = yes   # Console for debug(+400)
-COMMAND_ENABLE = yes    # Commands for debug and configuration
-#NKRO_ENABLE = yes     # USB Nkey Rollover
-
-SRC += next_kbd.c
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/pjrc.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/next_usb/README b/converter/next_usb/README
deleted file mode 100644 (file)
index 07ac89d..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-NeXT non-ADB Keyboard Converter
--------------------------------
-
-Cable connector inside keyboard case:
-+-----+
-|Black|\
-|Green|-\
-|Yello|--\--------  to computer via Mini-Din 5a Connector
-|Orang|--/--------
-|Red  |-/
-|Brown|/
-+-----+
-
-Black  - Ground to outer metal part of Mini Din 5a connector (not used)
-Green  - Ground
-Yellow - Power button signal 
-Orange - Keyboard Out
-Red    - Keyboard In
-Brown  - Vcc
-
-ATmega32u4 connections (pinout provided for Arduino Pro Micro):
-
-Keyboard out (orange) : PD0 (pin 3)
-Keyboard in  (red)    : PD1 (pin 2)
-Power Button (yellow) : PD4 (pin 4)
-Ground       (black)  : GND
-Vcc          (brown)  : VCC
-
-See attached next_timings.jpg file for a detailed illustration of NeXT keyboard protocol timings.
-
-Power button signal line is normally high when the keyboard is powered/initialized.  It is pulled to ground when pressed.  The converter automatically translates this to a "normal" keypress with code 0x5A.  This connection is technically optional, the only side effect of not making this connection is the power key will do nothing.
-
-Converter is based heavily on Ladyada's original "USB NeXT Keyboard with Arduino Micro" tutorial (http://learn.adafruit.com/usb-next-keyboard-with-arduino-micro/overview).  If you build this converter, show Adafruit some love and do it using an Arduino Micro (http://www.adafruit.com/products/1315) or their ATmega 32u4 Breakout Board (http://www.adafruit.com/products/296).  Arduino Micro should work fine using the Arduino Pro Micro configuration above, same pins numbers and everything.
-
-TODO:
------
-
-I believe it might be possible to run the keyboard off of 3V; during testing I observed that the keyboard could sometimes function even without Vcc connected as long as the ground connection was good and the Keyboard In line was connected.  If that works it should be easy to do a Bluetooth conversion and run the keyboard right off of a LiPo battery without a boost circuit
-
-Utilize second LED as status indicator for good initialization; also try to make hot plugging much more robust.
-
-Figure a better use for the Power button.  Too easy to hit it by mistake to use for Suspend or Power Off - maybe move cap to different part of the board and consider that
-
-Figure out a better use for the lock LEDs.  Right now they just light up when you press shift.  Lame.  Maybe implement proper Caps/Num/Scroll Locks
-
diff --git a/converter/next_usb/config.h b/converter/next_usb/config.h
deleted file mode 100644 (file)
index a06affc..0000000
+++ /dev/null
@@ -1,190 +0,0 @@
-/*
-NeXT non-ADB Keyboard USB Converter
-Copyright 2013, Benjamin Gould (bgould@github.com)
-
-Based on:
-TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com>
-Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license
-
-Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB
-Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html
-Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/
-
-This software is licensed with a Modified BSD License.
-All of this is supposed to be Free Software, Open Source, DFSG-free,
-GPL-compatible, and OK to use in both free and proprietary applications.
-Additions and corrections to this file are welcome.
-
-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 copyright holders nor the names of
-  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 OWNER 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.
-
-*/
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0xBCBC
-#define DEVICE_VER      0x0500
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         NeXT Keyboard to USB converter
-#define DESCRIPTION     USB converter for NeXT non-ADB Keyboard
-
-/* matrix size */
-#define MATRIX_ROWS 12  // keycode bit: 3-0
-#define MATRIX_COLS  8  // keycode bit: 6-4
-
-#define DEBUG_ON_INIT 1
-
-//#define TEENSY_CONFIG 1
-//#define PRO_MICRO_CONFIG 1
-#define TMK_CONFIG 1
-
-// comment out if you don't want the keyboard's LEDs to flash upon initialization or pressing shift
-//#define NEXT_KBD_INIT_FLASH_LEDS
-//#define NEXT_KBD_SHIFT_FLASH_LEDS
-
-//============= Start of Arduino Pro Micro Configuration ==============
-#ifdef PRO_MICRO_CONFIG
-
-// this is the debugging LED that flashes when a key is being pressed
-// comment out in order to disable debugging LED
-#define NEXT_KBD_LED1_PORT  PORTD
-#define NEXT_KBD_LED1_PIN   PIND
-#define NEXT_KBD_LED1_DDR   DDRD
-#define NEXT_KBD_LED1_BIT   5
-
-#define NEXT_KBD_LED1_ON    NEXT_KBD_LED1_PORT &= ~(1<<NEXT_KBD_LED1_BIT);
-#define NEXT_KBD_LED1_OFF   NEXT_KBD_LED1_PORT |=  (1<<NEXT_KBD_LED1_BIT);
-
-// reserved for future use
-#define NEXT_KBD_LED2_PORT  PORTB
-#define NEXT_KBD_LED2_PIN   PINB
-#define NEXT_KBD_LED2_DDR   DDRB
-#define NEXT_KBD_LED2_BIT   6
-
-#define NEXT_KBD_LED2_ON    NEXT_KBD_LED2_PORT &= ~(1<<NEXT_KBD_LED2_BIT);
-#define NEXT_KBD_LED2_OFF   NEXT_KBD_LED2_PORT |=  (1<<NEXT_KBD_LED2_BIT);
-
-// corresponds to the Keyboard In wire on the NeXT connector
-// (red wire in NeXT connector) - pin 2 on the Pro Micro
-#define NEXT_KBD_OUT_PORT  PORTD
-#define NEXT_KBD_OUT_PIN   PIND
-#define NEXT_KBD_OUT_DDR   DDRD
-#define NEXT_KBD_OUT_BIT   1
-
-// corresponds to the Keyboard Out wire on the NeXT connector
-// (orange wire in NeXT connector) - pin 3 on the Pro Micro
-#define NEXT_KBD_IN_PORT   PORTD
-#define NEXT_KBD_IN_PIN    PIND
-#define NEXT_KBD_IN_DDR    DDRD
-#define NEXT_KBD_IN_BIT    0
-
-// this pin is an input for the power key on the NeXT keyboard
-// as the keyboard is powered on this should be normally high;
-// if it is pulled low it means the power button is being preseed
-// (yellow wire in NeXT connector) - pin 4 on the Pro Micro
-#define NEXT_KBD_PWR_PORT  PORTD
-#define NEXT_KBD_PWR_PIN   PIND
-#define NEXT_KBD_PWR_DDR   DDRD
-#define NEXT_KBD_PWR_BIT   4
-
-#endif
-//============== End of Arduino Pro Micro Configuration ===============
-
-
-//================ Start of Teensy 2.0 Configuration =================
-#ifdef TEENSY_CONFIG
-
-// this is the debugging LED that flashes when a key is being pressed
-// comment out in order to disable debugging LED
-#define NEXT_KBD_LED_PORT  PORTD
-#define NEXT_KBD_LED_PIN   PIND
-#define NEXT_KBD_LED_DDR   DDRD
-#define NEXT_KBD_LED_BIT   6
-
-#define NEXT_KBD_LED_ON  NEXT_KBD_LED_PORT |=  (1<<NEXT_KBD_LED_BIT);
-#define NEXT_KBD_LED_OFF NEXT_KBD_LED_PORT &= ~(1<<NEXT_KBD_LED_BIT);
-
-// corresponds to the Keyboard In wire on the NeXT connector
-// (red wire in NeXT connector)
-#define NEXT_KBD_OUT_PORT  PORTB
-#define NEXT_KBD_OUT_PIN   PINB
-#define NEXT_KBD_OUT_DDR   DDRB
-#define NEXT_KBD_OUT_BIT   1
-
-// corresponds to the Keyboard Out wire on the NeXT connector
-// (orange wire in NeXT connector)
-#define NEXT_KBD_IN_PORT   PORTB
-#define NEXT_KBD_IN_PIN    PINB
-#define NEXT_KBD_IN_DDR    DDRB
-#define NEXT_KBD_IN_BIT    0
-
-#endif
-//================= End of Teensy 2.0 Configuration ==================
-
-
-//================ Start of TMK converter Configuration =================
-#ifdef TMK_CONFIG
-
-// this is the debugging LED that flashes when a key is being pressed
-// comment out in order to disable debugging LED
-#define NEXT_KBD_LED1_PORT  PORTD
-#define NEXT_KBD_LED1_PIN   PIND
-#define NEXT_KBD_LED1_DDR   DDRD
-#define NEXT_KBD_LED1_BIT   6
-
-#define NEXT_KBD_LED1_ON    NEXT_KBD_LED1_PORT |=  (1<<NEXT_KBD_LED1_BIT);
-#define NEXT_KBD_LED1_OFF   NEXT_KBD_LED1_PORT &= ~(1<<NEXT_KBD_LED1_BIT);
-
-// corresponds to the Keyboard In wire on the NeXT connector
-#define NEXT_KBD_OUT_PORT  PORTD
-#define NEXT_KBD_OUT_PIN   PIND
-#define NEXT_KBD_OUT_DDR   DDRD
-#define NEXT_KBD_OUT_BIT   1
-
-// corresponds to the Keyboard Out wire on the NeXT connector
-#define NEXT_KBD_IN_PORT   PORTD
-#define NEXT_KBD_IN_PIN    PIND
-#define NEXT_KBD_IN_DDR    DDRD
-#define NEXT_KBD_IN_BIT    0
-
-// this pin is an input for the power key on the NeXT keyboard
-// as the keyboard is powered on this should be normally high;
-// if it is pulled low it means the power button is being preseed
-#define NEXT_KBD_PWR_PORT  PORTD
-#define NEXT_KBD_PWR_PIN   PIND
-#define NEXT_KBD_PWR_DDR   DDRD
-#define NEXT_KBD_PWR_BIT   4
-
-#endif
-//================= End of TMK converter Configuration ==================
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) || \
-    (keyboard_report->mods == (MOD_BIT(KC_RALT) | MOD_BIT(KC_RALT))) || \
-    (keyboard_report->mods == (MOD_BIT(KC_RGUI) | MOD_BIT(KC_RGUI)))  \
-)
diff --git a/converter/next_usb/keymap.c b/converter/next_usb/keymap.c
deleted file mode 100644 (file)
index 0041df5..0000000
+++ /dev/null
@@ -1,177 +0,0 @@
-/*
-NeXT non-ADB Keyboard USB Converter
-Copyright 2013, Benjamin Gould (bgould@github.com)
-
-Based on:
----------
-* TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com>
-* Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/) \
-    released under BSD license \
-    https://github.com/adafruit/USB-NeXT-Keyboard
-
-Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB
-Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html
-Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/
-
-This software is licensed with a Modified BSD License.
-All of this is supposed to be Free Software, Open Source, DFSG-free,
-GPL-compatible, and OK to use in both free and proprietary applications.
-Additions and corrections to this file are welcome.
-
-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 copyright holders nor the names of
-  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 OWNER 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 <stdint.h>
-#include <stdbool.h>
-#include <avr/pgmspace.h>
-#include "keycode.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "keymap.h"
-#include "keycode.h"
-
-// 32*8(256) byte array which converts PS/2 code into USB code
-static const uint16_t PROGMEM fn_actions[] = {
-    ACTION_LAYER_MOMENTARY(1),                  // FN0 - left command key
-    ACTION_LAYER_MOMENTARY(1),                  // FN1 - right command key
-    ACTION_KEY(KC_BSLS),                        // FN2 - number pad slash & backslash
-    ACTION_MODS_KEY(MOD_LSFT, KC_BSLS),         // FN3 - number pad equals & pipe
-    ACTION_MODS_KEY(MOD_LCTL, KC_Z),            // FN4 - cmd+undo  on layer 1
-    ACTION_MODS_KEY(MOD_LCTL, KC_X),            // FN5 - cmd+cut   on layer 1
-    ACTION_MODS_KEY(MOD_LCTL, KC_C),            // FN6 - cmd+copy  on layer 1
-    ACTION_MODS_KEY(MOD_LCTL, KC_V),            // FN7 - cmd+paste on layer 1
-};
-
-/* This is the physical layout that I am starting with:
- *   Note: there is some strangeness on the number pad; 
- *         the equal sign shifts to pipe and forward slash shifts to backslash
- * ,-----------------------------------------------------------. ,-----------. ,---------------.
- * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|   BS  | |VUp|Pwr|BrU| |`  |  =|  /|  *|
- * |-----------------------------------------------------------| |-----------| |---------------|
- * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|     | |VDn|   |BrD| |  7|  8|  9|  -|
- * |------------------------------------------------------     | `---'   `---' |-----------|---|
- * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|               |  4|  5|  6|  +|
- * |-----------------------------------------------------------|     ,---.     |---------------|
- * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |     |  1|  2|  3|   |
- * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
- * |Alt  |Cmd  |              Space                |Cmd  |Alt  | |Lef|Dow|Rig| |      0|  .|   |
- * `-----------------------------------------------------------' `-----------' `---------------'
- *
- * Keymap array:
- *     8 bytes
- *   +---------+
- *  0|         |
- *  :|         | 0x00-0x87
- *  ;|         |
- * 11|         |
- *   +---------+
- */
-#define KEYMAP( \
-    K49,K4A,K4B,K4C,K4D,K50,K4F,K4E,K1E,K1F,K20,K1D,K1C,K1B,  K1A,K58,K19,  K26,K27,K28,K25, \
-    K41,K42,K43,K44,K45,K48,K47,K46,K06,K07,K08,K05,K04,K03,  K02,    K01,  K21,K22,K23,K24, \
-    K57,K39,K3A,K3B,K3C,K3D,K40,K3F,K3E,K2D,K2C,K2B,    K2A,                K12,K18,K13,K15, \
-    K56,    K31,K32,K33,K34,K35,K37,K36,K2E,K2F,K30,    K55,      K16,      K11,K17,K14,     \
-    K52,K54,                  K38,                  K53,K51,  K09,K0F,K10,  K0B,    K0C,K0D  \
-) { \
-    { KC_NO,    KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K10, KC_##K0B, KC_##K0C, KC_##K0D, KC_NO,    KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
-    { KC_##K28, KC_NO,    KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-}
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    
-    /* Layer 0: default
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|   BS  | |Ins|Ref|Hom| |`  |  =|  /|  *|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|     | |Del|   |End| |  7|  8|  9|  -|
-     * |-----------------------------------------------------'     | `---'   `---' |-----------|---|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|               |  4|  5|  6|  +|
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Fn0  |Alt  |              Space                |LGui |Fn1  | |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP(
-    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSPC,  INS, WREF,HOME,  GRV, FN3, FN2, PAST,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,NO,    DEL,      END,   P7,  P8,  P9,  PMNS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                    P4,  P5,  P6,  PPLS,
-    LSFT,     Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RSFT,       UP,         P1,  P2,  P3,  
-    FN0, LALT,                    SPC,                          LGUI,FN1,  LEFT,DOWN,RGHT,  P0,       PDOT,PENT
-    
-    ),
-
-    /* Layer 1: extra keys
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |Grv| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|   BS  | |VUp|VMu|PgU| |`  |  =|  /|  *|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |Pau|  W|  E|  R|  T|  Y|  U|  I|  O|PSc|  \|  ]|     | |VDn|   |PgD| |  7|  8|  9|  -|
-     * |-----------------------------------------------------'     | `---'   `---' |-----------|---|
-     * |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|               |  4|  5|  6|  +|
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |UND|CUT|COP|PST|  B|  N|  M|  ,|  .|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Fn0  |Alt  |              Space                |RGui |Fn1  | |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP(
-    
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, TRNS,  VOLU,MUTE,PGUP,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,PAUS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,FN3, BSLS,TRNS,  VOLD,     PGDN,  BTN1,MS_U,BTN2,WH_U,
-    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,                   MS_L,MS_D,MS_R,WH_D,
-    TRNS,     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
-    
-    )
-};
-
-/* 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/converter/next_usb/led.c b/converter/next_usb/led.c
deleted file mode 100644 (file)
index 2bd0ef6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-NeXT non-ADB Keyboard USB Converter
-Copyright 2013, Benjamin Gould (bgould@github.com)
-
-Based on:
-TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com>
-Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license
-
-Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB
-Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html
-Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/
-
-This software is licensed with a Modified BSD License.
-All of this is supposed to be Free Software, Open Source, DFSG-free,
-GPL-compatible, and OK to use in both free and proprietary applications.
-Additions and corrections to this file are welcome.
-
-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 copyright holders nor the names of
-  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 OWNER 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 "stdint.h"
-#include "led.h"
-#include "next_kbd.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    if (usb_led &  (1<<USB_LED_CAPS_LOCK)) {
-        next_kbd_set_leds(true, true);
-    } else {
-        next_kbd_set_leds(false, false);
-    }
-}
diff --git a/converter/next_usb/matrix.c b/converter/next_usb/matrix.c
deleted file mode 100644 (file)
index d91cd25..0000000
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
-NeXT non-ADB Keyboard USB Converter
-Copyright 2013, Benjamin Gould (bgould@github.com)
-
-Based on:
-TMK firmware code Copyright 2011,2012 Jun WAKO <wakojun@gmail.com>
-Arduino code by "Ladyada" Limor Fried (http://ladyada.net/, http://adafruit.com/), released under BSD license
-
-Timing reference thanks to http://m0115.web.fc2.com/ (dead link), http://cfile7.uf.tistory.com/image/14448E464F410BF22380BB
-Pinouts thanks to http://www.68k.org/~degs/nextkeyboard.html
-Keycodes from http://ftp.netbsd.org/pub/NetBSD/NetBSD-release-6/src/sys/arch/next68k/dev/
-
-This software is licensed with a Modified BSD License.
-All of this is supposed to be Free Software, Open Source, DFSG-free,
-GPL-compatible, and OK to use in both free and proprietary applications.
-Additions and corrections to this file are welcome.
-
-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 copyright holders nor the names of
-  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 OWNER 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 <stdint.h>
-#include <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "print.h"
-#include "util.h"
-#include "serial.h"
-#include "matrix.h"
-#include "debug.h"
-#include "matrix.h"
-#include "next_kbd.h"
-
-static void matrix_make(uint8_t code);
-static void matrix_break(uint8_t code);
-
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      ((code>>3)&0xF)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-/* number of matrix rows */
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-/* number of matrix columns */
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-#ifndef NEXT_KBD_LED1_ON
-#define NEXT_KBD_LED1_ON
-#endif
-
-#ifndef NEXT_KBD_LED1_OFF
-#define NEXT_KBD_LED1_OFF
-#endif
-
-#define NEXT_KBD_PWR_READ (NEXT_KBD_PWR_PIN&(1<<NEXT_KBD_PWR_BIT))
-
-static bool power_state = false;
-
-/* intialize matrix for scanning. should be called once. */
-void matrix_init(void)
-{
-#ifdef DEBUG_ON_INIT
-    debug_enable = true;
-#endif
-
-    // I've found that the matrix likes a little while for things to 
-    // settle down before it gets started.  Not sure why :)
-    _delay_ms(250);
-    
-    dprintf("[ Intializing NeXT keyboard ]\n");
-    NEXT_KBD_LED1_DDR |=  (1<<NEXT_KBD_LED1_BIT);  // LED pin to output
-    NEXT_KBD_LED1_ON;
-    
-    NEXT_KBD_PWR_DDR &= ~(1<<NEXT_KBD_PWR_BIT);  // Power Button pin to input
-    NEXT_KBD_PWR_PIN |=  (1<<NEXT_KBD_PWR_BIT);  // KBD_PWR pull up
-    
-    power_state = NEXT_KBD_PWR_READ ? false : true;
-    dprintf("Initial power button state: %b\n", power_state);
-    
-    next_kbd_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-#ifdef NEXT_KBD_INIT_FLASH_LEDS
-    dprintf("flashing LEDs:");
-    // flash the LEDs after initialization
-    bool leds_on = true;
-    for (uint8_t i = 0; i <= 6; i++)
-    {
-        leds_on = leds_on ? false : true;
-        dprintf(" %b", leds_on); 
-        next_kbd_set_leds(leds_on, leds_on);
-        _delay_ms(250);
-    }
-    dprintf("\n");
-#endif
-
-    dprintf("[ NeXT keyboard initialized ]\n");
-
-    return;
-}
-
-#define NEXT_KBD_KEYCODE(response)               (uint8_t)((response&0xFF)>>1)
-#define NEXT_KBD_PRESSED_KEYCODE(response)       (uint8_t)(((response)&0xF00)==0x400)
-#define NEXT_KBD_PRESSED(response, mask)         (uint8_t)(((response)&mask)>0)
-#define NEXT_KBD_PRESSED_CONTROL(response)       NEXT_KBD_PRESSED(response,0x01000)
-#define NEXT_KBD_PRESSED_SHIFT_LEFT(response)    NEXT_KBD_PRESSED(response,0x02000)
-#define NEXT_KBD_PRESSED_SHIFT_RGHT(response)    NEXT_KBD_PRESSED(response,0x04000)
-#define NEXT_KBD_PRESSED_CMD_LEFT(response)      NEXT_KBD_PRESSED(response,0x08000)
-#define NEXT_KBD_PRESSED_CMD_RGHT(response)      NEXT_KBD_PRESSED(response,0x10000)
-#define NEXT_KBD_PRESSED_ALT_LEFT(response)      NEXT_KBD_PRESSED(response,0x20000)
-#define NEXT_KBD_PRESSED_ALT_RGHT(response)      NEXT_KBD_PRESSED(response,0x40000)
-#define NEXT_KBD_MAKE_OR_BREAK(key, code) \
-    do { \
-        if (NEXT_KBD_PRESSED_##key(resp) > 0) \
-            matrix_make(code); \
-        else \
-            matrix_break(code); \
-    } while (0);
-
-#define NEXT_KBD_PWR_KEYCODE 0x58
-
-/* scan all key states on matrix */
-uint8_t matrix_scan(void)
-{
-    _delay_ms(5);
-    
-    //next_kbd_set_leds(false, false);
-    NEXT_KBD_LED1_OFF;
-    
-    is_modified = false;
-    
-    if (!NEXT_KBD_PWR_READ) {
-        matrix_make(NEXT_KBD_PWR_KEYCODE);
-        power_state = 1;
-        if (is_modified)
-        {
-            dprintf("Power state 1\n");
-            
-        }
-    } else {
-        matrix_break(NEXT_KBD_PWR_KEYCODE);
-        power_state = 0;
-        if (is_modified)
-        {
-            dprintf("Power state 0\n");
-            
-        }
-    }
-    
-    uint32_t resp = (next_kbd_recv());
-    
-    if (resp == NEXT_KBD_KMBUS_IDLE)
-    {
-        return 0;
-    }
-    
-    NEXT_KBD_LED1_ON;
-    
-#ifdef NEXT_KBD_SHIFT_FLASH_LEDS
-    next_kbd_set_leds(
-        NEXT_KBD_PRESSED_SHIFT_LEFT(resp) ? true : false, 
-        NEXT_KBD_PRESSED_SHIFT_RGHT(resp) ? true : false
-    );
-#endif
-    
-    dprintf("[ r=%04lX keycode=%02X pressed=%X CTRL=%X SHIFT_LEFT=%X SHIFT_RGHT=%X CMD_LEFT=%X CMD_RGHT=%X ALT_LEFT=%X ALT_RGHT=%X ]\n", \
-        resp, \
-        NEXT_KBD_KEYCODE(resp), \
-        NEXT_KBD_PRESSED_KEYCODE(resp), \
-        NEXT_KBD_PRESSED_CONTROL(resp), \
-        NEXT_KBD_PRESSED_SHIFT_LEFT(resp), \
-        NEXT_KBD_PRESSED_SHIFT_RGHT(resp), \
-        NEXT_KBD_PRESSED_CMD_LEFT(resp), \
-        NEXT_KBD_PRESSED_CMD_RGHT(resp), \
-        NEXT_KBD_PRESSED_ALT_LEFT(resp), \
-        NEXT_KBD_PRESSED_ALT_RGHT(resp) \
-    );
-    
-    // Modifier keys don't return keycode; have to check the upper bits    
-    NEXT_KBD_MAKE_OR_BREAK(ALT_RGHT,   0x51);
-    NEXT_KBD_MAKE_OR_BREAK(ALT_LEFT,   0x52);
-    NEXT_KBD_MAKE_OR_BREAK(CMD_RGHT,   0x53);
-    NEXT_KBD_MAKE_OR_BREAK(CMD_LEFT,   0x54);
-    NEXT_KBD_MAKE_OR_BREAK(SHIFT_RGHT, 0x55);
-    NEXT_KBD_MAKE_OR_BREAK(SHIFT_LEFT, 0x56);
-    NEXT_KBD_MAKE_OR_BREAK(CONTROL,    0x57);
-    NEXT_KBD_MAKE_OR_BREAK(KEYCODE,    NEXT_KBD_KEYCODE(resp));
-    
-    return 1;
-}
-
-/* whether modified from previous scan. used after matrix_scan. */
-bool matrix_is_modified()
-{
-    return is_modified;
-}
-
-/* whether a switch is on */
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
-    return (matrix[row] & (1<<col));
-}
-
-/* matrix state on row */
-inline
-uint8_t matrix_get_row(uint8_t row)
-{
-    return matrix[row];
-}
-
-/* print matrix for debug */
-void matrix_print(void)
-{
-}
-
-inline
-static void matrix_make(uint8_t code)
-{
-    if (!matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] |= 1<<COL(code);
-        is_modified = true;
-    }
-}
-
-inline
-static void matrix_break(uint8_t code)
-{
-    if (matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] &= ~(1<<COL(code));
-        is_modified = true;
-    }
-}
diff --git a/converter/next_usb/next_timings.jpg b/converter/next_usb/next_timings.jpg
deleted file mode 100644 (file)
index c9e429f..0000000
Binary files a/converter/next_usb/next_timings.jpg and /dev/null differ
diff --git a/converter/pc98_usb/Makefile b/converter/pc98_usb/Makefile
deleted file mode 100644 (file)
index 9892276..0000000
+++ /dev/null
@@ -1,83 +0,0 @@
-# Target file name (without extension).
-TARGET = pc98_usb
-
-# 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 \
-       protocol/serial_uart.c
-#      protocol/serial_soft.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
-
-
-#
-# 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
-
-
-# Build Options
-#   *Comment out* to disable the options.
-#
-MOUSEKEY_ENABLE = yes  # Mouse keys
-EXTRAKEY_ENABLE = yes  # Audio control and System control
-CONSOLE_ENABLE = yes   # Console for debug
-#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)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/pc98_usb/README b/converter/pc98_usb/README
deleted file mode 100644 (file)
index c9bdf3d..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-PC98 to USB keyboard protocol converter
-=======================================
-Target MCU is ATMega32u4 but other USB capable AVR will also work.
-
-
-Connector
----------
-
-    8Pin mini DIN
-       ___ ___
-      /  |_|  \
-     / 8  7  6 \
-    | 5    4  3 |
-     \_ 2   1 _/
-       \_____/  
-     (receptacle)
-
-
-Wiring: You can change this with editing config.h.
-
-    Pin mini DIN        MCU
-    ----------------------------------
-    1  ~RST(TXD)        PD3
-    2   GND             GND
-    3  ~RDY             PD4
-    4   RXD             PD2
-    5  ~RTY             PD5
-    6   NC                 
-    7   NC                 
-    8   5V              VCC
-
-
-
-
-Protocol
---------
-Signal: Asynchronous, Positive logic, 19200baud, Least bit first
-Frame format: 1-Start bit(Lo), 8-Data bits, Odd-Parity, 1-Stop bit
-
-
-
-Build Firmware
---------------
-Just use 'make'
-
-    $ cd pc98_usb
-    $ make
-
-Then, load the binary to MCU with your favorite programmer.
-
-
-
-Other PC98 converter projects and resource
-------------------------------------------
-PC98 to USB
-http://davy.nyacom.net/kbd98usb/
-
-PC98 to PS/2
-http://www.tsp.ne.jp/~sawada/mago/c_gka98at.htm
-http://www.tsp.ne.jp/~sawada/mago/src/gka98at.asm
-
-PC98 keyboard commands
-http://www.webtech.co.jp/company/doc/undocumented_mem/io_kb.txt
-
-
-Inhibit repeating key:
-0x9C, 0x70
diff --git a/converter/pc98_usb/config.h b/converter/pc98_usb/config.h
deleted file mode 100644 (file)
index b8d676e..0000000
+++ /dev/null
@@ -1,123 +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      0x9898
-#define DEVICE_VER      0x0100
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         PC98 keyboard converter
-#define DESCRIPTION     converts PC98 keyboard protocol into USB
-
-
-/* matrix size */
-#define MATRIX_ROWS     16
-#define MATRIX_COLS     8
-
-/* key combination for command */
-#define IS_COMMAND()    ( \
-    host_get_first_key() == KC_CANCEL \
-)
-
-
-/* PC98 Reset Port shared with TXD */
-#define PC98_RST_DDR    DDRD
-#define PC98_RST_PORT   PORTD
-#define PC98_RST_BIT    3
-/* PC98 Ready Port */
-#define PC98_RDY_DDR    DDRD
-#define PC98_RDY_PORT   PORTD
-#define PC98_RDY_BIT    4
-/* PC98 Retry Port */
-#define PC98_RTY_DDR    DDRD
-#define PC98_RTY_PORT   PORTD
-#define PC98_RTY_BIT    5
-
-/*
- * PC98 Serial(USART) configuration
- *     asynchronous, positive logic, 19200baud, bit order: LSB first
- *     1-start bit, 8-data bit, odd parity, 1-stop bit
- */
-/*
- * Software Serial
- */
-#define SERIAL_SOFT_BAUD                19200
-#define SERIAL_SOFT_PARITY_ODD
-#define SERIAL_SOFT_BIT_ORDER_LSB
-#define SERIAL_SOFT_LOGIC_POSITIVE
-/* RXD Port */
-#define SERIAL_SOFT_RXD_DDR             DDRD
-#define SERIAL_SOFT_RXD_PORT            PORTD
-#define SERIAL_SOFT_RXD_PIN             PIND
-#define SERIAL_SOFT_RXD_BIT             2
-#define SERIAL_SOFT_RXD_READ()          (SERIAL_SOFT_RXD_PIN&(1<<SERIAL_SOFT_RXD_BIT))
-/* RXD Interupt */
-#define SERIAL_SOFT_RXD_VECT            INT2_vect
-#define SERIAL_SOFT_RXD_INIT()          do { \
-    /* pin configuration: input with pull-up */ \
-    SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
-    SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
-    /* enable interrupt: INT2(falling edge) */ \
-    EICRA |= ((1<<ISC21)|(0<<ISC20)); \
-    EIMSK |= (1<<INT2); \
-    sei(); \
-} while (0)
-#define SERIAL_SOFT_RXD_INT_ENTER()
-#define SERIAL_SOFT_RXD_INT_EXIT()      do { \
-    /* clear interrupt  flag */ \
-    EIFR = (1<<INTF2); \
-} while (0)
-/* TXD Port */
-#define SERIAL_SOFT_TXD_DDR             DDRD
-#define SERIAL_SOFT_TXD_PORT            PORTD
-#define SERIAL_SOFT_TXD_PIN             PIND
-#define SERIAL_SOFT_TXD_BIT             3
-#define SERIAL_SOFT_TXD_HI()            do { SERIAL_SOFT_TXD_PORT |=  (1<<SERIAL_SOFT_TXD_BIT); } while (0)
-#define SERIAL_SOFT_TXD_LO()            do { SERIAL_SOFT_TXD_PORT &= ~(1<<SERIAL_SOFT_TXD_BIT); } while (0)
-#define SERIAL_SOFT_TXD_INIT()          do { \
-    /* pin configuration: output */ \
-    SERIAL_SOFT_TXD_DDR |= (1<<SERIAL_SOFT_TXD_BIT); \
-    /* idle */ \
-    SERIAL_SOFT_TXD_ON(); \
-} while (0)
-
-
-/*
- * Hardware Serial(UART)
- */
-#ifdef __AVR_ATmega32U4__
-    #define SERIAL_UART_BAUD       19200
-    #define SERIAL_UART_DATA       UDR1
-    #define SERIAL_UART_UBRR       ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
-    #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 = (uint8_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 |= (1<<UPM11) | (1<<UPM10);  /* parity: none(00), even(01), odd(11) */ \
-        sei(); \
-    } while(0)
-#else
-    #error "USART configuration is needed."
-#endif
-
-
-#endif
diff --git a/converter/pc98_usb/keymap.c b/converter/pc98_usb/keymap.c
deleted file mode 100644 (file)
index 8922ea7..0000000
+++ /dev/null
@@ -1,208 +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/pgmspace.h>
-#include "keycode.h"
-#include "action.h"
-#include "action_macro.h"
-#include "util.h"
-#include "keymap.h"
-
-
-
-
-/* PC-9801-98-S02   Raku Raku keyboard(Luckyboard) Normal Mode
-  ,---------------------------------------------------------------.
-  | 60| 61| 62| 63| 64| 65| 66| 67| 68| 69| 6A| 6B| 36| 37| 3F| 3E|
-  `---------------------------------------------------------------'
-  ,---------------------------------------------------------------.
-  |    00| 01| 02| 03| 04| 05|  58|  71| 06| 07| 08| 09| 0A|    0E|
-  |---------------------------------------------------------------|
-  |   0F| 10| 11| 12| 13| 14|    3A     | 15| 16| 17| 18| 19|   1C|
-  |---------------------------------------------------------'.    |
-  |  74| 20| 21| 22| 23| 24|  3B  |  3C  | 25| 26| 27| 28| 29|    |
-  |---------------------------------------------------------------|
-  | 70| 2A| 2B| 2C| 2D| 2E| 38|  3D   | 39| 2F| 30| 31| 32| 33| 70|
-  `---------------------------------------------------------------'
-          | 73|   51|   5B|   59|       34|   5A|   35| xx|
-          `-----------------------------------------------'
-  xx: 74 35 F4 B5
-*/
-#define KEYMAP( \
-    K60, K61, K62, K63, K64, K65, K66, K67, K68, K69, K6A, K6B, K36, K37, K3F, K3E, \
-      K00,  K01, K02, K03, K04, K05,  K58, K71,   K06, K07, K08, K09, K0A,    K0E,  \
-      K0F,  K10, K11, K12, K13, K14,     K3A,     K15, K16, K17, K18, K19,    K1C,  \
-      K74, K20, K21, K22, K23, K24,   K3B,  K3C,   K25, K26, K27, K28, K29,         \
-      K70,K2A, K2B, K2C, K2D, K2E, K38,  K3D,  K39, K2F, K30, K31, K32, K33,        \
-               K73,  K51, K5B, K59,        K34,        K5A,  K35                    \
-) { \
-    { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_NO,    KC_NO,    KC_NO,    KC_##K0E, KC_##K0F }, \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
-    { KC_##K18, KC_##K19, KC_NO,    KC_NO,    KC_##K1C, KC_NO,    KC_NO,    KC_NO    }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { 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_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_##K51, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##K70, KC_##K71, KC_NO,    KC_##K73, KC_##K74, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }  \
-}
-
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /*
-  ,---------------------------------------------------------------.
-  | 60| 61| 62| 63| 64| 65| 66| 67| 68| 69| 6A| 6B| 36| 37| 3F| 3E|
-  `---------------------------------------------------------------'
-  ,---------------------------------------------------------------.
-  |    00| 01| 02| 03| 04| 05|  58|  71| 06| 07| 08| 09| 0A|    0E|
-  |---------------------------------------------------------------|
-  |   0F| 10| 11| 12| 13| 14|    3A     | 15| 16| 17| 18| 19|   1C|
-  |---------------------------------------------------------------|
-  |  74| 20| 21| 22| 23| 24|  MINS|   EQL| 25| 26| 27| 28| 29|    |
-  |---------------------------------------------------------------|
-  | 70| 2A| 2B| 2C| 2D| 2E| 38|  3D   | 39| 2F| 30| 31| 32| 33| 70|
-  `---------------------------------------------------------------'
-          | 73|   51|   5B|   59|       34|   5A|   35| xx|
-          `-----------------------------------------------'
-    */
-    KEYMAP(
-  CANCEL,COPY,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10, F11, F12, F13, FN6,
-      ESC,    1,   2,   3,   4,   5,   FN4, FN5,    6,   7,   8,   9,   0,   BSPC,
-      TAB,    Q,   W,   E,   R,   T,      UP,       Y,   U,   I,   O,   P,   ENT,
-      LCTL,  A,   S,   D,   F,   G,  MINS,  EQL,     H,   J,   K,   L, FN2,
-      LSFT, Z,   X,   C,   V,   B, GRV, BSLS, QUOT,   N,   M,COMM, DOT, FN1,
-              LGUI, LALT, LCTL, LSFT,      SPC,      SPC,   RALT
-    ),
-    KEYMAP(
-    PAUS,COPY,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10, F11, F12, F13, F14,
-      GRV,   F1,  F2,  F3,  F4,  F5,    NO, NO,    F6,  F7,  F8,  F9, F10,    DEL,
-      TAB,    Q,   W,   E,   R,   T,      UP,    HOME,PGDN,PGUP, END,   P,   ENT,
-      LCTL,  A,   S,   D,   F,   G,  MINS,  EQL,  LEFT,DOWN,  UP,RGHT,SCLN,
-      LSFT, Z,   X,   C,   V,   B, INS, DOWN,  DEL,HOME,PGDN,PGUP, END,TRNS,
-              LGUI, LALT, LCTL, LSFT,      SPC,      SPC,   RALT
-    ),
-    KEYMAP(
-    PAUS,COPY,  F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9, F10, F11, F12, F13, F14,
-      GRV,   F1,  F2,  F3,  F4,  F5,    NO, NO,    F6,  F7,  F8,  F9, F10,    DEL,
-      TAB,    Q,   W,   E,   R,   T,      UP,    WH_L,WH_D,WH_U,WH_R,   P,   ENT,
-      LCTL,  A,   S,   D,   F,   G,  MINS,  EQL,  MS_L,MS_D,MS_U,MS_R,TRNS,
-      LSFT, Z,   X,   C,   V,   B, INS, DOWN, BTN3,BTN2,BTN1,BTN4,BTN5,TRNS,
-              LGUI, LALT, LCTL, LSFT,      SPC,      SPC,   RALT
-    ),
-};
-static const uint8_t PROGMEM overlays[][MATRIX_ROWS][MATRIX_COLS] = {};
-
-/*
- * Macro definition
- */
-enum macro_id {
-    LBRACKET,
-    RBRACKET,
-    DUMMY,
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-    keyevent_t event = record->event;
-    //uint8_t tap_count = record->tap_count;
-
-    switch (id) {
-        case LBRACKET:
-            return (event.pressed ?
-                    MACRO( T(LBRC), END ) :
-                    MACRO( T(LBRC), END ) );
-        case RBRACKET:
-            return (event.pressed ?
-                    MACRO( T(RBRC), END ) :
-                    MACRO( T(RBRC), END ) );
-    }
-    return MACRO_NONE;
-}
-
-/*
- * Action function
- */
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-/*
-    keyevent_t event = record->event;
-    uint8_t tap_count = record->tap_count;
-    switch (id) {
-        case 0xFF:
-            action_macro_play(get_macro(opt, event.pressed));
-            break;
-    }
-*/
-}
-
-
-/*
- * Fn actions
- */
-static const uint16_t PROGMEM fn_actions[] = {
-    ACTION_LAYER_TAP_TOGGLE(0),                  // FN0
-    ACTION_LAYER_TAP_KEY(1, KC_SLASH),           // FN1
-    ACTION_LAYER_TAP_KEY(2, KC_SCLN),            // FN2
-    ACTION_LAYER_MOMENTARY(2),                   // FN3
-    ACTION_MACRO(LBRACKET),                      // FN4
-    ACTION_MACRO(RBRACKET),                      // FN5
-    ACTION_MACRO(DUMMY),                         // FN6
-};
-
-
-
-
-
-
-/*
- * No need to edit.
- */
-#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/converter/pc98_usb/led.c b/converter/pc98_usb/led.c
deleted file mode 100644 (file)
index 48c3f1c..0000000
+++ /dev/null
@@ -1,33 +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 "serial.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    uint8_t sun_led = 0;
-    if (usb_led & (1<<USB_LED_NUM_LOCK))    sun_led |= (1<<0);
-    if (usb_led & (1<<USB_LED_COMPOSE))     sun_led |= (1<<1);
-    if (usb_led & (1<<USB_LED_SCROLL_LOCK)) sun_led |= (1<<2);
-    if (usb_led & (1<<USB_LED_CAPS_LOCK))   sun_led |= (1<<3);
-
-    serial_send(0x0E);
-    serial_send(sun_led);
-}
diff --git a/converter/pc98_usb/matrix.c b/converter/pc98_usb/matrix.c
deleted file mode 100644 (file)
index 8833e0a..0000000
+++ /dev/null
@@ -1,211 +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 "util.h"
-#include "matrix.h"
-#include "debug.h"
-#include "protocol/serial.h"
-
-
-/*
- * Matrix Array usage:
- *
- * ROW: 16(4bits)
- * COL:  8(3bits)
- *
- *    8bit wide
- *   +---------+
- *  0|00 ... 07|
- *  1|08 ... 0F|
- *  :|   ...   |
- *  :|   ...   |
- *  E|70 ... 77|
- *  F|78 ... 7F|
- *   +---------+
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      ((code>>3)&0xF)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-static void pc98_inhibit_repeat(void)
-{
-    uint8_t code;
-
-    while (serial_recv()) ;
-RETRY:
-    PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
-    _delay_ms(500);
-    serial_send(0x9C);
-
-    PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
-    _delay_ms(100);
-    while (!(code = serial_recv())) ;
-    print("PC98: send 9C: "); print_hex8(code); print("\n");
-    if (code != 0xFA) goto RETRY;
-
-
-
-    PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
-    _delay_ms(100);
-    serial_send(0x70);
-
-    PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
-    _delay_ms(100);
-    //code = serial_recv();
-    while (!(code = serial_recv())) ;
-    print("PC98: send 70: "); print_hex8(code); print("\n");
-    if (code != 0xFA) goto RETRY;
-}
-
-void matrix_init(void)
-{
-    PC98_RST_DDR |= (1<<PC98_RST_BIT);
-    PC98_RDY_DDR |= (1<<PC98_RDY_BIT);
-    PC98_RTY_DDR |= (1<<PC98_RTY_BIT);
-    PC98_RST_PORT |= (1<<PC98_RST_BIT);
-    PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
-    PC98_RTY_PORT |= (1<<PC98_RTY_BIT);
-
-
-    serial_init();
-
-    // PC98 reset
-/*
-    PC98_RST_PORT &= ~(1<<PC98_RST_BIT);
-    _delay_us(15);
-    PC98_RST_PORT |= (1<<PC98_RST_BIT);
-    _delay_us(13);
-    PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
-*/
-
-    _delay_ms(500);
-    pc98_inhibit_repeat();
-
-
-    // PC98 ready
-    PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    debug("init\n");
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-    is_modified = false;
-
-    uint16_t code;
-    PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
-    _delay_us(30);
-    code = serial_recv2();
-    PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
-    if (code == -1) return 0;
-
-if (code == 0x60) {
-    pc98_inhibit_repeat();
-
-/*
-    PC98_RDY_PORT |= (1<<PC98_RDY_BIT);
-    _delay_ms(100);
-    serial_send(0x96);
-    PC98_RDY_PORT &= ~(1<<PC98_RDY_BIT);
-*/
-
-    return 0;
-}
-
-    print_hex8(code); print(" ");
-
-    if (code&0x80) {
-        // break code
-        if (matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] &= ~(1<<COL(code));
-            is_modified = true;
-        }
-    } else {
-        // make code
-        if (!matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] |=  (1<<COL(code));
-            is_modified = true;
-        }
-    }
-    return code;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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
-uint8_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++) {
-        count += bitpop(matrix[i]);
-    }
-    return count;
-}
diff --git a/converter/ps2_usb/Makefile b/converter/ps2_usb/Makefile
deleted file mode 100644 (file)
index 51b2225..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-# 
-# Makefile for Teensy
-#
-# Target file name (without extension).
-TARGET = ps2_usb_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 \
-       led.c
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_plain.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
-NKRO_ENABLE = yes      # USB Nkey Rollover - not yet supported in LUFA
-
-
-# PS/2 Options
-#
-#PS2_USE_USART = yes   # uses hardware USART engine for PS/2 signal receive(recomened)
-PS2_USE_INT = yes      # uses external interrupt for falling edge of PS/2 clock pin
-#PS2_USE_BUSYWAIT = yes        # uses primitive reference code
-
-
-# Optimize size but this may cause error "relocation truncated to fit"
-#EXTRALDFLAGS = -Wl,--relax
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/ps2_usb/Makefile.mbed b/converter/ps2_usb/Makefile.mbed
deleted file mode 100644 (file)
index a7ea5bc..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-PROJECT = ps2_usb
-
-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)/protocol/ps2_busywait.o \
-       $(OBJDIR)/protocol/ps2_io_mbed.o \
-       $(OBJDIR)/./keymap_common.o \
-       $(OBJDIR)/./matrix.o \
-       $(OBJDIR)/./led.o \
-       $(OBJDIR)/./main.o
-
-ifdef KEYMAP
-    OBJECTS := $(OBJDIR)/keymap_$(KEYMAP).o $(OBJECTS)
-else
-    OBJECTS := $(OBJDIR)/keymap_plain.o $(OBJECTS)
-endif
-
-CONFIG_H = config_mbed.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/mk20d50m.mk
-include $(TMK_DIR)/tool/mbed/lpc11u35_501.mk
-include $(TMK_DIR)/tool/mbed/mbed.mk
-include $(TMK_DIR)/tool/mbed/common.mk
-include $(TMK_DIR)/tool/mbed/gcc.mk
diff --git a/converter/ps2_usb/Makefile.pjrc b/converter/ps2_usb/Makefile.pjrc
deleted file mode 100644 (file)
index 64319ac..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-# Target file name (without extension).
-TARGET = ps2_usb_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 := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_plain.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
-
-
-# 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
-EXTRAKEY_ENABLE = yes  # Audio control and System control
-CONSOLE_ENABLE = yes   # Console for debug(+400)
-COMMAND_ENABLE = yes    # Commands for debug and configuration
-NKRO_ENABLE = yes      # USB Nkey Rollover
-
-
-# PS/2 Options
-#
-#PS2_USE_USART = yes   # uses hardware USART engine for PS/2 signal receive(recomened)
-#PS2_USE_INT = yes     # uses external interrupt for falling edge of PS/2 clock pin
-PS2_USE_BUSYWAIT = yes # uses primitive reference code
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/pjrc.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/ps2_usb/Makefile.tmk_rev1 b/converter/ps2_usb/Makefile.tmk_rev1
deleted file mode 100644 (file)
index 6aaef49..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# 
-# Makefile for TMK keyboard converter rev2
-#     https://github.com/tmk/keyboard_converter#pcb-rev1
-#
-# Target file name (without extension).
-TARGET = ps2_usb_tmk_rev1
-
-# 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 \
-       led.c
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_plain.c $(SRC)
-endif
-
-CONFIG_H = config_tmk_rev1.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)
-
-
-# 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
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-
-
-# PS/2 Options
-#
-PS2_USE_USART = yes    # uses hardware USART engine for PS/2 signal receive(recomened)
-#PS2_USE_BUSYWAIT = yes        # uses primitive reference code
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/ps2_usb/Makefile.tmk_rev2 b/converter/ps2_usb/Makefile.tmk_rev2
deleted file mode 100644 (file)
index 5049a22..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# 
-# Makefile for TMK keyboard converter rev2
-#     https://github.com/tmk/keyboard_converter#pcb-rev2
-#
-# Target file name (without extension).
-TARGET = ps2_usb_tmk_rev2
-
-# 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 \
-       led.c
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_plain.c $(SRC)
-endif
-
-CONFIG_H = config_tmk_rev2.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)
-
-
-# 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
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-
-
-# PS/2 Options
-#
-PS2_USE_INT = yes      # uses external interrupt for falling edge of PS/2 clock pin
-#PS2_USE_BUSYWAIT = yes        # uses primitive reference code
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/ps2_usb/Makefile.vusb b/converter/ps2_usb/Makefile.vusb
deleted file mode 100644 (file)
index d9fa12b..0000000
+++ /dev/null
@@ -1,107 +0,0 @@
-# Target file name (without extension).
-TARGET = ps2_usb_vusb
-
-# 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 := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap_plain.c $(SRC)
-endif
-
-CONFIG_H = config.h
-
-
-# Use USART for PS/2. With V-USB INT and BUSYWAIT code is not useful.
-PS2_USE_USART = yes
-
-
-# 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 = at90usb162       # Teensy 1.0
-#MCU = atmega32u4       # Teensy 2.0
-#MCU = at90usb646       # Teensy++ 1.0
-#MCU = at90usb1286      # Teensy++ 2.0
-MCU = atmega168
-
-
-# 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 = 20000000
-
-
-# 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
-NO_UART = yes          # UART is unavailable
-
-
-
-#---------------- 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/converter/ps2_usb/README.md b/converter/ps2_usb/README.md
deleted file mode 100644 (file)
index 74464e2..0000000
+++ /dev/null
@@ -1,84 +0,0 @@
-PS/2 to USB keyboard converter
-==============================
-This firmware converts PS/2 keyboard protocol to USB.(It supports Scan Code Set 2.)
-
-
-Connect Wires
--------------
-In case of Teensy2.0(ATMega32U4):
-
-1. Connect **Vcc** and **GND**.
-2. Connect **Clock** and **Data** line. 
-    - **Interrupt**:   **Clock** is on `PD1` and **Data** on `PD0`.(Recommended. Soarer's converter compatible)
-    - **Busywait**:    **Clock** is on `PD1` and **Data** on `PD0`.
-    - **USART**:       **Clock** is on `PD5` and **Data** on `PD2`.
-3. Optionally you need pull-up resistor. 1K-10K Ohm is OK.
-
-To change pin configuration edit **config.h** and **Makefile**.
-
-
-Build Firmware
---------------
-For **PJRC Teensy** just run `make`:
-
-    $ make clean
-    $ make
-
-To select keymap:
-
-    $ make clean
-    $ make KEYMAP=[plain|jis|spacefn|...]
-
-After that you will find HEX file `ps2_usb_lufa.hex` in current directory.
-
-
-- For **TMK converter Rev.1** use `make -f Makefile.tmk_rev1` instead of `make` and HEX file is `ps2_usb_tmk_rev1.hex`.
-
-- For **TMK converter Rev.2** use `make -f Makefile.tmk_rev2` instead of `make` and HEX file is `ps2_usb_tmk_rev2.hex`.
-
-
-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 README.md of top directory) and existent keymap files.
-
-
-PS/2 signal handling implementations
-------------------------------------
-Following three methods can be used to implement PS/2 signal handling.
-
-### Simple and stupid busy-wait(ps2_busywait.c)
-    This is expected to implemented with portable C code for reference.
-### Interrupt driven(ps2_interrupt.c)
-    Uses pin interrupt to detect falling edge of clock line.
-### USART hardware module(ps2_usart.c)
-    Uses AVR USART engine to receive PS/2 signal.
-
-To select method edit Makefile.
-
-
-V-USB Support
--------------
-With V-USB you can use this converter on ATmega(168/328) but it doesn't support NKRO at this time.
-
-Circuit:
-
-                    +---+   +---------------+
-    USB            GND  |   |   ATmega168   |
-    ===                 C3  |               |
-    5V <-------+--------+---|Vcc,AVCC       |        PS/2
-               R1           |               |        ====
-    D- <----+--+-----R2-----|INT1        RXD|------->DATA
-    D+ <----|---+----R3-----|INT0        XCK|------->CLOCK
-            Z1  Z2          |               |      ->5V
-    GND<----+---+--+--+-----|GND            |      ->GND
-                   |  |     |               |
-                   |  C2-+--|XTAL1          |
-                   |     X1 |               |
-                   +--C3-+--|XTAL2          |
-                            +---------------+
-    R1:     1.5K Ohm
-    R2,R3:  68 Ohm
-    Z1,Z2:  Zenner 3.6V
-    C1,C2:  22pF
-    C3:     0.1uF
-    X1:     Crystal 20MHz(16MHz/12MHz)
diff --git a/converter/ps2_usb/config.h b/converter/ps2_usb/config.h
deleted file mode 100644 (file)
index c0a4fab..0000000
+++ /dev/null
@@ -1,173 +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 <avr/interrupt.h>
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x6512
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         PS/2 keyboard converter
-#define DESCRIPTION     convert PS/2 keyboard to USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 32  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-//#define NO_SUSPEND_POWER_DOWN
-
-
-/*
- * PS/2 Busywait
- */
-#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    0
-#endif
-
-/*
- * PS/2 Pin interrupt
- */
-#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    0
-#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 USART
- */
-#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
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
-/* 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   4
-#define PS2_DATA_PORT   PORTD
-#define PS2_DATA_PIN    PIND
-#define PS2_DATA_DDR    DDRD
-#define PS2_DATA_BIT    0
-/* 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);     \
-    UCSR0C = ((1 << UMSEL00) |  \
-              (3 << UPM00)   |  \
-              (0 << USBS0)   |  \
-              (3 << UCSZ00)  |  \
-              (0 << UCPOL0));   \
-    UCSR0A = 0;                 \
-    UBRR0H = 0;                 \
-    UBRR0L = 0;                 \
-} while (0)
-#define PS2_USART_RX_INT_ON() do {  \
-    UCSR0B = ((1 << RXCIE0) |       \
-              (1 << RXEN0));        \
-} while (0)
-#define PS2_USART_RX_POLL_ON() do { \
-    UCSR0B = (1 << RXEN0);          \
-} while (0)
-#define PS2_USART_OFF() do {    \
-    UCSR0C = 0;                 \
-    UCSR0B &= ~((1 << RXEN0) |  \
-                (1 << TXEN0));  \
-} while (0)
-#define PS2_USART_RX_READY      (UCSR0A & (1<<RXC0))
-#define PS2_USART_RX_DATA       UDR0
-#define PS2_USART_ERROR         (UCSR0A & ((1<<FE0) | (1<<DOR0) | (1<<UPE0)))
-#define PS2_USART_RX_VECT       USART_RX_vect
-#endif
-#endif
-
-#endif
diff --git a/converter/ps2_usb/config_mbed.h b/converter/ps2_usb/config_mbed.h
deleted file mode 100644 (file)
index 5819763..0000000
+++ /dev/null
@@ -1,60 +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_MBED_H
-#define CONFIG_MBED_H
-
-
-#if 0
-// duplicated name against mbed USBDeivce
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x6512
-#endif
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         PS/2 keyboard converter
-#define DESCRIPTION     convert PS/2 keyboard to USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 32  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-/*
- * PS/2 Busywait
- */
-#ifdef PS2_USE_BUSYWAIT
-#   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
-#endif
-
-
-#endif
diff --git a/converter/ps2_usb/config_tmk_rev1.h b/converter/ps2_usb/config_tmk_rev1.h
deleted file mode 100644 (file)
index 75dc97d..0000000
+++ /dev/null
@@ -1,147 +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 <avr/interrupt.h>
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x6512
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         PS/2 keyboard converter
-#define DESCRIPTION     convert PS/2 keyboard to USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 32  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-//#define NO_SUSPEND_POWER_DOWN
-
-
-/*
- * PS/2 Busywait
- */
-#ifdef PS2_USE_BUSYWAIT
-#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
-#endif
-
-/*
- * PS/2 USART
- */
-#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
-#elif defined(__AVR_ATmega168__) || defined(__AVR_ATmega168P__) || defined(__AVR_ATmega328P__)
-/* 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   4
-#define PS2_DATA_PORT   PORTD
-#define PS2_DATA_PIN    PIND
-#define PS2_DATA_DDR    DDRD
-#define PS2_DATA_BIT    0
-/* 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);     \
-    UCSR0C = ((1 << UMSEL00) |  \
-              (3 << UPM00)   |  \
-              (0 << USBS0)   |  \
-              (3 << UCSZ00)  |  \
-              (0 << UCPOL0));   \
-    UCSR0A = 0;                 \
-    UBRR0H = 0;                 \
-    UBRR0L = 0;                 \
-} while (0)
-#define PS2_USART_RX_INT_ON() do {  \
-    UCSR0B = ((1 << RXCIE0) |       \
-              (1 << RXEN0));        \
-} while (0)
-#define PS2_USART_RX_POLL_ON() do { \
-    UCSR0B = (1 << RXEN0);          \
-} while (0)
-#define PS2_USART_OFF() do {    \
-    UCSR0C = 0;                 \
-    UCSR0B &= ~((1 << RXEN0) |  \
-                (1 << TXEN0));  \
-} while (0)
-#define PS2_USART_RX_READY      (UCSR0A & (1<<RXC0))
-#define PS2_USART_RX_DATA       UDR0
-#define PS2_USART_ERROR         (UCSR0A & ((1<<FE0) | (1<<DOR0) | (1<<UPE0)))
-#define PS2_USART_RX_VECT       USART_RX_vect
-#endif
-#endif
-
-#endif
diff --git a/converter/ps2_usb/config_tmk_rev2.h b/converter/ps2_usb/config_tmk_rev2.h
deleted file mode 100644 (file)
index 2e91838..0000000
+++ /dev/null
@@ -1,85 +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 <avr/interrupt.h>
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x6512
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         PS/2 keyboard converter
-#define DESCRIPTION     convert PS/2 keyboard to USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 32  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-
-//#define NO_SUSPEND_POWER_DOWN
-
-
-/*
- * PS/2 Busywait
- */
-#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    0
-#endif
-
-/*
- * PS/2 Pin interrupt
- */
-#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    0
-#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
-
-#endif
diff --git a/converter/ps2_usb/keymap_common.c b/converter/ps2_usb/keymap_common.c
deleted file mode 100644 (file)
index e344fb4..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-Copyright 2011,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"
-#include "progmem.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/converter/ps2_usb/keymap_common.h b/converter/ps2_usb/keymap_common.h
deleted file mode 100644 (file)
index d783e01..0000000
+++ /dev/null
@@ -1,173 +0,0 @@
-/*
-Copyright 2011,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_macro.h"
-#include "report.h"
-#include "print.h"
-#include "debug.h"
-#include "keymap.h"
-
-
-// 32*8(256) byte array which converts PS/2 code into USB code
-extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-extern const uint16_t fn_actions[];
-
-
-/* All keys */
-#define KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    K61,                     /* for European ISO */                                         \
-    K51, K13, K6A, K64, K67, /* for Japanese JIS */                                         \
-    K08, K10, K18, K20, K28, K30, K38, K40, K48, K50, K57, K5F, /* F13-24 */                \
-    KB7, KBF, KDE,           /* System Power, Sleep, Wake */                                \
-    KA3, KB2, KA1,           /* Mute, Volume Up, Volume Down */                             \
-    KCD, K95, KBB, KB4, KD0, /* Next, Previous, Stop, Pause, Media Select */                \
-    KC8, KAB, KC0,           /* Mail, Calculator, My Computer */                            \
-    K90, KBA, KB8, KB0,      /* WWW Search, Home, Back, Forward */                          \
-    KA8, KA0, K98            /* WWW Stop, Refresh, Favorites */                             \
-) { \
-    { KC_NO,    KC_##K01, KC_NO,    KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_NO    }, \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO    }, \
-    { KC_##K18, KC_NO,    KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_NO    }, \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO    }, \
-    { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_NO    }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_NO    }, \
-    { KC_##K38, KC_NO,    KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO    }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_NO    }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_NO    }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_NO,    KC_##K54, KC_##K55, KC_NO,    KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_NO,    KC_##K5D, KC_NO,    KC_##K5F }, \
-    { KC_NO,    KC_##K61, KC_NO,    KC_NO,    KC_##K64, KC_NO,    KC_##K66, KC_##K67 }, \
-    { KC_NO,    KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K83, 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_##K90, KC_##K91, KC_NO,    KC_NO,    KC_##K94, KC_##K95, KC_NO,    KC_NO    }, \
-    { KC_##K98, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K9F }, \
-    { KC_##KA0, KC_##KA1, KC_NO,    KC_##KA3, KC_NO,    KC_NO,    KC_NO,    KC_##KA7 }, \
-    { KC_##KA8, KC_NO,    KC_NO,    KC_##KAB, KC_NO,    KC_NO,    KC_NO,    KC_##KAF }, \
-    { KC_##KB0, KC_NO,    KC_##KB2, KC_NO,    KC_##KB4, KC_NO,    KC_NO,    KC_##KB7 }, \
-    { KC_##KB8, KC_NO,    KC_##KBA, KC_##KBB, KC_NO,    KC_NO,    KC_NO,    KC_##KBF }, \
-    { KC_##KC0, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##KC8, KC_NO,    KC_##KCA, KC_NO,    KC_NO,    KC_##KCD, KC_NO,    KC_NO    }, \
-    { KC_##KD0, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##KDA, KC_NO,    KC_NO,    KC_NO,    KC_##KDE, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_##KE9, KC_NO,    KC_##KEB, KC_##KEC, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##KF0, KC_##KF1, KC_##KF2, KC_NO,    KC_##KF4, KC_##KF5, KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##KFA, KC_NO,    KC_##KFC, KC_##KFD, KC_##KFE, KC_NO    }, \
-}
-
-/* US layout */
-#define KEYMAP( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA  \
-) \
-KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    NUBS,                                                                                   \
-    RO, KANA, JYEN, HENK, MHEN,                                                             \
-    F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,                             \
-    SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE,                                                \
-    AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN,                                               \
-    MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT,         \
-    MAIL, CALCULATOR, MY_COMPUTER,                                                          \
-    WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD,                                            \
-    WWW_STOP, WWW_REFRESH, WWW_FAVORITES                                                    \
-)
-
-/* ISO layout */
-#define KEYMAP_ISO( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,     KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D,K5A,               K6B,K73,K74,K79, \
-    K12,K61,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,    K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA  \
-) \
-KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    K61,                                                                                    \
-    RO, KANA, JYEN, HENK, MHEN,                                                             \
-    F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,                             \
-    SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE,                                                \
-    AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN,                                               \
-    MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT,         \
-    MAIL, CALCULATOR, MY_COMPUTER,                                                          \
-    WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD,                                            \
-    WWW_STOP, WWW_REFRESH, WWW_FAVORITES                                                    \
-)
-
-/* JIS layout */
-#define KEYMAP_JIS( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,         KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K6A,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,         KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,K51,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,    K67,K29,K64,K13,            K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA  \
-) \
-KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    NUBS,                                                                                   \
-    K51, K13, K6A, K64, K67,                                                                \
-    F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,                             \
-    SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE,                                                \
-    AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN,                                               \
-    MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT,         \
-    MAIL, CALCULATOR, MY_COMPUTER,                                                          \
-    WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD,                                            \
-    WWW_STOP, WWW_REFRESH, WWW_FAVORITES                                                    \
-)
-
-#endif
diff --git a/converter/ps2_usb/keymap_jis.c b/converter/ps2_usb/keymap_jis.c
deleted file mode 100644 (file)
index 0258515..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * JIS layout Japanese keyboard
- */
-#include "keymap_common.h"
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: JIS LAYOUT
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.     ,-----------.
-     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|     |Pwr|Slp|Wak|
-     * `---'   `---------------' `---------------' `---------------' `-----------'     `-----------'
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =| JY|Bsp| |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Ret | |Del|End|PgD| |  7|  8|  9|   |
-     * |------------------------------------------------------`    | `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  :|  \|    |               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /| RO|Shift |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl |Gui |Alt |MHEN| Space  |HENK|KANA|Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP_JIS(
-    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, JYEN,BSPC,     INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,               DEL, END, PGDN,    P7,  P8,  P9,
-    CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,BSLS,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RO,            RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,     MHEN,SPC, HENK,KANA,               RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-};
diff --git a/converter/ps2_usb/keymap_plain.c b/converter/ps2_usb/keymap_plain.c
deleted file mode 100644 (file)
index 51b2fdd..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.     ,-----------.
-     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|     |Pwr|Slp|Wak|
-     * `---'   `---------------' `---------------' `---------------' `-----------'     `-----------'
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    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,    NLCK,PSLS,PAST,PMNS,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,BSLS,     DEL, END, PGDN,    P7,  P8,  P9,
-    CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-};
diff --git a/converter/ps2_usb/keymap_spacefn.c b/converter/ps2_usb/keymap_spacefn.c
deleted file mode 100644 (file)
index bffd2bc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * SpaceFN layout
- * http://geekhack.org/index.php?topic=51069.0
- */
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.     ,-----------.
-     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|     |Pwr|Slp|Wak|
-     * `---'   `---------------' `---------------' `---------------' `-----------'     `-----------'
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    ESC, 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,
-    CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          FN0,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 1: SpaceFN
-     * ,-----------------------------------------------------------.
-     * |`  | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
-     * |-----------------------------------------------------------|
-     * |     |   |   |Esc|   |   |   |Hom|Up |End|Psc|Slk|Pau|Ins  |
-     * |-----------------------------------------------------------|
-     * |      |   |   |   |   |   |PgU|Lef|Dow|Rig|   |   |        |
-     * |-----------------------------------------------------------|
-     * |        |   |   |   |   |Spc|PgD|`  |~  |   |Men|          |
-     * |-----------------------------------------------------------|
-     * |    |    |    |                        |    |    |    |    |
-     * `-----------------------------------------------------------'
-     */
-    KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,      INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    TRNS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP,  END, PSCR,SLCK,PAUS,INS,      DEL, END, PGDN,    P7,  P8,  P9,
-    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS,     TRNS,                        P4,  P5,  P6,  PPLS,
-    TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP,           TRNS,          UP,           P1,  P2,  P3,
-    TRNS,TRNS,TRNS,          TRNS,                    TRNS,TRNS,TRNS,TRNS,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE),
-    [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV),    // tilde
-};
-
diff --git a/converter/ps2_usb/led.c b/converter/ps2_usb/led.c
deleted file mode 100644 (file)
index e448e84..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 "stdint.h"
-#include "ps2.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    uint8_t ps2_led = 0;
-    if (usb_led &  (1<<USB_LED_SCROLL_LOCK))
-        ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
-    if (usb_led &  (1<<USB_LED_NUM_LOCK))
-        ps2_led |= (1<<PS2_LED_NUM_LOCK);
-    if (usb_led &  (1<<USB_LED_CAPS_LOCK))
-        ps2_led |= (1<<PS2_LED_CAPS_LOCK);
-    ps2_host_set_led(ps2_led);
-}
diff --git a/converter/ps2_usb/main.cpp b/converter/ps2_usb/main.cpp
deleted file mode 100644 (file)
index 860af14..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "mbed.h"
-#include "debug.h"
-#include "timer.h"
-#include "action.h"
-#include "keycode.h"
-#include "host.h"
-#include "host_driver.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;
-
-    timer_init();
-    host_set_driver(&mbed_driver);
-    keyboard_init();
-
-    //debug_enable = true;
-    xprintf("mbed_onekey ver.eee:\r\n");
-
-
-    bool last_isp = isp;
-    while (1) {
-        keyboard_task();
-
-        //led_green = !led_green;
-        if (last_isp == isp) continue;
-        last_isp = isp;
-        if (last_isp == 0) {
-            led_red = 0;    // on
-            dprintf("timer: %i\r\n", timer_read());
-            //register_code(KC_A);
-        } else {
-            led_red = 1;    // off
-            //unregister_code(KC_A);
-        }
-    }
-}
diff --git a/converter/ps2_usb/matrix.c b/converter/ps2_usb/matrix.c
deleted file mode 100644 (file)
index 45cf2a4..0000000
+++ /dev/null
@@ -1,486 +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 <stdbool.h>
-#include "action.h"
-#include "print.h"
-#include "util.h"
-#include "debug.h"
-#include "ps2.h"
-#include "matrix.h"
-
-
-static void matrix_make(uint8_t code);
-static void matrix_break(uint8_t code);
-static void matrix_clear(void);
-#ifdef MATRIX_HAS_GHOST
-static bool matrix_has_ghost_in_row(uint8_t row);
-#endif
-
-
-/*
- * Matrix Array usage:
- * 'Scan Code Set 2' is assigned into 256(32x8)cell matrix.
- * Hmm, it is very sparse and not efficient :(
- *
- * Notes:
- * Both 'Hanguel/English'(F1) and 'Hanja'(F2) collide with 'Delete'(E0 71) and 'Down'(E0 72).
- * These two Korean keys need exceptional handling and are not supported for now. Sorry.
- *
- *    8bit wide
- *   +---------+
- *  0|         |
- *  :|   XX    | 00-7F for normal codes(without E0-prefix)
- *  f|_________|
- * 10|         |
- *  :|  E0 YY  | 80-FF for E0-prefixed codes
- * 1f|         |     (<YY>|0x80) is used as matrix position.
- *   +---------+
- *
- * Exceptions:
- * 0x83:    F7(0x83) This is a normal code but beyond  0x7F.
- * 0xFC:    PrintScreen
- * 0xFE:    Pause
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      (code>>3)
-#define COL(code)      (code&0x07)
-
-// matrix positions for exceptional keys
-#define F7             (0x83)
-#define PRINT_SCREEN   (0xFC)
-#define PAUSE          (0xFE)
-
-static bool is_modified = false;
-
-
-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;
-    ps2_host_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    return;
-}
-
-/*
- * PS/2 Scan Code Set 2: Exceptional Handling
- *
- * There are several keys to be handled exceptionally.
- * The scan code for these keys are varied or prefix/postfix'd
- * depending on modifier key state.
- *
- * Keyboard Scan Code Specification:
- *     http://www.microsoft.com/whdc/archive/scancode.mspx
- *     http://download.microsoft.com/download/1/6/1/161ba512-40e2-4cc9-843a-923143f3456c/scancode.doc
- *
- *
- * 1) Insert, Delete, Home, End, PageUp, PageDown, Up, Down, Right, Left
- *     a) when Num Lock is off
- *     modifiers | make                      | break
- *     ----------+---------------------------+----------------------
- *     Ohter     |                    <make> | <break>
- *     LShift    | E0 F0 12           <make> | <break>  E0 12
- *     RShift    | E0 F0 59           <make> | <break>  E0 59
- *     L+RShift  | E0 F0 12  E0 F0 59 <make> | <break>  E0 59 E0 12
- *
- *     b) when Num Lock is on
- *     modifiers | make                      | break
- *     ----------+---------------------------+----------------------
- *     Other     | E0 12              <make> | <break>  E0 F0 12
- *     Shift'd   |                    <make> | <break>
- *
- *     Handling: These prefix/postfix codes are ignored.
- *
- *
- * 2) Keypad /
- *     modifiers | make                      | break
- *     ----------+---------------------------+----------------------
- *     Ohter     |                    <make> | <break>
- *     LShift    | E0 F0 12           <make> | <break>  E0 12
- *     RShift    | E0 F0 59           <make> | <break>  E0 59
- *     L+RShift  | E0 F0 12  E0 F0 59 <make> | <break>  E0 59 E0 12
- *
- *     Handling: These prefix/postfix codes are ignored.
- *
- *
- * 3) PrintScreen
- *     modifiers | make         | break
- *     ----------+--------------+-----------------------------------
- *     Other     | E0 12  E0 7C | E0 F0 7C  E0 F0 12
- *     Shift'd   |        E0 7C | E0 F0 7C
- *     Control'd |        E0 7C | E0 F0 7C
- *     Alt'd     |           84 | F0 84
- *
- *     Handling: These prefix/postfix codes are ignored, and both scan codes
- *               'E0 7C' and 84 are seen as PrintScreen.
- *
- * 4) Pause
- *     modifiers | make(no break code)
- *     ----------+--------------------------------------------------
- *     Other     | E1 14 77 E1 F0 14 F0 77
- *     Control'd | E0 7E E0 F0 7E
- *
- *     Handling: Both code sequences are treated as a whole.
- *               And we need a ad hoc 'pseudo break code' hack to get the key off
- *               because it has no break code.
- *
- */
-uint8_t matrix_scan(void)
-{
-
-    // scan code reading states
-    static enum {
-        INIT,
-        F0,
-        E0,
-        E0_F0,
-        // Pause
-        E1,
-        E1_14,
-        E1_14_77,
-        E1_14_77_E1,
-        E1_14_77_E1_F0,
-        E1_14_77_E1_F0_14,
-        E1_14_77_E1_F0_14_F0,
-        // Control'd Pause
-        E0_7E,
-        E0_7E_E0,
-        E0_7E_E0_F0,
-    } state = INIT;
-
-
-    is_modified = false;
-
-    // 'pseudo break code' hack
-    if (matrix_is_on(ROW(PAUSE), COL(PAUSE))) {
-        matrix_break(PAUSE);
-    }
-
-    uint8_t code = ps2_host_recv();
-    if (code) xprintf("%i\r\n", code);
-    if (!ps2_error) {
-        switch (state) {
-            case INIT:
-                switch (code) {
-                    case 0xE0:
-                        state = E0;
-                        break;
-                    case 0xF0:
-                        state = F0;
-                        break;
-                    case 0xE1:
-                        state = E1;
-                        break;
-                    case 0x83:  // F7
-                        matrix_make(F7);
-                        state = INIT;
-                        break;
-                    case 0x84:  // Alt'd PrintScreen
-                        matrix_make(PRINT_SCREEN);
-                        state = INIT;
-                        break;
-                    case 0x00:  // Overrun [3]p.25
-                        matrix_clear();
-                        clear_keyboard();
-                        print("Overrun\n");
-                        state = INIT;
-                        break;
-                    default:    // normal key make
-                        if (code < 0x80) {
-                            matrix_make(code);
-                        } else {
-                            matrix_clear();
-                            clear_keyboard();
-                            xprintf("unexpected scan code at INIT: %02X\n", code);
-                        }
-                        state = INIT;
-                }
-                break;
-            case E0:    // E0-Prefixed
-                switch (code) {
-                    case 0x12:  // to be ignored
-                    case 0x59:  // to be ignored
-                        state = INIT;
-                        break;
-                    case 0x7E:  // Control'd Pause
-                        state = E0_7E;
-                        break;
-                    case 0xF0:
-                        state = E0_F0;
-                        break;
-                    default:
-                        if (code < 0x80) {
-                            matrix_make(code|0x80);
-                        } else {
-                            matrix_clear();
-                            clear_keyboard();
-                            xprintf("unexpected scan code at E0: %02X\n", code);
-                        }
-                        state = INIT;
-                }
-                break;
-            case F0:    // Break code
-                switch (code) {
-                    case 0x83:  // F7
-                        matrix_break(F7);
-                        state = INIT;
-                        break;
-                    case 0x84:  // Alt'd PrintScreen
-                        matrix_break(PRINT_SCREEN);
-                        state = INIT;
-                        break;
-                    case 0xF0:
-                        matrix_clear();
-                        clear_keyboard();
-                        xprintf("unexpected scan code at F0: F0(clear and cont.)\n");
-                        break;
-                    default:
-                    if (code < 0x80) {
-                        matrix_break(code);
-                    } else {
-                        matrix_clear();
-                        clear_keyboard();
-                        xprintf("unexpected scan code at F0: %02X\n", code);
-                    }
-                    state = INIT;
-                }
-                break;
-            case E0_F0: // Break code of E0-prefixed
-                switch (code) {
-                    case 0x12:  // to be ignored
-                    case 0x59:  // to be ignored
-                        state = INIT;
-                        break;
-                    default:
-                        if (code < 0x80) {
-                            matrix_break(code|0x80);
-                        } else {
-                            matrix_clear();
-                            clear_keyboard();
-                            xprintf("unexpected scan code at E0_F0: %02X\n", code);
-                        }
-                        state = INIT;
-                }
-                break;
-            // following are states of Pause
-            case E1:
-                switch (code) {
-                    case 0x14:
-                        state = E1_14;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            case E1_14:
-                switch (code) {
-                    case 0x77:
-                        state = E1_14_77;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            case E1_14_77:
-                switch (code) {
-                    case 0xE1:
-                        state = E1_14_77_E1;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            case E1_14_77_E1:
-                switch (code) {
-                    case 0xF0:
-                        state = E1_14_77_E1_F0;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            case E1_14_77_E1_F0:
-                switch (code) {
-                    case 0x14:
-                        state = E1_14_77_E1_F0_14;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            case E1_14_77_E1_F0_14:
-                switch (code) {
-                    case 0xF0:
-                        state = E1_14_77_E1_F0_14_F0;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            case E1_14_77_E1_F0_14_F0:
-                switch (code) {
-                    case 0x77:
-                        matrix_make(PAUSE);
-                        state = INIT;
-                        break;
-                    default:
-                        state = INIT;
-                }
-                break;
-            // Following are states of Control'd Pause
-            case E0_7E:
-                if (code == 0xE0)
-                    state = E0_7E_E0;
-                else
-                    state = INIT;
-                break;
-            case E0_7E_E0:
-                if (code == 0xF0)
-                    state = E0_7E_E0_F0;
-                else
-                    state = INIT;
-                break;
-            case E0_7E_E0_F0:
-                if (code == 0x7E)
-                    matrix_make(PAUSE);
-                state = INIT;
-                break;
-            default:
-                state = INIT;
-        }
-    }
-
-    // TODO: request RESEND when error occurs?
-/*
-    if (PS2_IS_FAILED(ps2_error)) {
-        uint8_t ret = ps2_host_send(PS2_RESEND);
-        xprintf("Resend: %02X\n", ret);
-    }
-*/
-    return 1;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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)
-{
-    return (matrix[row] & (1<<col));
-}
-
-inline
-uint8_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");
-    }
-}
-
-uint8_t matrix_key_count(void)
-{
-    uint8_t count = 0;
-    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
-        count += bitpop(matrix[i]);
-    }
-    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 void matrix_make(uint8_t code)
-{
-    if (!matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] |= 1<<COL(code);
-        is_modified = true;
-    }
-}
-
-inline
-static void matrix_break(uint8_t code)
-{
-    if (matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] &= ~(1<<COL(code));
-        is_modified = true;
-    }
-}
-
-inline
-static void matrix_clear(void)
-{
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-}
diff --git a/converter/ps2_usb/usbconfig.h b/converter/ps2_usb/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/converter/serialmouse_usb/Makefile b/converter/serialmouse_usb/Makefile
deleted file mode 100644 (file)
index 34f550b..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-# 
-# Makefile for Teensy
-#
-# Target file name (without extension).
-TARGET = serialmouse_usb
-
-# 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=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
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-
-
-# Serial Mouse Options
-#   You can choose a mouse protocol and the implementation of
-#   the underlying serial connection.
-#
-SERIAL_MOUSE_MICROSOFT_ENABLE = yes    # Enable support for Microsoft-compatible mice
-#SERIAL_MOUSE_MOUSESYSTEMS_ENABLE = yes        # Enable support for Mousesystems-compatible mice
-#SERIAL_MOUSE_USE_UART = yes           # use hardware UART for serial connection
-SERIAL_MOUSE_USE_SOFT = yes            # use software serial implementation
-
-# Optional serial mouse driver features
-# Support scrolling while holding the middle mouse button
-# (currently only supported for Mousesystems mice):
-#OPT_DEFS += -DSERIAL_MOUSE_CENTER_SCROLL
-
-# Optimize size but this may cause error "relocation truncated to fit"
-#EXTRALDFLAGS = -Wl,--relax
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/serialmouse_usb/README.md b/converter/serialmouse_usb/README.md
deleted file mode 100644 (file)
index ef8a006..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-Serial mouse converter
-======================
-See https://github.com/tmk/tmk_keyboard/pull/131
-
-
-Supported protocols
--------------------
-### Microsoft
-Not tested.
-
-### Mousesystems
diff --git a/converter/serialmouse_usb/config.h b/converter/serialmouse_usb/config.h
deleted file mode 100644 (file)
index b257d99..0000000
+++ /dev/null
@@ -1,119 +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 <avr/interrupt.h>
-
-#define VENDOR_ID       0xFEED
-#define PRODUCT_ID      0x2222
-#define DEVICE_VER      0x0001
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         serial mouse converter
-#define DESCRIPTION     convert serial mouse into USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 0
-#define MATRIX_COLS 0
-
-
-/* key combination for command */
-#define IS_COMMAND()    false
-
-
-
-#ifdef SERIAL_MOUSE_MICROSOFT
-    /*
-     * Serial(USART) configuration (for Microsoft serial mice)
-     *     asynchronous, positive logic, 1200baud, bit order: LSB first
-     *     1-start bit, 7-data bit, no parity, 1-stop bit
-     */
-    #define SERIAL_UART_BAUD       1200
-    #define SERIAL_UART_DATA       UDR1
-    #define SERIAL_UART_UBRR       ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
-    #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 = (uint8_t) (SERIAL_UART_UBRR>>8);  /* baud rate */ \
-        UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \
-        UCSR1C = (1<<UCSZ11) | (0<<UCSZ10);  /* no parity, 1 stop bit, 7-bit characters */ \
-        sei(); \
-    } while(0)
-
-    // for Microsoft mouse protocol
-    /* Serial(USART) configuration
-     *     asynchronous, negative logic, 1200baud, no flow control
-     *     1-start bit, 7-data bit, non parity, 1-stop bit
-     */
-    #define SERIAL_SOFT_BAUD            1200
-    #define SERIAL_SOFT_DATA_7BIT
-    #define SERIAL_SOFT_PARITY_NONE
-    #define SERIAL_SOFT_BIT_ORDER_LSB
-    #define SERIAL_SOFT_LOGIC_NEGATIVE
-    /* RXD Port */
-    #define SERIAL_SOFT_RXD_DDR         DDRD
-    #define SERIAL_SOFT_RXD_PORT        PORTD
-    #define SERIAL_SOFT_RXD_PIN         PIND
-    #define SERIAL_SOFT_RXD_BIT         2
-    #define SERIAL_SOFT_RXD_VECT        INT2_vect
-    /* RXD Interupt */
-    #define SERIAL_SOFT_RXD_INIT()      do { \
-        /* pin configuration: input with pull-up */ \
-        SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
-        SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
-        /* enable interrupt: INT2(rising edge) */ \
-        EICRA |= ((1<<ISC21)|(1<<ISC20)); \
-        EIMSK |= (1<<INT2); \
-        sei(); \
-    } while (0)
-    #define SERIAL_SOFT_RXD_INT_ENTER()
-    #define SERIAL_SOFT_RXD_INT_EXIT()  do { \
-        /* clear interrupt  flag */ \
-        EIFR = (1<<INTF2); \
-    } while (0)
-    #define SERIAL_SOFT_RXD_READ()      (SERIAL_SOFT_RXD_PIN&(1<<SERIAL_SOFT_RXD_BIT))
-    /* TXD Port */
-    #define SERIAL_SOFT_TXD_HI()
-    #define SERIAL_SOFT_TXD_LO()
-    #define SERIAL_SOFT_TXD_INIT()
-#elif defined(SERIAL_MOUSE_MOUSESYSTEMS)
-    /*
-     * Serial(USART) configuration (for Mousesystems serial mice)
-     *     asynchronous, positive logic, 1200baud, bit order: LSB first
-     *     1-start bit, 8-data bit, no parity, 1-stop bit
-     */
-    #define SERIAL_UART_BAUD       1200
-    #define SERIAL_UART_DATA       UDR1
-    #define SERIAL_UART_UBRR       ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
-    #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 = (uint8_t) (SERIAL_UART_UBRR>>8);  /* baud rate */ \
-        UCSR1B |= (1<<RXCIE1) | (1<<RXEN1); /* RX interrupt, RX: enable */ \
-        UCSR1C = (1<<UCSZ11) | (1<<UCSZ10);  /* no parity, 1 stop bit, 8-bit characters */ \
-        sei(); \
-    } while(0)
-#endif
-
-
-
-
-#endif
diff --git a/converter/serialmouse_usb/keymap.c b/converter/serialmouse_usb/keymap.c
deleted file mode 100644 (file)
index cb78b4d..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-Copyright 2011,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 "keymap.h"
-
-
-/* translates key to keycode */
-uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
-{
-    return KC_NO;
-}
-
-/* translates Fn keycode to action */
-action_t keymap_fn_to_action(uint8_t keycode)
-{
-    return (action_t){};
-}
-
diff --git a/converter/serialmouse_usb/keymap_common.c b/converter/serialmouse_usb/keymap_common.c
deleted file mode 100644 (file)
index 55a1379..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-Copyright 2011,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/converter/serialmouse_usb/keymap_common.h b/converter/serialmouse_usb/keymap_common.h
deleted file mode 100644 (file)
index 216a8dc..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-Copyright 2011,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 "print.h"
-#include "debug.h"
-#include "keymap.h"
-
-
-// 32*8(256) byte array which converts PS/2 code into USB code
-extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
-extern const uint16_t fn_actions[];
-
-
-/* All keys */
-#define KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    K61,                     /* for European ISO */                                         \
-    K51, K13, K6A, K64, K67, /* for Japanese JIS */                                         \
-    K08, K10, K18, K20, K28, K30, K38, K40, K48, K50, K57, K5F, /* F13-24 */                \
-    KB7, KBF, KDE,           /* System Power, Sleep, Wake */                                \
-    KA3, KB2, KA1,           /* Mute, Volume Up, Volume Down */                             \
-    KCD, K95, KBB, KB4, KD0, /* Next, Previous, Stop, Pause, Media Select */                \
-    KC8, KAB, KC0,           /* Mail, Calculator, My Computer */                            \
-    K90, KBA, KB8, KB0,      /* WWW Search, Home, Back, Forward */                          \
-    KA8, KA0, K98            /* WWW Stop, Refresh, Favorites */                             \
-) { \
-    { KC_NO,    KC_##K01, KC_NO,    KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_NO    }, \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_NO    }, \
-    { KC_##K18, KC_NO,    KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_NO    }, \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_NO    }, \
-    { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_NO    }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_NO    }, \
-    { KC_##K38, KC_NO,    KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_NO    }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_NO    }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_NO    }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_NO,    KC_##K54, KC_##K55, KC_NO,    KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_NO,    KC_##K5D, KC_NO,    KC_##K5F }, \
-    { KC_NO,    KC_##K61, KC_NO,    KC_NO,    KC_##K64, KC_NO,    KC_##K66, KC_##K67 }, \
-    { KC_NO,    KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K83, 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_##K90, KC_##K91, KC_NO,    KC_NO,    KC_##K94, KC_##K95, KC_NO,    KC_NO    }, \
-    { KC_##K98, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K9F }, \
-    { KC_##KA0, KC_##KA1, KC_NO,    KC_##KA3, KC_NO,    KC_NO,    KC_NO,    KC_##KA7 }, \
-    { KC_##KA8, KC_NO,    KC_NO,    KC_##KAB, KC_NO,    KC_NO,    KC_NO,    KC_##KAF }, \
-    { KC_##KB0, KC_NO,    KC_##KB2, KC_NO,    KC_##KB4, KC_NO,    KC_NO,    KC_##KB7 }, \
-    { KC_##KB8, KC_NO,    KC_##KBA, KC_##KBB, KC_NO,    KC_NO,    KC_NO,    KC_##KBF }, \
-    { KC_##KC0, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##KC8, KC_NO,    KC_##KCA, KC_NO,    KC_NO,    KC_##KCD, KC_NO,    KC_NO    }, \
-    { KC_##KD0, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##KDA, KC_NO,    KC_NO,    KC_NO,    KC_##KDE, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_##KE9, KC_NO,    KC_##KEB, KC_##KEC, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##KF0, KC_##KF1, KC_##KF2, KC_NO,    KC_##KF4, KC_##KF5, KC_NO,    KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_##KFA, KC_NO,    KC_##KFC, KC_##KFD, KC_##KFE, KC_NO    }, \
-}
-
-/* US layout */
-#define KEYMAP( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA  \
-) \
-KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    NUBS,                                                                                   \
-    RO, KANA, JYEN, HENK, MHEN,                                                             \
-    F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,                             \
-    SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE,                                                \
-    AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN,                                               \
-    MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT,         \
-    MAIL, CALCULATOR, MY_COMPUTER,                                                          \
-    WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD,                                            \
-    WWW_STOP, WWW_REFRESH, WWW_FAVORITES                                                    \
-)
-
-/* ISO layout */
-#define KEYMAP_ISO( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,     KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D,K5A,               K6B,K73,K74,K79, \
-    K12,K61,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,    K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA  \
-) \
-KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    K61,                                                                                    \
-    RO, KANA, JYEN, HENK, MHEN,                                                             \
-    F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,                             \
-    SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE,                                                \
-    AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN,                                               \
-    MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT,         \
-    MAIL, CALCULATOR, MY_COMPUTER,                                                          \
-    WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD,                                            \
-    WWW_STOP, WWW_REFRESH, WWW_FAVORITES                                                    \
-)
-
-/* JIS layout */
-#define KEYMAP_JIS( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,         KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K6A,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,         KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,K5D,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,K51,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,    K67,K29,K64,K13,            K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA  \
-) \
-KEYMAP_ALL( \
-    K76,K05,K06,K04,K0C,K03,K0B,K83,K0A,K01,K09,K78,K07,     KFC,K7E,KFE,                   \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66, KF0,KEC,KFD,  K77,KCA,K7C,K7B, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5D, KF1,KE9,KFA,  K6C,K75,K7D,     \
-    K58,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,               K6B,K73,K74,K79, \
-    K12,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,        K59,     KF5,      K69,K72,K7A,     \
-    K14,K9F,K11,        K29,                K91,KA7,KAF,K94, KEB,KF2,KF4,  K70,    K71,KDA, \
-                                                                                            \
-    NUBS,                                                                                   \
-    K51, K13, K6A, K64, K67,                                                                \
-    F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,                             \
-    SYSTEM_POWER, SYSTEM_SLEEP, SYSTEM_WAKE,                                                \
-    AUDIO_MUTE, AUDIO_VOL_UP, AUDIO_VOL_DOWN,                                               \
-    MEDIA_NEXT_TRACK, MEDIA_PREV_TRACK, MEDIA_STOP, MEDIA_PLAY_PAUSE, MEDIA_SELECT,         \
-    MAIL, CALCULATOR, MY_COMPUTER,                                                          \
-    WWW_SEARCH, WWW_HOME, WWW_BACK, WWW_FORWARD,                                            \
-    WWW_STOP, WWW_REFRESH, WWW_FAVORITES                                                    \
-)
-
-#endif
diff --git a/converter/serialmouse_usb/led.c b/converter/serialmouse_usb/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/converter/serialmouse_usb/matrix.c b/converter/serialmouse_usb/matrix.c
deleted file mode 100644 (file)
index 0e0d87f..0000000
+++ /dev/null
@@ -1,83 +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 <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "action.h"
-#include "print.h"
-#include "util.h"
-#include "debug.h"
-#include "matrix.h"
-
-
-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_mouse=true;
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-    return 0;
-}
-
-bool matrix_is_modified(void)
-{
-    return false;
-}
-
-inline
-bool matrix_has_ghost(void)
-{
-    return false;
-}
-
-inline
-bool matrix_is_on(uint8_t row, uint8_t col)
-{
-    return false;
-}
-
-inline
-uint8_t matrix_get_row(uint8_t row)
-{
-    return 0;
-}
-
-void matrix_print(void)
-{
-}
-
-uint8_t matrix_key_count(void)
-{
-    return 0;
-}
diff --git a/converter/sun_usb/Makefile b/converter/sun_usb/Makefile
deleted file mode 100644 (file)
index f046bfd..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-# Target file name (without extension).
-TARGET = sun_usb
-
-# 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 \
-       command_extra.c \
-       protocol/serial_soft.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
-MCU = atmega32u2
-
-
-# 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
-
-
-#
-# 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
-
-
-# Build Options
-#   *Comment out* to disable the options.
-#
-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)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/sun_usb/README b/converter/sun_usb/README
deleted file mode 100644 (file)
index 98340dd..0000000
+++ /dev/null
@@ -1,106 +0,0 @@
-Sun to USB keyboard protocol converter
-======================================
-Target MCU is ATMega32u4 but other USB capable AVR will also work.
-
-This converter will work with Sun Type 2-5 Keyboards.
-
-
-Tested on:
-Sun Type 3 Keyboard: http://blog.daveastels.com.s3-website-us-west-2.amazonaws.com/2014/12/27/type-3-keyboard.html
-CTCSP SHORT TYPE KEYBOARD(Type 5): http://imgur.com/a/QIv6p
-
-
-Keymap of Type 3(keymap_sun3.c) were impoted from dastels's repository.
-https://github.com/dastels/tmk_keyboard/tree/master/converter/sun3_usb
-
-
-
-Connector
----------
-  8Pin mini DIN
-     ___ ___
-    /  |_|  \
-   / 8  7  6 \
-  | 5    4  3 |
-   \_ 2   1 _/
-     \_____/  
-   (receptacle)
-
-    Wiring:
-    Pin mini DIN        MCU
-    ----------------------------------
-    1   GND             GND
-    2   GND             GND
-    3   5V
-    4   RX/TX(Mouse)
-    5   RX              PD3
-    6   TX              PD2
-    7   GND             GND
-    8   5V              VCC
-
-
-Protocol
---------
-Signal: Asynchronous, Negative logic, 1200baud, No Flow control
-Frame format: 1-Start bit, 8-Data bits, No-Parity, 1-Stop bit
-
-    AVR USART engine expects positive logic while Sun keyboard signal is negative.
-    To use AVR UART engine you need external inverter in front of RX and TX pin.
-    Otherwise you can software serial routine to communicate the keyboard.
-
-This converter uses software method, you doesn't need any inverter part.
-
-
-Commands From System To Keyboard
-    0x01 Reset
-            Keyboard responds with following byte sequence:
-            Success: 0xFF 0x04 0x7F
-            Fail:    0x7E 0x01 0x7F
-    0x02 Bell On
-    0x03 Bell Off
-    0x0A Click On
-    0x0B Click Off
-    0x0E LED
-            followed by LED status byte:
-            bit: 3       2       1       0
-            LED: CapsLk  ScrLk   Compose NumLk
-    0x0F Layout
-            Keyboard responds with 'Layout Response' 0xFE 0xXX
-
-Commands From Keyboard To System
-    0x7F Idle
-            means no keys pressed.
-    0xFE Layout Response
-    0xFF Reset Response(followed by 0x04)
-     
-Reference
-    http://kentie.net/article/sunkbd/page2.htm
-    http://kentie.net/article/sunkbd/KBD.pdf
-
-
-Build Firmware
---------------
-Just use 'make'
-    $ cd sun_usb
-    $ make
-Then, load the binary to MCU with your favorite programmer.
-
-
-Sun commands
-------------
-You can send Sun protocol commands with TMK `Magic` key combo. By default `Magic` key is `LShift` + `RShift`, `LAlt` + `RAlt' or `LMeta` + `RMeta`.
-https://github.com/tmk/tmk_keyboard#magic-commands
-
-Following Sun specific commands are available. For example, to send 'Bell On' you can press `LShift` + `RShift` + `Up` keys simultaneously.
-
-```
------ Sun converter Help -----
-Up:     Bell On
-Down:   Bell Off
-Left:   Click On
-Right:  Click Off
-PgUp:   LED all On
-PgDown: LED all On
-Insert: Layout
-Delete: Reset
-```
diff --git a/converter/sun_usb/command_extra.c b/converter/sun_usb/command_extra.c
deleted file mode 100644 (file)
index aba3fe6..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include "stdbool.h"
-#include "stdint.h"
-#include "keycode.h"
-#include "serial.h"
-#include "print.h"
-#include "command.h"
-
-bool command_extra(uint8_t code)
-{
-    switch (code) {
-        case KC_H:
-        case KC_SLASH: /* ? */
-            print("\n\n----- Sun converter Help -----\n");
-            print("Up: Bell On\n");
-            print("Down:       Bell Off\n");
-            print("Left:       Click On\n");
-            print("Right:      Click Off\n");
-            print("PgUp:       LED all On\n");
-            print("PgDown:     LED all On\n");
-            print("Insert:     Layout\n");
-            print("Delete:     Reset\n");
-            return false;
-        case KC_DEL:
-            print("Reset\n");
-            serial_send(0x01);
-            break;
-        case KC_UP:
-            print("Bell On\n");
-            serial_send(0x02);
-            break;
-        case KC_DOWN:
-            print("Bell Off\n");
-            serial_send(0x03);
-            break;
-        case KC_LEFT:
-            print("Click On\n");
-            serial_send(0x0A);
-            break;
-        case KC_RIGHT:
-            print("Click Off\n");
-            serial_send(0x0B);
-            break;
-        case KC_PGUP:
-            print("LED all on\n");
-            serial_send(0x0E);
-            serial_send(0xFF);
-            break;
-        case KC_PGDOWN:
-            print("LED all off\n");
-            serial_send(0x0E);
-            serial_send(0x00);
-            break;
-        case KC_INSERT:
-            print("layout\n");
-            serial_send(0x0F);
-            break;
-        default:
-            return false;
-    }
-    return true;
-}
diff --git a/converter/sun_usb/config.h b/converter/sun_usb/config.h
deleted file mode 100644 (file)
index 66036da..0000000
+++ /dev/null
@@ -1,95 +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      0x3333
-#define DEVICE_VER      0x0100
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         Sun keyboard converter
-#define DESCRIPTION     converts Sun keyboard protocol into USB
-
-/* matrix size */
-#define MATRIX_ROWS 16
-#define MATRIX_COLS 8
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \
-)
-
-/* legacy keymap support */
-#define USE_LEGACY_KEYMAP
-
-
-/* Serial(USART) configuration
- *     asynchronous, negative logic, 1200baud, no flow control
- *     1-start bit, 8-data bit, non parity, 1-stop bit
- */
-#define SERIAL_SOFT_BAUD            1200
-#define SERIAL_SOFT_PARITY_NONE
-#define SERIAL_SOFT_BIT_ORDER_LSB
-#define SERIAL_SOFT_LOGIC_NEGATIVE
-/* RXD Port */
-#define SERIAL_SOFT_RXD_ENABLE
-#define SERIAL_SOFT_RXD_DDR         DDRD
-#define SERIAL_SOFT_RXD_PORT        PORTD
-#define SERIAL_SOFT_RXD_PIN         PIND
-#define SERIAL_SOFT_RXD_BIT         2
-#define SERIAL_SOFT_RXD_VECT        INT2_vect
-/* RXD Interupt */
-#ifdef SERIAL_SOFT_LOGIC_NEGATIVE
-/* enable interrupt: INT2(rising edge) */
-#define INTR_TRIG_EDGE   ((1<<ISC21)|(1<<ISC20))
-#else
-/* enable interrupt: INT2(falling edge) */
-#define INTR_TRIG_EDGE   ((1<<ISC21)|(0<<ISC20))
-#endif
-#define SERIAL_SOFT_RXD_INIT()      do { \
-    /* pin configuration: input with pull-up */ \
-    SERIAL_SOFT_RXD_DDR &= ~(1<<SERIAL_SOFT_RXD_BIT); \
-    SERIAL_SOFT_RXD_PORT |= (1<<SERIAL_SOFT_RXD_BIT); \
-    EICRA |= INTR_TRIG_EDGE; \
-    EIMSK |= (1<<INT2); \
-    sei(); \
-} while (0)
-#define SERIAL_SOFT_RXD_INT_ENTER()
-#define SERIAL_SOFT_RXD_INT_EXIT()  do { \
-    /* clear interrupt  flag */ \
-    EIFR = (1<<INTF2); \
-} while (0)
-#define SERIAL_SOFT_RXD_READ()      (SERIAL_SOFT_RXD_PIN&(1<<SERIAL_SOFT_RXD_BIT))
-/* TXD Port */
-#define SERIAL_SOFT_TXD_ENABLE
-#define SERIAL_SOFT_TXD_DDR         DDRD
-#define SERIAL_SOFT_TXD_PORT        PORTD
-#define SERIAL_SOFT_TXD_PIN         PIND
-#define SERIAL_SOFT_TXD_BIT         3
-#define SERIAL_SOFT_TXD_HI()        do { SERIAL_SOFT_TXD_PORT |=  (1<<SERIAL_SOFT_TXD_BIT); } while (0)
-#define SERIAL_SOFT_TXD_LO()        do { SERIAL_SOFT_TXD_PORT &= ~(1<<SERIAL_SOFT_TXD_BIT); } while (0)
-#define SERIAL_SOFT_TXD_INIT()      do { \
-    /* pin configuration: output */ \
-    SERIAL_SOFT_TXD_DDR |= (1<<SERIAL_SOFT_TXD_BIT); \
-    /* idle */ \
-    SERIAL_SOFT_TXD_ON(); \
-} while (0)
-
-#endif
diff --git a/converter/sun_usb/keymap.c b/converter/sun_usb/keymap.c
deleted file mode 100644 (file)
index 3d724a5..0000000
+++ /dev/null
@@ -1,192 +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/pgmspace.h>
-#include "keycode.h"
-#include "util.h"
-#include "keymap.h"
-
-
-
-
-/* Sun type 5 keyboard
-,-------.  ,---,  ,---------------. ,---------------. ,---------------.   ,-----------. ,---------------.
-|   76  |  |   |  | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B|   | 16| 17| 15| | 2D| 02| 04| 30|
-`-------'  `---'  `---------------' `---------------' `---------------'   `-----------' `---------------'
-,-------.  ,-----------------------------------------------------------.  ,-----------. ,---------------.
-| 01| 03|  | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A|  | 2C| 34| 60| | 62| 2E| 2F| 47|
-|-------|  |-----------------------------------------------------------|  |------------ |---------------|
-| 19| 1A|  |  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B  |  | 42| 4A| 7B| | 44| 45| 46|   |
-|-------|  |-----------------------------------------------------------|  `-----------' |-----------| 7D|
-| 31| 33|  |  4C  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57|   59   |                | 5B| 5C| 5D|   |
-|-------|  |-----------------------------------------------------------|      ,---.     |-----------|---|
-| 48| 49|  |   63   | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D|    6E    |      | 14|     | 70| 71| 72|   |
-|-------|  |-----------------------------------------------------------|  .-----------. |-----------| 5A|
-| 5F| 61|  | 77 | 13| 78 |*73 |       79         |*74 |*75| 7A | 43| 0D|  | 18| 1B| 1C| |   5E  | 32|   |
-`-------'  `-----------------------------------------------------------'  `-----------' `---------------'
-*/
-#define KEYMAP( \
-      K76,        K05,K06,K08,K0A,    K0C,K0E,K10,K11,    K12,K07,K09,K0B,  K16,K17,K15,  K2D,K02,K04,K30, \
-    K01,K03,  K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A,  K2C,K34,K60,  K62,K2E,K2F,K47, \
-    K19,K1A,  K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,   K2B,  K42,K4A,K7B,  K44,K45,K46,K7D, \
-    K31,K33,  K4C,  K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57,      K59,                K5B,K5C,K5D,     \
-    K48,K49,  K63,   K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D,         K6E,      K14,      K70,K71,K72,K5A, \
-    K5F,K61,  K77,K13, K78, K73,        K79,      K74, K75, K7A, K43, K0D,  K18,K1B,K1C,  K5E,    K32      \
-) { \
-    { KC_NO,    KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_NO,   }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_NO,    KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_NO    }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_NO,    KC_##K7D, KC_NO,    KC_NO    }  \
-}
-
-/* CTCSP SHORT TYPE KEYBOARD */
-#define SHORT_TYPE( \
-    K01, K05,K06,K08,K0A,K0C,K0E, K61,K49,K33, K30, K2C,K34,K60, \
-         K10,K11,K12,K07,K09,K0B,                   K42,K4A,K7B, \
-    K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A, \
-    K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,   K2B, \
-    K4C,  K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57,      K59, \
-    K63,   K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D, K0D,K14,K6E, \
-    K77,K13, K78,             K79,      K7A,K43,K62,K18,K1B,K1C  \
-) KEYMAP( \
-         HELP,           K05,K06,K08,K0A,    K0C,K0E,K10,K11,    K12,K07,K09,K0B,  PSCR,SLCK,PAUS,  MUTE,VOLD,VOLU,K30,  \
-    K01,    AGAIN,   K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A,  K2C, K34, K60,   K62, PSLS,PAST,PMNS, \
-    MENU,   UNDO,    K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,   K2B,  K42, K4A, K7B,   P7,  P8, P9,  PPLS,  \
-    SELECT, K33,     K4C,  K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57,      K59,                   P4,  P5, P6,         \
-    EXECUTE,K49,     K63,   K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D,         K6E,       K14,        P1,  P2, P3,  PENT,  \
-    FIND,   K61,     K77,K13, K78, HENK,       K79,      MHEN, KANA, K7A,K43,K0D,  K18, K1B, K1C,   P0,      PDOT        \
-)
-
-
-// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
-static const uint8_t PROGMEM fn_layer[] = {
-    2,              // Fn0
-    3,              // Fn1
-    4,              // Fn2
-    0,              // Fn3
-    0,              // 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_SCLN,        // Fn1
-    KC_SLSH,        // Fn2
-    KC_NO,          // Fn3
-    KC_NO,          // Fn4
-    KC_NO,          // Fn5
-    KC_NO,          // Fn6
-    KC_NO           // Fn7
-};
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/*
-    KEYMAP(
-         HELP,       F1, F2, F3, F4,         F5, F6, F7, F8,         F9, F10,F11,F12,   PSCR,SLCK,PAUS,  MUTE,VOLD,VOLU,PWR,
-    STOP,   AGAIN,   ESC,1,  2,  3,  4,  5,  6,  7,  8,  9,  0,   MINS,EQL, BSLS,GRV,   INS, HOME,PGUP,  NLCK,PSLS,PAST,PMNS,
-    MENU,   UNDO,    TAB, Q,  W,  E,  R,  T,  Y,  U,  I,  O,  P,   LBRC,RBRC,    BSPC,  DEL, END, PGDN,  P7,  P8, P9,  PPLS,
-    SELECT, COPY,    LCTL, A,  S,  D,  F,  G,  H,  J,  K,  L,  SCLN,QUOT,        ENT,                    P4,  P5, P6,
-    EXECUTE,PASTE,   LSFT,  Z,  X,  C,  V,  B,  N,  M,  COMM,DOT,SLSH,           RSFT,       UP,         P1,  P2, P3,  PENT,
-    FIND,   CUT,     CAPS, LALT, LGUI,HENK,  SPC,            MHEN,KANA,RGUI,APP, RALT,  LEFT,DOWN,RGHT,  P0,      PDOT
-    ),
-*/
-    // 0: default
-    SHORT_TYPE(
-        STOP, F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        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,  RALT,UP,  RSFT,
-        CAPS,LALT,LGUI,            SPC,              RGUI,APP, NLCK,LEFT,DOWN,RGHT
-    ),
-    // 1: with layer keys
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        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,   FN1, QUOT,        ENT,
-        LSFT,   Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, FN2,   RSFT,UP,  FN0,
-        CAPS,LALT,LGUI,            SPC,              RGUI,RALT,FN0, LEFT,DOWN,RGHT
-    ),
-    // 2: HHKB
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        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,  NO,  NO,  HOME,PGUP,LEFT,RGHT,        ENT,
-        LSFT,   Z,   X,   C,   V,   B,   NO,  NO,  END, PGDN,DOWN,  RSFT,PGUP,FN0,
-        CAPS,LALT,LGUI,            SPC,              RGUI,RALT,FN0, HOME,PGDN,END
-    ),
-    // 3: Mousekey
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL,
-        CAPS, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,WH_U,WH_R,NO,  NO,  NO,      BSPC,
-        LCTL,  NO,  ACL0,ACL1,ACL2,NO,  MS_L,MS_D,MS_U,MS_R,FN1, NO,          ENT,
-        LSFT,   NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,NO,  NO,  NO,    RSFT,UP,  NO,
-        CAPS,LALT,LGUI,            BTN1,             RGUI,RALT,NO,  LEFT,DOWN,RGHT
-    ),
-    // 4: Cursor
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL,
-        CAPS, NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, NO,  NO,  NO,      BSPC,
-        LCTL,  NO,  NO,  NO,  NO,  NO,  LEFT,DOWN,UP,  RGHT,NO,  NO,          ENT,
-        LSFT,   NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, FN2,   RSFT,UP,  NO,
-        CAPS,LALT,LGUI,            BTN1,             RGUI,RALT,NO,  LEFT,DOWN,RGHT
-    ),
-};
-
-
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
-{
-    return pgm_read_byte(&keymaps[(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/converter/sun_usb/keymap_sun3.c b/converter/sun_usb/keymap_sun3.c
deleted file mode 100644 (file)
index 273cd94..0000000
+++ /dev/null
@@ -1,173 +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/pgmspace.h>
-#include "keycode.h"
-#include "util.h"
-#include "keymap.h"
-
-
-/* Sun type 3 keyboard 
-,-------.  ,-----------------------------------------------------------.  ,-----------.
-| 01| 03|  | 05| 06|     08|     0A|     0C|     0E|     10| 11| 12| 2B|  | 15| 16| 17|
-|-------|  |-----------------------------------------------------------|  |-----------|
-| 19| 1A|  | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A|  | 2D| 2E| 2F|
-|-------|  |-----------------------------------------------------------|  |-----------|
-| 31| 33|  |  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 42  |  | 44| 45| 46|
-|-------|  |-----------------------------------------------------------|  |-----------|
-| 48| 49|  |  4C  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57|   59   |  | 5B| 5C| 5D|
-|-------|  |-----------------------------------------------------------|  |-----------|
-| 5F| 61|  |   63   | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D|    6E| 6F|  | 70| 71| 72|
-`-------'  |-----------------------------------------------------------|  `-----------'
-           | 77 | 78  |               79                  | 7A  |   13 |  
-           `-----------------------------------------------------------'  
-*/
-
-
-#define KEYMAP( \
-    K01,K03,  K05,K06,    K08,    K0A,    K0C,    K0E,    K10,K11,K12,K2B,  K15,K16,K17, \
-    K19,K1A,  K1D,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,K58,K2A,  K2D,K2E,K2F, \
-    K31,K33,  K35, K36,K37,K38,K39,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,   K42,  K44,K45,K46, \
-    K48,K49,  K4C,  K4D,K4E,K4F,K50,K51,K52,K53,K54,K55,K56,K57,      K59,  K5B,K5C,K5D, \
-    K5F,K61,  K63,   K64,K65,K66,K67,K68,K69,K6A,K6B,K6C,K6D,     K6E,K6F,  K70,K71,K72, \
-              K77,K78,                    K79,                    K7A,K13                \
-) { \
-    { KC_NO,    KC_##K01, KC_NO,    KC_##K03, KC_NO,    KC_##K05, KC_##K06, KC_NO    }, \
-    { KC_##K08, KC_NO,    KC_##K0A, KC_NO,    KC_##K0C, KC_NO,    KC_##K0E, KC_NO    }, \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_NO,    KC_##K15, KC_##K16, KC_##K17 }, \
-    { KC_NO,    KC_##K19, KC_##K1A, KC_NO,    KC_NO,    KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_NO,    KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_NO,    KC_##K31, KC_NO,    KC_##K33, KC_NO,    KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_NO,    KC_##K44, KC_##K45, KC_##K46, KC_NO    }, \
-    { KC_##K48, KC_##K49, KC_NO,    KC_NO,    KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_NO,    KC_##K5B, KC_##K5C, KC_##K5D, KC_NO,    KC_##K5F }, \
-    { KC_NO,    KC_##K61, KC_NO,    KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }  \
-}
-
-// Assign Fn key(0-7) to a layer to which switch with the Fn key pressed.
-static const uint8_t PROGMEM fn_layer[] = {
-    2,              // Fn0
-    3,              // Fn1
-    4,              // Fn2
-    0,              // Fn3
-    0,              // 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_SCLN,        // Fn1
-    KC_SLSH,        // Fn2
-    KC_NO,          // Fn3
-    KC_NO,          // Fn4
-    KC_NO,          // Fn5
-    KC_NO,          // Fn6
-    KC_NO           // Fn7
-};
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
-    KEYMAP(
-    F10, F11,   F1, F2,     F3,     F4,     F5,     F6,      F7,  F8, F9,  BSPC,   VOLD, MUTE,   VOLU,
-    F12, F13,   ESC, 1,  2,  3,  4,  5,  6,  7,  8,  9,  0,MINS, EQL, BSLS, GRV,   MPRV, MPLY,   MNXT,
-    F14, F15,   TAB, Q,  W,  E,  R,  T,  Y,  U,  I,  O,  P,   LBRC,RBRC,    DEL,   HOME, UP,     PGUP,
-    F16, F17,   LCTL, A,  S,  D,  F,  G,  H,  J,  K,  L,  SCLN,QUOT,        ENT,   LEFT, INSERT, RIGHT, 
-    F18, F19,   LSFT,  Z,  X,  C,  V,  B,  N,  M,  COMM,DOT,SLSH,     RSFT,RCTL,   END,  DOWN,   PGDOWN,
-                LGUI, LALT,                 SPC,                      RALT,RGUI
-    ),
-    /*
-    // 0: default
-    SHORT_TYPE(
-        STOP, F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        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,  RALT,UP,  RSFT,
-        CAPS,LALT,LGUI,            SPC,              RGUI,APP, NLCK,LEFT,DOWN,RGHT
-    ),
-    // 1: with layer keys
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        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,   FN1, QUOT,        ENT,
-        LSFT,   Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, FN2,   RSFT,UP,  FN0,
-        CAPS,LALT,LGUI,            SPC,              RGUI,RALT,FN0, LEFT,DOWN,RGHT
-    ),
-    // 2: HHKB
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        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,  NO,  NO,  HOME,PGUP,LEFT,RGHT,        ENT,
-        LSFT,   Z,   X,   C,   V,   B,   NO,  NO,  END, PGDN,DOWN,  RSFT,PGUP,FN0,
-        CAPS,LALT,LGUI,            SPC,              RGUI,RALT,FN0, HOME,PGDN,END
-    ),
-    // 3: Mousekey
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL,
-        CAPS, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,WH_U,WH_R,NO,  NO,  NO,      BSPC,
-        LCTL,  NO,  ACL0,ACL1,ACL2,NO,  MS_L,MS_D,MS_U,MS_R,FN1, NO,          ENT,
-        LSFT,   NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,NO,  NO,  NO,    RSFT,UP,  NO,
-        CAPS,LALT,LGUI,            BTN1,             RGUI,RALT,NO,  LEFT,DOWN,RGHT
-    ),
-    // 4: Cursor
-    SHORT_TYPE(
-        ESC,  F1,F2,F3,F4, F5, F6,   CUT,PASTE,COPY,PWR,    INS, HOME,PGUP,
-              F7,F8,F9,F10,F11,F12,                         DEL, END, PGDN,
-        GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL,
-        CAPS, NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, NO,  NO,  NO,      BSPC,
-        LCTL,  NO,  NO,  NO,  NO,  NO,  LEFT,DOWN,UP,  RGHT,NO,  NO,          ENT,
-        LSFT,   NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, FN2,   RSFT,UP,  NO,
-        CAPS,LALT,LGUI,            BTN1,             RGUI,RALT,NO,  LEFT,DOWN,RGHT
-    ),
-    */
-};
-
-
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
-{
-    return pgm_read_byte(&keymaps[(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/converter/sun_usb/led.c b/converter/sun_usb/led.c
deleted file mode 100644 (file)
index 809398f..0000000
+++ /dev/null
@@ -1,35 +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 "serial.h"
-#include "led.h"
-#include "debug.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    uint8_t sun_led = 0;
-    if (usb_led & (1<<USB_LED_NUM_LOCK))    sun_led |= (1<<0);
-    if (usb_led & (1<<USB_LED_COMPOSE))     sun_led |= (1<<1);
-    if (usb_led & (1<<USB_LED_SCROLL_LOCK)) sun_led |= (1<<2);
-    if (usb_led & (1<<USB_LED_CAPS_LOCK))   sun_led |= (1<<3);
-    xprintf("LED: %02X\n", usb_led);
-
-    serial_send(0x0E);
-    serial_send(sun_led);
-}
diff --git a/converter/sun_usb/matrix.c b/converter/sun_usb/matrix.c
deleted file mode 100644 (file)
index 3126bd3..0000000
+++ /dev/null
@@ -1,186 +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 "util.h"
-#include "matrix.h"
-#include "debug.h"
-#include "protocol/serial.h"
-
-
-/*
- * Matrix Array usage:
- *
- * ROW: 16(4bits)
- * COL:  8(3bits)
- *
- *    8bit wide
- *   +---------+
- *  0|00 ... 07|
- *  1|08 ... 0F|
- *  :|   ...   |
- *  :|   ...   |
- *  E|70 ... 77|
- *  F|78 ... 7F|
- *   +---------+
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      ((code>>3)&0xF)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-    DDRD |= (1<<6);
-    PORTD |= (1<<6);
-    //debug_enable = true;
-
-    serial_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    // wait for keyboard coming up
-    // otherwise LED status update fails
-    print("Reseting ");
-    while (1) {
-        print(".");
-        while (serial_recv());
-        serial_send(0x01);
-        _delay_ms(500);
-        if (serial_recv() == 0xFF) {
-            _delay_ms(500);
-            if (serial_recv() == 0x04)
-                break;
-        }
-    }
-    print(" Done\n");
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-    is_modified = false;
-
-    uint8_t code;
-    code = serial_recv();
-    if (!code) return 0;
-
-    debug_hex(code); debug(" ");
-
-    switch (code) {
-        case 0xFF:  // reset success: FF 04
-            print("reset: ");
-            _delay_ms(500);
-            code = serial_recv();
-            xprintf("%02X\n", code);
-            if (code == 0x04) {
-                // LED status
-                led_set(host_keyboard_leds());
-            }
-            return 0;
-        case 0xFE:  // layout: FE <layout>
-            print("layout: ");
-            _delay_ms(500);
-            xprintf("%02X\n", serial_recv());
-            return 0;
-        case 0x7E:  // reset fail: 7E 01
-            print("reset fail: ");
-            _delay_ms(500);
-            xprintf("%02X\n", serial_recv());
-            return 0;
-        case 0x7F:
-            // all keys up
-            for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-            return 0;
-    }
-
-    if (code&0x80) {
-        // break code
-        if (matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] &= ~(1<<COL(code));
-            is_modified = true;
-        }
-    } else {
-        // make code
-        if (!matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] |=  (1<<COL(code));
-            is_modified = true;
-        }
-    }
-    return code;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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
-uint8_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++) {
-        count += bitpop(matrix[i]);
-    }
-    return count;
-}
diff --git a/converter/terminal_bluefruit/Makefile b/converter/terminal_bluefruit/Makefile
deleted file mode 100644 (file)
index dec9233..0000000
+++ /dev/null
@@ -1,99 +0,0 @@
-# Target file name (without extension).
-TARGET = terminal_bluefruit
-
-# 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
-
-BLUEFRUIT_TRACE_SERIAL=true
-
-# 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
-
-
-#
-# 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
-#   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
-
-
-#
-# PS/2 protocol implementations
-#      USART is recommended if it is available, others are for reference purpose.
-#      INT implementation will drop simultaneous key strokes.
-#
-#PS2_USE_USART = yes   # uses hardware USART engine for PS/2 signal receive(recomened)
-PS2_USE_INT = yes      # uses external interrupt for falling edge of PS/2 clock pin
-#PS2_USE_BUSYWAIT = yes        # uses primitive reference code
-
-#---------------- 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.mk
-include $(TMK_DIR)/protocol/bluefruit.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/terminal_bluefruit/README b/converter/terminal_bluefruit/README
deleted file mode 100644 (file)
index 6ff1bc9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Keyboard converter for IBM terminal keyboard
-============================================
-It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
-I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
-
-Source code: https://github.com/tmk/tmk_keyboard
-Article: http://geekhack.org/index.php?topic=27272.0
-
-
-CONNECTION
-----------
-Keyboard    ATMega32U4
-----------------------
-Data:       PD2
-Clock:      PD5
-
-And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
-
-
-BUILD
------
-$ git clone https://github.com/tmk/tmk_keyboard.git
-$ cd converter/terminal_usb
-$ make 
-
-
-RESOURCE
---------
-Soarer's Converter: http://geekhack.org/index.php?topic=17458.0
-102keys(1392595): http://geekhack.org/index.php?topic=10737.0
-122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html
-KbdBabel: http://www.kbdbabel.org/
-RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
-DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png
-WinAVR: http://winavr.sourceforge.net/
-
-EOF
diff --git a/converter/terminal_bluefruit/config.h b/converter/terminal_bluefruit/config.h
deleted file mode 100644 (file)
index 8bf139d..0000000
+++ /dev/null
@@ -1,112 +0,0 @@
-/*
-Converter for 70% IBM Terminal Keyboard
-Author: Benjamin Gould, 2013
-Based on code 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      0x6535
-#define DEVICE_VER      0x0100
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         70% IBM Terminal Keyboard Converter w/ Bluetooth
-#define DESCRIPTION     USB converter for IBM Terminal Keyboard w/ Bluetooth
-
-
-/* matrix size */
-#define MATRIX_ROWS 17  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* legacy keymap support */
-// #define USE_LEGACY_KEYMAP
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) || \
-    (keyboard_report->mods == (MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)))  \
-)
-
-/* USART configuration
- *     asynchronous, 9600baud, 8-data bit, non parity, 1-stop bit, no flow control
- */
-#ifdef __AVR_ATmega32U4__
-    #define SERIAL_UART_BAUD       9600
-    #define SERIAL_UART_DATA       UDR1
-    #define SERIAL_UART_UBRR       ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
-    #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 = (uint8_t) (SERIAL_UART_UBRR>>8);  /* baud rate */ \
-        UCSR1B = (1<<TXEN1);                /* TX: enable */ \
-        UCSR1C = (0<<UPM11) | (0<<UPM10) | /* parity: none(00), even(01), odd(11) */ \
-                 (0<<UCSZ12) | (1<<UCSZ11) | (1<<UCSZ10); /* data-8bit(011) */ \
-        sei(); \
-    } while(0)
-#else
-#   error "USART configuration is needed."
-#endif
-
-/*
- * PS/2 Interrupt configuration
- */
-#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    0
-
-#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 Busywait configuration
- */
-#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    0
-#endif
-
-#endif
diff --git a/converter/terminal_bluefruit/keymap.c b/converter/terminal_bluefruit/keymap.c
deleted file mode 100644 (file)
index 8acd8cf..0000000
+++ /dev/null
@@ -1,227 +0,0 @@
-/*
-Converter for 70% IBM Terminal Keyboard
-Author: Benjamin Gould, 2013
-Based on code 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 <stdbool.h>
-#include <avr/pgmspace.h>
-#include "keycode.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "keymap.h"
-
-
-
-
-/* 
- * IBM Terminal keyboard 6110345(122keys)/1392595(102keys)
- * http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M
- * http://www.seasip.info/VintagePC/ibm_1391406.html
- *
- * Keymap array:
- *     8 bytes
- *   +---------+
- *  0|         |
- *  :|         | 0x00-0x87
- *  ;|         |
- * 17|         |
- *   +---------+
- */
-#define KEYMAP( \
-                  K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F,                                         \
-                  K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E,                                         \
-                                                                                                           \
-    K05,K06,  K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66,  K67,K6E,K6F,  K76,K77,K7E,K84, \
-    K04,K0C,  K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,    K5C,  K64,K65,K6D,  K6C,K75,K7D,K7C, \
-    K03,K0B,  K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K53,K5A,      K63,      K6B,K73,K74,K7B, \
-    K83,K0A,  K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,    K51,K59,  K61,K62,K6A,  K69,K72,K7A,K79, \
-    K01,K09,  K11,    K19,            K29,                    K39,    K58,      K60,      K68,K70,K71,K78  \
-) { \
-    { KC_NO,    KC_##K01, KC_NO,    KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K83, KC_##K84, KC_NO,    KC_NO,    KC_NO,   }, \
-}
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
-     * |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|  -|  =|  \|BS | |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #|Retu|               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shif|  \|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl|    |Alt |          Space              |Alt |    |Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `----'    `---------------------------------------'    `----' `-----------' `---------------'
-     */
-/*
-    KEYMAP(
-                     F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
-                     F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,
-
-    PSCR,ESC,   GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, JYEN,BSPC,  INS, HOME,PGUP,  NLCK,PSLS,PAST,PMNS,
-    SLCK,INT4,  TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     BSLS,  DEL, END, PGDN,  P7,  P8,  P9,  PPLS,
-    PAUS,INT5,  CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     NUHS,ENT,        UP,         P4,  P5,  P6,  PCMM,
-    APP, INT6,  LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RO,  RSFT,  LEFT,INT2,RGHT,  P1,  P2,  P3,  PENT,
-    RGUI,LGUI,  LCTL,     LALT,               SPC,                          RALT,     RCTL,       DOWN,       NO,  P0,  PDOT,NO
-    ),
-*/
-    /*
-    KEYMAP(
-                     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-                     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,TRNS,       TRNS,       TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,TRNS,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,     TRNS,               TRNS,                         TRNS,     TRNS,       TRNS,       TRNS,TRNS,TRNS,TRNS
-    ),
-    */
-    // pseudo ANSI
-
-    KEYMAP(
-                     FN0, NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  
-                     PSCR,PAUS,PGUP,PGDN,HOME,END, INS, DEL, LEFT,DOWN,UP,  RGHT,
-
-    NO,  NO,    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, GRV, BSPC,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    NO,  NO,    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     BSLS,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    NO,  NO,    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     BSLS,ENT,        NO,         NO,  NO,  NO,  NO,
-    NO,  NO,    LSFT,FN1 ,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     FN1, RSFT,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    NO,  NO,    LCTL,     LALT,               SPC,                          LGUI,     APP,        NO,         NO,  NO,  NO,  NO
-    ),
-    
-    // Momentary Function Layer
-    KEYMAP(
-                     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-                     TRNS,MUTE,VOLD,VOLU,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-
-    TRNS,TRNS,  TRNS,F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL,   TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,UP  ,END,      TRNS,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,MS_L,MS_D,MS_U,MS_R,LEFT,DOWN,     RGHT,TRNS,       TRNS,       TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,PGDN,TRNS,     TRNS,RSFT,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  BTN2,     TRNS,               BTN1,                         RALT,     RCTL,       TRNS,       TRNS,TRNS,TRNS,TRNS
-    ),
-    
-    // Mouse Layer
-    KEYMAP(
-                     FN0, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-                     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,NO,  TRNS,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,NO,  NO,  MS_U,NO,  NO,  WH_L,WH_D,WH_U,WH_R,NO,  NO,  NO,       TRNS,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    TRNS,TRNS,  BTN2,BTN1,MS_L,MS_D,MS_R,NO,  MS_L,MS_D,MS_U,MS_R,NO,  NO,       NO,  ENT,        NO,         NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,TRNS,NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,       NO,  RSFT,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,     TRNS,               BTN1,                         BTN2,     TRNS,       NO,         NO,  NO,  NO,  NO
-    ),
-    
-    // vi Layer
-    KEYMAP(
-                     FN0, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-                     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,NO,  TRNS,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,HOME,PGDN,UP,  PGUP,END, HOME,PGDN,PGUP,END, NO,  NO,  NO,       TRNS,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,NO,  LEFT,DOWN,RGHT,NO,  LEFT,DOWN,UP,  RGHT,NO,  NO,       NO,  ENT,        NO,         NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,TRNS,NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,  NO,       NO,  RSFT,  NO,  NO,  NO,    NO,  NO,  NO,  NO,
-    TRNS,TRNS,  TRNS,     TRNS,               SPC,                          RALT,     RCTL,       NO,         NO,  NO,  NO,  NO
-    ),
-    
-    // num lock layer
-    KEYMAP(
-                     FN0, TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-                     TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,  TRNS,TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,     TRNS,TRNS,       TRNS,       TRNS,TRNS,TRNS,TRNS,
-    TRNS,TRNS,  TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,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 fn_actions[] PROGMEM = {
-    [0] = ACTION_DEFAULT_LAYER_SET(0),
-    [1] = ACTION_LAYER_MOMENTARY(1),
-    [2] = ACTION_LAYER_MOMENTARY(2), //ACTION_LAYER_ON(2, ON_RELEASE),
-    [3] = KC_NO, //ACTION_LAYER_ON(3, ON_RELEASE),
-    [4] = KC_NO, //ACTION_LAYER_ON(4, ON_RELEASE),
-    [5] = KC_NO,
-    [6] = KC_NO,
-    [7] = KC_NO,
-};
-
-/*
-enum macro_id {
-    MS_UL,
-    MS_UR,
-    MS_DL,
-    MS_DR,
-};
-
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-    keyevent_t event = record->event;
-
-    switch (id) {
-        case MS_UL:
-            return (event.pressed ? MACRO( D(MS_L), D(MS_U), END ) : MACRO( U(MS_L), U(MS_U), END ) );
-        case MS_UR:
-            return (event.pressed ? MACRO( D(MS_R), D(MS_U), END ) : MACRO( U(MS_L), U(MS_U), END ) );
-        case MS_DL:
-            return (event.pressed ? MACRO( D(MS_L), D(MS_D), END ) : MACRO( U(MS_L), U(MS_U), END ) );
-        case MS_DR:
-            return (event.pressed ? MACRO( D(MS_R), D(MS_D), END ) : MACRO( U(MS_L), U(MS_U), END ) );
-    }
-    return MACRO_NONE;
-}
-*/
-
-uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
-{
-    return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
-}
-
-action_t keymap_fn_to_action(uint8_t keycode)
-{
-    action_t action;
-    action.code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]);
-    return action;
-}
diff --git a/converter/terminal_bluefruit/led.c b/converter/terminal_bluefruit/led.c
deleted file mode 100644 (file)
index e5bf41d..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-Converter for 70% IBM Terminal Keyboard
-Author: Benjamin Gould, 2013
-Based on code 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 "ps2.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    uint8_t ps2_led = 0;
-    if (usb_led &  (1<<USB_LED_SCROLL_LOCK))
-        ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
-    if (usb_led &  (1<<USB_LED_NUM_LOCK))
-        ps2_led |= (1<<PS2_LED_NUM_LOCK);
-    if (usb_led &  (1<<USB_LED_CAPS_LOCK))
-        ps2_led |= (1<<PS2_LED_CAPS_LOCK);
-    ps2_host_set_led(ps2_led);
-}
diff --git a/converter/terminal_bluefruit/matrix.c b/converter/terminal_bluefruit/matrix.c
deleted file mode 100644 (file)
index 3690153..0000000
+++ /dev/null
@@ -1,262 +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 <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "print.h"
-#include "util.h"
-#include "debug.h"
-#include "ps2.h"
-#include "matrix.h"
-
-
-static void matrix_make(uint8_t code);
-static void matrix_break(uint8_t code);
-#ifdef MATRIX_HAS_GHOST
-static bool matrix_has_ghost_in_row(uint8_t row);
-#endif
-
-
-/*
- * Matrix Array usage:
- * 'Scan Code Set 3' is assigned into 17x8 cell matrix.
- *
- *    8bit wide
- *   +---------+
- *  0|         |
- *  :|         | 0x00-0x87
- *  ;|         |
- * 17|         |
- *   +---------+
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      (code>>3)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-
-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_keyboard = true;
-    //debug_mouse = false;
-
-    ps2_host_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-
-    // scan code reading states
-    static enum {
-        RESET,
-        RESET_RESPONSE,
-        KBD_ID0,
-        KBD_ID1,
-        CONFIG,
-        READY,
-        F0,
-    } state = RESET;
-
-    is_modified = false;
-
-    uint8_t code;
-    if ((code = ps2_host_recv())) {
-        debug("r"); debug_hex(code); debug(" ");
-    }
-
-    switch (state) {
-        case RESET:
-            debug("wFF ");
-            if (ps2_host_send(0xFF) == 0xFA) {
-                debug("[ack]\nRESET_RESPONSE: ");
-                state = RESET_RESPONSE;
-            }
-            break;
-        case RESET_RESPONSE:
-            if (code == 0xAA) {
-                debug("[ok]\nKBD_ID: ");
-                state = KBD_ID0;
-            } else if (code) {
-                debug("err\nRESET: ");
-                state = RESET;
-            }
-            break;
-        // after reset receive keyboad ID(2 bytes)
-        case KBD_ID0:
-            if (code) {
-                state = KBD_ID1;
-            }
-            break;
-        case KBD_ID1:
-            if (code) {
-                debug("\nCONFIG: ");
-                state = CONFIG;
-            }
-            break;
-        case CONFIG:
-            debug("wF8 ");
-            if (ps2_host_send(0xF8) == 0xFA) {
-                debug("[ack]\nREADY\n");
-                state = READY;
-            }
-            break;
-        case READY:
-            switch (code) {
-                case 0x00:
-                    break;
-                case 0xF0:
-                    state = F0;
-                    debug(" ");
-                    break;
-                default:    // normal key make
-                    if (code < 0x88) {
-                        matrix_make(code);
-                    } else {
-                        debug("unexpected scan code at READY: "); debug_hex(code); debug("\n");
-                    }
-                    state = READY;
-                    debug("\n");
-            }
-            break;
-        case F0:    // Break code
-            switch (code) {
-                case 0x00:
-                    break;
-                default:
-                    if (code < 0x88) {
-                        matrix_break(code);
-                    } else {
-                        debug("unexpected scan code at F0: "); debug_hex(code); debug("\n");
-                    }
-                    state = READY;
-                    debug("\n");
-            }
-            break;
-    }
-    return 1;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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)
-{
-    return (matrix[row] & (1<<col));
-}
-
-inline
-uint8_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");
-    }
-}
-
-uint8_t matrix_key_count(void)
-{
-    uint8_t count = 0;
-    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
-        count += bitpop(matrix[i]);
-    }
-    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 void matrix_make(uint8_t code)
-{
-    if (!matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] |= 1<<COL(code);
-        is_modified = true;
-    }
-}
-
-inline
-static void matrix_break(uint8_t code)
-{
-    if (matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] &= ~(1<<COL(code));
-        is_modified = true;
-    }
-}
diff --git a/converter/terminal_usb/Makefile b/converter/terminal_usb/Makefile
deleted file mode 100644 (file)
index 4218452..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-# Target file name (without extension).
-TARGET = terminal_lufa
-
-# 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
-
-
-#
-# 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
-#   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
-
-
-#
-# PS/2 protocol implementations
-#      USART is recommended if it is available, others are for reference purpose.
-#      INT implementation will drop simultaneous key strokes.
-#
-PS2_USE_USART = yes    # uses hardware USART engine for PS/2 signal receive(recomened)
-#PS2_USE_INT = yes     # uses external interrupt for falling edge of PS/2 clock pin
-#PS2_USE_BUSYWAIT = yes        # uses primitive reference code
-
-
-#---------------- 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/lufa.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/terminal_usb/README b/converter/terminal_usb/README
deleted file mode 100644 (file)
index 6ff1bc9..0000000
+++ /dev/null
@@ -1,37 +0,0 @@
-Keyboard converter for IBM terminal keyboard
-============================================
-It supports PS/2 Scan Code Set 3 and runs on USB AVR chips such like PJRC Teensy.
-I tested the converter on ATMega32U4 with 1392595(102keys) and 6110345(122keys).
-
-Source code: https://github.com/tmk/tmk_keyboard
-Article: http://geekhack.org/index.php?topic=27272.0
-
-
-CONNECTION
-----------
-Keyboard    ATMega32U4
-----------------------
-Data:       PD2
-Clock:      PD5
-
-And VCC and GND, of course. See RESOURCE for keyboard connector pin assign.
-
-
-BUILD
------
-$ git clone https://github.com/tmk/tmk_keyboard.git
-$ cd converter/terminal_usb
-$ make 
-
-
-RESOURCE
---------
-Soarer's Converter: http://geekhack.org/index.php?topic=17458.0
-102keys(1392595): http://geekhack.org/index.php?topic=10737.0
-122keys(1390876): http://www.seasip.info/VintagePC/ibm_1390876.html
-KbdBabel: http://www.kbdbabel.org/
-RJ45 Connector: http://www.kbdbabel.org/conn/kbd_connector_ibmterm.png
-DIN Connector: http://www.kbdbabel.org/conn/kbd_connector_ibm3179_318x_319x.png
-WinAVR: http://winavr.sourceforge.net/
-
-EOF
diff --git a/converter/terminal_usb/config.h b/converter/terminal_usb/config.h
deleted file mode 100644 (file)
index ea5ce62..0000000
+++ /dev/null
@@ -1,138 +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      0x6535
-#define DEVICE_VER      0x0100
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         PS/2(Set3)-USB Keyboard converter(IBM 122keys)
-#define DESCRIPTION     USB converter for IBM Terminal Keyboard 122keys
-
-
-/* matrix size */
-#define MATRIX_ROWS 17  // keycode bit: 3-0
-#define MATRIX_COLS 8   // keycode bit: 6-4
-
-
-/* legacy keymap support */
-#define USE_LEGACY_KEYMAP
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) || \
-    (keyboard_report->mods == (MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)))  \
-)
-
-
-/* 
- * PS/2 USART configuration for ATMega32U4
- */
-#ifdef PS2_USE_USART
-/* XCK for clock line */
-#define PS2_CLOCK_PORT  PORTD
-#define PS2_CLOCK_PIN   PIND
-#define PS2_CLOCK_DDR   DDRD
-#define PS2_CLOCK_BIT   5
-/* RXD for data line */
-#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
-
-
-/*
- * PS/2 Interrupt configuration
- */
-#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    0
-
-#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 Busywait configuration
- */
-#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    0
-#endif
-
-#endif
diff --git a/converter/terminal_usb/keymap.c b/converter/terminal_usb/keymap.c
deleted file mode 100644 (file)
index 8ca66b5..0000000
+++ /dev/null
@@ -1,216 +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/pgmspace.h>
-#include "keycode.h"
-#include "print.h"
-#include "debug.h"
-#include "util.h"
-#include "keymap.h"
-
-
-
-
-/* 
- * IBM Terminal keyboard 6110345(122keys)/1392595(102keys)
- * http://geekhack.org/showthread.php?10737-What-Can-I-Do-With-a-Terminal-Model-M
- * http://www.seasip.info/VintagePC/ibm_1391406.html
- *
- * Keymap array:
- *     8 bytes
- *   +---------+
- *  0|         |
- *  :|         | 0x00-0x87
- *  ;|         |
- * 17|         |
- *   +---------+
- */
-#define KEYMAP( \
-                  K08,K10,K18,K20,K28,K30,K38,K40,K48,K50,K57,K5F,                                         \
-                  K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E,                                         \
-                                                                                                           \
-    K05,K06,  K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K5D,K66,  K67,K6E,K6F,  K76,K77,K7E,K84, \
-    K04,K0C,  K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,    K5C,  K64,K65,K6D,  K6C,K75,K7D,K7C, \
-    K03,K0B,  K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K53,K5A,      K63,      K6B,K73,K74,K7B, \
-    K83,K0A,  K12,K13,K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,    K51,K59,  K61,K62,K6A,  K69,K72,K7A,K79, \
-    K01,K09,  K11,    K19,            K29,                    K39,    K58,      K60,      K68,K70,K71,K78  \
-) { \
-    { KC_NO,    KC_##K01, KC_NO,    KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_##K78, KC_##K79, KC_##K7A, KC_##K7B, KC_##K7C, KC_##K7D, KC_##K7E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_##K83, KC_##K84, KC_NO,    KC_NO,    KC_NO,   }, \
-}
-
-/*
- * IBM Terminal keyboard 1399625, 101-key
- */
-#define KEYMAP_101( \
-    K08,    K07,K0F,K17,K1F,K27,K2F,K37,K3F,K47,K4F,K56,K5E,  K57,K5F,K62,                   \
-                                                                                             \
-    K0E,K16,K1E,K26,K25,K2E,K36,K3D,K3E,K46,K45,K4E,K55,K66,  K67,K6E,K6F,  K76,K77,K7E,K84, \
-    K0D,K15,K1D,K24,K2D,K2C,K35,K3C,K43,K44,K4D,K54,K5B,K5C,  K64,K65,K6D,  K6C,K75,K7D,     \
-    K14,K1C,K1B,K23,K2B,K34,K33,K3B,K42,K4B,K4C,K52,    K5A,                K6B,K73,K74,K7C, \
-    K12,    K1A,K22,K21,K2A,K32,K31,K3A,K41,K49,K4A,    K59,      K63,      K69,K72,K7A,     \
-    K11,    K19,            K29,                K39,    K58,  K61,K60,K6A,  K70,    K71,K79  \
-) { \
-    { KC_NO,    KC_NO   , KC_NO,    KC_NO   , KC_NO   , KC_NO   , KC_NO   , KC_##K07 }, \
-    { KC_##K08, KC_NO   , KC_NO   , KC_NO   , KC_NO   , KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { KC_NO   , KC_##K11, KC_##K12, KC_NO   , KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \
-    { KC_NO   , KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { KC_NO   , KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \
-    { KC_NO   , KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_NO   , KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_NO   , KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_NO   , KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_NO   , KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_NO   , KC_NO   , KC_##K52, KC_NO   , KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_NO   , KC_##K5E, KC_##K5F }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_NO   , KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_##K6D, KC_##K6E, KC_##K6F }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \
-    { KC_NO   , KC_##K79, KC_##K7A, KC_NO   , KC_##K7C, KC_##K7D, KC_##K7E, KC_NO    }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO   , KC_##K84, KC_NO,    KC_NO,    KC_NO,   }, \
-}
-
-// 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
-    0,              // Fn1
-    0,              // Fn2
-    0,              // Fn3
-    0,              // 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_NO,          // Fn2
-    KC_NO,          // Fn3
-    KC_NO,          // Fn4
-    KC_NO,          // Fn5
-    KC_NO,          // Fn6
-    KC_NO           // Fn7
-};
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
-     * |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|  -|  =|  \|BS | |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #|Retu|               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shif|  \|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl|    |Alt |          Space              |Alt |    |Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `----'    `---------------------------------------'    `----' `-----------' `---------------'
-     */
-/*
-    KEYMAP(
-                     F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
-                     F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,
-
-    PSCR,ESC,   GRV, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, JYEN,BSPC,  INS, HOME,PGUP,  NLCK,PSLS,PAST,PMNS,
-    SLCK,INT4,  TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     BSLS,  DEL, END, PGDN,  P7,  P8,  P9,  PPLS,
-    PAUS,INT5,  CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     NUHS,ENT,        UP,         P4,  P5,  P6,  PCMM,
-    APP, INT6,  LSFT,NUBS,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     RO,  RSFT,  LEFT,INT2,RGHT,  P1,  P2,  P3,  PENT,
-    RGUI,LGUI,  LCTL,     LALT,               SPC,                          RALT,     RCTL,       DOWN,       NO,  P0,  PDOT,NO
-    ),
-*/
-    // pseudo ANSI
-    KEYMAP(
-                     F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24,
-                     F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,
-
-    PSCR,ESC,   ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, NO,  BSPC,  INS, HOME,PGUP,  NLCK,PSLS,PAST,PMNS,
-    SLCK,INT4,  TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     NO,    DEL, END, PGDN,  P7,  P8,  P9,  PPLS,
-    PAUS,INT5,  LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     BSLS,ENT,        UP,         P4,  P5,  P6,  PCMM,
-    APP, INT6,  LSFT,LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,     NO,  RSFT,  LEFT,INT2,RGHT,  P1,  P2,  P3,  PENT,
-    RGUI,LGUI,  LCTL,     LALT,               SPC,                          LGUI,     GRV,        DOWN,       NO,  P0,  PDOT,NO
-    ),
-
-/* 101-key keymaps
- */
-    /* 0: default
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.
-     * |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|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl|    |Alt |          Space              |Alt |    |Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `----'    `---------------------------------------'    `----' `-----------' `---------------'
-     */
-/*
-    KEYMAP_101(
-     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,     NLCK,PSLS,PAST,PMNS,
-     TAB,   Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,LBRC,RBRC,BSLS,      DEL, END,PGDN,       P7,  P8,  P9,
-    CAPS,   A,   S,   D,   F,   G,   H,   J,   K,   L,SCLN,QUOT,      ENT,                           P4,  P5,  P6,PPLS,
-    LSFT,        Z,   X,   C,   V,   B,   N,   M,COMM, DOT,SLSH,     RSFT,            UP,            P1,  P2,  P3,
-    LCTL,     LALT,                SPC,                    RALT,     RCTL,     LEFT,DOWN,RGHT,       P0,     PDOT,PENT
-    ),
-*/
-};
-
-
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
-{
-    return pgm_read_byte(&keymaps[(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/converter/terminal_usb/led.c b/converter/terminal_usb/led.c
deleted file mode 100644 (file)
index e448e84..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 "stdint.h"
-#include "ps2.h"
-#include "led.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    uint8_t ps2_led = 0;
-    if (usb_led &  (1<<USB_LED_SCROLL_LOCK))
-        ps2_led |= (1<<PS2_LED_SCROLL_LOCK);
-    if (usb_led &  (1<<USB_LED_NUM_LOCK))
-        ps2_led |= (1<<PS2_LED_NUM_LOCK);
-    if (usb_led &  (1<<USB_LED_CAPS_LOCK))
-        ps2_led |= (1<<PS2_LED_CAPS_LOCK);
-    ps2_host_set_led(ps2_led);
-}
diff --git a/converter/terminal_usb/matrix.c b/converter/terminal_usb/matrix.c
deleted file mode 100644 (file)
index 3690153..0000000
+++ /dev/null
@@ -1,262 +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 <stdbool.h>
-#include <avr/io.h>
-#include <util/delay.h>
-#include "print.h"
-#include "util.h"
-#include "debug.h"
-#include "ps2.h"
-#include "matrix.h"
-
-
-static void matrix_make(uint8_t code);
-static void matrix_break(uint8_t code);
-#ifdef MATRIX_HAS_GHOST
-static bool matrix_has_ghost_in_row(uint8_t row);
-#endif
-
-
-/*
- * Matrix Array usage:
- * 'Scan Code Set 3' is assigned into 17x8 cell matrix.
- *
- *    8bit wide
- *   +---------+
- *  0|         |
- *  :|         | 0x00-0x87
- *  ;|         |
- * 17|         |
- *   +---------+
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      (code>>3)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-
-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_keyboard = true;
-    //debug_mouse = false;
-
-    ps2_host_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-
-    // scan code reading states
-    static enum {
-        RESET,
-        RESET_RESPONSE,
-        KBD_ID0,
-        KBD_ID1,
-        CONFIG,
-        READY,
-        F0,
-    } state = RESET;
-
-    is_modified = false;
-
-    uint8_t code;
-    if ((code = ps2_host_recv())) {
-        debug("r"); debug_hex(code); debug(" ");
-    }
-
-    switch (state) {
-        case RESET:
-            debug("wFF ");
-            if (ps2_host_send(0xFF) == 0xFA) {
-                debug("[ack]\nRESET_RESPONSE: ");
-                state = RESET_RESPONSE;
-            }
-            break;
-        case RESET_RESPONSE:
-            if (code == 0xAA) {
-                debug("[ok]\nKBD_ID: ");
-                state = KBD_ID0;
-            } else if (code) {
-                debug("err\nRESET: ");
-                state = RESET;
-            }
-            break;
-        // after reset receive keyboad ID(2 bytes)
-        case KBD_ID0:
-            if (code) {
-                state = KBD_ID1;
-            }
-            break;
-        case KBD_ID1:
-            if (code) {
-                debug("\nCONFIG: ");
-                state = CONFIG;
-            }
-            break;
-        case CONFIG:
-            debug("wF8 ");
-            if (ps2_host_send(0xF8) == 0xFA) {
-                debug("[ack]\nREADY\n");
-                state = READY;
-            }
-            break;
-        case READY:
-            switch (code) {
-                case 0x00:
-                    break;
-                case 0xF0:
-                    state = F0;
-                    debug(" ");
-                    break;
-                default:    // normal key make
-                    if (code < 0x88) {
-                        matrix_make(code);
-                    } else {
-                        debug("unexpected scan code at READY: "); debug_hex(code); debug("\n");
-                    }
-                    state = READY;
-                    debug("\n");
-            }
-            break;
-        case F0:    // Break code
-            switch (code) {
-                case 0x00:
-                    break;
-                default:
-                    if (code < 0x88) {
-                        matrix_break(code);
-                    } else {
-                        debug("unexpected scan code at F0: "); debug_hex(code); debug("\n");
-                    }
-                    state = READY;
-                    debug("\n");
-            }
-            break;
-    }
-    return 1;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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)
-{
-    return (matrix[row] & (1<<col));
-}
-
-inline
-uint8_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");
-    }
-}
-
-uint8_t matrix_key_count(void)
-{
-    uint8_t count = 0;
-    for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
-        count += bitpop(matrix[i]);
-    }
-    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 void matrix_make(uint8_t code)
-{
-    if (!matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] |= 1<<COL(code);
-        is_modified = true;
-    }
-}
-
-inline
-static void matrix_break(uint8_t code)
-{
-    if (matrix_is_on(ROW(code), COL(code))) {
-        matrix[ROW(code)] &= ~(1<<COL(code));
-        is_modified = true;
-    }
-}
diff --git a/converter/usb_usb/Makefile b/converter/usb_usb/Makefile
deleted file mode 100644 (file)
index 0f25232..0000000
+++ /dev/null
@@ -1,140 +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 = usb_usb
-
-TMK_DIR = ../../tmk_core
-
-# Directory keyboard dependent files exist
-TARGET_DIR = .
-
-# 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
-
-
-
-# Build Options
-#   comment out to disable the options.
-#
-MOUSEKEY_ENABLE = yes  # Mouse keys
-EXTRAKEY_ENABLE = yes  # Media 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
-
-#LDFLAGS += -Wl,--relax
-
-#OPT_DEFS += -DNO_ACTION_TAPPING
-#OPT_DEFS += -DNO_ACTION_LAYER
-#OPT_DEFS += -DNO_ACTION_MACRO
-
-SRC =  \
-       keymap_common.c \
-       matrix.c \
-       main.cpp
-
-ifdef KEYMAP
-    SRC := keymap_$(KEYMAP).c $(SRC)
-else
-    SRC := keymap.c $(SRC)
-endif
-
-CONFIG_H = config.h
-
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-
-
-# program Leonardo
-PROGRAM_CMD = avrdude -p$(MCU) -cavr109 -b57600 -Uflash:w:$(TARGET).hex -P$(DEV)
-
-
-
-include $(TMK_DIR)/protocol/usb_hid.mk
-include $(TMK_DIR)/protocol/lufa.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/usb_usb/README b/converter/usb_usb/README
deleted file mode 100644 (file)
index 30d5deb..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-USB to USB keyboard protocol converter
-======================================
-
-Hardware requirement
---------------------
-Arduino Leonardo
-    http://arduino.cc/en/Main/ArduinoBoardLeonardo 
-
-Circuit@Home USB Host Shield 2.0
-    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino-assembled/
-
-Buying Arduino Leonardo and USB Host Shield 2.0(from Circuit@home) will be the easiest way, you won't need even soldering iron.
-Arduino's Shield will also work well but I think Sparkfun's needs to be modified.
-
-    http://arduino.cc/en/Main/ArduinoUSBHostShield
-    https://www.sparkfun.com/products/9947
-
-Also Pro Micro 3.3V(not Mini) or Teensy with mini host shield will work with some fixes on signal/power routing.
-    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini
-    https://www.sparkfun.com/products/12587
-    https://www.pjrc.com/teensy/td_libs_USBHostShield.html
-
-
-
-Build firmware
---------------
-    $ git clone git://github.com/tmk/tmk_keyboard.git
-    $ cd tmk_keyboard
-    $ git submodule init
-    $ git submodule update
-    $ cd converter/usb_usb
-    $ make
-
-Program converter. Push reset button on Leonardo before run this command. Serial port name(COM17) depends your system. On Linux I got /dev/ttyACM0.
-
-    $ DEV=COM17 make program
-    or
-    $ avrdude -patmega32u4 -cavr109 -b57600 -Uflash:w:usb_usb.hex -PCOM17
-
-
-
-Limitation
-----------
-Only supports 'HID Boot protocol'.
-Not support keyboard LED yet.
-
-Note that the converter can host only USB "boot protocol" keyboard(6KRO) and not NKRO, it is possible to support NKRO keyboard but you will need to write HID report parser for that. Every NKRO keyboard can have different HID report and it is difficult to support all kind of NKRO keyboards in the market.
-
-
-
-Update
-------
-2014/12/11  Added Hub support(confirmed with HHKB pro2)
-
-
-
-Resource
---------
-USB Host Sheild 2.0
-    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-2-0-for-arduino
-    https://www.circuitsathome.com/products-page/arduino-shields/usb-host-shield-for-arduino-pro-mini
-USB Host Sheild 2.0 source
-    https://github.com/felis/USB_Host_Shield_2.0
-Arduino USB Host Shield(with bootst converter)
-    http://arduino.cc/en/Main/ArduinoUSBHostShield
-Arduino source
-    https://github.com/arduino/Arduino/hardware/arduino/{cores,variants}
-Initial release of TMK USB-USB converter
-    https://geekhack.org/index.php?topic=33057.msg653549#msg653549
-    http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html#p74854
-Arduino-based hardware keyboard remapper - Colemak forum
-    http://forum.colemak.com/viewtopic.php?id=1561
-Teensy + Host Shield
-    http://www.pjrc.com/teensy/td_libs_USBHostShield.html
diff --git a/converter/usb_usb/config.h b/converter/usb_usb/config.h
deleted file mode 100644 (file)
index c992456..0000000
+++ /dev/null
@@ -1,39 +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      0x005B
-#define DEVICE_VER      0x0814
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         USB to USB keyboard converter
-
-
-#define DESCRIPTION     Product from t.m.k. keyboard firmware project
-
-
-/* matrix size */
-#define MATRIX_ROWS 32
-#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/converter/usb_usb/keymap.c b/converter/usb_usb/keymap.c
deleted file mode 100644 (file)
index 5397de5..0000000
+++ /dev/null
@@ -1,115 +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 "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: plain Qwerty without layer switching
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.     ,-----------.
-     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|     |Pwr|Slp|Wak|
-     * `---'   `---------------' `---------------' `---------------' `-----------'     `-----------'
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    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,
-    CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 1: Colemak http://colemak.com
-     * ,-----------------------------------------------------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa|
-     * |-----------------------------------------------------------|
-     * |Tab  |  Q|  W|  F|  P|  G|  J|  L|  U|  Y|  ;|  [|  ]|    \|
-     * |-----------------------------------------------------------|
-     * |BackSp|  A|  R|  S|  T|  D|  H|  N|  E|  I|  O|  '|Return  |
-     * |-----------------------------------------------------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  K|  M|  ,|  ,|  /|Shift     |
-     * |-----------------------------------------------------------|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl|
-     * `----------------------------------------------------------'
-     */
-    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,   F,   P,   G,   J,   L,   U,   Y,   SCLN,LBRC,RBRC,BSLS,     DEL, END, PGDN,    P7,  P8,  P9,
-    BSPC,A,   R,   S,   T,   D,   H,   N,   E,   I,   O,   QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   K,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 2: Dvorak http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard
-     * ,-----------------------------------------------------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  [|  ]|Backspa|
-     * |-----------------------------------------------------------|
-     * |Tab  |  '|  ,|  .|  P|  Y|  F|  G|  C|  R|  L|  /|  =|    \|
-     * |-----------------------------------------------------------|
-     * |BackSp|  A|  O|  E|  U|  I|  D|  H|  T|  N|  S|  -|Return  |
-     * |-----------------------------------------------------------|
-     * |Shift   |  ;|  Q|  J|  K|  X|  B|  M|  Wl  V|  Z|Shift     |
-     * |-----------------------------------------------------------|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl|
-     * `-----------------------------------------------------------'
-     */
-    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,   LBRC,RBRC,BSPC,     INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    TAB, QUOT,COMM,DOT, P,   Y,   F,   G,   C,   R,   L,   SLSH,EQL, BSLS,     DEL, END, PGDN,    P7,  P8,  P9,
-    CAPS,A,   O,   E,   U,   I,   D,   H,   T,   N,   S,   MINS,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,SCLN,Q,   J,   K,   X,   B,   M,   W,   V,   Z,             RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 3: Workman http://viralintrospection.wordpress.com/2010/09/06/a-different-philosophy-in-designing-keyboard-layouts/
-     * ,-----------------------------------------------------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa|
-     * |-----------------------------------------------------------|
-     * |Tab  |  Q|  D|  R|  W|  B|  J|  F|  U|  P|  ;|  [|  ]|    \|
-     * |-----------------------------------------------------------|
-     * |CapsLo|  A|  S|  H|  T|  G|  Y|  N|  E|  O|  I|  '|Return  |
-     * |-----------------------------------------------------------|
-     * |Shift   |  Z|  X|  M|  C|  V|  K|  L|  ,|  ,|  /|Shift     |
-     * |-----------------------------------------------------------|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl|
-     * `-----------------------------------------------------------'
-     */
-    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,   D,   R,   W,   B,   J,   F,   U,   P,   SCLN,LBRC,RBRC,BSLS,     DEL, END, PGDN,    P7,  P8,  P9,
-    BSPC,A,   S,   H,   T,   G,   Y,   N,   E,   O,   I,   QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   M,   C,   V,   K,   L,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-};
diff --git a/converter/usb_usb/keymap_common.c b/converter/usb_usb/keymap_common.c
deleted file mode 100644 (file)
index 8ab5ba9..0000000
+++ /dev/null
@@ -1,31 +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/>.
-*/
-#include "keymap_common.h"
-#include "progmem.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/converter/usb_usb/keymap_common.h b/converter/usb_usb/keymap_common.h
deleted file mode 100644 (file)
index 435d83f..0000000
+++ /dev/null
@@ -1,77 +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 "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( \
-    K29,K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45,     K46,K47,K48,                   \
-    K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K2A, K49,K4A,K4B,  K53,K54,K55,K56, \
-    K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30,K31, K4C,K4D,K4E,  K5F,K60,K61,     \
-    K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34,    K28,               K5C,K5D,K5E,K57, \
-    KE1,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38,        KE5,     K52,      K59,K5A,K5B,     \
-    KE0,KE3,KE2,        K2C,                KE6,KE7,K65,KE4, K50,K51,K4F,  K62,    K63,K58  \
-) { \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, /* 00-07 */ \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, /* 08-0F */ \
-    { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, /* 10-17 */ \
-    { KC_##K18, KC_##K19, KC_##K1A, KC_##K1B, KC_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, /* 18-1F */ \
-    { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, /* 20-27 */ \
-    { KC_##K28, KC_##K29, KC_##K2A, KC_##K2B, KC_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, /* 28-2F */ \
-    { KC_##K30, KC_##K31, KC_NO,    KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, /* 30-37 */ \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, /* 38-3F */ \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, /* 40-47 */ \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, /* 48-4F */ \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, /* 50-57 */ \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, /* 58-5F */ \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_NO,    KC_##K65, KC_NO,    KC_NO    }, /* 60-67 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 68-6F */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 70-77 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 78-7F */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 80-87 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 88-8F */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 90-97 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* 98-9F */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* A0-A7 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* A8-AF */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* B0-B7 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* B8-BF */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* C0-C7 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* C8-CF */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* D0-D7 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* D8-DF */ \
-    { KC_##KE0, KC_##KE1, KC_##KE2, KC_##KE3, KC_##KE4, KC_##KE5, KC_##KE6, KC_##KE7 }, /* E0-E7 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* E8-EF */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* F0-F7 */ \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }, /* F8-FF */ \
-}
-
-#endif
diff --git a/converter/usb_usb/keymap_hasu.c b/converter/usb_usb/keymap_hasu.c
deleted file mode 100644 (file)
index de19e23..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-#include "keymap_common.h"
-
-const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
-    /* 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, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    ESC, 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,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   FN3, QUOT,     FN6,                         P4,  P5,  P6,  PPLS,
-    FN7, Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, FN2,           RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          FN4,                     RALT,FN5, FN5, FN1,      LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 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(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,      INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    CAPS,NO,  NO,  NO,  NO,  NO,  NO,  NO,  PSCR,SLCK,PAUS, UP,  NO, BSLS,     DEL, END, PGDN,    P7,  P8,  P9,
-    LCTL,VOLD,VOLU,MUTE,NO,  NO,  PAST,PSLS,HOME,PGUP,LEFT,RGHT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,NO,  NO,  NO,  NO,  NO,  PPLS,PMNS,END, PGDN,DOWN,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, TRNS,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 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(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,      INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    TAB, HOME,PGDN,UP,  PGUP,END, HOME,PGDN,PGUP,END, NO,  NO,  NO,  BSLS,     DEL, END, PGDN,    P7,  P8,  P9,
-    LCTL,NO,  LEFT,DOWN,RGHT,NO,  LEFT,DOWN,UP,  RGHT,NO,  NO,       ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,NO,  NO,  NO,  NO,  NO,  HOME,PGDN,PGUP,END, TRNS,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          SPC,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 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 Wheel8
-     */
-    [3] = \
-    KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, FN8,      INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    FN8, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,MS_U,WH_U,WH_R,WBAK,WFWD,FN8,      DEL, END, PGDN,    P7,  P8,  P9,
-    LCTL,ACL0,ACL1,ACL2,ACL2,NO,  NO,  MS_L,MS_D,MS_R,TRNS,NO,       ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,BTN4,BTN5,NO,            RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          BTN1,                    RALT,TRNS,TRNS,RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* Layer 5: 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 Wheel8
-     */
-    [4] = \
-    KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, FN8,      INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    FN8, NO,  NO,  NO,  NO,  NO,  WH_L,WH_D,MS_U,WH_U,WH_R,WBAK,WFWD,FN8,      DEL, END, PGDN,    P7,  P8,  P9,
-    LCTL,ACL0,ACL1,ACL2,ACL2,NO,  NO,  MS_L,MS_D,MS_R,BTN1,NO,       ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,NO,  NO,  NO,  NO,  BTN3,BTN2,BTN1,BTN4,BTN5,NO,            RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          TRNS,                    RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-
-/*
- * Macro definition
- */
-enum macro_id {
-    ALT_TAB,
-};
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
-{
-    switch (id) {
-        case ALT_TAB:
-            return (record->event.pressed ?
-                    MACRO( D(LALT), D(TAB), END ) :
-                    MACRO( U(TAB), END ));
-    }
-    return MACRO_NONE;
-}
-
-
-/*
- * 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(3),                  // Mousekey layer
-    [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
-};
diff --git a/converter/usb_usb/keymap_spacefn.c b/converter/usb_usb/keymap_spacefn.c
deleted file mode 100644 (file)
index bffd2bc..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * SpaceFN layout
- * http://geekhack.org/index.php?topic=51069.0
- */
-#include "keymap_common.h"
-
-
-const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-    /* 0: default
-     * ,---.   ,---------------. ,---------------. ,---------------. ,-----------.     ,-----------.
-     * |Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|     |Pwr|Slp|Wak|
-     * `---'   `---------------' `---------------' `---------------' `-----------'     `-----------'
-     * ,-----------------------------------------------------------. ,-----------. ,---------------.
-     * |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  /|  *|  -|
-     * |-----------------------------------------------------------| |-----------| |---------------|
-     * |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|    \| |Del|End|PgD| |  7|  8|  9|   |
-     * |-----------------------------------------------------------| `-----------' |-----------|  +|
-     * |CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return  |               |  4|  5|  6|   |
-     * |-----------------------------------------------------------|     ,---.     |---------------|
-     * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
-     * |-----------------------------------------------------------| ,-----------. |-----------|Ent|
-     * |Ctrl |Gui |Alt |         Space         |Alt |Gui |Menu|Ctrl| |Lef|Dow|Rig| |      0|  .|   |
-     * `-----------------------------------------------------------' `-----------' `---------------'
-     */
-    KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    ESC, 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,
-    CAPS,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,     ENT,                         P4,  P5,  P6,  PPLS,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,          RSFT,          UP,           P1,  P2,  P3,
-    LCTL,LGUI,LALT,          FN0,                     RALT,RGUI,APP, RCTL,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-
-    /* 1: SpaceFN
-     * ,-----------------------------------------------------------.
-     * |`  | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Delete |
-     * |-----------------------------------------------------------|
-     * |     |   |   |Esc|   |   |   |Hom|Up |End|Psc|Slk|Pau|Ins  |
-     * |-----------------------------------------------------------|
-     * |      |   |   |   |   |   |PgU|Lef|Dow|Rig|   |   |        |
-     * |-----------------------------------------------------------|
-     * |        |   |   |   |   |Spc|PgD|`  |~  |   |Men|          |
-     * |-----------------------------------------------------------|
-     * |    |    |    |                        |    |    |    |    |
-     * `-----------------------------------------------------------'
-     */
-    KEYMAP(
-    ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12,           PSCR,SLCK,BRK,
-    GRV, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, DEL,      INS, HOME,PGUP,    NLCK,PSLS,PAST,PMNS,
-    TRNS,TRNS,TRNS,ESC, TRNS,TRNS,TRNS,HOME,UP,  END, PSCR,SLCK,PAUS,INS,      DEL, END, PGDN,    P7,  P8,  P9,
-    TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PGUP,LEFT,DOWN,RGHT,TRNS,TRNS,     TRNS,                        P4,  P5,  P6,  PPLS,
-    TRNS,TRNS,TRNS,TRNS,TRNS,SPC, PGDN,GRV, FN1, TRNS,APP,           TRNS,          UP,           P1,  P2,  P3,
-    TRNS,TRNS,TRNS,          TRNS,                    TRNS,TRNS,TRNS,TRNS,     LEFT,DOWN,RGHT,    P0,       PDOT,PENT
-    ),
-};
-
-const uint16_t PROGMEM fn_actions[] = {
-    [0] = ACTION_LAYER_TAP_KEY(1, KC_SPACE),
-    [1] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV),    // tilde
-};
-
diff --git a/converter/usb_usb/main.cpp b/converter/usb_usb/main.cpp
deleted file mode 100644 (file)
index 652c805..0000000
+++ /dev/null
@@ -1,132 +0,0 @@
-#include <avr/io.h>
-#include <avr/wdt.h>
-#include <avr/power.h>
-#include <util/delay.h>
-
-// USB HID host
-#include "Usb.h"
-#include "usbhub.h"
-#include "hid.h"
-#include "hidboot.h"
-#include "parser.h"
-
-// LUFA
-#include "lufa.h"
-
-#include "timer.h"
-#include "sendchar.h"
-#include "debug.h"
-#include "keyboard.h"
-#include "led.h"
-
-
-/* LED ping configuration */
-#define TMK_LED
-//#define LEONARDO_LED
-#if defined(TMK_LED)
-// For TMK converter and Teensy
-#define LED_TX_INIT    (DDRD  |=  (1<<6))
-#define LED_TX_ON      (PORTD |=  (1<<6))
-#define LED_TX_OFF     (PORTD &= ~(1<<6))
-#define LED_TX_TOGGLE  (PORTD ^=  (1<<6))
-#elif defined(LEONARDO_LED)
-// For Leonardo(TX LED)
-#define LED_TX_INIT    (DDRD  |=  (1<<5))
-#define LED_TX_ON      (PORTD &= ~(1<<5))
-#define LED_TX_OFF     (PORTD |=  (1<<5))
-#define LED_TX_TOGGLE  (PORTD ^=  (1<<5))
-#else
-#define LED_TX_INIT
-#define LED_TX_ON
-#define LED_TX_OFF
-#define LED_TX_TOGGLE
-#endif
-
-
-static void LUFA_setup(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);
-}
-
-
-
-/*
- * USB Host Shield HID keyboard
- */
-USB usb_host;
-USBHub hub1(&usb_host);
-HIDBoot<HID_PROTOCOL_KEYBOARD>    kbd(&usb_host);
-KBDReportParser kbd_parser;
-
-
-void led_set(uint8_t usb_led)
-{
-    kbd.SetReport(0, 0, 2, 0, 1, &usb_led);
-}
-
-
-
-int main(void)
-{
-    // LED for debug
-    LED_TX_INIT;
-    LED_TX_ON;
-
-    debug_enable = true;
-    debug_keyboard = true;
-
-    host_set_driver(&lufa_driver);
-    keyboard_init();
-
-    LUFA_setup();
-
-    // USB Host Shield setup
-    usb_host.Init();
-    kbd.SetReportParser(0, (HIDReportParser*)&kbd_parser);
-
-    /* NOTE: Don't insert time consuming job here.
-     * It'll cause unclear initialization failure when DFU reset(worm start).
-     */
-    sei();
-
-    // wait for startup of sendchar routine
-    while (USB_DeviceState != DEVICE_STATE_Configured) ;
-    if (debug_enable) {
-        _delay_ms(1000);
-    }
-
-    debug("init: done\n");
-
-uint16_t timer;
-    for (;;) {
-        keyboard_task();
-
-timer = timer_read();
-        usb_host.Task();
-timer = timer_elapsed(timer);
-if (timer > 100) {
-    debug("host.Task: "); debug_hex16(timer);  debug("\n");
-}
-
-#if !defined(INTERRUPT_CONTROL_ENDPOINT)
-        // LUFA Task for control request
-        USB_USBTask();
-#endif
-    }
-
-    return 0;
-}
diff --git a/converter/usb_usb/matrix.c b/converter/usb_usb/matrix.c
deleted file mode 100644 (file)
index 83d5ab6..0000000
+++ /dev/null
@@ -1,133 +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 <stdbool.h>
-#include "usb_hid.h"
-#include "keycode.h"
-#include "util.h"
-#include "print.h"
-#include "debug.h"
-#include "matrix.h"
-
-/* KEY CODE to Matrix
- *
- * HID keycode(1 byte):
- * Higher 5 bits indicates ROW and lower 3 bits COL.
- *
- *  7 6 5 4 3 2 1 0
- * +---------------+
- * |   ROW   | COL |
- * +---------------+
- *
- * Matrix space(32 * 8):
- *      01234567
- *   0 +--------+
- *   : |        |
- *   : |        |
- *  31 +--------+
- */
-#define ROW_MASK 0xF8
-#define COL_MASK 0x07
-#define CODE(row, col)  (((row) << 3) | (col))
-#define ROW(code)       (((code) & ROW_MASK) >> 3)
-#define COL(code)       ((code) & COL_MASK)
-#define ROW_BITS(code)  (1 << COL(code))
-
-
-uint8_t matrix_rows(void) { return MATRIX_ROWS; }
-uint8_t matrix_cols(void) { return MATRIX_COLS; }
-void matrix_init(void) {}
-bool matrix_has_ghost(void) { return false; }
-
-static bool matrix_is_mod =false;
-
-uint8_t matrix_scan(void) {
-    static uint16_t last_time_stamp = 0;
-
-    if (last_time_stamp != usb_hid_time_stamp) {
-        last_time_stamp = usb_hid_time_stamp;
-        matrix_is_mod = true;
-    } else {
-        matrix_is_mod = false;
-    }
-    return 1;
-}
-
-bool matrix_is_modified(void) {
-
-    return matrix_is_mod;
-}
-
-bool matrix_is_on(uint8_t row, uint8_t col) {
-    uint8_t code = CODE(row, col);
-
-    if (IS_MOD(code)) {
-        if (usb_hid_keyboard_report.mods & ROW_BITS(code)) {
-            return true;
-        }
-    }
-    for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
-        if (usb_hid_keyboard_report.keys[i] == code) {
-            return true;
-        }
-    }
-    return false;
-}
-
-uint8_t matrix_get_row(uint8_t row) {
-    uint8_t row_bits = 0;
-
-    if (IS_MOD(CODE(row, 0)) && usb_hid_keyboard_report.mods) {
-        row_bits |= usb_hid_keyboard_report.mods;
-    }
-
-    for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
-        if (IS_ANY(usb_hid_keyboard_report.keys[i])) {
-            if (row == ROW(usb_hid_keyboard_report.keys[i])) {
-                row_bits |= ROW_BITS(usb_hid_keyboard_report.keys[i]);
-            }
-        }
-    }
-    return row_bits;
-}
-
-uint8_t matrix_key_count(void) {
-    uint8_t count = 0;
-
-    count += bitpop(usb_hid_keyboard_report.mods);
-    for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
-        if (IS_ANY(usb_hid_keyboard_report.keys[i])) {
-            count++;
-        }
-    }
-    return count;
-}
-
-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");
-    }
-}
diff --git a/converter/x68k_usb/Makefile b/converter/x68k_usb/Makefile
deleted file mode 100644 (file)
index 60e9a57..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-#
-# Makefile for PJRC Teensy
-#
-
-
-# Target file name (without extension).
-TARGET = x68k_usb_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 \
-       protocol/serial_uart.c
-
-CONFIG_H = config_pjrc.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
-#SLEEP_LED_ENABLE = yes  # Breathing sleep LED during USB suspend
-#NKRO_ENABLE = yes     # USB Nkey Rollover - not yet supported in LUFA
-
-
-
-#---------------- Programming Options --------------------------
-AVRDUDE = avrdude
-# Type: avrdude -c ? to get a full listing.
-AVRDUDE_PROGRAMMER = avr109
-AVRDUDE_PORT = /dev/ttyACM0
-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)
-#PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex
-PROGRAM_CMD = dfu-programmer atmega32u4 flash $(TARGET).hex
-
-
-# Search Path
-VPATH += $(TARGET_DIR)
-VPATH += $(TMK_DIR)
-
-
-include $(TMK_DIR)/protocol/pjrc.mk
-include $(TMK_DIR)/protocol.mk
-include $(TMK_DIR)/common.mk
-include $(TMK_DIR)/rules.mk
diff --git a/converter/x68k_usb/README b/converter/x68k_usb/README
deleted file mode 100644 (file)
index 516fcd2..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-X68000 to USB keyboard protocol converter
-=========================================
-SHARP X68000 is a hobby computer released in Japan.(1987-93)
-http://en.wikipedia.org/wiki/Sharp_X68000
-
-X68000 keyboard has ALPS linear switches.
-- DSETK0016CE01   green linear
-- DSETK0022CE02   yellow linear
-- DSETK0023CE03   yellow linear
-
-
-Hardware
---------
-Target MCU is ATMega32u4 but other USB capable AVR will also work.
-You can use PJRC Teensy as development board.
-    http://www.pjrc.com/teensy/
-
-Wiring:
-    Mini-DIN            Teensy
-    -----------------------------------------------------
-    pin1   +5V          VCC
-    pin2   MOUSE        -
-    pin3   RXD          PD2(RXD)
-    pin4   TXD          PD3(TXD) NOTE: Not supported yet.
-    pin5   READY        -
-    pin6   REMOTE       -
-    pin7   GND          GND
-
-
-Firmware
---------
-Build:
-    $ cd x68k_usb
-    $ make
-
-And load the binary to MCU with your favorite programmer.
-If you use Teensy you can load with PJRC Teensy Loader tool.
-    http://www.pjrc.com/teensy/loader.html
-
-
-*   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *   *
-
-
-X68000 Keyboard Protocol
-========================
-http://kyoutan.jpn.org/uts/pc/pic/x68key/
-
-
-Connector
----------
-Mini DIN 7pin(female connector on computer side)
-       7 6 5
-       o o o
-    4 o  =  o 3
-        o o
-        2 1
-
-    Mini-DIN
-    -------------
-    pin1   +5V
-    pin2   MOUSE
-    pin3   RXD
-    pin4   TXD
-    pin5   READY
-    pin6   REMOTE
-    pin7   GND
-
-
-Signaling
----------
-- TXD,RXD
-    Asynchronous, 2400baud, 1-startbit(L), 8-databit, 1-stopbit(H)
-
-- READY
-    ready/not ready(1/0)
-
-
-Data from keyboard
-------------------
-bit 7       make/break flag(0/1)
-bit 6-0     following scan code
-
-
-Data from computer
-------------------
-- LED control ON/OFF(0/1)
-    bit 7   1(fixed)
-    bit 6   全角
-    bit 5   ひらがな
-    bit 4   INS
-    bit 3   CAPS
-    bit 2   コード入力
-    bit 1   ローマ字
-    bit 0   かな
-
-- Repeat delay
-    bit 7   0(fixed)
-    bit 6   1(fixed)
-    bit 5   1(fixed)
-    bit 4   0(fixed)
-    bit 3-0 delay
-    REPEAT_DELAY = 200+delay*100 ms
-    default: 500ms
--  Repeat time
-    bit 7   0(fixed)
-    bit 6   1(fixed)
-    bit 5   1(fixed)
-    bit 4   1(fixed)
-    bit 3-0 time
-    REPEAT_TIME = 30+time^2*5 ms
-    default: 110ms
-
-
-Scan Codes
-----------
-,---. ,---.    ,-------------------,    ,-------------------.  ,-----------. ,---------------.
-| 61| | 62|    | 63| 64| 65| 66| 67|    | 68| 69| 6A| 6B| 6C|  | 5A| 5B| 5C| | 5D| 52| 53| 54|
-`---' `---'    `-------------------'    `-------------------'  `-----------' `---------------'
-,-----------------------------------------------------------.  ,-----------. ,---------------.
-| 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| 0F|  | 36| 5E| 37| | 3F| 40| 41| 42|
-|-----------------------------------------------------------|  |------------ |---------------|
-|  10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C|     |  | 38| 39| 3A| | 43| 44| 45| 46|
-|------------------------------------------------------. 1D |  `---=====---' |---------------|
-|  71  | 1E| 1F| 20| 21| 2l| 23| 24| 25| 26| 27| 28| 29|    |   ___| 3C|___  | 47| 48| 49| 4A|
-|-----------------------------------------------------------|  | 3B|---| 3D| |-----------|---|
-|  70    | 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34|   70 |  `---| 3E|---' | 4B| 4C| 4D|   |
-`-----------------------------------------------------------|  .---=====---. |-----------| 4E|
-       | 5F| 55 | 56 |     35     | 57 | 58 | 59 | 60|         |  72 |  73 | | 4F| 50| 51|   |
-       `---------------------------------------------'         `-----------' `---------------'
-
-
-
-LED Special Functions
----------------------
-http://homepage2.nifty.com/m_kamada/docs/unlistedx68k.htm#keyboard
-
-1. Random Illumination
-    Plug in with pressing F1, F2 and F3.
-
-2. Sequential Illumination
-    Plug in with pressing 記号入力(52), 登録(53) and HELP.
-
-3. Scan code Display
-    Plug in with pressing かな(5A), ローマ字(5B) and コード入力(5C).
-    You can see its scan code on LEDs by pressing a key.
-   +---------------------------------------------------+
-   |bit|6   |5       |4  |3   |2         |1       |0   |
-   |---+----+--------+---+----+----------+--------+----|
-   |LED|全角|ひらがな|INS|CAPS|コード入力|ローマ字|かな|
-   +---------------------------------------------------+
diff --git a/converter/x68k_usb/config_pjrc.h b/converter/x68k_usb/config_pjrc.h
deleted file mode 100644 (file)
index c49b4a7..0000000
+++ /dev/null
@@ -1,67 +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      0x6800
-#define MANUFACTURER    t.m.k.
-#define PRODUCT         SHARP X68000 keyboard converter
-#define DESCRIPTION     converts SHARP X68000 keyboard protocol into USB
-
-
-/* matrix size */
-#define MATRIX_ROWS 16
-#define MATRIX_COLS 8
-
-
-/* key combination for command */
-#define IS_COMMAND() ( \
-    keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \
-    keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) \
-)
-
-/* legacy keymap support */
-#define USE_LEGACY_KEYMAP
-
-
-/* USART configuration
- *     asynchronous, 2400baud, 8-data bit, non parity, 1-stop bit, no flow control
- */
-#ifdef __AVR_ATmega32U4__
-    #define SERIAL_UART_BAUD       2400
-    #define SERIAL_UART_DATA       UDR1
-    #define SERIAL_UART_UBRR       ((F_CPU/(16UL*SERIAL_UART_BAUD))-1)
-    #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 = (uint8_t) (SERIAL_UART_UBRR>>8);  /* baud rate */ \
-        UCSR1B = (1<<RXCIE1) | (1<<RXEN1) | /* RX: interrupt, RX: enable */ \
-                 (1<<TXEN1);                /* TX: enable */ \
-        UCSR1C = (0<<UPM11) | (0<<UPM10) | /* parity: none(00), even(01), odd(11) */ \
-                 (0<<UCSZ12) | (1<<UCSZ11) | (1<<UCSZ10); /* data-8bit(011) */ \
-        sei(); \
-    } while(0)
-#else
-#   error "USART configuration is needed."
-#endif
-
-#endif
diff --git a/converter/x68k_usb/keymap.c b/converter/x68k_usb/keymap.c
deleted file mode 100644 (file)
index 5e09f55..0000000
+++ /dev/null
@@ -1,150 +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/pgmspace.h>
-#include "keycode.h"
-#include "util.h"
-#include "keymap.h"
-
-
-
-
-// Following macros help you to define a keymap with the form of actual keyboard layout.
-
-/* X68000 Keyboard Scan codes
-    ,---. ,---.    ,-------------------,    ,-------------------.  ,-----------. ,---------------.
-    | 61| | 62|    | 63| 64| 65| 66| 67|    | 68| 69| 6A| 6B| 6C|  | 5A| 5B| 5C| | 5D| 52| 53| 54|
-    `---' `---'    `-------------------'    `-------------------'  `-----------' `---------------'
-    ,-----------------------------------------------------------.  ,-----------. ,---------------.
-    | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| 0F|  | 36| 5E| 37| | 3F| 40| 41| 42|
-    |-----------------------------------------------------------|  |------------ |---------------|
-    |  10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C|     |  | 38| 39| 3A| | 43| 44| 45| 46|
-    |------------------------------------------------------. 1D |  `---=====---' |---------------|
-    |  71  | 1E| 1F| 20| 21| 2l| 23| 24| 25| 26| 27| 28| 29|    |   ___| 3C|___  | 47| 48| 49| 4A|
-    |-----------------------------------------------------------|  | 3B|---| 3D| |-----------|---|
-    |  70    | 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34|   70 |  `---| 3E|---' | 4B| 4C| 4D|   |
-    `-----------------------------------------------------------|  .---=====---. |-----------| 4E|
-           | 5F| 55 | 56 |     35     | 57 | 58 | 59 | 60|         |  72 |  73 | | 4F| 50| 51|   |
-           `---------------------------------------------'         `-----------' `---------------'
-*/
-#define KEYMAP( \
-    K61,K62,        K63,K64,K65,K66,K67,    K68,K69,K6A,K6B,K6C,  K5A,K5B,K5C,  K5D,K52,K53,K54, \
-    K01,K02,K03,K04,K05,K06,K07,K08,K09,K0A,K0B,K0C,K0D,K0E,K0F,  K36,K5E,K37,  K3F,K40,K41,K42, \
-    K10,K11,K12,K13,K14,K15,K16,K17,K18,K19,K1A,K1B,K1C,    K1D,  K38,K39,K3A,  K43,K44,K45,K46, \
-    K71,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K28,K29,              K3C,      K47,K48,K49,K4A, \
-    K70,K2A,K2B,K2C,K2D,K2E,K2F,K30,K31,K32,K33,K34,              K3B,K3E,K3D,  K4B,K4C,K4D,K4E, \
-        K5F,K55,K56,    K35,        K57,K58,K59,K60,              K72,    K73,  K4F,K50,K51      \
-) { \
-    { KC_NO,    KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \
-    { KC_##K08, KC_##K09, KC_##K0A, KC_##K0B, KC_##K0C, KC_##K0D, KC_##K0E, KC_##K0F }, \
-    { 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_##K1C, KC_##K1D, KC_##K1E, KC_##K1F }, \
-    { 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_##K2C, KC_##K2D, KC_##K2E, KC_##K2F }, \
-    { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \
-    { KC_##K38, KC_##K39, KC_##K3A, KC_##K3B, KC_##K3C, KC_##K3D, KC_##K3E, KC_##K3F }, \
-    { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \
-    { KC_##K48, KC_##K49, KC_##K4A, KC_##K4B, KC_##K4C, KC_##K4D, KC_##K4E, KC_##K4F }, \
-    { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \
-    { KC_##K58, KC_##K59, KC_##K5A, KC_##K5B, KC_##K5C, KC_##K5D, KC_##K5E, KC_##K5F }, \
-    { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \
-    { KC_##K68, KC_##K69, KC_##K6A, KC_##K6B, KC_##K6C, KC_NO,    KC_NO,    KC_NO    }, \
-    { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_NO,    KC_NO,    KC_NO,    KC_NO,   }, \
-    { KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO,    KC_NO    }  \
-}
-
-
-// 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
-    0,              // Fn1
-    0,              // Fn2
-    0,              // Fn3
-    0,              // 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_NO,          // Fn2
-    KC_NO,          // Fn3
-    KC_NO,          // Fn4
-    KC_NO,          // Fn5
-    KC_NO,          // Fn6
-    KC_NO           // Fn7
-};
-
-
-static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-/* X68000 Keyboard Scan codes
-    ,---. ,---.    ,-------------------,    ,-------------------.  ,-----------. ,---------------.
-    | 61| | 62|    | 63| 64| 65| 66| 67|    | 68| 69| 6A| 6B| 6C|  | 5A| 5B| 5C| | 5D| 52| 53| 54|
-    `---' `---'    `-------------------'    `-------------------'  `-----------' `---------------'
-    ,-----------------------------------------------------------.  ,-----------. ,---------------.
-    | 01| 02| 03| 04| 05| 06| 07| 08| 09| 0A| 0B| 0C| 0D| 0E| 0F|  | 36| 5E| 37| | 3F| 40| 41| 42|
-    |-----------------------------------------------------------|  |------------ |---------------|
-    |  10 | 11| 12| 13| 14| 15| 16| 17| 18| 19| 1A| 1B| 1C|     |  | 38| 39| 3A| | 43| 44| 45| 46|
-    |------------------------------------------------------. 1D |  `---=====---' |---------------|
-    |  71  | 1E| 1F| 20| 21| 2l| 23| 24| 25| 26| 27| 28| 29|    |   ___| 3C|___  | 47| 48| 49| 4A|
-    |-----------------------------------------------------------|  | 3B|---| 3D| |-----------|---|
-    |  70    | 2A| 2B| 2C| 2D| 2E| 2F| 30| 31| 32| 33| 34|   70 |  `---| 3E|---' | 4B| 4C| 4D|   |
-    `-----------------------------------------------------------|  .---=====---. |-----------| 4E|
-           | 5F| 55 | 56 |     35     | 57 | 58 | 59 | 60|         |  72 |  73 | | 4F| 50| 51|   |
-           `---------------------------------------------'         `-----------' `---------------'
-*/
-    /* ANSI */
-    KEYMAP(
-    F16, F17,     F1,  F2,  F3,  F4,  F5,   F6,  F7,  F8,  F9,  F10,              PSCR,SLCK,PAUS,     CAPS,F11, F12, F13,
-    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, BSLS,BSPC,   HOME,INS, DEL,      NLCK,PSLS,PAST,PMNS,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     ENT,    PGDN,PGUP,END,      P7,  P8,  P9,  PPLS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,F18,                   UP,            P4,  P5,  P6,  PEQL,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,GRV,                   LEFT,DOWN,RGHT,     P1,  P2,  P3,  PENT,
-         F19, LGUI,LALT,     SPC,      RALT,RGUI,RCTL,APP,                        F14,      F15,      P0,  PCMM,PDOT
-    ),
-    /* JIS */
-    KEYMAP(
-    F16, F17,     F1,  F2,  F3,  F4,  F5,   F6,  F7,  F8,  F9,  F10,              PSCR,SLCK,PAUS,     CAPS,F11, F12, F13,
-    ESC, 1,   2,   3,   4,   5,   6,   7,   8,   9,   0,   MINS,EQL, JYEN,BSPC,   HOME,INS, DEL,      NLCK,PSLS,PAST,PMNS,
-    TAB, Q,   W,   E,   R,   T,   Y,   U,   I,   O,   P,   LBRC,RBRC,     ENT,    PGDN,PGUP,END,      P7,  P8,  P9,  PPLS,
-    LCTL,A,   S,   D,   F,   G,   H,   J,   K,   L,   SCLN,QUOT,NUHS,                  UP,            P4,  P5,  P6,  PEQL,
-    LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RO,                    LEFT,DOWN,RGHT,     P1,  P2,  P3,  PENT,
-         LGUI,LALT,MHEN,     SPC,      HENK,KANA,APP, ZKHK,                       F14,      F15,      P0,  PCMM,PDOT
-    ),
-};
-
-
-uint8_t keymap_get_keycode(uint8_t layer, uint8_t row, uint8_t col)
-{
-    return pgm_read_byte(&keymaps[(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/converter/x68k_usb/led.c b/converter/x68k_usb/led.c
deleted file mode 100644 (file)
index ccc3869..0000000
+++ /dev/null
@@ -1,43 +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 "serial.h"
-#include "led.h"
-#include "debug.h"
-
-
-void led_set(uint8_t usb_led)
-{
-    /* X68000 LED bits 0: on, 1: off
-     * bit 7   1(fixed)
-     * bit 6   全角
-     * bit 5   ひらがな
-     * bit 4   INS
-     * bit 3   CAPS
-     * bit 2   コード入力
-     * bit 1   ローマ字
-     * bit 0   かな
-     */
-    uint8_t led = 0xFF;
-    if (usb_led&(1<<USB_LED_NUM_LOCK))      led &= ~(1<<2);
-    if (usb_led&(1<<USB_LED_CAPS_LOCK))     led &= ~(1<<3);
-    if (usb_led&(1<<USB_LED_SCROLL_LOCK))   led &= ~(1<<1);
-    if (usb_led&(1<<USB_LED_COMPOSE))       led &= ~(1<<4);
-    if (usb_led&(1<<USB_LED_KANA))          led &= ~(1<<0);
-    serial_send(led);
-}
diff --git a/converter/x68k_usb/matrix.c b/converter/x68k_usb/matrix.c
deleted file mode 100644 (file)
index 2d5a1e1..0000000
+++ /dev/null
@@ -1,142 +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 "util.h"
-#include "serial.h"
-#include "matrix.h"
-#include "debug.h"
-
-
-/*
- * Matrix Array usage:
- *
- * ROW: 16(4bits)
- * COL:  8(3bits)
- *
- *    8bit wide
- *   +---------+
- *  0|00 ... 07|
- *  1|08 ... 0F|
- *  :|   ...   |
- *  :|   ...   |
- *  E|70 ... 77|
- *  F|78 ... 7F|
- *   +---------+
- *
- */
-static uint8_t matrix[MATRIX_ROWS];
-#define ROW(code)      ((code>>3)&0xF)
-#define COL(code)      (code&0x07)
-
-static bool is_modified = false;
-
-
-inline
-uint8_t matrix_rows(void)
-{
-    return MATRIX_ROWS;
-}
-
-inline
-uint8_t matrix_cols(void)
-{
-    return MATRIX_COLS;
-}
-
-void matrix_init(void)
-{
-    serial_init();
-
-    // initialize matrix state: all keys off
-    for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00;
-
-    return;
-}
-
-uint8_t matrix_scan(void)
-{
-    is_modified = false;
-
-    uint16_t code;
-    code = serial_recv2();
-    if (code == -1) {
-        return 0;
-    }
-
-    dprintf("%02X\n", code);
-    if (code&0x80) {
-        // break code
-        if (matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] &= ~(1<<COL(code));
-            is_modified = true;
-        }
-    } else {
-        // make code
-        if (!matrix_is_on(ROW(code), COL(code))) {
-            matrix[ROW(code)] |=  (1<<COL(code));
-            is_modified = true;
-        }
-    }
-    return code;
-}
-
-bool matrix_is_modified(void)
-{
-    return is_modified;
-}
-
-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
-uint8_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++) {
-        count += bitpop(matrix[i]);
-    }
-    return count;
-}
diff --git a/doc/BUILD_GUIDE.md b/doc/BUILD_GUIDE.md
new file mode 100644 (file)
index 0000000..089d638
--- /dev/null
@@ -0,0 +1,60 @@
+# Build Guide
+
+## Build Environment Setup
+
+### Windows (Vista and later)
+1. If you have ever installed WinAVR, uninstall it.
+2. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
+3. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
+4. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
+5. Double-click on the 1-setup-path-win batch script to run it. You'll need to accept a User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
+6. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
+7. Future build commands should be run from the standard Windows command prompt, which you can find by searching for "command prompt" from the start menu or start screen. Ignore the "MHV AVR Shell".
+
+### Mac
+If you're using [homebrew,](http://brew.sh/) you can use the following commands:
+
+    brew tap osx-cross/avr
+    brew install avr-libc
+    brew install dfu-programmer
+
+This is the recommended method. If you don't have homebrew, [install it!](http://brew.sh/) It's very much worth it for anyone who works in the command line.
+
+You can also try these instructions:
+
+1. Install Xcode from the App Store.
+2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
+3. Install [DFU-Programmer][dfu-prog].
+
+### Linux
+Install AVR GCC, AVR libc, and dfu-progammer with your favorite package manager.
+
+Debian/Ubuntu example: 
+
+    sudo apt-get update
+    sudo apt-get install gcc-avr avr-libc dfu-programmer
+
+### Vagrant
+If you have any problems building the firmware, you can try using a tool called Vagrant. It will set up a virtual computer with a known configuration that's ready-to-go for firmware building. OLKB does NOT host the files for this virtual computer. Details on how to set up Vagrant are in the [VAGRANT_GUIDE file](VAGRANT_GUIDE.md).
+
+## Verify Your Installation
+1. If you haven't already, obtain this repository ([https://github.com/jackhumbert/qmk_firmware](https://github.com/jackhumbert/qmk_firmware)). You can either download it as a zip file and extract it, or clone it using the command line tool git or the Github Desktop application. 
+2. Open up a terminal or command prompt and navigate to the qmk_firmware folder using the `cd` command. The command prompt will typically open to your home directory. If, for example, you cloned the repository to your Documents folder, then you would type `cd Documents/qmk_firmware`. If you extracted the file from a zip, then it may be named `qmk_firmware-master` instead. 
+3. To confirm that you're in the correct location, you can display the contents of your current folder using the `dir` command on Windows, or the `ls` command on Linux or Mac. You should see several files, including `README.md` and a `quantum` folder. From here, you need to navigate to the appropriate folder under `keyboard/`. For example, if you're building for a Planck, run `cd keyboard/planck`.
+4. Once you're in the correct keyboard-specific folder, run the `make` command. This should output a lot of information about the build process.
+
+## Customizing, Building, and Deploying Your Firmware
+
+Note: Some keyboard folders have non-standard organizations, and may not even support specifying alternate keymaps. Until these get reorganized, you will need to edit their default keymaps directly.
+
+1. Running the `make` command from your keyboard's folder will generate a .hex file based on the default keymap. All keymaps for a particular keyboard live in the `keymaps` folder in that keyboard's folder. To create your own keymap, duplicate the folder `keymaps/default`, and rename it with your name, for example `jack`. Or, if you don't care about the ability to share your keymap with the community via GitHub, you can just modify the default keymap itself. Details on how to program keymap files can be found in other guides. 
+2. To build a keymap other than the default, type `KEYMAP=<name>` after `make`. So if I've named my keymap `jack`, the full command would be `make KEYMAP=jack`.
+3. How you deploy the firmware will depend on whether you are using a PCB or a Teensy. In both cases, you'll need to put the keyboard in bootloader mode, either by pressing a button on the PCB/Teensy or pressing the key with the `RESET` keycode. Then, if you're using a PCB, just run `make KEYMAP=<name> dfu` to both build and deploy the firmware. If you're using a Teensy, you'll probably need to take the <keyboardname>.hex file that make produces in the keyboard's folder, and deploy it using the [Teensy Loader.](https://www.pjrc.com/teensy/loader.html)
+
+## Helpful Tips
+1. On Linux or OS X, you can run `sleep 5; make KEYMAP=<name> dfu` to delay building/deploying the firmware until for 5 seconds, giving you a chance to put the firmware into bootloader mode. You can change the 5 to any number of seconds.
+
+## Troubleshooting
+1. Try running `make clean` if the make command fails.
+
+       WIP
diff --git a/doc/COPYING.GPLv2 b/doc/COPYING.GPLv2
new file mode 100644 (file)
index 0000000..d159169
--- /dev/null
@@ -0,0 +1,339 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                    GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation.  If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+                            NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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, write to the Free Software Foundation, Inc.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.
diff --git a/doc/COPYING.GPLv3 b/doc/COPYING.GPLv3
new file mode 100644 (file)
index 0000000..94a9ed0
--- /dev/null
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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 3 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/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/doc/CYGWIN_GUIDE.md b/doc/CYGWIN_GUIDE.md
new file mode 100755 (executable)
index 0000000..ac13e74
--- /dev/null
@@ -0,0 +1,352 @@
+#Planck Advanced (but not too advanced) `cygwin` Users Guide
+If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you.
+
+This guide was written step by step as I went through the process on a `Windows 10` `x86_64` and a `Windows 7` `amd k10` based system.  This should be generally applicable to to any `Windows` environment with `cygwin`.
+
+#####Do not skip steps. Do not move past a step until the previous step finishes successfully.
+
+Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)
+
+##Get the Required Packages
+Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected:
+- devel/git
+- devel/gcc-core
+- devel/gcc-g++
+- devel/flex
+- devel/bison
+- devel/make
+- devel/texinfo
+- devel/gettext-devel
+- devel/automake
+- devel/autoconfig
+- devel/libtool
+- text/gettext
+- libs/libgcc1
+- interpreters/m4
+- web/wget
+- archive/unzip
+
+The following sources will be required:
+- [gmp](https://gmplib.org/) (6.1.0)
+- [mpfr](http://www.mpfr.org/) (3.1.4)
+- [mpc](http://www.multiprecision.org/) (1.0.3) 
+- [binutils](https://www.sourceware.org/binutils/) (2.26)
+- [gcc](https://gcc.gnu.org/) (5.3.0)
+- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)
+
+The `dfu-programmer` will be required to flash the new firmware 
+- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)
+
+The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive
+```
+$ mkdir ~/local
+$ mkdir ~/local/avr
+$ mkdir ~/src
+$ cd ~/src
+$ wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
+$ wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
+$ wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
+$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz
+$ wget http://mirror0.babylon.network/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
+$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2
+$ tar -xjf gmp-6.1.0.tar.bz2
+$ tar -xjf mpfr-3.1.4.tar.bz2
+$ tar -zxf mpc-1.0.3.tar.gz
+$ tar -zxf binutils-2.26.tar.gz
+$ tar -zxf gcc-5.3.0.tar.gz
+$ tar -xjf avr-libc-2.0.0.tar.bz2 
+```
+
+##Setup the Build Environment
+These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages.  Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent.
+```
+$ PREFIX=$HOME/local/avr
+$ export PREFIX
+$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
+$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib
+$ export PATH
+```
+
+##The `gcc` Required Math Library Packages
+The following packages are required to be complied and installed in order to compile `gcc`.  They are not sufficiently available through the `cygwin` package system, so we have to make them ourselves.  They must be complied in this order because each one depends on the previous. Verfiy that for each package, `make check` returns all passing and no fails.
+
+###Build and Install `gmp`
+```
+$ cd ~/src/gmp-6.1.0
+$ ./configure --enable-static --disable-shared
+$ make
+$ make check
+$ make install
+```
+
+###Build and Install `mpfr`
+```
+$ cd ~/src/mpfr-3.1.4
+$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared
+$ make
+$ make check
+$ make install
+```
+
+###Build and Install `mpc`
+```
+$ cd ~/src/mpc-1.0.3
+$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared
+$ make
+$ make check
+$ make install
+```
+
+##OPTIONAL Part
+You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`.  This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while).
+
+###Build and Install `gcc` for Your Machine  
+```
+$ cd ~/src/gcc-5.3.0
+$ mkdir obj-local
+$ cd obj-local
+$ ../configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared
+$ make
+$ make install
+```
+##End OPTIONAL Part
+
+###Build and Install `binutils` for Your Machine
+```
+$ cd ~/src/binutils-2.26
+$ mkdir obj-local
+$ cd obj-local
+$ ../configure
+$ make
+$ make install
+```
+
+##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system
+Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture.  These allow us to build and manipulate the firmware for the keyboard.
+
+###Build `binutils` for AVR
+If you plan to build and install `avr-gdb` also, use the `gdb` install at the end of this guide as it also builds the `binutils`
+```
+$ cd ~/src/binutils-2.26
+$ mkdir obj-avr
+$ cd obj-avr
+$ ../configure --prefix=$PREFIX --target=avr --disable-nls
+$ make
+$ make install
+```
+
+###Build `gcc` for AVR
+```
+$ cd ~/src/gcc-5.3.0
+$ mkdir obj-avr
+$ cd obj-avr
+$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared --disable-nls --disable-libssp --with-dwarf2
+$ make
+$ make install
+```
+
+###Build `avr-libc` for AVR
+For building the `avr-libc`, we have to specify the host build system.  In my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`.
+```
+$ cd ~/src/avr-libc-2.0.0
+$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr
+$ make
+$ make install
+```
+
+##Building 'dfu-programmer' for flashing the firmware via USB and installing the drivers
+We can either build our own, or use the precomplied binaries.  The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves.  The procedure for the precompiled binaries is included at the end of this guide.
+
+### Build and Install the `libusb`
+The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system.
+```
+$ cd ~/src
+$ git clone https://github.com/libusb/libusb.git
+$ cd libusb
+$ ./bootstrap.sh
+$ ./configure
+$ make
+$ make install
+```
+
+### Build and Install the `dfu-programmer`
+```
+$ cd ~/src
+$ git clone https://github.com/dfu-programmer/dfu-programmer.git
+$ cd dfu-programmer
+$ ./bootstrap.sh
+$ ./configure
+$ make
+$ make install
+```
+
+Verify the installation with:
+```
+$ which dfu-programmer
+/usr/local/bin/dfu-programmer
+
+$ dfu-programmer
+dfu-programmer 0.7.2
+https://github.com/dfu-programmer/dfu-programmer
+Type 'dfu-programmer --help'    for a list of commands
+     'dfu-programmer --targets' to list supported target devices
+```
+If you are not getting the above result, you will not be able to flash the firmware! 
+
+###Install the USB drivers
+The drivers are included in the windows binary version of [`dfu-programmer` 0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip).
+```
+$ cd ~/src
+$ wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
+$ unzip dfu-programmer-win-0.7.2.zip -d dfu-programmer-win-0.7.2
+```
+
+or
+
+The official drivers are found in [Atmel's `FLIP` installer](http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe). Download and then install `FLIP`. Upon installation, the drivers will be found in `C:\Program Files (x86)\Atmel\Flip 3.4.7\usb`.
+
+Then, from an **administrator-privileged** `Windows` terminal, run the following command (adjust the path for username, etc. as necessary) and accept the prompt that pops up:
+```
+C:\> pnputil -i -a C:\cygwin64\home\Kevin\src\dfu-programmer-win-0.7.2\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
+or
+C:\> pnputil -i -a "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf"
+```
+
+This should be the result:
+```
+Microsoft PnP Utility
+
+Processing inf :            atmel_usb_dfu.inf
+Successfully installed the driver on a device on the system.
+Driver package added successfully.
+Published name :            oem104.inf
+
+
+Total attempted:              1
+Number successfully imported: 1
+```
+
+Alternatively, the `Windows` driver can be installed when prompted by `Windows` when the keyboard is attached. Do not let `Windows` search for a driver; specify the path to search for a driver and point it to the `atmel_usb_dfu.inf` file.
+
+##Building and Flashing the Planck firmware!
+If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.
+
+###Build Planck and Load the Firmware
+```
+$ cd ~/src
+$ git clone https://github.com/jackhumbert/qmk_firmware.git
+$ cd qmk_firmware/keyboard/planck
+$ make
+```
+
+Make sure there are no errors.  You should end up with this or something similar:
+```
+Creating load file for Flash: planck.hex
+avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature planck.elf planck.hex
+
+Creating load file for EEPROM: planck.eep
+avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
+--change-section-lma .eeprom=0 --no-change-warnings -O ihex planck.elf planck.eep || exit 0
+
+Creating Extended Listing: planck.lss
+avr-objdump -h -S -z planck.elf > planck.lss
+
+Creating Symbol Table: planck.sym
+avr-nm -n planck.elf > planck.sym
+
+Size after:
+   text    data     bss     dec     hex filename
+  18602      82     155   18839    4997 planck.elf
+
+-------- end --------
+```
+
+If you do not get the above, you **did not** build the firmware, and you will have nothing to flash.  If you have the fresh clone from `github`, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed.
+
+But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:
+```
+$ make dfu
+```
+.
+.
+.
+profit!!!
+
+
+
+
+
+##extra bits...
+
+###Installing Precompiled `dfu-programmer` Binaries (not recommended for `cygwin`)
+To install the `dfu-programmer` from the binaries, we must get if from [the `dfu-programmer` website](https://dfu-programmer.github.io/) ([0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip)).
+
+Copy this file into your `cygwin` home\src directory.  (For me, it is `C:\cygwin64\home\Kevin\src`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from  `./dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. This is because the `dfu-programmer` binary is `mingw` based, not `cygwin` based, so the `dlls` do not cooperate. I achieved acceptable pathing by moving the files to  `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running (Adjusting your path for username, etc. as needed):
+```
+C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin
+```
+
+Then, rename `libusb0_x86.dll` to `libusb0.dll`.
+You can tell that you were successful by trying to execute 'dfu-programmer' from the 'cygwin' prompt:
+```
+$ which dfu-programmer
+/home/Kevin/local/avr/bin/dfu-programmer
+
+$ dfu-programmer
+dfu-programmer 0.7.2
+https://github.com/dfu-programmer/dfu-programmer
+Type 'dfu-programmer --help'    for a list of commands
+     'dfu-programmer --targets' to list supported target devices
+```
+
+If you are not getting the above result, you will not be able to flash the firmware! 
+- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`. 
+- Make sure the `dll` is named correctly.
+- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permission. If you did it anyway, do `chmod +x dfu-programmer.exe`.
+- Still have problems? Try building it instead.
+
+
+##Debugging Tools
+
+These tools are for debugging your firmware, etc. before flashing. Theoretically, it can save your memory from wearing out. However, these tool do not work 100% for the Planck firmware.
+
+### `gdb` for AVR
+`gdb` has a simulator for AVR but it does not support all instructions (like WDT), so it immediately crashes when running the Planck firmware (because `lufa.c` disables the WDT in the first few lines of execution). But it can still be useful in debugging example code and test cases, if you know how to use it.
+
+```
+$ cd ~/src
+$ git clone git://sourceware.org/git/binutils-gdb.git
+$ cd binutils-gdb
+$ mkdir obj-avr
+$ cd obj-avr
+$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static
+$ make
+$ make install
+```
+
+### `simulavr`
+`simulavr` is an AVR simulator.  It runs the complied AVR elfs. `simulavr` does not support the `atmega32u4` device... it does `atmega32` but that is not good enough for the firmware (no PORTE and other things), so you cannot run the Planck firmware. I use it to simulate ideas I have for features in separate test projects.
+
+This one is a major pain in the butt because it has a lot of dependencies and it is buggy.  I will do my best to explain it but... it was hard to figure out. A few things need to be changed in the 'Makefile' to make it work in `cygwin`.
+
+
+```
+$ cd ~/src
+$ git clone https://github.com/Traumflug/simulavr.git
+$ cd simulavr
+$ ./bootstrap
+$ ./configure --prefix=$PREFIX --enable-static --disable-tcl --disable-doxygen-doc
+```
+ Edit `src/Makefile.am` now so that `-no-undefined` is included (I did this by removing the SYS_MINGW conditional surrounding `libsim_la_LDFLAGS += -no-undefined` and  `libsimulavr_la_LDFLAGS += -no-undefined \ libsimulavr_la_LIBADD += $(TCL_LIB)`. Also, `$(EXEEXT)` is added after `kbdgentables` in two places.
+
+```
+$ make
+$ make install
+```
+
+
+TODO:
+- git repos for all sources
+- command line magic for cygwin setup
+- better options for `dfu-drivers`
diff --git a/doc/FUSE.txt b/doc/FUSE.txt
new file mode 100644 (file)
index 0000000..40055e5
--- /dev/null
@@ -0,0 +1,40 @@
+ATMega168P Fuse/Lock Bits
+=========================
+This configuration is from usbasploader's Makefile.
+
+    HFUSE   0xD6
+    LFUSE   0xDF
+    EFUSE   0x00
+    LOCK    0x3F(intact)
+
+#---------------------------------------------------------------------
+# ATMega168P
+#---------------------------------------------------------------------
+# Fuse extended byte:
+# 0x00 = 0 0 0 0   0 0 0 0 <-- BOOTRST (boot reset vector at 0x1800)
+#                    \+/
+#                     +------- BOOTSZ (00 = 2k bytes)
+# Fuse high byte:
+# 0xd6 = 1 1 0 1   0 1 1 0
+#        ^ ^ ^ ^   ^ \-+-/
+#        | | | |   |   +------ BODLEVEL 0..2 (110 = 1.8 V)
+#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)
+#        | | | +-------------- WDTON (if 0: watchdog always on)
+#        | | +---------------- SPIEN (allow serial programming)
+#        | +------------------ DWEN (debug wire enable)
+#        +-------------------- RSTDISBL (reset pin is enabled)
+# Fuse low byte:
+# 0xdf = 1 1 0 1   1 1 1 1
+#        ^ ^ \ /   \--+--/
+#        | |  |       +------- CKSEL 3..0 (external >8M crystal)
+#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)
+#        | +------------------ CKOUT (if 0: Clock output enabled)
+#        +-------------------- CKDIV8 (if 0: divide by 8)
+
+
+# Lock Bits
+# 0x3f = - - 1 1   1 1 1 1
+#            \ /   \-/ \-/
+#             |     |   +----- LB 2..1 (No memory lock features enabled)
+#             |     +--------- BLB0 2..1 (No restrictions for SPM or LPM accessing the Application section)
+#             +--------------- BLB1 2..1 (No restrictions for SPM or LPM accessing the Boot Loader section)
diff --git a/doc/HAND_WIRE.md b/doc/HAND_WIRE.md
new file mode 100644 (file)
index 0000000..0b7367e
--- /dev/null
@@ -0,0 +1,321 @@
+# Quantum Hand-wiring Guide
+
+Parts list:
+* *x* keyswitches (MX, Matias, Gateron, etc)
+* *x* diodes
+* Keyboard plate (metal, plastic, cardboard, etc)
+* Wire (strained for wiring to the Teensy, anything for the rows/columns)
+* Soldering iron set at 600ºF or 315ºC (if temperature-controlled)
+* Resin-cored solder (leaded or lead-free)
+* Adequate ventilation/a fan
+* Tweezers (optional)
+* Wire cutters/snippers
+
+## How the matrix works (why we need diodes)
+
+The microcontroller (in this case, the Teensy 2.0) will be setup up via the firmware to send a logical 1 to the columns, one at a time, and read from the rows, all at once - this process is called matrix scanning. The matrix is a bunch of open switches that, by default, don't allow any current to pass through - the firmware will read this as no keys being pressed. As soon as you press one key down, the logical 1 that was coming from the column the keyswitch is attached to gets passed through the switch and to the corresponding row - check out the following 2x2 example:
+
+        Column 0 being scanned     Column 1 being scanned
+                  x                                   x
+                 col0     col1              col0     col1
+                  |        |                 |        |
+        row0 ---(key0)---(key1)    row0 ---(key0)---(key1)
+                  |        |                 |        |
+        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
+
+The `x` represents that the column/row associated has a value of 1, or is HIGH. Here, we see that no keys are being pressed, so no rows get an `x`. For one keyswitch, keep in mind that one side of the contacts is connected to its row, and the other, its column.
+
+When we press `key0`, `col0` gets connected to `row0`, so the values that the firmware receives for that row is `0b01` (the `0b` here means that this is a bit value, meaning all of the following digits are bits - 0 or 1 - and represent the keys in that column). We'll use this notation to show when a keyswitch has been pressed, to show that the column and row are being connected:
+
+        Column 0 being scanned     Column 1 being scanned
+                  x                                   x
+                 col0     col1              col0     col1
+                  |        |                 |        |
+      x row0 ---(-+-0)---(key1)    row0 ---(-+-0)---(key1)
+                  |        |                 |        |
+        row1 ---(key2)---(key3)    row1 ---(key2)---(key3)
+
+We can now see that `row0` has an `x`, so has the value of 1. As a whole, the data the firmware receives when `key0` is pressed is
+
+    col0: 0b01
+    col1: 0b00
+            │└row0
+            └row1
+
+A problem arises when you start pressing more than one key at a time. Looking at our matrix again, it should become pretty obvious:
+
+        Column 0 being scanned     Column 1 being scanned
+                  x                                   x
+                 col0     col1              col0     col1
+                  |        |                 |        |
+      x row0 ---(-+-0)---(-+-1)  x row0 ---(-+-0)---(-+-1)
+                  |        |                 |        |
+      x row1 ---(key2)---(-+-3)  x row1 ---(key2)---(-+-3)
+
+      Remember that this ^ is still connected to row1
+
+The data we get from that is:
+
+    col0: 0b11
+    col1: 0b11
+            │└row0
+            └row1
+
+Which isn't accurate, since we only have 3 keys pressed down, not all 4. This behavior is called ghosting, and only happens in odd scenarios like this, but can be much more common on a bigger keyboard. The way we can get around this is by placing a diode after the keyswitch, but before it connects to its row. A diode only allows current to pass through one way, which will protect our other columns/rows from being activated in the previous example. We'll represent a dioded matrix like this;
+
+        Column 0 being scanned     Column 1 being scanned
+                    x                                   x
+                  col0      col1              col0     col1
+                    │        │                 |        │
+                 (key0)   (key1)            (key0)   (key1)
+                  ! │      ! │               ! |      ! │
+        row0 ─────┴────────┘ │     row0 ─────┴────────┘ │
+                    │        │                 |        │
+                 (key2)   (key3)            (key2)   (key3)
+                  !        !                 !        !
+        row1 ─────┴────────┘       row1 ─────┴────────┘
+
+In practical applications, the black line of the diode will be placed facing the row, and away from the keyswitch - the `!` in this case is the diode, where the gap represents the black line. A good way to remember this is to think of this symbol: `>|`
+
+Now when we press the three keys, invoking what would be a ghosting scenario:
+
+        Column 0 being scanned     Column 1 being scanned
+                    x                                   x
+                  col0      col1              col0     col1
+                    │        │                 │        │
+                 (┌─┤0)   (┌─┤1)            (┌─┤0)   (┌─┤1)
+                  ! │      ! │               ! │      ! │
+      x row0 ─────┴────────┘ │   x row0 ─────┴────────┘ │
+                    │        │                 │        │
+                 (key2)   (┌─┘3)            (key2)   (┌─┘3)
+                  !        !                 !        !
+        row1 ─────┴────────┘     x row1 ─────┴────────┘
+
+Things act as they should! Which will get us the following data:
+
+    col0: 0b01
+    col1: 0b11
+            │└row0
+            └row1
+
+The firmware can then use this correct data to detect what it should do, and eventually, what signals it needs to send to the OS.
+
+## The actual hand-wiring
+
+### Getting things in place
+
+When starting this, you should have all of your stabilisers and keyswitches already installed (and optionally keycaps). If you're using a Cherry-type stabiliser (plate-mounted only, obviously), you'll need to install that before your keyswitches. If you're using Costar ones, you can installed them afterwards.
+
+To make things easier on yourself, make sure all of the keyswitches are oriented the same way (if they can be - not all layouts support this). Despite this, it's important to remember that the contacts on the keyswitches are completely symmetrical. We'll be using the keyswitch's left side contact for wiring the rows, and the right side one for wiring the columns.
+
+Get your soldering iron heated-up and collect the rest of the materials from the part list at the beginning of the guide. Place your keyboard so that the bottoms of the keyswitches are accessible - it may be a good idea to place it on a cloth to protect your keyswitches/keycaps.
+
+Before continuing, plan out where you're going to place your Teensy. If you're working with a board that has a large (6.25u) spacebar, it may be a good idea to place it in-between switches against the plate. Otherwise, you may want to trim some of the leads on the keyswitches where you plan on putting it - this will make it a little harder to solder the wire/diodes, but give you more room to place the Teensy.
+
+### Preparing the diodes
+
+It's a little easier to solder the diodes in place if you bend them at a 90º angle immediately after the black line - this will help to make sure you put them on the right way (direction matters), and in the correct position. The diodes will look like this when bent (with longer leads):
+
+       ┌─────┬─┐
+    ───┤     │ ├─┐
+       └─────┴─┘ │
+                 │
+
+We'll be using the long lead at the bent end to connect it to the elbow (bent part) of the next diode, creating the row.
+
+### Soldering the diodes
+
+Starting at the top-left switch, place the diode (with tweezers if you have them) on the switch so that the diode itself is vertically aligned, and the black line is facing toward you. The straight end of the diode should be touching the left contact on the switch, and the bent end should be facing to the right and resting on the switch there, like this:
+
+     │o
+    ┌┴┐         o
+    │ │    O
+    ├─┤      
+    └┬┘
+     └─────────────
+
+Letting the diode rest, grab your solder, and touch both it and the soldering iron to the left contact at the same time - the rosin in the solder should make it easy for the solder to flow over both the diode and the keyswitch contact. The diode may move a little, and if it does, carefully position it back it place by grabbing the bent end of the diode - the other end will become hot very quickly. If you find that it's moving too much, using needle-nose pliers of some sort may help to keep the diode still when soldering.
+
+The smoke that the rosin releases is harmful, so be careful not to breath it or get it in your eyes/face.
+
+After soldering things in place, it may be helpful to blow on the joint to push the smoke away from your face, and cool the solder quicker. You should see the solder develop a matte (not shiney) surface as it solidifies. Keep in mind that it will still be very hot afterwards, and will take a couple minutes to be cool to touch. Blow on it will accelerate this process.
+
+When the first diode is complete, the next one will need to be soldered to both the keyswitch, and the previous diode at the new elbow. That will look something like this:
+
+     │o               │o
+    ┌┴┐         o    ┌┴┐         o
+    │ │    O         │ │    O
+    ├─┤              ├─┤      
+    └┬┘              └┬┘
+     └────────────────┴─────────────
+
+After completing a row, use the wire cutters to trim the excess wire from the tops of the diodes, and from the right side on the final switch. This process will need to completed for each row you have.
+
+When all of the diodes are completely soldered, it's a good idea to quickly inspect each one to ensure that your solder joints are solid and sturdy - repairing things after this is possible, but more difficult.
+
+### Soldering the columns
+
+You'll have some options in the next process - it's a good idea to insulate the column wires (since the diodes aren't), but if you're careful enough, you can use exposed wires for the columns - it's not recommended, though. If you're using single-cored wire, stripping the plastic off of the whole wire and feeding it back on is probably the best option, but can be difficult depending on the size and materials. You'll want to leave parts of the wire exposed where you're going to be solder it onto the keyswitch.
+
+If you're using stranded wire, it's probably easiest to just use a lot of small wires to connect each keyswitch along the column. It's possible to use one and melt through the insulation, but this isn't recommended, will produce even more harmful fumes, and can ruin your soldering iron.
+
+Before beginning to solder, it helps to have your wire pre-bent (if using single-cored), or at least have an idea of how you're going to route the column (especially if you're making a staggered board). Where you go in particular doesn't matter too much, as we'll be basing our keymap definitions on how it was wired - just make sure every key in a particular row is in a unique column, and that they're in order from left to right.
+
+If you're not using any insulation, you can try to keep the column wires elevated, and solder them near the tips of the keyswitch contacts - if the wires are sturdy enough, they won't short out to the row wiring an diodes.
+
+### Wiring things to the Teensy
+
+Now that the matrix itself is complete, it's time to connect what you've done to the Teensy. You'll be needing the number of pins equal to your number of columns + your number of rows. There are some pins on the Teensy that are special, like D6 (the LED on the chip), or some of the UART, SPI, I2C, or PWM channels, but only avoid those if you're planning something in addition to a keyboard. If you're unsure about wanting to add something later, you should have enough pins in total to avoid a couple.
+
+The pins you'll absolutely have to avoid are: GND, VCC, AREF, and RST - all the others are usable and accessible in the firmware.
+
+Place the Teensy where you plan to put it - you'll have to cut wires to length in the next step, and you'll want to make sure they reach.
+
+Starting with the first column on the right side, measure out how much wire you'll need to connect it to the first pin on the Teensy - it helps to pick a side that you'll be able to work down, to keep the wires from overlapping too much. It may help to leave a little bit of slack so things aren't too tight. Cut the piece of wire, and solder it to the Teensy, and then the column - you can solder it anywhere along the column, but it may be easiest at the keyswitch. Just be sure the wire doesn't separate from the keyswitch when soldering.
+
+As you move from column to column, it'll be helpful to write the locations of the pins down. We'll use this data to setup the matrix in the future.
+
+When you're done with the columns, start with the rows in the same process, from top to bottom, and write them all down. Again, you can solder anywhere along the row, as long as it's after the diode - soldering before the diode (on the keyswitch side) will cause that row not to work.
+
+As you move along, be sure that the Teensy is staying in place - recutting and soldering the wires is a pain!
+
+### Getting some basic firmware set-up
+
+From here, you should have a working keyboard with the correct firmware. Before we attach the Teensy permanently to the keyboard, let's quickly get some firmware loaded onto the Teensy so we can test each keyswitch.
+
+To start out, download [the firmware](https://github.com/jackhumbert/qmk_firmware/) - we'll be using my (Jack's) fork of TMK called QMK/Quantum. We'll be doing a lot from the Terminal/command prompt, so get that open, along with a decent text editor like [Sublime Text](http://www.sublimetext.com/).
+
+The first thing we're going to do is create a new project using the script in the root directory of the firmware. In your terminal, run this command with `<project_name>` replaced by the name of your project - it'll need to be different from any other project in the `keyboard/` folder:
+
+    ./new_project.sh <project_name>
+
+You'll want to navigate to the `keyboard/<project_name>/` folder by typing, like the print-out from the script specifies:
+
+    cd keyboard/<project_name>
+
+#### config.h
+
+The first thing you're going to want to modify is the `config.h` file. Find `MATRIX_ROWS` and `MATRIX_COLS` and them to match the dimensions of your keyboard's matrix.
+
+Farther down are `MATRIX_ROW_PINS` and `MATRIX_COL_PINS`. Change their definitions to match how you wired up your matrix (looking from the top of the keyboard, the rows run top-to-bottom and the columns run left-to-right). Likewise, change the definition of `UNUSED_PINS` to match the pins you did not use (this will save power).
+
+#### \<project_name\>.h
+
+The next file you'll want to look at is `<project_name>.h`. You're going to want to rewrite the `KEYMAP` definition - the format and syntax here is extremely important, so pay attention to how things are setup. The first half of the definition are considered the arguments - this is the format that you'll be following in your keymap later on, so you'll want to have as many k*xy* variables here as you do keys. The second half is the part that the firmware actually looks at, and will contain gaps depending on how you wired your matrix.
+
+We'll dive into how this will work with the following example. Say we have a keyboard like this:
+
+    ┌───┬───┬───┐
+    │   │   │   │
+    ├───┴─┬─┴───┤
+    │     │     │
+    └─────┴─────┘
+
+This can be described by saying the top row is 3 1u keys, and the bottom row is 2 1.5u keys. The difference between the two rows is important, because the bottom row has an unused column spot (3 v 2). Let's say that this is how we wired the columns:
+
+    ┌───┬───┬───┐
+    │ ┋ │ ┋ │ ┋ │
+    ├─┋─┴─┬─┴─┋─┤
+    │ ┋   │   ┋ │
+    └─────┴─────┘
+
+The middle column is unused on the bottom row in this example. Our `KEYMAP` definition would look like this:
+
+    #define KEYMAP( \
+        k00, k01, k02, \
+          k10,  k11,   \
+    ) \
+    { \
+        { k00, k01,   k02 }, \
+        { k10, KC_NO, k11 }, \
+    }
+
+Notice how the top half is spaced to resemble our physical layout - this helps us understand which keys are associated with which columns. The bottom half uses the keycode `KC_NO` where there is no keyswitch wired in. It's easiest to keep the bottom half aligned in a grid to help us make sense of how the firmware actually sees the wiring.
+
+Let's say that instead, we wired our keyboard like this (a fair thing to do):
+
+    ┌───┬───┬───┐
+    │ ┋ │  ┋│ ┋ │
+    ├─┋─┴─┬┋┴───┤
+    │ ┋   │┋    │
+    └─────┴─────┘
+
+This would require our `KEYMAP` definition to look like this:
+
+    #define KEYMAP( \
+        k00, k01, k02, \
+          k10,  k11,   \
+    ) \
+    { \
+        { k00, k01, k02   }, \
+        { k10, k11, KC_NO }, \
+    }
+
+Notice how the `k11` and `KC_NO` switched places to represent the wiring, and the unused final column on the bottom row. Sometimes it'll make more sense to put a keyswitch on a particular column, but in the end, it won't matter, as long as all of them are accounted for. You can use this process to write out the `KEYMAP` for your entire keyboard - be sure to remember that your keyboard is actually backwards when looking at the underside of it.
+
+#### keymaps/default.c
+
+This is the actual keymap for your keyboard, and the main place you'll make changes as you perfect your layout. `default.c` is the file that gets pull by default when typing `make`, but you can make other files as well, and specify them by typing `make KEYMAP=<variant>`, which will pull `keymaps/<variant>.c`.
+
+The basis of a keymap is its layers - by default, layer 0 is active. You can activate other layers, the highest of which will be referenced first. Let's start with our base layer.
+
+Using our previous example, let's say we want to create the following layout:
+
+    ┌───┬───┬───┐
+    │ A │ 1 │ H │
+    ├───┴─┬─┴───┤
+    │ TAB │ SPC │
+    └─────┴─────┘
+
+This can be accomplished by using the following `keymaps` definition:
+
+    const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+    [0] = KEYMAP( /* Base */
+      KC_A,  KC_1,  KC_H, \
+        KC_TAB,  KC_SPC   \
+    ),
+    };
+
+Note that the layout of the keycodes is similar to the physical layout of our keyboard - this make it much easier to see what's going on. A lot of the keycodes should be fairly obvious, but for a full list of them, check out [tmk_code/doc/keycode.txt](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt) - there are also a lot of aliases to condense your keymap file.
+
+It's also important to use the `KEYMAP` function we defined earlier - this is what allows the firmware to associate our intended readable keymap with the actual wiring.
+
+#### Compiling your firmware
+
+After you've written out your entire keymap, you're ready to get the firmware compiled and onto your Teensy. Before compiling, you'll need to get your [development environment set-up](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboard/planck/PCB_GUIDE.md#setting-up-the-environment) - you can skip the dfu-programmer instructions, but you'll need to download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html) to get the firmware on your Teensy.
+
+Once everything is installed, running `make` in the terminal should get you some output, and eventually a `<project_name>.hex` file in that folder. If you're having trouble with this step, see the end of the guide for the trouble-shooting section.
+
+Once you have your `<project_name>.hex` file, open up the Teensy loader application, and click the file icon. From here, navigate to your `QMK/keyboard/<project_name>/` folder, and select the `<project_name>.hex` file. Plug in your keyboard and press the button on the Teensy - you should see the LED on the device turn off once you do. The Teensy Loader app will change a little, and the buttons should be clickable - click the download button (down arrow), and then the reset button (right arrow), and your keyboard should be ready to go!
+
+#### Testing your firmware
+
+Carefully flip your keyboard over, open up a new text document, and try typing - you should get the characters that you put into your keymap. Test each key, and note the ones that aren't working. Here's a quick trouble-shooting guide for non-working keys:
+
+0. Flip the keyboard back over and short the keyswitch's contacts with a piece wire - this will eliminate the possibility of the keyswitch being bad and needing to be replaced.
+1. Check the solder points on the keyswitch - these need to be plump and whole. If you touch it with a moderate amount of force and it comes apart, it's not strong enough.
+2. Check the solder joints on the diode - if the diode is loose, part of your row may register, while the other may not.
+3. Check the solder joints on the columns - if your column wiring is loose, part or all of the column may not work.
+4. Check the solder joints on both sides of the wires going to/from the Teensy - the wires need to be fully soldered and connect to both sides.
+5. Check the <project_name>.h file for errors and incorrectly placed `KC_NO`s - if you're unsure where they should be, instead duplicate a k*xy* variable.
+6. Check to make sure you actually compiled the firmware and flashed the Teensy correctly. Unless you got error messages in the terminal, or a pop-up during flashing, you probably did everything correctly.
+
+If you've done all of these things, keep in mind that sometimes you might have had multiple things affecting the keyswitch, so it doesn't hurt to test the keyswitch by shorting it out at the end.
+
+#### Securing the Teensy, finishing your hardware, getting fancier firmware
+
+Now that you have a working board, it's time to get things in their permanent positions. I've often used liberal amounts of hot glue to secure and insulate things, so if that's your style, start spreading that stuff like butter. Otherwise, double-sided tape is always an elegant solution, and electrical tape is a distant second. Due to the nature of these builds, a lot of this part is up to you and how you planned (or didn't plan) things out.
+
+There are a lot of possibilities inside the firmware - check out the [README](https://github.com/jackhumbert/qmk_firmware/blob/master/README.md) for a full feature list, and dive into the different project (Planck, Ergodox EZ, etc) to see how people use all of them. You can always stop by [the OLKB subreddit for help!](http://reddit.com/r/olkb)
+
+## Trouble-shooting compiling
+
+### Windows
+
+#### fork: Resource temporarily unavailable
+
+http://www.avrfreaks.net/forum/windows-81-compilation-error
+
+### Mac
+
+### Linux
diff --git a/doc/PCB_GUIDE.md b/doc/PCB_GUIDE.md
new file mode 100644 (file)
index 0000000..b36d8fb
--- /dev/null
@@ -0,0 +1,151 @@
+# Planck Firmware Guide
+
+## Setting up the environment
+
+### Windows
+1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
+2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
+3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
+4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
+5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
+
+
+### Mac
+
+If you're using homebrew, you can use the following commands:
+
+    brew tap osx-cross/avr
+    brew install avr-libc
+    brew install dfu-programmer
+
+Otherwise, these instructions will work:
+
+1. Install Xcode from the App Store.
+2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
+3. Install [DFU-Programmer][dfu-prog].
+
+### Linux
+1. Install AVR GCC with your favorite package manager.
+2. Install [DFU-Programmer][dfu-prog].
+
+Note that, since it will be directly accessing USB hardware, the
+`dfu-programmer` program needs to be run as root.
+
+## Verify Your Installation
+1. Clone the following repository: https://github.com/jackhumbert/qmk_firmware
+2. Open a Terminal and `cd` into `qmk_firmware/keyboard/planck`
+3. Run `make`. This should output a lot of information about the build process.
+
+## Using the built-in functions
+
+Here is a list of some of the functions available from the command line:
+
+* `make clean`: clean the environment - may be required in-between builds
+* `make`: compile the code
+* `make KEYMAP=<keymap>`: compile with the extended keymap file `extended_keymaps/extended_keymap_<keymap>.c`
+* `make dfu`: build and flash the layout to the PCB
+* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash)
+
+Generally, the instructions to flash the PCB are as follows:
+
+1. Make changes to the appropriate keymap file
+2. Save the file
+3. `make clean`
+4. Press the reset button on the PCB/press the key with the `RESET` keycode
+5. `make <arguments> dfu` - use the necessary `KEYMAP=<keymap>` and/or `COMMON=true` arguments here.
+
+## Troubleshooting
+If you see something like this
+
+          0 [main] sh 13384 sync_with_child: child 9716(0x178) died before initialization with status code 0xC0000142
+        440 [main] sh 13384 sync_with_child: *** child state waiting for longjmp
+    /usr/bin/sh: fork: Resource temporarily unavailable
+
+after running 'make' on Windows than you are encountering a very popular issue with WinAVR on Windows 8.1 and 10.
+You can easily fix this problem by replacing msys-1.0.dll in WinAVR/utils/bin with [this one](http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip).
+Restart your system and everything should work fine!
+
+
+If you see this
+
+    dfu-programmer atmega32u4 erase
+    process_begin: CreateProcess(NULL, dfu-programmer atmega32u4 erase, ...) failed.
+    make (e=2): The system cannot find the file specified.
+    make: *** [dfu] Error 2
+
+when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to qmk_firmware/keyboard/planck.
+
+
+## Quantum MK Firmware
+
+### Keymap
+
+Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h).
+
+You can use modifiers with keycodes like this:
+
+    LCTL(KC_C)
+    
+Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like:
+
+    LCTL(LALT(KC_C))
+    
+That will generate Ctrl+Alt+c. The entire list of these functions is here:
+
+* `LCTL()`: Left control
+* `LSFT()` / `S()`: Left shift
+* `LALT()`: Left alt/opt
+* `LGUI()`: Left win/cmd
+* `RCTL()`: Right control
+* `RSFT()`: Right shift
+* `RALT()`: Right alt/opt
+* `RGUI()`: Right win/cmd
+
+`S(KC_1)`-like entries are useful in writing keymaps for the Planck.
+
+### Other keycodes
+
+A number of other keycodes have been added that you may find useful:
+
+* `CM_<key>`: the Colemak equivalent of a key (in place of `KC_<key>`), when using Colemak in software (`CM_O` generates `KC_SCLN`)
+* `RESET`: jump to bootloader for flashing (same as press the reset button)
+* `BL_STEP`: step through the backlight brightnesses
+* `BL_<0-15>`: set backlight brightness to 0-15
+* `BL_DEC`: lower the backlight brightness
+* `BL_INC`: raise the backlight brightness
+* `BL_TOGG`: toggle the backlight on/off
+
+### Function layers
+
+The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN<num>` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC(<num>)` notation. `F(<num>)` is a shortcut for this.
+
+The function actions are unchanged, and you can see the full list of them [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/common/action_code.h). They are explained in detail [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/doc/keymap.md#2-action).
+
+### Macros
+
+Macros have been setup in the `keymaps/keymap_default.c` file so that you can use `M(<num>)` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`):
+
+    switch(id) {
+      case 0:
+        return MACRODOWN(TYPE(KC_A), END);
+        break;
+      case 1:
+        return MACRODOWN(TYPE(KC_B), END);
+        break;
+      case 2:
+        return MACRODOWN(TYPE(KC_C), END);
+        break;
+      case 3:
+        return MACRODOWN(TYPE(KC_D), END);
+        break;
+    } 
+    return MACRO_NONE;
+
+`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke.
+
+[cygwin]:       https://www.cygwin.com/
+[mingw]:        http://www.mingw.org/
+[mhv]:          https://infernoembedded.com/products/avr-tools
+[winavr]:       http://winavr.sourceforge.net/
+[crosspack]:    http://www.obdev.at/products/crosspack/index.html
+[dfu-prog]:     http://dfu-programmer.sourceforge.net/
diff --git a/doc/POWER.txt b/doc/POWER.txt
new file mode 100644 (file)
index 0000000..0abbbe4
--- /dev/null
@@ -0,0 +1,62 @@
+Time to Sleep
+=============
+USB suspend     no activity on USB line for  3ms
+No Interaction  no user interaction
+    matrix has no change
+    matrix has no switch on
+
+
+AVR Power Management
+====================
+
+V-USB suspend
+    USB suspend
+    http://vusb.wikidot.com/examples
+
+MCUSR   MCU Status Register
+    WDRF    Watchdog Reset Flag
+    BORF
+    EXTRF
+    PORF    Power-on Reset Flag
+
+SMCR    Sleep Mode Control Register
+    SE      Sleep Enable
+    SM2:0   
+        #define set_sleep_mode(mode) \
+        #define SLEEP_MODE_IDLE         (0)
+        #define SLEEP_MODE_ADC          _BV(SM0)
+        #define SLEEP_MODE_PWR_DOWN     _BV(SM1)
+        #define SLEEP_MODE_PWR_SAVE     (_BV(SM0) | _BV(SM1))
+        #define SLEEP_MODE_STANDBY      (_BV(SM1) | _BV(SM2))
+        #define SLEEP_MODE_EXT_STANDBY  (_BV(SM0) | _BV(SM1) | _BV(SM2))
+
+
+ACSR    Analog Comparator Control and Status Register
+    To disable Analog Comparator
+    ACSR = 0x80;
+    or
+    ACSR &= ~_BV(ACIE);
+    ACSR |= _BV(ACD);
+
+    ACD: Analog Comparator Disable
+        When this bit is written logic one, the power to the Analog Comparator is
+        switched off. This bit can be set at any time to turn off the Analog
+        Comparator. This will reduce power consumption in Active and Idle mode.
+        When changing the ACD bit, the Analog Comparator Interrupt must be disabled
+        by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when
+        the bit is changed.
+
+DIDR1   Digital Input Disable Register 1
+    AIN1D
+    AIN0D
+        When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
+
+
+PRR     Power Reduction Register
+    PRTWI
+    PRTIM2
+    PRTIM0
+    PRTIM1
+    PRSPI
+    PRUSART0
+    PRADC
diff --git a/doc/TMK_README.md b/doc/TMK_README.md
new file mode 100644 (file)
index 0000000..36ef84a
--- /dev/null
@@ -0,0 +1,243 @@
+# TMK Documenation
+
+Features
+--------
+These features can be used in your keyboard.
+
+* Multi-layer Keymap  - Multiple keyboard layouts with layer switching
+* Mouse key           - Mouse control with keyboard
+* System Control Key  - Power Down, Sleep, Wake Up and USB Remote Wake up
+* Media Control Key   - Volume Down/Up, Mute, Next/Prev track, Play, Stop and etc
+* USB NKRO            - 120 keys(+ 8 modifiers) simultaneously
+* PS/2 mouse support  - PS/2 mouse(TrackPoint) as composite device
+* Keyboard protocols  - PS/2, ADB, M0110, Sun and other old keyboard protocols
+* User Function       - Customizable function of key with writing code
+* Macro               - Very primitive at this time
+* Keyboard Tricks     - Oneshot modifier and modifier with tapping feature
+* Debug Console       - Messages for debug and interaction with firmware
+* Virtual DIP Switch  - Configurations stored EEPROM(Boot Magic)
+* Locking CapsLock    - Mechanical switch support for CapsLock
+* Breathing Sleep LED - Sleep indicator with charm during USB suspend
+* Backlight           - Control backlight levels
+
+
+
+Projects
+--------
+You can find some keyboard specific projects under `converter` and `keyboard` directory.
+
+## Main projects
+
+### OLKB products
+* [planck](keyboard/planck/)                - [Planck] Ortholinear 40% keyboard
+* [preonic](keyboard/preonic/)              - [Preonic] Ortholinear 50% keyboard
+* [atomic](keyboard/atomic/)                - [Atomic] Ortholinear 60% keyboard
+
+### Ergodox EZ
+* [ergodox_ez](keyboard/ergodox_ez)         - [Ergodox_EZ] Assembled split keyboard
+
+## Other projects
+
+### converter
+* [ps2_usb](converter/ps2_usb/)             - [PS/2 keyboard to USB][GH_ps2]
+* [adb_usb](converter/adb_usb/)             - [ADB keyboard to USB][GH_adb]
+* [m0110_usb](converter/m0110_usb)          - [Macintosh 128K/512K/Plus keyboard to USB][GH_m0110]
+* [terminal_usb](converter/terminal_usb/)   - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal]
+* [news_usb](converter/news_usb/)           - [Sony NEWS keyboard to USB][GH_news]
+* [x68k_usb](converter/x68k_usb/)           - [Sharp X68000 keyboard to USB][GH_x68k]
+* [sun_usb](converter/sun_usb/)             - [Sun] to USB(type4, 5 and 3?)
+* [pc98_usb](converter/pc98_usb/)           - [PC98] to USB
+* [usb_usb](converter/usb_usb/)             - USB to USB(experimental)
+* [ascii_usb](converter/ascii_usb/)         - ASCII(Serial console terminal) to USB
+* [ibm4704_usb](converter/ibm4704_usb)      - [IBM 4704 keyboard Converter][GH_ibm4704]
+
+### keyboard
+* [hhkb](keyboard/hhkb/)                    - [Happy Hacking Keyboard pro][GH_hhkb] hasu's main board
+* [gh60](keyboard/gh60/)                    - [GH60] DIY 60% keyboard [prototype][GH60_proto] hasu's second board
+* [hbkb](keyboard/hbkb/)                    - [Happy Buckling spring keyboard][GH_hbkb](IBM Model M 60% mod)
+* [hid_liber](keyboard/hid_liber/)          - [HID liberation][HID_liber] controller (by alaricljs)
+* [phantom](keyboard/phantom/)              - [Phantom] keyboard (by Tranquilite)
+* [IIgs_Standard](keyboard/IIgs/)           - Apple [IIGS] keyboard mod(by JeffreySung)
+* [macway](keyboard/macway/)                - [Compact keyboard mod][GH_macway] [retired]
+* [KMAC](keyboard/kmac/)                    - Korean custom keyboard
+* [Lightsaber](keyboard/lightsaber/)        - Korean custom keyboard
+* [Infinity](keyboard/infinity/)            - Massdrop [Infinity keyboard][Infinity]
+* [NerD](keyboard/nerd/)                    - Korean custom keyboard
+* [KittenPaw](keyboard/kitten_paw)          - Custom Majestouch controller
+* [Lightpad](keyboard/lightpad)             - Korean custom keypad
+* [ghost_squid](keyboard/ghost_squid/)      - [The Ghost Squid][ghost_squid] controller for [Cooler Master QuickFire XT][cmxt]
+
+### Extenal projects using tmk_keyboard
+* [ErgoDox_cub-uanic][cub-uanic]            - Split Ergonomic Keyboard [ErgoDox][ergodox_org]
+* [mcdox][mcdox_tmk]                        - [mcdox][mcdox]
+
+
+[GH_macway]:    http://geekhack.org/showwiki.php?title=Island:11930
+[GH_hhkb]:      http://geekhack.org/showwiki.php?title=Island:12047
+[GH_ps2]:       http://geekhack.org/showwiki.php?title=Island:14618
+[GH_adb]:       http://geekhack.org/showwiki.php?title=Island:14290
+[GH_hhkb_bt]:   http://geekhack.org/showwiki.php?title=Island:20851
+[GH_m0110]:     http://geekhack.org/showwiki.php?title=Island:24965
+[GH_news]:      http://geekhack.org/showwiki.php?title=Island:25759
+[GH_terminal]:  http://geekhack.org/showwiki.php?title=Island:27272
+[GH_x68k]:      http://geekhack.org/showwiki.php?title=Island:29060
+[GH_hbkb]:      http://geekhack.org/showwiki.php?title=Island:29483
+[GH_ibm4704]:   http://geekhack.org/index.php?topic=54706.0
+[HID_liber]:    http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions
+[Phantom]:      http://geekhack.org/index.php?topic=26742
+[GH60]:         http://geekhack.org/index.php?topic=34959
+[GH60_proto]:   http://geekhack.org/index.php?topic=37570.0
+[PC98]:         http://en.wikipedia.org/wiki/NEC_PC-9801
+[Sun]:          http://en.wikipedia.org/wiki/Sun-3
+[IIGS]:         http://en.wikipedia.org/wiki/Apple_IIGS
+[Infinity]:     https://www.massdrop.com/buy/infinity-keyboard-kit
+[ghost_squid]:  http://deskthority.net/wiki/Costar_replacement_controllers#The_Ghost_Squid
+[cmxt]:         http://gaming.coolermaster.com/en/products/keyboards/quickfirext/
+[ergodox_org]:  http://ergodox.org/
+[cub-uanic]:    https://github.com/cub-uanic/tmk_keyboard/tree/master/keyboard/ergodox
+[mcdox]:        https://github.com/DavidMcEwan/mcdox
+[mcdox_tmk]:    https://github.com/DavidMcEwan/tmk_keyboard/tree/master/keyboard/mcdox
+[Planck]:       http://olkb.co/planck
+[Preonic]:      http://olkb.co/preonic
+[Atomic]:       http://olkb.co/atomic
+[Ergodox_EZ]:   https://www.indiegogo.com/projects/ergodox-ez-an-incredible-mechanical-keyboard
+
+
+License
+-------
+**GPLv2** or later. Some protocol files are under **Modified BSD License**.
+
+Third party libraries like LUFA, PJRC and V-USB have their own license respectively.
+
+
+
+Build Firmware and Program Controller
+-------------------------------------
+See [doc/build.md](tmk_core/doc/build.md), or the README in the particular keyboard/* folder.
+
+
+
+Change your keymap
+------------------
+See [doc/keymap.md](tmk_core/doc/keymap.md).
+
+
+
+Magic Commands
+--------------
+To see help press `Magic` + `H`.
+
+`Magic` key combination is `LShift` + `RShift` in many project, but `Power` key on ADB converter. 
+`Magic` keybind can be vary on each project, check `config.h` in project directory.
+
+Following commands can be also executed with `Magic` + key. In console mode `Magic` keybind is not needed.
+
+    ----- Command Help -----
+    c:      enter console mode
+    d:      toggle debug enable
+    x:      toggle matrix debug
+    k:      toggle keyboard debug
+    m:      toggle mouse debug
+    v:      print device version & info
+    t:      print timer count
+    s:      print status
+    e:     print eeprom config
+    n:     toggle NKRO
+    0/F10:  switch to Layer0
+    1/F1:   switch to Layer1
+    2/F2:   switch to Layer2
+    3/F3:   switch to Layer3
+    4/F4:   switch to Layer4
+    PScr:   power down/remote wake-up
+    Caps:   Lock Keyboard(Child Proof)
+    Paus:   jump to bootloader
+
+
+
+Boot Magic Configuration - Virtual DIP Switch
+---------------------------------------------
+Boot Magic are executed during boot up time. Press Magic key below then plug in keyboard cable.
+Note that you must use keys of **Layer 0** as Magic keys. These settings are stored in EEPROM so that retain your configure over power cycles.
+
+To avoid configuring accidentally additive salt key `KC_SPACE` also needs to be pressed along with the following configuration keys. The salt key is configurable in `config.h`. See [tmk_core/common/bootmagic.h](tmk_core/common/bootmagic.h).
+
+#### General
+- Skip reading EEPROM to start with default configuration(`ESC`)
+- Clear configuration stored in EEPROM to reset configuration(`Backspace`)
+
+#### Bootloader
+- Kick up Bootloader(`B`)
+
+#### Debug
+- Debug enable(`D`)
+- Debug matrix enable(`D`+`X`)
+- Debug keyboard enable(`D`+`K`)
+- Debug mouse enable(`D`+`M`)
+
+#### Keymap
+- Swap Control and CapsLock(`Left Control`)
+- Change CapsLock to Control(`Caps Lock`)
+- Swap LeftAlt and Gui(`Left Alt`)
+- Swap RightAlt and Gui(`Right Alt`)
+- Disable Gui(`Left Gui`)
+- Swap Grave and Escape(`Grave`)
+- Swap BackSlash and BackSpace(`Back Slash`)
+- Enable NKRO on boot(`N`)
+
+#### Default Layer
+- Set Default Layer to 0(`0`)
+- Set Default Layer to 1(`1`)
+- Set Default Layer to 2(`2`)
+- Set Default Layer to 3(`3`)
+- Set Default Layer to 4(`4`)
+- Set Default Layer to 5(`5`)
+- Set Default Layer to 6(`6`)
+- Set Default Layer to 7(`7`)
+
+
+
+Mechanical Locking support
+--------------------------
+This feature makes it possible for you to use mechanical locking switch for `CapsLock`, `NumLock` 
+or `ScrollLock`. To enable this feature define these macros in `config.h` and use `KC_LCAP`, `KC_LN
+UM` or `KC_LSCR` in keymap for locking key instead of normal `KC_CAPS`, `KC_NLCK` or `KC_SLCK`. Res
+ync option tries to keep switch state consistent with keyboard LED state.
+    #define LOCKING_SUPPORT_ENABLE
+    #define LOCKING_RESYNC_ENABLE
+
+
+
+Start Your Own Project
+-----------------------
+**TBD**
+
+
+
+Debugging
+--------
+Use PJRC's `hid_listen` to see debug messages. You can use the tool for debug even if firmware use LUFA stack.
+
+You can use xprintf() to display debug info on `hid_listen`, see `tmk_core/common/xprintf.h`.
+
+
+
+Files and Directories
+-------------------
+### Top
+* tmk_core/     - core library
+* keyboard/     - keyboard projects
+* converter/    - protocol converter projects
+* doc/          - documents
+
+
+
+Coding Style
+-------------
+- Doesn't use Tab to indent, use 4-spaces instead.
+
+
+
+Other Keyboard Firmware Projects
+------------------
+You can learn a lot about keyboard firmware from these. See [doc/other_projects.md](tmk_core/doc/other_projects.md).
diff --git a/doc/USB_NKRO.txt b/doc/USB_NKRO.txt
new file mode 100644 (file)
index 0000000..d9f1d12
--- /dev/null
@@ -0,0 +1,160 @@
+USB NKRO MEMO
+=============
+2010/12/09
+
+
+References
+----------
+USB - boot mode, NKRO, compatibility, etc...
+    http://geekhack.org/showthread.php?t=13162
+NKey Rollover - Overview, Testing Methodology, and Results
+    http://geekhack.org/showwiki.php?title=NKey+Rollover+-+Overview+Testing+Methodology+and+Results
+dfj's NKRO(2010/06)
+    http://geekhack.org/showpost.php?p=191195&postcount=251
+    http://geekhack.org/showthread.php?p=204389#post204389
+
+
+Terminology
+---------
+NKRO
+ghost
+matrix
+mechanical with diodes
+membrane
+
+
+OS Support Status
+-----------------
+USB NKRO is possible *without* a custom driver.
+At least following OS's supports.
+    Windows7 64bit
+    WindowsXP
+    Windows2000 SP4
+    Ubuntu10.4(Linux 2.6)
+    MacOSX(To be tested)
+
+
+Custom Driver for USB NKRO
+--------------------------
+NOT NEEDED
+at least when using following report formats on Windows, Linux or MacOSX.
+
+
+USB NKRO methods
+----------------
+1. Virtual keyboards
+    Keyboard can increase its KRO by using virtual keyboards with Standard or Extended report.
+    If the keyboard has 2 virtual keyboard with Standard report(6KRO), it gets 12KRO.
+    Using this method means the keyboard is a composite device.
+
+2. Extended report
+    It needs large report size for this method to achieve NKRO.
+    If a keyboard has 101keys, it needs 103byte report. It seems to be inefficient.
+
+3. Bitmap report
+    If the keyboard has less than 128keys, 16byte report will be enough for NKRO.
+    The 16byte report seems to be reasonable cost to get NKRO.
+
+
+Report Format
+-------------
+Other report formats than followings are possible, though these format are typical one.
+
+1. Standard             8bytes
+    modifiers(bitmap)       1byte
+    reserved                1byte(not used)
+    keys(array)             1byte*6
+Standard report can send 6keys plus 8modifiers simultaneously.
+Standard report is used by most keyboards in the marketplace.
+Standard report is identical to boot protocol report.
+Standard report is hard to suffer from compatibility problems.
+
+2. Extended standard    16,32,64bytes
+    modifiers(bitmap)       1byte
+    reserved                1byte(not used)
+    keys(array)             1byte*(14,32,62)
+Extended report can send N-keys by using N+2bytes.
+Extended report is expected to be compatible with boot protocol.
+
+3. Bitmap               16,32,64bytes
+    keys(bitmap)            (16,32)bytes
+Bitmap report can send at most 128keys by 16bytes and 256keys by 32bytes.
+Bitmap report can achieve USB NKRO efficiently in terms of report size.
+Bitmap report needs a deliberation for boot protocol implementation.
+Bitmap report descriptor sample:
+        0x05, 0x01,                     // Usage Page (Generic Desktop),
+        0x09, 0x06,                     // Usage (Keyboard),
+        0xA1, 0x01,                     // Collection (Application),
+        // bitmap of modifiers
+        0x75, 0x01,                     //   Report Size (1),
+        0x95, 0x08,                     //   Report Count (8),
+        0x05, 0x07,                     //   Usage Page (Key Codes),
+        0x19, 0xE0,                     //   Usage Minimum (224),
+        0x29, 0xE7,                     //   Usage Maximum (231),
+        0x15, 0x00,                     //   Logical Minimum (0),
+        0x25, 0x01,                     //   Logical Maximum (1),
+        0x81, 0x02,                     //   Input (Data, Variable, Absolute), ;Modifier byte
+        // LED output report
+        0x95, 0x05,                     //   Report Count (5),
+        0x75, 0x01,                     //   Report Size (1),
+        0x05, 0x08,                     //   Usage Page (LEDs),
+        0x19, 0x01,                     //   Usage Minimum (1),
+        0x29, 0x05,                     //   Usage Maximum (5),
+        0x91, 0x02,                     //   Output (Data, Variable, Absolute),
+        0x95, 0x01,                     //   Report Count (1),
+        0x75, 0x03,                     //   Report Size (3),
+        0x91, 0x03,                     //   Output (Constant),
+        // bitmap of keys
+        0x95, (REPORT_BYTES-1)*8,      //   Report Count (),
+        0x75, 0x01,                     //   Report Size (1),
+        0x15, 0x00,                     //   Logical Minimum (0),
+        0x25, 0x01,                     //   Logical Maximum(1),
+        0x05, 0x07,                     //   Usage Page (Key Codes),
+        0x19, 0x00,                     //   Usage Minimum (0),
+        0x29, (REPORT_BYTES-1)*8-1,    //   Usage Maximum (),
+        0x81, 0x02,                     //   Input (Data, Variable, Absolute),
+        0xc0                            // End Collection
+where REPORT_BYTES is a report size in bytes.
+
+
+Considerations
+--------------
+Compatibility
+    boot protocol
+    minor/old system
+        Some BIOS doesn't send SET_PROTOCOL request, a keyboard can't switch to boot protocol mode.
+        This may cause a problem on a keyboard which uses other report than Standard.
+Reactivity
+    USB polling time
+    OS/Driver processing time
+
+
+Windows Problem
+---------------
+1. Windows accepts only 6keys  in case of Standard report.
+        It should be able to send 6keys plus 8modifiers.
+2. Windows accepts only 10keys in case of 16bytes Extended report.
+        It should be able to send 14keys plus 8modifiers.
+3. Windows accepts only 18keys in case of 32bytes Extended report.
+        It should be able to send 30keys plus 8modifiers.
+If keys are pressed in excess of the number, wrong keys are registered on Windows.
+
+This problem will be reportedly fixed soon.(2010/12/05)
+    http://forums.anandtech.com/showpost.php?p=30873364&postcount=17
+
+
+Tools for testing NKRO
+----------------------
+Browser App:
+http://www.microsoft.com/appliedsciences/content/projects/KeyboardGhostingDemo.aspx
+http://random.xem.us/rollover.html
+
+Windows:
+AquaKeyTest.exe http://geekhack.org/showthread.php?t=6643
+
+Linux:
+xkeycaps
+xev
+showkeys
+
+EOF
diff --git a/doc/VAGRANT_GUIDE.md b/doc/VAGRANT_GUIDE.md
new file mode 100644 (file)
index 0000000..2127347
--- /dev/null
@@ -0,0 +1,26 @@
+# Quick Start Directions
+
+This project includes a Vagrantfile that will allow you to build a new firmware for your keyboard very easily without major changes to your primary operating system. This also ensures that when you clone the project and perform a build, you have the exact same environment as anyone else using the Vagrantfile to build. This makes it much easier for people to help you troubleshoot any issues you encounter.
+
+## Requirements
+
+Using the `/util/Vagrantfile` in this repository requires you have [Vagrant](http://www.vagrantup.com/) as well as [VirtualBox](https://www.virtualbox.org/) (or [VMware Workstation](https://www.vmware.com/products/workstation) and [Vagrant VMware plugin](http://www.vagrantup.com/vmware) but the (paid) VMware plugin requires a licensed copy of VMware Workstation/Fusion).
+
+*COMPATIBILITY NOTICE* Certain versions of Virtualbox 5 appear to have an incompatibility with the Virtualbox extensions installed in the boxes in this Vagrantfile. If you encounter any issues with the /vagrant mount not succeeding, please upgrade your version of Virtualbox to at least 5.0.12.
+
+Other than having Vagrant and Virtualbox installed and possibly a restart of your computer afterwards, you can simple run a 'vagrant up' anywhere inside the folder where you checked out this project and it will start a Linux virtual machine that contains all the tools required to build this project. There is a post Vagrant startup hint that will get you off on the right foot, otherwise you can also reference the build documentation below.
+
+Build Firmware and Program Controller
+-------------------------------------
+See [/doc/BUIDE_GUIDE.md](/doc/BUILD_GUIDE.md), or the README in the particular keyboard/* folder.
+
+Change your keymap
+------------------
+See [/doc/keymap.md](/doc/keymap.md).
+
+## Flashing the firmware
+
+The "easy" way to flash the firmware is using a tool from your host OS like the Teensy programming app. [ErgoDox EZ](/keyboard/ergodox_ez/readme.md) gives a great example.
+
+If you want to program via the command line you can uncomment the ['modifyvm'] lines in the Vagrantfile to enable the USB passthrough into Linux and then program using the command line tools like dfu-util/dfu-programmer or you can install the Teensy CLI version.
+       
\ No newline at end of file
diff --git a/doc/build_old.md b/doc/build_old.md
new file mode 100644 (file)
index 0000000..5c2d57d
--- /dev/null
@@ -0,0 +1,187 @@
+Build Firmware and Program Controller
+=====================================
+
+## This guide may be out-dated - use doc/BUILD_GUIDE.md instead
+
+Download and Install
+--------------------
+### 1. Install Tools
+
+1. **Toolchain** On Windows install [MHV AVR Tools][mhv] for AVR GCC compiler and [Cygwin][cygwin](or [MinGW][mingw]) for shell terminal. On Mac you can use [CrossPack][crosspack]. On Linux you can install AVR GCC (and avr-libc) with your favorite package manager or run the avr_setup.sh script in the root of this repository.
+
+2. **Programmer** On Windows install [Atmel FLIP][flip]. On Mac and Linux install [dfu-programmer][dfu-prog].
+
+3. **Driver** On Windows you start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. In case of `dfu-programmer` use its driver.
+
+If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader].
+
+
+### 2. Download source
+You can find firmware source at github:
+
+- <https://github.com/tmk/tmk_keyboard>
+
+If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from:
+
+- <https://github.com/tmk/tmk_keyboard/archive/master.zip>
+
+
+Build firmware
+--------------
+### 1. Open terminal
+Open terminal window to get access to commands. Use Cygwin(or MingGW) `shell terminal` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up.
+
+### 2. Change directory
+Move to project directory in the firmware source.
+
+    cd tmk_keyboard/{'keyboard' or 'converter'}/<project>
+
+### 3. Make
+Build firmware using GNU `make` command. You'll see `<project>_<variant>.hex` file in that directory unless something unexpected occurs in build process.
+
+
+    make -f Makefile.<variant> clean
+    make -f Makefile.<variant>
+
+
+
+
+Program Controller
+------------------
+Now you have **hex** file to program on current directory. This **hex** is only needed to program your controller, other files are used for development and you may leave and forget them.
+
+### 1. Start bootloader
+How to program controller depends on controller chip and its board design. To program AVR USB chips you'll need to start it up in bootloader mode. Most of boards with the chip have a push button to let bootloader come up. Consult with your controller board manual.
+
+### 2. Program with DFU bootloader
+Stock AVR USB chip including ATmega32U4 has DFU bootloader by factory default. `FLIP` is a DFU programmer on Windows offered by Atmel. Open source command line tool `dfu-programmer` also supports AVR chips, it runs on Linux, Mac OSX and even Windows.
+
+To program AVR chip with DFU bootloader use `FLIP` or `dfu-programmer`.
+If you have a proper program command in `Makefile` just type this.
+
+`FLIP` has two version of tool, GUI app and command line program. If you want GUI see tutorial below.
+To use command line tool run this command. Note that you need to set PATH variable properly.
+
+    $ make -f Makefile.<variant> flip
+
+Or to program with `dfu-programmer` run:
+
+    $ make -f Makefile.<variant> dfu
+
+#### FLIP GUI tutorial
+1. On menu bar click Device -> Select, then. `ATmega32u4`.
+2. On menu bar click Settings -> Communication -> USB, then click 'Open' button on 'USB Port Connection' dialog.
+At this point you'll see grey-outed widgets on the app get colored and ready.
+
+3. On menu bar click File -> Load HEX File, then select your firmware hex file on File Selector dialog.
+4. On 'Operations Flow' panel click 'Run' button to load the firmware binary to the chip. Note that you should keep 'Erase', 'Blank Check', 'Program' and 'Verify' check boxes selected.
+5. Re-plug USB cord or click 'Start Application' button to restart your controller.
+Done.
+
+See also these instructions if you need.
+
+- <http://code.google.com/p/micropendous/wiki/LoadingFirmwareWithFLIP>
+- <http://www.atmel.com/Images/doc7769.pdf>
+
+
+### 3. Program with Teensy Loader
+If you have PJRC Teensy see instruction of `Teensy Loader`.
+
+- <http://www.pjrc.com/teensy/loader.html>
+
+Or use this command if you have command line version of Teensy Loader installed.
+
+    $ make -f Makefile.<variant> teensy
+
+
+### 4. Program with Other programmer
+You may want to use other programmer like `avrdude` with AVRISPmkII, Arduino or USBasp. In that case you can still use make target `program` for build with configuring `PROGRAM_CMD` in Makefile.
+
+    $ make -f Makefile.<variant> program
+
+
+[cygwin]:       https://www.cygwin.com/
+[mingw]:        http://www.mingw.org/
+[mhv]:          https://infernoembedded.com/products/avr-tools
+[winavr]:       http://winavr.sourceforge.net/
+[crosspack]:    http://www.obdev.at/products/crosspack/index.html
+[flip]:         http://www.atmel.com/tools/FLIP.aspx
+[dfu-prog]:     http://dfu-programmer.sourceforge.net/
+[teensy-loader]:http://www.pjrc.com/teensy/loader.html
+
+
+
+Makefile Options
+----------------
+### 1. MCU and Frequency.
+
+    MCU = atmega32u4       # Teensy 2.0
+    #MCU = at90usb1286      # Teensy++ 2.0
+    F_CPU = 16000000
+
+Set your MCU and its clock in Hz.
+
+    # Boot Section Size in *bytes*
+    #   Teensy halfKay   512
+    #   Atmel DFU loader 4096
+    #   LUFA bootloader  4096
+    OPT_DEFS += -DBOOTLOADER_SIZE=4096
+
+If you are using PJRC Teensy use `512` for `BOOTLOADER_SIZE`, otherwise use `4096` unless you are sure.
+
+### 2. Features
+Optional. Note that ***comment out*** with `#` to disable them.
+
+    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
+
+### 3. Programmer
+Optional. Set proper command for your controller, bootloader and programmer. This command can be used with `make program`. Not needed if you use `FLIP`, `dfu-programmer` or `Teensy Loader`.
+
+    # avrdude with AVRISPmkII
+    PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex
+
+    # avrdude with USBaspLoader
+    PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex
+
+    # avrdude with arduino
+    PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex
+
+
+
+Config.h Options
+----------------
+### 1. Magic command key combination
+
+    #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)))
+
+### 2. Mechanical Locking Support for CapsLock
+
+    /* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */
+    #define CAPSLOCK_LOCKING_ENABLE
+    /* Locking CapsLock re-synchronize hack */
+    #define CAPSLOCK_LOCKING_RESYNC_ENABLE
+
+### 3. Disable Debug and Print
+
+    /* disable debug print */
+    #define NO_DEBUG
+
+    /* disable print */
+    #define NO_PRINT
+
+### 4. Disable Action Features
+
+    #define NO_ACTION_LAYER
+    #define NO_ACTION_TAPPING
+    #define NO_ACTION_ONESHOT
+    #define NO_ACTION_MACRO
+    #define NO_ACTION_FUNCTION
+
+***TBD***
diff --git a/doc/keycode.txt b/doc/keycode.txt
new file mode 100644 (file)
index 0000000..44d7e27
--- /dev/null
@@ -0,0 +1,261 @@
+Keycode Symbol Table
+====================
+Keycodes are defined in `common/keycode.h`.
+Range of 00-A4 and E0-E7 are identical with HID Usage:
+<http://www.usb.org/developers/devclass_docs/Hut1_11.pdf>
+Virtual keycodes are defined out of above range to support special actions.
+
+
+Keycode Symbol      Short name      Description
+--------------------------------------------------------------------------------
+KC_NO                               00 Reserved (no event indicated)
+KC_ROLL_OVER                        01 Keyboard ErrorRollOver
+KC_POST_FAIL                        02 Keyboard POSTFail
+KC_UNDEFINED                        03 Keyboard ErrorUndefined
+KC_A                                04 Keyboard a and A
+KC_B                                05 Keyboard b and B
+KC_C                                06 Keyboard c and C
+KC_D                                07 Keyboard d and D
+KC_E                                08 Keyboard e and E
+KC_F                                09 Keyboard f and F
+KC_G                                0A Keyboard g and G
+KC_H                                0B Keyboard h and H
+KC_I                                0C Keyboard i and I
+KC_J                                0D Keyboard j and J
+KC_K                                0E Keyboard k and K
+KC_L                                0F Keyboard l and L
+KC_M                                10 Keyboard m and M
+KC_N                                11 Keyboard n and N
+KC_O                                12 Keyboard o and O
+KC_P                                13 Keyboard p and P
+KC_Q                                14 Keyboard q and Q
+KC_R                                15 Keyboard r and R
+KC_S                                16 Keyboard s and S
+KC_T                                17 Keyboard t and T
+KC_U                                18 Keyboard u and U
+KC_V                                19 Keyboard v and V
+KC_W                                1A Keyboard w and W
+KC_X                                1B Keyboard x and X
+KC_Y                                1C Keyboard y and Y
+KC_Z                                1D Keyboard z and Z
+KC_1                                1E Keyboard 1 and !
+KC_2                                1F Keyboard 2 and @
+KC_3                                20 Keyboard 3 and #
+KC_4                                21 Keyboard 4 and $
+KC_5                                22 Keyboard 5 and %
+KC_6                                23 Keyboard 6 and ^
+KC_7                                24 Keyboard 7 and &
+KC_8                                25 Keyboard 8 and *
+KC_9                                26 Keyboard 9 and (
+KC_0                                27 Keyboard 0 and )
+KC_ENTER            KC_ENT          28 Keyboard Return (ENTER)
+KC_ESCAPE           KC_ESC          29 Keyboard ESCAPE
+KC_BSPACE           KC_BSPC         2A Keyboard DELETE (Backspace)
+KC_TAB                              2B Keyboard Tab
+KC_SPACE            KC_SPC          2C Keyboard Spacebar
+KC_MINUS            KC_MINS         2D Keyboard - and (underscore)
+KC_EQUAL            KC_EQL          2E Keyboard = and +
+KC_LBRACKET         KC_LBRC         2F Keyboard [ and {
+KC_RBRACKET         KC_RBRC         30 Keyboard ] and }
+KC_BSLASH           KC_BSLS         31 Keyboard \ and |
+KC_NONUS_HASH       KC_NUHS         32 Keyboard Non-US # and ~
+KC_SCOLON           KC_SCLN         33 Keyboard ; and :
+KC_QUOTE            KC_QUOT         34 Keyboard ‘ and “
+KC_GRAVE            KC_GRV          35 Keyboard Grave Accent and Tilde
+KC_COMMA            KC_COMM         36 Keyboard, and <
+KC_DOT                              37 Keyboard . and >
+KC_SLASH            KC_SLSH         38 Keyboard / and ?
+KC_CAPSLOCK         KC_CAPS         39 Keyboard Caps Lock
+KC_F1                               3A Keyboard F1
+KC_F2                               3B Keyboard F2
+KC_F3                               3C Keyboard F3
+KC_F4                               3D Keyboard F4
+KC_F5                               3E Keyboard F5
+KC_F6                               3F Keyboard F6
+KC_F7                               40 Keyboard F7
+KC_F8                               41 Keyboard F8
+KC_F9                               42 Keyboard F9
+KC_F10                              43 Keyboard F10
+KC_F11                              44 Keyboard F11
+KC_F12                              45 Keyboard F12
+KC_PSCREEN          KC_PSCR         46 Keyboard PrintScreen1
+KC_SCKLOCK          KC_SLCK         47 Keyboard Scroll Lock11
+KC_PAUSE            KC_PAUS         48 Keyboard Pause1
+KC_INSERT           KC_INS          49 Keyboard Insert1
+KC_HOME                             4A Keyboard Home1
+KC_PGUP                             4B Keyboard PageUp1
+KC_DELETE           KC_DELETE       4C Keyboard Delete Forward
+KC_END                              4D Keyboard End1
+KC_PGDOWN           KC_PGDN         4E Keyboard PageDown1
+KC_RIGHT            KC_RGHT         4F Keyboard RightArrow1
+KC_LEFT                             50 Keyboard LeftArrow1
+KC_DOWN                             51 Keyboard DownArrow1
+KC_UP                               52 Keyboard UpArrow1
+KC_NUMLOCK          KC_NLCK         53 Keypad Num Lock and Clear11
+KC_KP_SLASH         KC_PSLS         54 Keypad /1
+KC_KP_ASTERISK      KC_PAST         55 Keypad *
+KC_KP_MINUS         KC_PMNS         56 Keypad -
+KC_KP_PLUS          KC_PPLS         57 Keypad +
+KC_KP_ENTER         KC_PENT         58 Keypad ENTER5
+KC_KP_1             KC_P1           59 Keypad 1 and End
+KC_KP_2             KC_P2           5A Keypad 2 and Down Arrow
+KC_KP_3             KC_P3           5B Keypad 3 and PageDn
+KC_KP_4             KC_P4           5C Keypad 4 and Left Arrow
+KC_KP_5             KC_P5           5D Keypad 5
+KC_KP_6             KC_P6           5E Keypad 6 and Right Arrow
+KC_KP_7             KC_P7           5F Keypad 7 and Home
+KC_KP_8             KC_P8           60 Keypad 8 and Up Arrow
+KC_KP_9             KC_P9           61 Keypad 9 and PageUp
+KC_KP_0             KC_P0           62 Keypad 0 and Insert
+KC_KP_DOT           KC_PDOT         63 Keypad . and Delete
+KC_NONUS_BSLASH     KC_NUBS         64 Keyboard Non-US \ and |
+KC_APPLICATION      KC_APP          65 Keyboard Application10
+KC_POWER                            66 Keyboard Power9
+KC_KP_EQUAL         KC_PEQL         67 Keypad =
+KC_F13                              68 Keyboard F13
+KC_F14                              69 Keyboard F14
+KC_F15                              6A Keyboard F15
+KC_F16                              6B Keyboard F16
+KC_F17                              6C Keyboard F17
+KC_F18                              6D Keyboard F18
+KC_F19                              6E Keyboard F19
+KC_F20                              6F Keyboard F20
+KC_F21                              70 Keyboard F21
+KC_F22                              71 Keyboard F22
+KC_F23                              72 Keyboard F23
+KC_F24                              73 Keyboard F24
+KC_EXECUTE                          74 Keyboard Execute
+KC_HELP                             75 Keyboard Help
+KC_MENU                             76 Keyboard Menu
+KC_SELECT                           77 Keyboard Select
+KC_STOP                             78 Keyboard Stop
+KC_AGAIN                            79 Keyboard Again
+KC_UNDO                             7A Keyboard Undo
+KC_CUT                              7B Keyboard Cut
+KC_COPY                             7C Keyboard Copy
+KC_PASTE                            7D Keyboard Paste
+KC_FIND                             7E Keyboard Find
+KC__MUTE                            7F Keyboard Mute
+KC__VOLUP                           80 Keyboard Volume Up
+KC__VOLDOWN                         81 Keyboard Volume Down
+KC_LOCKING_CAPS                     82 Keyboard Locking Caps Lock12
+KC_LOCKING_NUM                      83 Keyboard Locking Num Lock12
+KC_LOCKING_SCROLL                   84 Keyboard Locking Scroll Lock12
+KC_KP_COMMA         KC_PCMM         85 Keypad Comma27
+KC_KP_EQUAL_AS400                   86 Keypad Equal Sign29
+KC_INT1             KC_RO           87 Keyboard International115,28
+KC_INT2             KC_KANA         88 Keyboard International216
+KC_INT3             KC_JYEN         89 Keyboard International317
+KC_INT4             KC_HENK         8A Keyboard International418
+KC_INT5             KC_MHEN         8B Keyboard International519
+KC_INT6                             8C Keyboard International620
+KC_INT7                             8D Keyboard International721
+KC_INT8                             8E Keyboard International822
+KC_INT9                             8F Keyboard International922
+KC_LANG1                            90 Keyboard LANG125
+KC_LANG2                            91 Keyboard LANG226
+KC_LANG3                            92 Keyboard LANG330
+KC_LANG4                            93 Keyboard LANG431
+KC_LANG5                            94 Keyboard LANG532
+KC_LANG6                            95 Keyboard LANG68
+KC_LANG7                            96 Keyboard LANG78
+KC_LANG8                            97 Keyboard LANG88
+KC_LANG9                            98 Keyboard LANG98
+KC_ALT_ERASE                        99 Keyboard Alternate Erase7
+KC_SYSREQ                           9A Keyboard SysReq/Attention1
+KC_CANCEL                           9B Keyboard Cancel
+KC_CLEAR                            9C Keyboard Clear
+KC_PRIOR                            9D Keyboard Prior
+KC_RETURN                           9E Keyboard Return
+KC_SEPARATOR                        9F Keyboard Separator
+KC_OUT                              A0 Keyboard Out
+KC_OPER                             A1 Keyboard Oper
+KC_CLEAR_AGAIN                      A2 Keyboard Clear/Again
+KC_CRSEL                            A3 Keyboard CrSel/Props
+KC_EXSEL                            A4 Keyboard ExSel
+/* Modifiers */
+KC_LCTRL            KC_LCTL         E0 Keyboard LeftControl
+KC_LSHIFT           KC_LSFT         E1 Keyboard LeftShift
+KC_LALT                             E2 Keyboard LeftAlt
+KC_LGUI                             E3 Keyboard Left GUI(Windows/Apple/Meta key)
+KC_RCTRL            KC_RCTL         E4 Keyboard RightControl
+KC_RSHIFT           KC_RSFT         E5 Keyboard RightShift
+KC_RALT                             E6 Keyboard RightAlt
+KC_RGUI                             E7 Keyboard Right GUI(Windows/Apple/Meta key)
+
+/* 
+ * Virtual keycodes
+ */
+/* System Control */
+KC_SYSTEM_POWER     KC_PWR          System Power Down
+KC_SYSTEM_SLEEP     KC_SLEP         System Sleep
+KC_SYSTEM_WAKE      KC_WAKE         System Wake
+/* Consumer Page */
+KC_AUDIO_MUTE       KC_MUTE
+KC_AUDIO_VOL_UP     KC_VOLU
+KC_AUDIO_VOL_DOWN   KC_VOLD
+KC_MEDIA_NEXT_TRACK KC_MNXT
+KC_MEDIA_PREV_TRACK KC_MPRV
+KC_MEDIA_STOP       KC_MSTP
+KC_MEDIA_PLAY_PAUSE KC_MPLY
+KC_MEDIA_SELECT     KC_MSEL
+KC_MAIL             KC_MAIL
+KC_CALCULATOR       KC_CALC
+KC_MY_COMPUTER      KC_MYCM
+KC_WWW_SEARCH       KC_WSCH
+KC_WWW_HOME         KC_WHOM
+KC_WWW_BACK         KC_WBAK
+KC_WWW_FORWARD      KC_WFWD
+KC_WWW_STOP         KC_WSTP
+KC_WWW_REFRESH      KC_WREF
+KC_WWW_FAVORITES    KC_WFAV
+/* Mousekey */
+KC_MS_UP            KC_MS_U         Mouse Cursor Up
+KC_MS_DOWN          KC_MS_D         Mouse Cursor Down
+KC_MS_LEFT          KC_MS_L         Mouse Cursor Left
+KC_MS_RIGHT         KC_MS_R         Mouse Cursor Right
+KC_MS_BTN1          KC_BTN1         Mouse Button 1
+KC_MS_BTN2          KC_BTN2         Mouse Button 2
+KC_MS_BTN3          KC_BTN3         Mouse Button 3
+KC_MS_BTN4          KC_BTN4         Mouse Button 4
+KC_MS_BTN5          KC_BTN5         Mouse Button 5
+KC_MS_WH_UP         KC_WH_U         Mouse Wheel Up
+KC_MS_WH_DOWN       KC_WH_D         Mouse Wheel Down
+KC_MS_WH_LEFT       KC_WH_L         Mouse Wheel Left
+KC_MS_WH_RIGHT      KC_WH_R         Mouse Wheel Right
+KC_MS_ACCEL0        KC_ACL0         Mouse Acceleration 0
+KC_MS_ACCEL1        KC_ACL1         Mouse Acceleration 1
+KC_MS_ACCEL2        KC_ACL2         Mouse Acceleration 2
+/* Fn key */
+KC_FN0
+KC_FN1
+KC_FN2
+KC_FN3
+KC_FN4
+KC_FN5
+KC_FN6
+KC_FN7
+KC_FN8
+KC_FN9
+KC_FN10
+KC_FN11
+KC_FN12
+KC_FN13
+KC_FN14
+KC_FN15
+KC_FN16
+KC_FN17
+KC_FN18
+KC_FN19
+KC_FN20
+KC_FN21
+KC_FN22
+KC_FN23
+KC_FN24
+KC_FN25
+KC_FN26
+KC_FN27
+KC_FN28
+KC_FN29
+KC_FN30
+KC_FN31
diff --git a/doc/keymap.md b/doc/keymap.md
new file mode 100644 (file)
index 0000000..4d42fbe
--- /dev/null
@@ -0,0 +1,599 @@
+Keymap framework - how to define your keymap
+============================================
+***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.***
+
+## 0. Keymap and layers
+**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most.
+**Layer** is an array of **keycodes** to define **actions** for each physical keys.
+respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
+
+    Keymap: 32 Layers                   Layer: Keycode matrix
+    -----------------                   ---------------------
+    stack of layers                     array_of_keycode[row][column]
+           ____________ precedence               _______________________
+          /           / | high                  / ESC / F1  / F2  / F3   ....
+      31 /___________// |                      /-----/-----/-----/-----
+      30 /___________// |                     / TAB /  Q  /  W  /  E   ....
+      29 /___________/  |                    /-----/-----/-----/-----
+       :   _:_:_:_:_:__ |               :   /LCtrl/  A  /  S  /  D   ....
+       :  / : : : : : / |               :  /  :     :     :     :
+       2 /___________// |               2 `--------------------------
+       1 /___________// |               1 `--------------------------
+       0 /___________/  V low           0 `--------------------------
+
+
+
+### 0.1 Keymap status
+Keymap has its state in two parameters:
+**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
+
+Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
+To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
+
+    Initial state of Keymap          Change base layout              
+    -----------------------          ------------------              
+
+      31                               31
+      30                               30
+      29                               29
+       :                                :
+       :                                :   ____________
+       2   ____________                 2  /           /
+       1  /           /              ,->1 /___________/
+    ,->0 /___________/               |  0
+    |                                |
+    `--- default_layer = 0           `--- default_layer = 1
+         layer_state   = 0x00000001       layer_state   = 0x00000002
+
+On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
+
+    Overlay feature layer
+    ---------------------      bit|status
+           ____________        ---+------
+      31  /           /        31 |   0
+      30 /___________// -----> 30 |   1
+      29 /___________/  -----> 29 |   1
+       :                        : |   :
+       :   ____________         : |   :
+       2  /           /         2 |   0
+    ,->1 /___________/  ----->  1 |   1
+    |  0                        0 |   0
+    |                                 +
+    `--- default_layer = 1            |
+         layer_state   = 0x60000002 <-'
+
+
+
+### 0.2 Layer Precedence and Transparency
+Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred.
+
+You can place `KC_TRNS` on overlay layer changes just part of layout to fall back on lower or base layer.
+Key with `KC_TRANS` doesn't has its own keycode and refers to lower valid layers for keycode, instead.
+See example below.
+
+
+### 0.3 Keymap Example
+Keymap is **`keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array.
+
+This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
+This example has three layers, 'Qwerty' as base layer, 'Cursor' and  'Mousekey'.
+In this example,
+
+ `Fn0` is a **momentary layer switching** key, you can use keys on Cursor layer while holding the key.
+
+ `Fn1` is a momentary layer switching key with tapping feature, you can get semicolon **';'** with taping the key and switch layers while holding the key. The word **'tap'** or **'tapping'** mean to press and release a key quickly.
+
+ `Fn2` is a **toggle layer switch** key, you can stay switched layer after releasing the key unlike momentary switching.
+
+You can find other keymap definitions in file `keymap.c` located on project directories.
+
+    static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+        /* 0: Qwerty
+         * ,-----------------------------------------------------------.
+         * |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|Fn1|  '|Enter   |
+         * |-----------------------------------------------------------|
+         * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift |Fn0|
+         * `-----------------------------------------------------------'
+         *       |Gui|Alt  |Space                  |Alt  |Fn2|
+         *       `-------------------------------------------'
+         */
+        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,   FN1, QUOT,ENT, \
+               LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,FN0, \
+                    LGUI,LALT,          SPC,                RALT,FN2),
+        /* 1: Cursor(HHKB mode)
+         * ,-----------------------------------------------------------.
+         * |Pwr| 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|
+         *      `--------------------------------------------'
+         */ 
+        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, \
+               LCTL,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \
+               LSFT,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \
+                    LGUI,LALT,          SPC,                RALT,RGUI),
+        /* 2: Mousekey
+         * ,-----------------------------------------------------------.
+         * |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|   |   |Return  |
+         * |-----------------------------------------------------------|
+         * |Shift   |   |   |   |   |Mb3|Mb2|Mb1|Mb4|Mb5|   |Shift |   |
+         * `-----------------------------------------------------------'
+         *      |Gui |Alt  |Mb1                    |Alt  |   |
+         *      `--------------------------------------------'
+         * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel 
+         */
+        KEYMAP(ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
+               TAB, TRNS,TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_U,WH_R,TRNS,TRNS,TRNS,BSPC, \
+               LCTL,TRNS,ACL0,ACL1,ACL2,TRNS,MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \
+               LSFT,TRNS,TRNS,TRNS,TRNS,BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,TRNS, \
+                    LGUI,LALT,          BTN1,               RALT,TRNS),
+    };
+
+    static const uint16_t PROGMEM fn_actions[] = {
+        ACTION_LAYER_MOMENTARY(1),                  // FN0
+        ACTION_LAYER_TAP_KEY(2, KC_SCLN),           // FN1
+        ACTION_LAYER_TOGGLE(2),                     // FN2
+    };
+
+
+
+
+## 1. Keycode
+See [`common/keycode.h`](../common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
+
+ ***In `KEYMAP()` macro you should omit prefix part `KC_` of keycode to keep keymap compact.*** For example, just use `A` instead you place `KC_A` in `KEYMAP()`. Some keycodes has 4-letter **short name** in addition to descriptive name, you'll prefer short one in `KEYMAP()`.
+
+### 1.0 Other key
+- `KC_NO` for no action
+- `KC_TRNS` for layer transparency (See above)
+
+### 1.1 Normal key
+- `KC_A` to `KC_Z`, `KC_1` to `KC_0` for alpha numeric key
+- `KC_MINS`, `KC_EQL`, `KC_GRV`, `KC_RBRC`, `KC_LBRC`, `KC_COMM`, `KC_DOT`, `KC_BSLS`, `KC_SLSH`, `KC_SCLN`, `KC_QUOT`
+- `KC_ESC`, `KC_TAB`, `KC_SPC`, `KC_BSPC`, `KC_ENT`, `KC_DEL`, `KC_INS`
+- `KC_UP`, `KC_DOWN`, `KC_RGHT`, `KC_LEFT`, `KC_PGUP`, `KC_PGDN`, `KC_HOME`, `KC_END`
+- `KC_CAPS`, `KC_NLCK`, `KC_SLCK`, `KC_PSCR`, `KC_PAUS`, `KC_APP`, `KC_F1` to `KC_F24`
+- `KC_P1` to `KC_P0`, `KC_PDOT`, `KC_PCMM`, `KC_PSLS`, `KC_PAST`, `KC_PMNS`, `KC_PPLS`, `KC_PEQL`, `KC_PENT` for keypad.
+
+### 1.2 Modifier
+There are 8 modifiers which has discrimination between left and right. 
+
+- `KC_LCTL` and `KC_RCTL` for Control
+- `KC_LSFT` and `KC_RSFT` for Shift
+- `KC_LALT` and `KC_RALT` for Alt
+- `KC_LGUI` and `KC_RGUI` for Windows key or Command key in Mac
+
+### 1.3 Mousekey
+- `KC_MS_U`, `KC_MS_D`, `KC_MS_L`, `KC_MS_R` for mouse cursor
+- `KC_WH_U`, `KC_WH_D`, `KC_WH_L`, `KC_WH_R` for mouse wheel
+- `KC_BTN1`, `KC_BTN2`, `KC_BTN3`, `KC_BTN4`, `KC_BTN5` for mouse buttons
+
+### 1.4 System & Media key
+- `KC_PWR`, `KC_SLEP`, `KC_WAKE` for Power, Sleep, Wake
+- `KC_MUTE`, `KC_VOLU`, `KC_VOLD` for audio volume control
+- `KC_MNXT`, `KC_MPRV`, `KC_MSTP`, `KC_MPLY`, `KC_MSEL` for media control
+- `KC_MAIL`, `KC_CALC`, `KC_MYCM` for application launch
+- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
+
+### 1.5 Fn key
+`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.***
+
+### 1.6 Keycode Table
+ See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
+
+ In regard to implementation side most of keycodes are identical with [HID usage][HID_usage](pdf) sent to host for real and some virtual keycodes are defined to support special actions.
+[HID_usage]: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
+
+
+
+## 2. Action
+See [`common/action_code.h`](../common/action_code.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping.
+
+Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory compared to using just keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP()` instead of action codes.
+
+***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.***
+
+
+### 2.1 Key Action
+This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release.
+
+#### Parameters
++ **mods**: { ` MOD_LCTL`, ` MOD_LSFT`, ` MOD_LALT`, ` MOD_LGUI`,
+              ` MOD_RCTL`, ` MOD_RSFT`, ` MOD_RALT`, ` MOD_RGUI` }
++ **key**: keycode
+
+
+#### 2.1.1 Normal key and Modifier
+***This action usually won't be used expressly in keymap*** because you can just use keycodes in `KEYMAP()` instead.
+
+You can define these actions on *'A'* key and *'left shift'* modifier with:
+
+    ACTION_KEY(KC_A)
+    ACTION_KEY(KC_LSFT)
+
+#### 2.1.2 Modified key
+This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes.
+
+Say you want to assign a key to `Shift + 1` to get character *'!'* or `Alt + Tab` to switch application windows.
+
+    ACTION_MODS_KEY(MOD_LSFT, KC_1)
+    ACTION_MODS_KEY(MOD_LALT, KC_TAB)
+
+Or `Alt,Shift + Tab` can be defined. `ACTION_MODS_KEY(mods, key)` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro.
+
+    ACTION_MODS_KEY(MOD_LALT | MOD_LSFT, KC_TAB)
+
+#### 2.1.3 Multiple Modifiers
+Registers multiple modifiers with pressing a key. To specify multiple modifiers use `|`.
+
+    ACTION_MODS(MOD_ALT | MOD_LSFT)
+
+#### 2.1.3 Modifier with Tap key([Dual role][dual_role])
+Works as a modifier key while holding, but registers a key on tap(press and release quickly).
+
+
+    ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)
+
+
+
+### 2.2 Layer Action
+These actions operate layers of keymap.
+
+#### Parameters
+You can specify a **target layer** of action and **when the action is executed**. Some actions take a **bit value** for bitwise operation.
+
+
++ **layer**: `0`-`31`
++ **on**: { `ON_PRESS` | `ON_RELEASE` | `ON_BOTH` }
++ **bits**: 4-bit value and 1-bit mask bit
+
+
+#### 2.2.1 Default Layer
+Default Layer is a layer which always is valid and referred to when actions is not defined on other overlay layers.
+
+This sets Default Layer to given parameter `layer` and activate it.
+
+    ACTION_DEFAULT_LAYER_SET(layer)
+
+
+#### 2.2.2 Momentary 
+Turns on `layer` momentarily while holding, in other words it activates when key is pressed and deactivate when released.
+
+    ACTION_LAYER_MOMENTARY(layer)
+
+
+#### 2.2.3 Toggle Switch
+Turns on `layer` with first type(press and release) and turns off with next.
+
+    ACTION_LAYER_TOGGLE(layer)
+
+
+#### 2.2.4 Momentary Switch with tap key
+Turns on `layer` momentary while holding, but registers key on tap(press and release quickly).
+
+    ACTION_LAYER_TAP_KEY(layer, key)
+
+
+#### 2.2.5 Momentary Switch with tap toggle
+Turns on `layer` momentary while holding and toggles it with serial taps.
+
+    ACTION_LAYER_TAP_TOGGLE(layer)
+
+
+#### 2.2.6 Invert state of layer
+Inverts current state of `layer`. If the layer is on it becomes off with this action.
+
+    ACTION_LAYER_INVERT(layer, on)
+
+
+#### 2.2.7 Turn On layer
+Turns on layer state.
+
+    ACTION_LAYER_ON(layer, on)
+
+Turns on layer state on press and turns off on release.
+
+    ACTION_LAYER_ON_OFF(layer)
+
+
+#### 2.2.8 Turn Off layer
+Turns off layer state.
+
+    ACTION_LAYER_OFF(layer, on)
+
+Turns off layer state on press and activates on release.
+
+    ACTION_LAYER_OFF_ON(layer)
+
+
+#### 2.2.9 Set layer
+Turn on layer only.
+`layer_state = (1<<layer) [layer: 0-31]`
+
+    ACTION_LAYER_SET(layer, on)
+
+Turns on layer only and clear all layer on release..
+
+    ACTION_LAYER_SET_CLEAR(layer)
+
+
+#### 2.2.10 Bitwise operation
+
+**part** indicates which part of 32bit layer state(0-7). **bits** is 5-bit value. **on** indicates when the action is executed.
+
+    ACTION_LAYER_BIT_AND(part, bits, on)
+    ACTION_LAYER_BIT_OR(part, bits, on)
+    ACTION_LAYER_BIT_XOR(part, bits, on)
+    ACTION_LAYER_BIT_SET(part, bits, on)
+
+These actions works with parameters as following code.
+
+    uint8_t shift = part*4;
+    uint32_t mask = (bits&0x10) ? ~(0xf<<shift) : 0;
+    uint32_t layer_state = layer_state <bitop> ((bits<<shift)|mask);
+
+
+Default Layer also has bitwise operations, they are executed when key is released.
+
+    ACTION_DEFAULT_LAYER_BIT_AND(part, bits)
+    ACTION_DEFAULT_LAYER_BIT_OR(part, bits)
+    ACTION_DEFAULT_LAYER_BIT_XOR(part, bits)
+    ACTION_DEFAULT_LAYER_BIT_SET(part, bits)
+
+
+
+### 2.3 Macro action
+***TBD***
+
+`Macro` action indicates complex key strokes.
+    MACRO( D(LSHIFT), D(D), END )
+    MACRO( U(D), U(LSHIFT), END )
+    MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END )
+
+#### 2.3.1 Macro Commands
+- **I()**   change interval of stroke.
+- **D()**   press key
+- **U()**   release key
+- **T()**   type key(press and release)
+- **W()**   wait
+- **END**   end mark
+
+#### 2.3.2 Examples
+
+***TODO: sample implementation***
+See `keyboard/hhkb/keymap.c` for sample.
+
+
+
+### 2.4 Function action
+***TBD***
+
+There are two type of action, normal `Function` and tappable `Function`.
+These actions call user defined function with `id`, `opt`, and key event information as arguments.
+
+#### 2.4.1 Function
+To define normal `Function` action in keymap use this.
+
+    ACTION_FUNCTION(id, opt)
+
+#### 2.4.2 Function with tap
+To define tappable `Function` action in keymap use this.
+
+    ACTION_FUNCTION_TAP(id, opt)
+
+#### 2.4.3 Implement user function
+`Function` actions can be defined freely with C by user in callback function:
+
+    void keymap_call_function(keyrecord_t *event, uint8_t id, uint8_t opt)
+
+This C function is called every time key is operated, argument `id` selects action to be performed and `opt` can be used for option. Function `id` can be 0-255 and `opt` can be 0-15.
+
+ `keyrecord_t` is comprised of key event and tap count. `keyevent_t` indicates which and when key is pressed or released. From `tap_count` you can know tap state, 0 means no tap. These information will be used in user function to decide how action of key is performed.
+
+    typedef struct {
+        keyevent_t  event;
+        uint8_t     tap_count;
+    } keyrecord_t;
+
+    typedef struct {
+        key_t    key;
+        bool     pressed;
+        uint16_t time;
+    } keyevent_t;
+
+    typedef struct {
+        uint8_t col;
+        uint8_t row;
+    } key_t;
+
+***TODO: sample implementation***
+See `keyboard/hhkb/keymap.c` for sample.
+
+
+
+### 2.5 Backlight Action
+These actions control the backlight.
+
+#### 2.5.1 Change backlight level
+Increase backlight level.
+
+    ACTION_BACKLIGHT_INCREASE()
+
+Decrease backlight level.
+
+    ACTION_BACKLIGHT_DECREASE()
+
+Step through backlight levels.
+
+    ACTION_BACKLIGHT_STEP()
+
+Turn a specific backlight level on or off.
+
+    ACTION_BACKLIGHT_LEVEL(1)
+
+#### 2.5.2 Turn on / off backlight
+Turn the backlight on and off without changing level.
+
+    ACTION_BACKLIGHT_TOGGLE()
+
+
+
+## 3. Layer switching Example
+There are some ways to switch layer with 'Layer' actions.
+
+### 3.1 Momentary switching
+Momentary switching changes layer only while holding Fn key.
+
+This action makes 'Layer 1' active(valid) on key press event and inactive on release event. Namely you can overlay a layer on lower layers or default layer temporarily with this action.
+
+    ACTION_LAYER_MOMENTARY(1)
+
+
+Note that after switching on press the actions on destination layer(Layer 1) are performed.
+***Thus you shall need to place an action to go back on destination layer***, or you will be stuck in destination layer without way to get back. Usually you need to place same action or 'KC_TRNS` on destination layer to get back.
+
+
+### 3.2 Toggle switching
+Toggle switching performed after releasing a key. With this action you can keep staying on the destination layer until you type the key again to return.
+
+This performs toggle switching action of 'Layer 2'.
+
+    ACTION_LAYER_TOGGLE(2)
+
+
+
+### 3.3 Momentary switching with Tap key
+These actions switch a layer only while holding a key but register the key on tap. **Tap** means to press and release a key quickly.
+
+    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
+
+With this you can place a layer switching action on normal key like ';' without losing its original key register function. This action allows you to have layer switching action without necessity of a dedicated key. It means you can have it even on home row of keyboard.
+
+
+
+### 3.4 Momentary switching with Tap Toggle
+This switches layer only while holding a key but toggle layer with several taps. **Tap** means to press and release key quickly.
+
+    ACTION_LAYER_TAP_TOGGLE(1)
+
+Number of taps can be configured with `TAPPING_TOGGLE` in `config.h`, `5` by default.
+
+
+
+### 3.5 Momentary switching with Modifiers
+This registers modifier key(s) simultaneously with layer switching.
+
+    ACTION_LAYER_MODS(2, MOD_LSFT | MOD_LALT)
+
+
+
+## 4. Tapping
+Tapping is to press and release a key quickly. Tapping speed is determined with setting of `TAPPING_TERM`, which can be defined in `config.h`, 200ms by default.
+
+### 4.1 Tap Key
+This is a feature to assign normal key action and modifier including layer switching to just same one physical key. This is a kind of [Dual role key][dual_role]. It works as modifier when holding the key but registers normal key when tapping.
+
+Modifier with tap key:
+
+    ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV)
+
+Layer switching with tap key:
+
+    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
+
+[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
+
+
+### 4.2 Tap Toggle
+This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps.
+
+    ACTION_LAYER_TAP_TOGGLE(1)
+
+
+### 4.3 Oneshot Modifier
+This runs onetime effects which modify only on just one following key. It works as normal modifier key when holding down while oneshot modifier when tapping. The behavior of oneshot modifiers is similar to the [sticky keys](https://en.wikipedia.org/wiki/StickyKeys) functionality found in most operating systems.
+
+    ACTION_MODS_ONESHOT(MOD_LSFT)
+
+Oneshot layer key:
+
+    ACTION_LAYER_ONESHOT(MY_LAYER)
+
+Say you want to type 'The', you have to push and hold Shift key before type 't' then release it before type 'h' and 'e', otherwise you'll get 'THe' or 'the' unintentionally. With Oneshot Modifier you can tap Shift then type 't', 'h' and 'e' normally, you don't need to holding Shift key properly here. This mean you can release Shift before 't' is pressed down.
+
+Oneshot effect is cancel unless following key is pressed down within `ONESHOT_TIMEOUT` of `config.h`. No timeout when it is `0` or not defined.
+
+Most implementations of sticky keys allow you to lock a modifier by double tapping the modifier. The layer then remains locked untill the modifier is tapped again. To enable this behaviour for oneshot modifiers set `ONESHOT_TAP_TOGGLE` to the number taps required. The feature is disabled if `ONESHOT_TAP_TOGGLE<2` or not defined.
+
+
+### 4.4 Tap Toggle Mods
+Similar to layer tap toggle, this works as a momentary modifier when holding, but toggles on with several taps. A single tap will 'unstick' the modifier again.
+
+    ACTION_MODS_TAP_TOGGLE(MOD_LSFT)
+
+
+
+
+## 5. Legacy Keymap
+This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.***
+
+To enable Legacy Keymap support define this macro in `config.h`.
+
+    #define USE_LEGACY_KEYMAP
+
+Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
+
+In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
+
+    static const uint8_t PROGMEM fn_layer[] = {
+        1,              // Fn0
+        2,              // Fn1
+        2,              // Fn2
+    };
+
+    static const uint8_t PROGMEM fn_keycode[] = {
+        KC_NO,          // Fn0
+        KC_NO,          // Fn1
+        KC_SPC,         // Fn2
+    };
+
+
+## 6. Terminology
+***TBD***
+### keymap
+is comprised of multiple layers.
+### layer
+is matrix of keycodes.
+### key
+is physical button on keyboard or logical switch on software.
+### keycode
+is codes used on firmware.
+### action
+is a function assigned on a key.
+### layer transparency
+Using transparent keycode one layer can refer key definition on other lower layer.
+### layer precedence
+Top layer has higher precedence than lower layers.
+### tapping
+is to press and release a key quickly.
+### Fn key
+is key which executes a special action like layer switching, mouse key, macro or etc.
+### dual role key
+<http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys>
diff --git a/doc/other_projects.md b/doc/other_projects.md
new file mode 100644 (file)
index 0000000..bf980b0
--- /dev/null
@@ -0,0 +1,62 @@
+Other Keyboard Firmware Projects
+================================
+## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
+- <http://www.pjrc.com/teensy/usb_keyboard.html>
+- <http://www.pjrc.com/teensy/usb_mouse.html>
+
+## kbupgrade[USB][V-USB][AVR]
+- <http://github.com/rhomann/kbupgrade>
+- <http://geekhack.org/showwiki.php?title=Island:8406>
+
+## c64key[USB][V-USB][AVR]
+- <http://symlink.dk/projects/c64key/>
+
+## rump[USB][V-USB][AVR]
+- <http://mg8.org/rump/>
+- <http://github.com/clee/rump>
+
+## dulcimer[USB][V-USB][AVR]
+- <http://www.schatenseite.de/dulcimer.html>
+
+## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
+- <http://github.com/humblehacker>
+- <http://www.humblehacker.com/keyboard/>
+- <http://geekhack.org/showwiki.php?title=Island:6292>
+
+## ps2avr[PS/2][AVR]
+- <http://sourceforge.net/projects/ps2avr/>
+
+## ErgoDox[Ergo][Split][USB][AVR]
+- <http://geekhack.org/index.php?topic=22780.0>
+- <https://github.com/benblazak/ergodox-firmware>
+- <https://github.com/cub-uanic/tmk_keyboard>
+
+## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
+- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
+- <https://github.com/frobiac/adnw>
+
+## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
+- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
+- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
+- <http://deskthority.net/wiki/Phantom>
+
+## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
+- <http://forum.colemak.com/viewtopic.php?pid=10837>
+- <https://github.com/darkytoothpaste/keymapper>
+
+## USB-USB converter threads[converter][USB-USB]
+- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
+- <http://geekhack.org/index.php?topic=19458.0>
+
+## kbdbabel.org[converter][vintage][protocol][8051]
+Great resource of vintage keyboard protocol information and code
+
+- <http://www.kbdbabel.org/>
+
+## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
+A lots of vintage keyboard protocol supports
+
+- <http://gitorious.org/kiibohd-controller>
+
+## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
+- <https://github.com/chrisandreae/kinesis-firmware>
diff --git a/keyboard/atomic/flash-pcb.sh b/keyboard/atomic/flash-pcb.sh
deleted file mode 100755 (executable)
index 46abc69..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-dfu-programmer atmega32u4 erase --force
-dfu-programmer atmega32u4 flash atomic_pcb.hex
-dfu-programmer atmega32u4 reset
\ No newline at end of file
index 59130129cda7e20f5ce0bf9e314015b02c3928d5..78b825aaa2629794b0f055f23e2ffaa0c6d9e1ac 100644 (file)
@@ -15,7 +15,7 @@ This requires a little bit of familiarity with coding.
 
 1. Go to https://github.com/jackhumbert/qmk_firmware and read the Readme at the base of this repository, top to bottom. Then come back here :)
 2. Clone the repository (download it)
-3. Set up a build environment as per [the build guide](/BUILD_GUIDE.md) 
+3. Set up a build environment as per [the build guide](/doc/BUILD_GUIDE.md) 
     - Using a Mac and have homebrew? just run `brew tap osx-cross/avr && brew install avr-libc`
 4. Copy `keyboard/ergodox_ez/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`)
 5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work.
diff --git a/keyboard/planck/CYGWIN_GUIDE.md b/keyboard/planck/CYGWIN_GUIDE.md
deleted file mode 100755 (executable)
index ac13e74..0000000
+++ /dev/null
@@ -1,352 +0,0 @@
-#Planck Advanced (but not too advanced) `cygwin` Users Guide
-If you are a user of the [cygwin environment](https://cygwin.com) in Windows and want the freedom to use the latest tools available, then this is the guide for you. If compiling your own copy of the latest and greatest Gnu C Compiler makes you super happy, then this is the guide for you. If the command line make you smile, then this is the guide for you.
-
-This guide was written step by step as I went through the process on a `Windows 10` `x86_64` and a `Windows 7` `amd k10` based system.  This should be generally applicable to to any `Windows` environment with `cygwin`.
-
-#####Do not skip steps. Do not move past a step until the previous step finishes successfully.
-
-Based on [avr-libc installation guide](http://www.nongnu.org/avr-libc/user-manual/install_tools.html)
-
-##Get the Required Packages
-Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and install the default system plus the following if they are not already selected:
-- devel/git
-- devel/gcc-core
-- devel/gcc-g++
-- devel/flex
-- devel/bison
-- devel/make
-- devel/texinfo
-- devel/gettext-devel
-- devel/automake
-- devel/autoconfig
-- devel/libtool
-- text/gettext
-- libs/libgcc1
-- interpreters/m4
-- web/wget
-- archive/unzip
-
-The following sources will be required:
-- [gmp](https://gmplib.org/) (6.1.0)
-- [mpfr](http://www.mpfr.org/) (3.1.4)
-- [mpc](http://www.multiprecision.org/) (1.0.3) 
-- [binutils](https://www.sourceware.org/binutils/) (2.26)
-- [gcc](https://gcc.gnu.org/) (5.3.0)
-- [avr-libc](http://www.nongnu.org/avr-libc/) (2.0.0)
-
-The `dfu-programmer` will be required to flash the new firmware 
-- [dfu-programmer](https://dfu-programmer.github.io/) (0.7.2)
-
-The set of commands below will create a directory (`~/local/avr`) for the sources you compile to be installed on the machine and a directory (`~/src`) for these source files to be stored. The commands then download the sources of the needed packages and unpack them. Note: the expand commands are different depending on if the packages are offered as a `bz2` or `gz` archive
-```
-$ mkdir ~/local
-$ mkdir ~/local/avr
-$ mkdir ~/src
-$ cd ~/src
-$ wget https://gmplib.org/download/gmp/gmp-6.1.0.tar.bz2
-$ wget http://www.mpfr.org/mpfr-3.1.4/mpfr-3.1.4.tar.bz2
-$ wget ftp://ftp.gnu.org/gnu/mpc/mpc-1.0.3.tar.gz
-$ wget http://ftp.gnu.org/gnu/binutils/binutils-2.26.tar.gz
-$ wget http://mirror0.babylon.network/gcc/releases/gcc-5.3.0/gcc-5.3.0.tar.gz
-$ wget http://download.savannah.gnu.org/releases/avr-libc/avr-libc-2.0.0.tar.bz2
-$ tar -xjf gmp-6.1.0.tar.bz2
-$ tar -xjf mpfr-3.1.4.tar.bz2
-$ tar -zxf mpc-1.0.3.tar.gz
-$ tar -zxf binutils-2.26.tar.gz
-$ tar -zxf gcc-5.3.0.tar.gz
-$ tar -xjf avr-libc-2.0.0.tar.bz2 
-```
-
-##Setup the Build Environment
-These commands will set up the install directory and the `PATH` variable, which will allow you to access your installed packages.  Note: if you close the `cygwin` terminal window, you will need to rerun these commands, they are not permanent.
-```
-$ PREFIX=$HOME/local/avr
-$ export PREFIX
-$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
-$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib
-$ export PATH
-```
-
-##The `gcc` Required Math Library Packages
-The following packages are required to be complied and installed in order to compile `gcc`.  They are not sufficiently available through the `cygwin` package system, so we have to make them ourselves.  They must be complied in this order because each one depends on the previous. Verfiy that for each package, `make check` returns all passing and no fails.
-
-###Build and Install `gmp`
-```
-$ cd ~/src/gmp-6.1.0
-$ ./configure --enable-static --disable-shared
-$ make
-$ make check
-$ make install
-```
-
-###Build and Install `mpfr`
-```
-$ cd ~/src/mpfr-3.1.4
-$ ./configure --with-gmp-build=../gmp-6.1.0 --enable-static --disable-shared
-$ make
-$ make check
-$ make install
-```
-
-###Build and Install `mpc`
-```
-$ cd ~/src/mpc-1.0.3
-$ ./configure --with-gmp=/usr/local --with-mpfr=/usr/local --enable-static --disable-shared
-$ make
-$ make check
-$ make install
-```
-
-##OPTIONAL Part
-You can build and install a brand new `gcc` or you can use the one supplied by `cygwin`.  This will take about 4-5 hours to compile (It is a "native build", so it does the entire build **3 times**. This takes a long while).
-
-###Build and Install `gcc` for Your Machine  
-```
-$ cd ~/src/gcc-5.3.0
-$ mkdir obj-local
-$ cd obj-local
-$ ../configure --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared
-$ make
-$ make install
-```
-##End OPTIONAL Part
-
-###Build and Install `binutils` for Your Machine
-```
-$ cd ~/src/binutils-2.26
-$ mkdir obj-local
-$ cd obj-local
-$ ../configure
-$ make
-$ make install
-```
-
-##Buliding `binutils`, `gcc`, and `avr-libc` for the AVR system
-Now we can make the critical stuff for compiling our firmware: `binutils`, `gcc`, and `avr-libc` for the AVR architecture.  These allow us to build and manipulate the firmware for the keyboard.
-
-###Build `binutils` for AVR
-If you plan to build and install `avr-gdb` also, use the `gdb` install at the end of this guide as it also builds the `binutils`
-```
-$ cd ~/src/binutils-2.26
-$ mkdir obj-avr
-$ cd obj-avr
-$ ../configure --prefix=$PREFIX --target=avr --disable-nls
-$ make
-$ make install
-```
-
-###Build `gcc` for AVR
-```
-$ cd ~/src/gcc-5.3.0
-$ mkdir obj-avr
-$ cd obj-avr
-$ ../configure --prefix=$PREFIX --target=avr --enable-languages=c,c++ --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --enable-static --disable-shared --disable-nls --disable-libssp --with-dwarf2
-$ make
-$ make install
-```
-
-###Build `avr-libc` for AVR
-For building the `avr-libc`, we have to specify the host build system.  In my case it is `x86_64-unknown-cygwin`. You can look for build system type in the `gcc` configure notes for the proper `--build` specification to pass when you configure `avr-libc`.
-```
-$ cd ~/src/avr-libc-2.0.0
-$ ./configure --prefix=$PREFIX --build=x86_64-unknown-cygwin --host=avr
-$ make
-$ make install
-```
-
-##Building 'dfu-programmer' for flashing the firmware via USB and installing the drivers
-We can either build our own, or use the precomplied binaries.  The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves.  The procedure for the precompiled binaries is included at the end of this guide.
-
-### Build and Install the `libusb`
-The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system.
-```
-$ cd ~/src
-$ git clone https://github.com/libusb/libusb.git
-$ cd libusb
-$ ./bootstrap.sh
-$ ./configure
-$ make
-$ make install
-```
-
-### Build and Install the `dfu-programmer`
-```
-$ cd ~/src
-$ git clone https://github.com/dfu-programmer/dfu-programmer.git
-$ cd dfu-programmer
-$ ./bootstrap.sh
-$ ./configure
-$ make
-$ make install
-```
-
-Verify the installation with:
-```
-$ which dfu-programmer
-/usr/local/bin/dfu-programmer
-
-$ dfu-programmer
-dfu-programmer 0.7.2
-https://github.com/dfu-programmer/dfu-programmer
-Type 'dfu-programmer --help'    for a list of commands
-     'dfu-programmer --targets' to list supported target devices
-```
-If you are not getting the above result, you will not be able to flash the firmware! 
-
-###Install the USB drivers
-The drivers are included in the windows binary version of [`dfu-programmer` 0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip).
-```
-$ cd ~/src
-$ wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
-$ unzip dfu-programmer-win-0.7.2.zip -d dfu-programmer-win-0.7.2
-```
-
-or
-
-The official drivers are found in [Atmel's `FLIP` installer](http://www.atmel.com/images/Flip%20Installer%20-%203.4.7.112.exe). Download and then install `FLIP`. Upon installation, the drivers will be found in `C:\Program Files (x86)\Atmel\Flip 3.4.7\usb`.
-
-Then, from an **administrator-privileged** `Windows` terminal, run the following command (adjust the path for username, etc. as necessary) and accept the prompt that pops up:
-```
-C:\> pnputil -i -a C:\cygwin64\home\Kevin\src\dfu-programmer-win-0.7.2\dfu-prog-usb-1.2.2\atmel_usb_dfu.inf
-or
-C:\> pnputil -i -a "C:\Program Files (x86)\Atmel\Flip 3.4.7\usb\atmel_usb_dfu.inf"
-```
-
-This should be the result:
-```
-Microsoft PnP Utility
-
-Processing inf :            atmel_usb_dfu.inf
-Successfully installed the driver on a device on the system.
-Driver package added successfully.
-Published name :            oem104.inf
-
-
-Total attempted:              1
-Number successfully imported: 1
-```
-
-Alternatively, the `Windows` driver can be installed when prompted by `Windows` when the keyboard is attached. Do not let `Windows` search for a driver; specify the path to search for a driver and point it to the `atmel_usb_dfu.inf` file.
-
-##Building and Flashing the Planck firmware!
-If you did everything else right. This part should be a snap! Grab the latest sources from `github`, make the Plank firmware, then flash it.
-
-###Build Planck and Load the Firmware
-```
-$ cd ~/src
-$ git clone https://github.com/jackhumbert/qmk_firmware.git
-$ cd qmk_firmware/keyboard/planck
-$ make
-```
-
-Make sure there are no errors.  You should end up with this or something similar:
-```
-Creating load file for Flash: planck.hex
-avr-objcopy -O ihex -R .eeprom -R .fuse -R .lock -R .signature planck.elf planck.hex
-
-Creating load file for EEPROM: planck.eep
-avr-objcopy -j .eeprom --set-section-flags=.eeprom="alloc,load" \
---change-section-lma .eeprom=0 --no-change-warnings -O ihex planck.elf planck.eep || exit 0
-
-Creating Extended Listing: planck.lss
-avr-objdump -h -S -z planck.elf > planck.lss
-
-Creating Symbol Table: planck.sym
-avr-nm -n planck.elf > planck.sym
-
-Size after:
-   text    data     bss     dec     hex filename
-  18602      82     155   18839    4997 planck.elf
-
--------- end --------
-```
-
-If you do not get the above, you **did not** build the firmware, and you will have nothing to flash.  If you have the fresh clone from `github`, it was probably something gone wrong in this install process, go check and see what didn't work and threw errors or what steps you might have missed.
-
-But if everything went OK, you are ready to flash! Press the reset button on the bottom of the Planck, wait two seconds, then:
-```
-$ make dfu
-```
-.
-.
-.
-profit!!!
-
-
-
-
-
-##extra bits...
-
-###Installing Precompiled `dfu-programmer` Binaries (not recommended for `cygwin`)
-To install the `dfu-programmer` from the binaries, we must get if from [the `dfu-programmer` website](https://dfu-programmer.github.io/) ([0.7.2](http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip)).
-
-Copy this file into your `cygwin` home\src directory.  (For me, it is `C:\cygwin64\home\Kevin\src`), extract the files, move `dfu-programmer.exe` to `~/local/avr/bin`. Most obnoxiously, the `libusb0_x86.dll` and `libusb0.sys` need to be moved from  `./dfu-prog-usb-1.2.2/x86/` to a directory in the `Windows` `PATH` and the `cygwin` `PATH`. This is because the `dfu-programmer` binary is `mingw` based, not `cygwin` based, so the `dlls` do not cooperate. I achieved acceptable pathing by moving the files to  `C:\cygwin64\home\Kevin\local\avr\bin` Then, in a `WINDOWS` command prompt running (Adjusting your path for username, etc. as needed):
-```
-C:\> set PATH=%PATH%;C:\cygwin64\home\Kevin\local\avr\bin
-```
-
-Then, rename `libusb0_x86.dll` to `libusb0.dll`.
-You can tell that you were successful by trying to execute 'dfu-programmer' from the 'cygwin' prompt:
-```
-$ which dfu-programmer
-/home/Kevin/local/avr/bin/dfu-programmer
-
-$ dfu-programmer
-dfu-programmer 0.7.2
-https://github.com/dfu-programmer/dfu-programmer
-Type 'dfu-programmer --help'    for a list of commands
-     'dfu-programmer --targets' to list supported target devices
-```
-
-If you are not getting the above result, you will not be able to flash the firmware! 
-- Try making sure your `PATH` variables are set correctly for both `Windows` and `cygwin`. 
-- Make sure the `dll` is named correctly.
-- Do not extract it with `cygwin`'s `unzip` as it does not set the executable permission. If you did it anyway, do `chmod +x dfu-programmer.exe`.
-- Still have problems? Try building it instead.
-
-
-##Debugging Tools
-
-These tools are for debugging your firmware, etc. before flashing. Theoretically, it can save your memory from wearing out. However, these tool do not work 100% for the Planck firmware.
-
-### `gdb` for AVR
-`gdb` has a simulator for AVR but it does not support all instructions (like WDT), so it immediately crashes when running the Planck firmware (because `lufa.c` disables the WDT in the first few lines of execution). But it can still be useful in debugging example code and test cases, if you know how to use it.
-
-```
-$ cd ~/src
-$ git clone git://sourceware.org/git/binutils-gdb.git
-$ cd binutils-gdb
-$ mkdir obj-avr
-$ cd obj-avr
-$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static
-$ make
-$ make install
-```
-
-### `simulavr`
-`simulavr` is an AVR simulator.  It runs the complied AVR elfs. `simulavr` does not support the `atmega32u4` device... it does `atmega32` but that is not good enough for the firmware (no PORTE and other things), so you cannot run the Planck firmware. I use it to simulate ideas I have for features in separate test projects.
-
-This one is a major pain in the butt because it has a lot of dependencies and it is buggy.  I will do my best to explain it but... it was hard to figure out. A few things need to be changed in the 'Makefile' to make it work in `cygwin`.
-
-
-```
-$ cd ~/src
-$ git clone https://github.com/Traumflug/simulavr.git
-$ cd simulavr
-$ ./bootstrap
-$ ./configure --prefix=$PREFIX --enable-static --disable-tcl --disable-doxygen-doc
-```
- Edit `src/Makefile.am` now so that `-no-undefined` is included (I did this by removing the SYS_MINGW conditional surrounding `libsim_la_LDFLAGS += -no-undefined` and  `libsimulavr_la_LDFLAGS += -no-undefined \ libsimulavr_la_LIBADD += $(TCL_LIB)`. Also, `$(EXEEXT)` is added after `kbdgentables` in two places.
-
-```
-$ make
-$ make install
-```
-
-
-TODO:
-- git repos for all sources
-- command line magic for cygwin setup
-- better options for `dfu-drivers`
diff --git a/keyboard/planck/PCB_GUIDE.md b/keyboard/planck/PCB_GUIDE.md
deleted file mode 100644 (file)
index b36d8fb..0000000
+++ /dev/null
@@ -1,151 +0,0 @@
-# Planck Firmware Guide
-
-## Setting up the environment
-
-### Windows
-1. Install [MHV AVR Tools](https://infernoembedded.com/sites/default/files/project/MHV_AVR_Tools_20131101.exe). Disable smatch, but **be sure to leave the option to add the tools to the PATH checked**.
-2. Install [MinGW](https://sourceforge.net/projects/mingw/files/Installer/mingw-get-setup.exe/download). During installation, uncheck the option to install a graphical user interface. **DO NOT change the default installation folder.** The scripts depend on the default location.
-3. Clone this repository. [This link will download it as a zip file, which you'll need to extract.](https://github.com/jackhumbert/qmk_firmware/archive/master.zip) Open the extracted folder in Windows Explorer.
-4. Right-click on the 1-setup-path-win batch script, select "Run as administrator", and accept the User Account Control prompt. Press the spacebar to dismiss the success message in the command prompt that pops up.
-5. Right-click on the 2-setup-environment-win batch script, select "Run as administrator", and accept the User Account Control prompt. This part may take a couple of minutes, and you'll need to approve a driver installation, but once it finishes, your environment is complete!
-
-
-### Mac
-
-If you're using homebrew, you can use the following commands:
-
-    brew tap osx-cross/avr
-    brew install avr-libc
-    brew install dfu-programmer
-
-Otherwise, these instructions will work:
-
-1. Install Xcode from the App Store.
-2. Install the Command Line Tools from `Xcode->Preferences->Downloads`.
-3. Install [DFU-Programmer][dfu-prog].
-
-### Linux
-1. Install AVR GCC with your favorite package manager.
-2. Install [DFU-Programmer][dfu-prog].
-
-Note that, since it will be directly accessing USB hardware, the
-`dfu-programmer` program needs to be run as root.
-
-## Verify Your Installation
-1. Clone the following repository: https://github.com/jackhumbert/qmk_firmware
-2. Open a Terminal and `cd` into `qmk_firmware/keyboard/planck`
-3. Run `make`. This should output a lot of information about the build process.
-
-## Using the built-in functions
-
-Here is a list of some of the functions available from the command line:
-
-* `make clean`: clean the environment - may be required in-between builds
-* `make`: compile the code
-* `make KEYMAP=<keymap>`: compile with the extended keymap file `extended_keymaps/extended_keymap_<keymap>.c`
-* `make dfu`: build and flash the layout to the PCB
-* `make dfu-force`: build and force-flash the layout to the PCB (may be require for first flash)
-
-Generally, the instructions to flash the PCB are as follows:
-
-1. Make changes to the appropriate keymap file
-2. Save the file
-3. `make clean`
-4. Press the reset button on the PCB/press the key with the `RESET` keycode
-5. `make <arguments> dfu` - use the necessary `KEYMAP=<keymap>` and/or `COMMON=true` arguments here.
-
-## Troubleshooting
-If you see something like this
-
-          0 [main] sh 13384 sync_with_child: child 9716(0x178) died before initialization with status code 0xC0000142
-        440 [main] sh 13384 sync_with_child: *** child state waiting for longjmp
-    /usr/bin/sh: fork: Resource temporarily unavailable
-
-after running 'make' on Windows than you are encountering a very popular issue with WinAVR on Windows 8.1 and 10.
-You can easily fix this problem by replacing msys-1.0.dll in WinAVR/utils/bin with [this one](http://www.madwizard.org/download/electronics/msys-1.0-vista64.zip).
-Restart your system and everything should work fine!
-
-
-If you see this
-
-    dfu-programmer atmega32u4 erase
-    process_begin: CreateProcess(NULL, dfu-programmer atmega32u4 erase, ...) failed.
-    make (e=2): The system cannot find the file specified.
-    make: *** [dfu] Error 2
-
-when trying to 'make dfu' on Windows you need to copy the dfu-programmer.exe to qmk_firmware/keyboard/planck.
-
-
-## Quantum MK Firmware
-
-### Keymap
-
-Unlike the other keymaps, prefixing the keycodes with `KC_` is required. A full list of the keycodes is available [here](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keycode.txt). For the keycodes available only in the extended keymap, see this [header file](https://github.com/jackhumbert/qmk_firmware/blob/master/quantum/keymap_common.h).
-
-You can use modifiers with keycodes like this:
-
-    LCTL(KC_C)
-    
-Which will generate Ctrl+c. These are daisy-chainable, meaning you can do things like:
-
-    LCTL(LALT(KC_C))
-    
-That will generate Ctrl+Alt+c. The entire list of these functions is here:
-
-* `LCTL()`: Left control
-* `LSFT()` / `S()`: Left shift
-* `LALT()`: Left alt/opt
-* `LGUI()`: Left win/cmd
-* `RCTL()`: Right control
-* `RSFT()`: Right shift
-* `RALT()`: Right alt/opt
-* `RGUI()`: Right win/cmd
-
-`S(KC_1)`-like entries are useful in writing keymaps for the Planck.
-
-### Other keycodes
-
-A number of other keycodes have been added that you may find useful:
-
-* `CM_<key>`: the Colemak equivalent of a key (in place of `KC_<key>`), when using Colemak in software (`CM_O` generates `KC_SCLN`)
-* `RESET`: jump to bootloader for flashing (same as press the reset button)
-* `BL_STEP`: step through the backlight brightnesses
-* `BL_<0-15>`: set backlight brightness to 0-15
-* `BL_DEC`: lower the backlight brightness
-* `BL_INC`: raise the backlight brightness
-* `BL_TOGG`: toggle the backlight on/off
-
-### Function layers
-
-The extended keymap extends the number of function layers from 32 to the near-infinite value of 256. Rather than using `FN<num>` notation (still available, but limited to `FN0`-`FN31`), you can use the `FUNC(<num>)` notation. `F(<num>)` is a shortcut for this.
-
-The function actions are unchanged, and you can see the full list of them [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/common/action_code.h). They are explained in detail [here](https://github.com/jackhumbert/tmk_keyboard/blob/master/doc/keymap.md#2-action).
-
-### Macros
-
-Macros have been setup in the `keymaps/keymap_default.c` file so that you can use `M(<num>)` to access a macro in the `action_get_macro` section on your keymap. The switch/case structure you see here is required, and is setup for `M(0)` - you'll need to copy and paste the code to look like this (e.g. to support `M(3)`):
-
-    switch(id) {
-      case 0:
-        return MACRODOWN(TYPE(KC_A), END);
-        break;
-      case 1:
-        return MACRODOWN(TYPE(KC_B), END);
-        break;
-      case 2:
-        return MACRODOWN(TYPE(KC_C), END);
-        break;
-      case 3:
-        return MACRODOWN(TYPE(KC_D), END);
-        break;
-    } 
-    return MACRO_NONE;
-
-`MACRODOWN()` is a shortcut for `(record->event.pressed ? MACRO(__VA_ARGS__) : MACRO_NONE)` which tells the macro to execute when the key is pressed. Without this, the macro will be executed on both the down and up stroke.
-
-[cygwin]:       https://www.cygwin.com/
-[mingw]:        http://www.mingw.org/
-[mhv]:          https://infernoembedded.com/products/avr-tools
-[winavr]:       http://winavr.sourceforge.net/
-[crosspack]:    http://www.obdev.at/products/crosspack/index.html
-[dfu-prog]:     http://dfu-programmer.sourceforge.net/
diff --git a/keyboard/planck/flash-pcb.sh b/keyboard/planck/flash-pcb.sh
deleted file mode 100755 (executable)
index 2ae1545..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-dfu-programmer atmega32u4 erase --force
-dfu-programmer atmega32u4 flash planck_pcb.hex
-dfu-programmer atmega32u4 reset
\ No newline at end of file
diff --git a/keyboard/preonic/flash-pcb.sh b/keyboard/preonic/flash-pcb.sh
deleted file mode 100755 (executable)
index 8b59b83..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-dfu-programmer atmega32u4 erase --force
-dfu-programmer atmega32u4 flash preonic_pcb.hex
-dfu-programmer atmega32u4 reset
\ No newline at end of file
diff --git a/new_project.sh b/new_project.sh
deleted file mode 100755 (executable)
index 7def543..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/bin/sh
-# Script to make a new quantum project
-# Jack Humbert 2015
-
-if [ -z "$1" ]; then
-       echo "Usage: $0 <keyboard_name>"
-       exit 1
-fi
-
-KEYBOARD=$1
-KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
-
-mkdir keyboard/$1
-mkdir keyboard/$1/keymaps
-sed -e "s;%KEYBOARD%;$KEYBOARD;g" -e "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" quantum/template/template.h > keyboard/$KEYBOARD/$KEYBOARD.h
-sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/template.c > keyboard/$KEYBOARD/$KEYBOARD.c
-sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/config.h > keyboard/$KEYBOARD/config.h
-sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/README.md > keyboard/$KEYBOARD/README.md
-sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/Makefile > keyboard/$KEYBOARD/Makefile
-sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default.c > keyboard/$KEYBOARD/keymaps/default.c
-
-echo "######################################################"
-echo "# keyboard/$KEYBOARD project created. To start"
-echo "# working on things, use the following command:"
-echo "# cd keyboard/$KEYBOARD"
-echo "######################################################"
diff --git a/tmk_core/doc/COPYING.GPLv2 b/tmk_core/doc/COPYING.GPLv2
deleted file mode 100644 (file)
index d159169..0000000
+++ /dev/null
@@ -1,339 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-                            NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    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, write to the Free Software Foundation, Inc.,
-    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
diff --git a/tmk_core/doc/COPYING.GPLv3 b/tmk_core/doc/COPYING.GPLv3
deleted file mode 100644 (file)
index 94a9ed0..0000000
+++ /dev/null
@@ -1,674 +0,0 @@
-                    GNU GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-                            Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.  We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors.  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
-  To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights.  Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received.  You must make sure that they, too, receive
-or can get the source code.  And you must show them these terms so they
-know their rights.
-
-  Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
-  For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software.  For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
-  Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so.  This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software.  The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable.  Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products.  If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
-  Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary.  To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-                       TERMS AND CONDITIONS
-
-  0. Definitions.
-
-  "This License" refers to version 3 of the GNU General Public License.
-
-  "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
-  "The Program" refers to any copyrightable work licensed under this
-License.  Each licensee is addressed as "you".  "Licensees" and
-"recipients" may be individuals or organizations.
-
-  To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy.  The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
-  A "covered work" means either the unmodified Program or a work based
-on the Program.
-
-  To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy.  Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
-  To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies.  Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
-  An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License.  If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
-  1. Source Code.
-
-  The "source code" for a work means the preferred form of the work
-for making modifications to it.  "Object code" means any non-source
-form of a work.
-
-  A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
-  The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form.  A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
-  The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities.  However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work.  For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
-  The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
-  The Corresponding Source for a work in source code form is that
-same work.
-
-  2. Basic Permissions.
-
-  All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met.  This License explicitly affirms your unlimited
-permission to run the unmodified Program.  The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work.  This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
-  You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force.  You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright.  Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
-  Conveying under any other circumstances is permitted solely under
-the conditions stated below.  Sublicensing is not allowed; section 10
-makes it unnecessary.
-
-  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
-  No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
-  When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
-  4. Conveying Verbatim Copies.
-
-  You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
-  You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
-  5. Conveying Modified Source Versions.
-
-  You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
-    a) The work must carry prominent notices stating that you modified
-    it, and giving a relevant date.
-
-    b) The work must carry prominent notices stating that it is
-    released under this License and any conditions added under section
-    7.  This requirement modifies the requirement in section 4 to
-    "keep intact all notices".
-
-    c) You must license the entire work, as a whole, under this
-    License to anyone who comes into possession of a copy.  This
-    License will therefore apply, along with any applicable section 7
-    additional terms, to the whole of the work, and all its parts,
-    regardless of how they are packaged.  This License gives no
-    permission to license the work in any other way, but it does not
-    invalidate such permission if you have separately received it.
-
-    d) If the work has interactive user interfaces, each must display
-    Appropriate Legal Notices; however, if the Program has interactive
-    interfaces that do not display Appropriate Legal Notices, your
-    work need not make them do so.
-
-  A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit.  Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
-  6. Conveying Non-Source Forms.
-
-  You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
-    a) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by the
-    Corresponding Source fixed on a durable physical medium
-    customarily used for software interchange.
-
-    b) Convey the object code in, or embodied in, a physical product
-    (including a physical distribution medium), accompanied by a
-    written offer, valid for at least three years and valid for as
-    long as you offer spare parts or customer support for that product
-    model, to give anyone who possesses the object code either (1) a
-    copy of the Corresponding Source for all the software in the
-    product that is covered by this License, on a durable physical
-    medium customarily used for software interchange, for a price no
-    more than your reasonable cost of physically performing this
-    conveying of source, or (2) access to copy the
-    Corresponding Source from a network server at no charge.
-
-    c) Convey individual copies of the object code with a copy of the
-    written offer to provide the Corresponding Source.  This
-    alternative is allowed only occasionally and noncommercially, and
-    only if you received the object code with such an offer, in accord
-    with subsection 6b.
-
-    d) Convey the object code by offering access from a designated
-    place (gratis or for a charge), and offer equivalent access to the
-    Corresponding Source in the same way through the same place at no
-    further charge.  You need not require recipients to copy the
-    Corresponding Source along with the object code.  If the place to
-    copy the object code is a network server, the Corresponding Source
-    may be on a different server (operated by you or a third party)
-    that supports equivalent copying facilities, provided you maintain
-    clear directions next to the object code saying where to find the
-    Corresponding Source.  Regardless of what server hosts the
-    Corresponding Source, you remain obligated to ensure that it is
-    available for as long as needed to satisfy these requirements.
-
-    e) Convey the object code using peer-to-peer transmission, provided
-    you inform other peers where the object code and Corresponding
-    Source of the work are being offered to the general public at no
-    charge under subsection 6d.
-
-  A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
-  A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling.  In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage.  For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product.  A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
-  "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source.  The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
-  If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information.  But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
-  The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed.  Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
-  Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
-  7. Additional Terms.
-
-  "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law.  If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
-  When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it.  (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.)  You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
-  Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
-    a) Disclaiming warranty or limiting liability differently from the
-    terms of sections 15 and 16 of this License; or
-
-    b) Requiring preservation of specified reasonable legal notices or
-    author attributions in that material or in the Appropriate Legal
-    Notices displayed by works containing it; or
-
-    c) Prohibiting misrepresentation of the origin of that material, or
-    requiring that modified versions of such material be marked in
-    reasonable ways as different from the original version; or
-
-    d) Limiting the use for publicity purposes of names of licensors or
-    authors of the material; or
-
-    e) Declining to grant rights under trademark law for use of some
-    trade names, trademarks, or service marks; or
-
-    f) Requiring indemnification of licensors and authors of that
-    material by anyone who conveys the material (or modified versions of
-    it) with contractual assumptions of liability to the recipient, for
-    any liability that these contractual assumptions directly impose on
-    those licensors and authors.
-
-  All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10.  If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term.  If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
-  If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
-  Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
-  8. Termination.
-
-  You may not propagate or modify a covered work except as expressly
-provided under this License.  Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
-  However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
-  Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
-  Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License.  If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
-  9. Acceptance Not Required for Having Copies.
-
-  You are not required to accept this License in order to receive or
-run a copy of the Program.  Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance.  However,
-nothing other than this License grants you permission to propagate or
-modify any covered work.  These actions infringe copyright if you do
-not accept this License.  Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
-  10. Automatic Licensing of Downstream Recipients.
-
-  Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License.  You are not responsible
-for enforcing compliance by third parties with this License.
-
-  An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations.  If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
-  You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License.  For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
-  11. Patents.
-
-  A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based.  The
-work thus licensed is called the contributor's "contributor version".
-
-  A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version.  For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
-  Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
-  In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement).  To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
-  If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients.  "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
-  If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
-  A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License.  You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
-  Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
-  12. No Surrender of Others' Freedom.
-
-  If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all.  For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
-  13. Use with the GNU Affero General Public License.
-
-  Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work.  The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
-  14. Revised Versions of this License.
-
-  The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-  Each version is given a distinguishing version number.  If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation.  If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
-  If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
-  Later license versions may give you additional or different
-permissions.  However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
-  15. Disclaimer of Warranty.
-
-  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. Limitation of Liability.
-
-  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
-  17. Interpretation of Sections 15 and 16.
-
-  If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
-                     END OF TERMS AND CONDITIONS
-
-            How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    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 3 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/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
-  If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
-    <program>  Copyright (C) <year>  <name of author>
-    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
-  You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
-  The GNU General Public License does not permit incorporating your program
-into proprietary programs.  If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library.  If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.  But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/tmk_core/doc/FUSE.txt b/tmk_core/doc/FUSE.txt
deleted file mode 100644 (file)
index 40055e5..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-ATMega168P Fuse/Lock Bits
-=========================
-This configuration is from usbasploader's Makefile.
-
-    HFUSE   0xD6
-    LFUSE   0xDF
-    EFUSE   0x00
-    LOCK    0x3F(intact)
-
-#---------------------------------------------------------------------
-# ATMega168P
-#---------------------------------------------------------------------
-# Fuse extended byte:
-# 0x00 = 0 0 0 0   0 0 0 0 <-- BOOTRST (boot reset vector at 0x1800)
-#                    \+/
-#                     +------- BOOTSZ (00 = 2k bytes)
-# Fuse high byte:
-# 0xd6 = 1 1 0 1   0 1 1 0
-#        ^ ^ ^ ^   ^ \-+-/
-#        | | | |   |   +------ BODLEVEL 0..2 (110 = 1.8 V)
-#        | | | |   + --------- EESAVE (preserve EEPROM over chip erase)
-#        | | | +-------------- WDTON (if 0: watchdog always on)
-#        | | +---------------- SPIEN (allow serial programming)
-#        | +------------------ DWEN (debug wire enable)
-#        +-------------------- RSTDISBL (reset pin is enabled)
-# Fuse low byte:
-# 0xdf = 1 1 0 1   1 1 1 1
-#        ^ ^ \ /   \--+--/
-#        | |  |       +------- CKSEL 3..0 (external >8M crystal)
-#        | |  +--------------- SUT 1..0 (crystal osc, BOD enabled)
-#        | +------------------ CKOUT (if 0: Clock output enabled)
-#        +-------------------- CKDIV8 (if 0: divide by 8)
-
-
-# Lock Bits
-# 0x3f = - - 1 1   1 1 1 1
-#            \ /   \-/ \-/
-#             |     |   +----- LB 2..1 (No memory lock features enabled)
-#             |     +--------- BLB0 2..1 (No restrictions for SPM or LPM accessing the Application section)
-#             +--------------- BLB1 2..1 (No restrictions for SPM or LPM accessing the Boot Loader section)
diff --git a/tmk_core/doc/POWER.txt b/tmk_core/doc/POWER.txt
deleted file mode 100644 (file)
index 0abbbe4..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Time to Sleep
-=============
-USB suspend     no activity on USB line for  3ms
-No Interaction  no user interaction
-    matrix has no change
-    matrix has no switch on
-
-
-AVR Power Management
-====================
-
-V-USB suspend
-    USB suspend
-    http://vusb.wikidot.com/examples
-
-MCUSR   MCU Status Register
-    WDRF    Watchdog Reset Flag
-    BORF
-    EXTRF
-    PORF    Power-on Reset Flag
-
-SMCR    Sleep Mode Control Register
-    SE      Sleep Enable
-    SM2:0   
-        #define set_sleep_mode(mode) \
-        #define SLEEP_MODE_IDLE         (0)
-        #define SLEEP_MODE_ADC          _BV(SM0)
-        #define SLEEP_MODE_PWR_DOWN     _BV(SM1)
-        #define SLEEP_MODE_PWR_SAVE     (_BV(SM0) | _BV(SM1))
-        #define SLEEP_MODE_STANDBY      (_BV(SM1) | _BV(SM2))
-        #define SLEEP_MODE_EXT_STANDBY  (_BV(SM0) | _BV(SM1) | _BV(SM2))
-
-
-ACSR    Analog Comparator Control and Status Register
-    To disable Analog Comparator
-    ACSR = 0x80;
-    or
-    ACSR &= ~_BV(ACIE);
-    ACSR |= _BV(ACD);
-
-    ACD: Analog Comparator Disable
-        When this bit is written logic one, the power to the Analog Comparator is
-        switched off. This bit can be set at any time to turn off the Analog
-        Comparator. This will reduce power consumption in Active and Idle mode.
-        When changing the ACD bit, the Analog Comparator Interrupt must be disabled
-        by clearing the ACIE bit in ACSR. Otherwise an interrupt can occur when
-        the bit is changed.
-
-DIDR1   Digital Input Disable Register 1
-    AIN1D
-    AIN0D
-        When this bit is written logic one, the digital input buffer on the AIN1/0 pin is disabled. The corresponding PIN Register bit will always read as zero when this bit is set. When an analog signal is applied to the AIN1/0 pin and the digital input from this pin is not needed, this bit should be written logic one to reduce power consumption in the digital input buffer.
-
-
-PRR     Power Reduction Register
-    PRTWI
-    PRTIM2
-    PRTIM0
-    PRTIM1
-    PRSPI
-    PRUSART0
-    PRADC
diff --git a/tmk_core/doc/USB_NKRO.txt b/tmk_core/doc/USB_NKRO.txt
deleted file mode 100644 (file)
index d9f1d12..0000000
+++ /dev/null
@@ -1,160 +0,0 @@
-USB NKRO MEMO
-=============
-2010/12/09
-
-
-References
-----------
-USB - boot mode, NKRO, compatibility, etc...
-    http://geekhack.org/showthread.php?t=13162
-NKey Rollover - Overview, Testing Methodology, and Results
-    http://geekhack.org/showwiki.php?title=NKey+Rollover+-+Overview+Testing+Methodology+and+Results
-dfj's NKRO(2010/06)
-    http://geekhack.org/showpost.php?p=191195&postcount=251
-    http://geekhack.org/showthread.php?p=204389#post204389
-
-
-Terminology
----------
-NKRO
-ghost
-matrix
-mechanical with diodes
-membrane
-
-
-OS Support Status
------------------
-USB NKRO is possible *without* a custom driver.
-At least following OS's supports.
-    Windows7 64bit
-    WindowsXP
-    Windows2000 SP4
-    Ubuntu10.4(Linux 2.6)
-    MacOSX(To be tested)
-
-
-Custom Driver for USB NKRO
---------------------------
-NOT NEEDED
-at least when using following report formats on Windows, Linux or MacOSX.
-
-
-USB NKRO methods
-----------------
-1. Virtual keyboards
-    Keyboard can increase its KRO by using virtual keyboards with Standard or Extended report.
-    If the keyboard has 2 virtual keyboard with Standard report(6KRO), it gets 12KRO.
-    Using this method means the keyboard is a composite device.
-
-2. Extended report
-    It needs large report size for this method to achieve NKRO.
-    If a keyboard has 101keys, it needs 103byte report. It seems to be inefficient.
-
-3. Bitmap report
-    If the keyboard has less than 128keys, 16byte report will be enough for NKRO.
-    The 16byte report seems to be reasonable cost to get NKRO.
-
-
-Report Format
--------------
-Other report formats than followings are possible, though these format are typical one.
-
-1. Standard             8bytes
-    modifiers(bitmap)       1byte
-    reserved                1byte(not used)
-    keys(array)             1byte*6
-Standard report can send 6keys plus 8modifiers simultaneously.
-Standard report is used by most keyboards in the marketplace.
-Standard report is identical to boot protocol report.
-Standard report is hard to suffer from compatibility problems.
-
-2. Extended standard    16,32,64bytes
-    modifiers(bitmap)       1byte
-    reserved                1byte(not used)
-    keys(array)             1byte*(14,32,62)
-Extended report can send N-keys by using N+2bytes.
-Extended report is expected to be compatible with boot protocol.
-
-3. Bitmap               16,32,64bytes
-    keys(bitmap)            (16,32)bytes
-Bitmap report can send at most 128keys by 16bytes and 256keys by 32bytes.
-Bitmap report can achieve USB NKRO efficiently in terms of report size.
-Bitmap report needs a deliberation for boot protocol implementation.
-Bitmap report descriptor sample:
-        0x05, 0x01,                     // Usage Page (Generic Desktop),
-        0x09, 0x06,                     // Usage (Keyboard),
-        0xA1, 0x01,                     // Collection (Application),
-        // bitmap of modifiers
-        0x75, 0x01,                     //   Report Size (1),
-        0x95, 0x08,                     //   Report Count (8),
-        0x05, 0x07,                     //   Usage Page (Key Codes),
-        0x19, 0xE0,                     //   Usage Minimum (224),
-        0x29, 0xE7,                     //   Usage Maximum (231),
-        0x15, 0x00,                     //   Logical Minimum (0),
-        0x25, 0x01,                     //   Logical Maximum (1),
-        0x81, 0x02,                     //   Input (Data, Variable, Absolute), ;Modifier byte
-        // LED output report
-        0x95, 0x05,                     //   Report Count (5),
-        0x75, 0x01,                     //   Report Size (1),
-        0x05, 0x08,                     //   Usage Page (LEDs),
-        0x19, 0x01,                     //   Usage Minimum (1),
-        0x29, 0x05,                     //   Usage Maximum (5),
-        0x91, 0x02,                     //   Output (Data, Variable, Absolute),
-        0x95, 0x01,                     //   Report Count (1),
-        0x75, 0x03,                     //   Report Size (3),
-        0x91, 0x03,                     //   Output (Constant),
-        // bitmap of keys
-        0x95, (REPORT_BYTES-1)*8,      //   Report Count (),
-        0x75, 0x01,                     //   Report Size (1),
-        0x15, 0x00,                     //   Logical Minimum (0),
-        0x25, 0x01,                     //   Logical Maximum(1),
-        0x05, 0x07,                     //   Usage Page (Key Codes),
-        0x19, 0x00,                     //   Usage Minimum (0),
-        0x29, (REPORT_BYTES-1)*8-1,    //   Usage Maximum (),
-        0x81, 0x02,                     //   Input (Data, Variable, Absolute),
-        0xc0                            // End Collection
-where REPORT_BYTES is a report size in bytes.
-
-
-Considerations
---------------
-Compatibility
-    boot protocol
-    minor/old system
-        Some BIOS doesn't send SET_PROTOCOL request, a keyboard can't switch to boot protocol mode.
-        This may cause a problem on a keyboard which uses other report than Standard.
-Reactivity
-    USB polling time
-    OS/Driver processing time
-
-
-Windows Problem
----------------
-1. Windows accepts only 6keys  in case of Standard report.
-        It should be able to send 6keys plus 8modifiers.
-2. Windows accepts only 10keys in case of 16bytes Extended report.
-        It should be able to send 14keys plus 8modifiers.
-3. Windows accepts only 18keys in case of 32bytes Extended report.
-        It should be able to send 30keys plus 8modifiers.
-If keys are pressed in excess of the number, wrong keys are registered on Windows.
-
-This problem will be reportedly fixed soon.(2010/12/05)
-    http://forums.anandtech.com/showpost.php?p=30873364&postcount=17
-
-
-Tools for testing NKRO
-----------------------
-Browser App:
-http://www.microsoft.com/appliedsciences/content/projects/KeyboardGhostingDemo.aspx
-http://random.xem.us/rollover.html
-
-Windows:
-AquaKeyTest.exe http://geekhack.org/showthread.php?t=6643
-
-Linux:
-xkeycaps
-xev
-showkeys
-
-EOF
diff --git a/tmk_core/doc/build.md b/tmk_core/doc/build.md
deleted file mode 100644 (file)
index 2846f1d..0000000
+++ /dev/null
@@ -1,186 +0,0 @@
-Build Firmware and Program Controller
-=====================================
-
-
-Download and Install
---------------------
-### 1. Install Tools
-
-1. **Toolchain** On Windows install [MHV AVR Tools][mhv] for AVR GCC compiler and [Cygwin][cygwin](or [MinGW][mingw]) for shell terminal. On Mac you can use [CrossPack][crosspack]. On Linux you can install AVR GCC (and avr-libc) with your favorite package manager or run the avr_setup.sh script in the root of this repository.
-
-2. **Programmer** On Windows install [Atmel FLIP][flip]. On Mac and Linux install [dfu-programmer][dfu-prog].
-
-3. **Driver** On Windows you start DFU bootloader on the chip first time you will see 'Found New Hardware Wizard' to install driver. If you install device driver properly you can find chip name like 'ATmega32U4' under 'LibUSB-Win32 Devices' tree on 'Device Manager'. If not you shall need to update its driver on 'Device Manager'. You will find the driver in `FLIP` install directory like: C:\Program Files (x86)\Atmel\Flip 3.4.5\usb\. In case of `dfu-programmer` use its driver.
-
-If you use PJRC Teensy you don't need step 2 and 3 above, just get [Teensy loader][teensy-loader].
-
-
-### 2. Download source
-You can find firmware source at github:
-
-- <https://github.com/tmk/tmk_keyboard>
-
-If you are familiar with `Git` tools you are recommended to use it but you can also download zip archive from:
-
-- <https://github.com/tmk/tmk_keyboard/archive/master.zip>
-
-
-Build firmware
---------------
-### 1. Open terminal
-Open terminal window to get access to commands. Use Cygwin(or MingGW) `shell terminal` in Windows or `Terminal.app` on Mac OSX. In Windows press `Windows` key and `R` then enter `cmd` in 'Run command' dialog showing up.
-
-### 2. Change directory
-Move to project directory in the firmware source.
-
-    cd tmk_keyboard/{'keyboard' or 'converter'}/<project>
-
-### 3. Make
-Build firmware using GNU `make` command. You'll see `<project>_<variant>.hex` file in that directory unless something unexpected occurs in build process.
-
-
-    make -f Makefile.<variant> clean
-    make -f Makefile.<variant>
-
-
-
-
-Program Controller
-------------------
-Now you have **hex** file to program on current directory. This **hex** is only needed to program your controller, other files are used for development and you may leave and forget them.
-
-### 1. Start bootloader
-How to program controller depends on controller chip and its board design. To program AVR USB chips you'll need to start it up in bootloader mode. Most of boards with the chip have a push button to let bootloader come up. Consult with your controller board manual.
-
-### 2. Program with DFU bootloader
-Stock AVR USB chip including ATmega32U4 has DFU bootloader by factory default. `FLIP` is a DFU programmer on Windows offered by Atmel. Open source command line tool `dfu-programmer` also supports AVR chips, it runs on Linux, Mac OSX and even Windows.
-
-To program AVR chip with DFU bootloader use `FLIP` or `dfu-programmer`.
-If you have a proper program command in `Makefile` just type this.
-
-`FLIP` has two version of tool, GUI app and command line program. If you want GUI see tutorial below.
-To use command line tool run this command. Note that you need to set PATH variable properly.
-
-    $ make -f Makefile.<variant> flip
-
-Or to program with `dfu-programmer` run:
-
-    $ make -f Makefile.<variant> dfu
-
-#### FLIP GUI tutorial
-1. On menu bar click Device -> Select, then. `ATmega32u4`.
-2. On menu bar click Settings -> Communication -> USB, then click 'Open' button on 'USB Port Connection' dialog.
-At this point you'll see grey-outed widgets on the app get colored and ready.
-
-3. On menu bar click File -> Load HEX File, then select your firmware hex file on File Selector dialog.
-4. On 'Operations Flow' panel click 'Run' button to load the firmware binary to the chip. Note that you should keep 'Erase', 'Blank Check', 'Program' and 'Verify' check boxes selected.
-5. Re-plug USB cord or click 'Start Application' button to restart your controller.
-Done.
-
-See also these instructions if you need.
-
-- <http://code.google.com/p/micropendous/wiki/LoadingFirmwareWithFLIP>
-- <http://www.atmel.com/Images/doc7769.pdf>
-
-
-### 3. Program with Teensy Loader
-If you have PJRC Teensy see instruction of `Teensy Loader`.
-
-- <http://www.pjrc.com/teensy/loader.html>
-
-Or use this command if you have command line version of Teensy Loader installed.
-
-    $ make -f Makefile.<variant> teensy
-
-
-### 4. Program with Other programmer
-You may want to use other programmer like `avrdude` with AVRISPmkII, Arduino or USBasp. In that case you can still use make target `program` for build with configuring `PROGRAM_CMD` in Makefile.
-
-    $ make -f Makefile.<variant> program
-
-
-[cygwin]:       https://www.cygwin.com/
-[mingw]:        http://www.mingw.org/
-[mhv]:          https://infernoembedded.com/products/avr-tools
-[winavr]:       http://winavr.sourceforge.net/
-[crosspack]:    http://www.obdev.at/products/crosspack/index.html
-[flip]:         http://www.atmel.com/tools/FLIP.aspx
-[dfu-prog]:     http://dfu-programmer.sourceforge.net/
-[teensy-loader]:http://www.pjrc.com/teensy/loader.html
-
-
-
-Makefile Options
-----------------
-### 1. MCU and Frequency.
-
-    MCU = atmega32u4       # Teensy 2.0
-    #MCU = at90usb1286      # Teensy++ 2.0
-    F_CPU = 16000000
-
-Set your MCU and its clock in Hz.
-
-    # Boot Section Size in *bytes*
-    #   Teensy halfKay   512
-    #   Atmel DFU loader 4096
-    #   LUFA bootloader  4096
-    OPT_DEFS += -DBOOTLOADER_SIZE=4096
-
-If you are using PJRC Teensy use `512` for `BOOTLOADER_SIZE`, otherwise use `4096` unless you are sure.
-
-### 2. Features
-Optional. Note that ***comment out*** with `#` to disable them.
-
-    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
-
-### 3. Programmer
-Optional. Set proper command for your controller, bootloader and programmer. This command can be used with `make program`. Not needed if you use `FLIP`, `dfu-programmer` or `Teensy Loader`.
-
-    # avrdude with AVRISPmkII
-    PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex
-
-    # avrdude with USBaspLoader
-    PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex
-
-    # avrdude with arduino
-    PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex
-
-
-
-Config.h Options
-----------------
-### 1. Magic command key combination
-
-    #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KB_LSHIFT) | MOD_BIT(KB_RSHIFT)))
-
-### 2. Mechanical Locking Support for CapsLock
-
-    /* Mechanical locking CapsLock support. Use KC_LCAP instead of KC_CAPS in keymap */
-    #define CAPSLOCK_LOCKING_ENABLE
-    /* Locking CapsLock re-synchronize hack */
-    #define CAPSLOCK_LOCKING_RESYNC_ENABLE
-
-### 3. Disable Debug and Print
-
-    /* disable debug print */
-    #define NO_DEBUG
-
-    /* disable print */
-    #define NO_PRINT
-
-### 4. Disable Action Features
-
-    #define NO_ACTION_LAYER
-    #define NO_ACTION_TAPPING
-    #define NO_ACTION_ONESHOT
-    #define NO_ACTION_MACRO
-    #define NO_ACTION_FUNCTION
-
-***TBD***
diff --git a/tmk_core/doc/keycode.txt b/tmk_core/doc/keycode.txt
deleted file mode 100644 (file)
index 44d7e27..0000000
+++ /dev/null
@@ -1,261 +0,0 @@
-Keycode Symbol Table
-====================
-Keycodes are defined in `common/keycode.h`.
-Range of 00-A4 and E0-E7 are identical with HID Usage:
-<http://www.usb.org/developers/devclass_docs/Hut1_11.pdf>
-Virtual keycodes are defined out of above range to support special actions.
-
-
-Keycode Symbol      Short name      Description
---------------------------------------------------------------------------------
-KC_NO                               00 Reserved (no event indicated)
-KC_ROLL_OVER                        01 Keyboard ErrorRollOver
-KC_POST_FAIL                        02 Keyboard POSTFail
-KC_UNDEFINED                        03 Keyboard ErrorUndefined
-KC_A                                04 Keyboard a and A
-KC_B                                05 Keyboard b and B
-KC_C                                06 Keyboard c and C
-KC_D                                07 Keyboard d and D
-KC_E                                08 Keyboard e and E
-KC_F                                09 Keyboard f and F
-KC_G                                0A Keyboard g and G
-KC_H                                0B Keyboard h and H
-KC_I                                0C Keyboard i and I
-KC_J                                0D Keyboard j and J
-KC_K                                0E Keyboard k and K
-KC_L                                0F Keyboard l and L
-KC_M                                10 Keyboard m and M
-KC_N                                11 Keyboard n and N
-KC_O                                12 Keyboard o and O
-KC_P                                13 Keyboard p and P
-KC_Q                                14 Keyboard q and Q
-KC_R                                15 Keyboard r and R
-KC_S                                16 Keyboard s and S
-KC_T                                17 Keyboard t and T
-KC_U                                18 Keyboard u and U
-KC_V                                19 Keyboard v and V
-KC_W                                1A Keyboard w and W
-KC_X                                1B Keyboard x and X
-KC_Y                                1C Keyboard y and Y
-KC_Z                                1D Keyboard z and Z
-KC_1                                1E Keyboard 1 and !
-KC_2                                1F Keyboard 2 and @
-KC_3                                20 Keyboard 3 and #
-KC_4                                21 Keyboard 4 and $
-KC_5                                22 Keyboard 5 and %
-KC_6                                23 Keyboard 6 and ^
-KC_7                                24 Keyboard 7 and &
-KC_8                                25 Keyboard 8 and *
-KC_9                                26 Keyboard 9 and (
-KC_0                                27 Keyboard 0 and )
-KC_ENTER            KC_ENT          28 Keyboard Return (ENTER)
-KC_ESCAPE           KC_ESC          29 Keyboard ESCAPE
-KC_BSPACE           KC_BSPC         2A Keyboard DELETE (Backspace)
-KC_TAB                              2B Keyboard Tab
-KC_SPACE            KC_SPC          2C Keyboard Spacebar
-KC_MINUS            KC_MINS         2D Keyboard - and (underscore)
-KC_EQUAL            KC_EQL          2E Keyboard = and +
-KC_LBRACKET         KC_LBRC         2F Keyboard [ and {
-KC_RBRACKET         KC_RBRC         30 Keyboard ] and }
-KC_BSLASH           KC_BSLS         31 Keyboard \ and |
-KC_NONUS_HASH       KC_NUHS         32 Keyboard Non-US # and ~
-KC_SCOLON           KC_SCLN         33 Keyboard ; and :
-KC_QUOTE            KC_QUOT         34 Keyboard ‘ and “
-KC_GRAVE            KC_GRV          35 Keyboard Grave Accent and Tilde
-KC_COMMA            KC_COMM         36 Keyboard, and <
-KC_DOT                              37 Keyboard . and >
-KC_SLASH            KC_SLSH         38 Keyboard / and ?
-KC_CAPSLOCK         KC_CAPS         39 Keyboard Caps Lock
-KC_F1                               3A Keyboard F1
-KC_F2                               3B Keyboard F2
-KC_F3                               3C Keyboard F3
-KC_F4                               3D Keyboard F4
-KC_F5                               3E Keyboard F5
-KC_F6                               3F Keyboard F6
-KC_F7                               40 Keyboard F7
-KC_F8                               41 Keyboard F8
-KC_F9                               42 Keyboard F9
-KC_F10                              43 Keyboard F10
-KC_F11                              44 Keyboard F11
-KC_F12                              45 Keyboard F12
-KC_PSCREEN          KC_PSCR         46 Keyboard PrintScreen1
-KC_SCKLOCK          KC_SLCK         47 Keyboard Scroll Lock11
-KC_PAUSE            KC_PAUS         48 Keyboard Pause1
-KC_INSERT           KC_INS          49 Keyboard Insert1
-KC_HOME                             4A Keyboard Home1
-KC_PGUP                             4B Keyboard PageUp1
-KC_DELETE           KC_DELETE       4C Keyboard Delete Forward
-KC_END                              4D Keyboard End1
-KC_PGDOWN           KC_PGDN         4E Keyboard PageDown1
-KC_RIGHT            KC_RGHT         4F Keyboard RightArrow1
-KC_LEFT                             50 Keyboard LeftArrow1
-KC_DOWN                             51 Keyboard DownArrow1
-KC_UP                               52 Keyboard UpArrow1
-KC_NUMLOCK          KC_NLCK         53 Keypad Num Lock and Clear11
-KC_KP_SLASH         KC_PSLS         54 Keypad /1
-KC_KP_ASTERISK      KC_PAST         55 Keypad *
-KC_KP_MINUS         KC_PMNS         56 Keypad -
-KC_KP_PLUS          KC_PPLS         57 Keypad +
-KC_KP_ENTER         KC_PENT         58 Keypad ENTER5
-KC_KP_1             KC_P1           59 Keypad 1 and End
-KC_KP_2             KC_P2           5A Keypad 2 and Down Arrow
-KC_KP_3             KC_P3           5B Keypad 3 and PageDn
-KC_KP_4             KC_P4           5C Keypad 4 and Left Arrow
-KC_KP_5             KC_P5           5D Keypad 5
-KC_KP_6             KC_P6           5E Keypad 6 and Right Arrow
-KC_KP_7             KC_P7           5F Keypad 7 and Home
-KC_KP_8             KC_P8           60 Keypad 8 and Up Arrow
-KC_KP_9             KC_P9           61 Keypad 9 and PageUp
-KC_KP_0             KC_P0           62 Keypad 0 and Insert
-KC_KP_DOT           KC_PDOT         63 Keypad . and Delete
-KC_NONUS_BSLASH     KC_NUBS         64 Keyboard Non-US \ and |
-KC_APPLICATION      KC_APP          65 Keyboard Application10
-KC_POWER                            66 Keyboard Power9
-KC_KP_EQUAL         KC_PEQL         67 Keypad =
-KC_F13                              68 Keyboard F13
-KC_F14                              69 Keyboard F14
-KC_F15                              6A Keyboard F15
-KC_F16                              6B Keyboard F16
-KC_F17                              6C Keyboard F17
-KC_F18                              6D Keyboard F18
-KC_F19                              6E Keyboard F19
-KC_F20                              6F Keyboard F20
-KC_F21                              70 Keyboard F21
-KC_F22                              71 Keyboard F22
-KC_F23                              72 Keyboard F23
-KC_F24                              73 Keyboard F24
-KC_EXECUTE                          74 Keyboard Execute
-KC_HELP                             75 Keyboard Help
-KC_MENU                             76 Keyboard Menu
-KC_SELECT                           77 Keyboard Select
-KC_STOP                             78 Keyboard Stop
-KC_AGAIN                            79 Keyboard Again
-KC_UNDO                             7A Keyboard Undo
-KC_CUT                              7B Keyboard Cut
-KC_COPY                             7C Keyboard Copy
-KC_PASTE                            7D Keyboard Paste
-KC_FIND                             7E Keyboard Find
-KC__MUTE                            7F Keyboard Mute
-KC__VOLUP                           80 Keyboard Volume Up
-KC__VOLDOWN                         81 Keyboard Volume Down
-KC_LOCKING_CAPS                     82 Keyboard Locking Caps Lock12
-KC_LOCKING_NUM                      83 Keyboard Locking Num Lock12
-KC_LOCKING_SCROLL                   84 Keyboard Locking Scroll Lock12
-KC_KP_COMMA         KC_PCMM         85 Keypad Comma27
-KC_KP_EQUAL_AS400                   86 Keypad Equal Sign29
-KC_INT1             KC_RO           87 Keyboard International115,28
-KC_INT2             KC_KANA         88 Keyboard International216
-KC_INT3             KC_JYEN         89 Keyboard International317
-KC_INT4             KC_HENK         8A Keyboard International418
-KC_INT5             KC_MHEN         8B Keyboard International519
-KC_INT6                             8C Keyboard International620
-KC_INT7                             8D Keyboard International721
-KC_INT8                             8E Keyboard International822
-KC_INT9                             8F Keyboard International922
-KC_LANG1                            90 Keyboard LANG125
-KC_LANG2                            91 Keyboard LANG226
-KC_LANG3                            92 Keyboard LANG330
-KC_LANG4                            93 Keyboard LANG431
-KC_LANG5                            94 Keyboard LANG532
-KC_LANG6                            95 Keyboard LANG68
-KC_LANG7                            96 Keyboard LANG78
-KC_LANG8                            97 Keyboard LANG88
-KC_LANG9                            98 Keyboard LANG98
-KC_ALT_ERASE                        99 Keyboard Alternate Erase7
-KC_SYSREQ                           9A Keyboard SysReq/Attention1
-KC_CANCEL                           9B Keyboard Cancel
-KC_CLEAR                            9C Keyboard Clear
-KC_PRIOR                            9D Keyboard Prior
-KC_RETURN                           9E Keyboard Return
-KC_SEPARATOR                        9F Keyboard Separator
-KC_OUT                              A0 Keyboard Out
-KC_OPER                             A1 Keyboard Oper
-KC_CLEAR_AGAIN                      A2 Keyboard Clear/Again
-KC_CRSEL                            A3 Keyboard CrSel/Props
-KC_EXSEL                            A4 Keyboard ExSel
-/* Modifiers */
-KC_LCTRL            KC_LCTL         E0 Keyboard LeftControl
-KC_LSHIFT           KC_LSFT         E1 Keyboard LeftShift
-KC_LALT                             E2 Keyboard LeftAlt
-KC_LGUI                             E3 Keyboard Left GUI(Windows/Apple/Meta key)
-KC_RCTRL            KC_RCTL         E4 Keyboard RightControl
-KC_RSHIFT           KC_RSFT         E5 Keyboard RightShift
-KC_RALT                             E6 Keyboard RightAlt
-KC_RGUI                             E7 Keyboard Right GUI(Windows/Apple/Meta key)
-
-/* 
- * Virtual keycodes
- */
-/* System Control */
-KC_SYSTEM_POWER     KC_PWR          System Power Down
-KC_SYSTEM_SLEEP     KC_SLEP         System Sleep
-KC_SYSTEM_WAKE      KC_WAKE         System Wake
-/* Consumer Page */
-KC_AUDIO_MUTE       KC_MUTE
-KC_AUDIO_VOL_UP     KC_VOLU
-KC_AUDIO_VOL_DOWN   KC_VOLD
-KC_MEDIA_NEXT_TRACK KC_MNXT
-KC_MEDIA_PREV_TRACK KC_MPRV
-KC_MEDIA_STOP       KC_MSTP
-KC_MEDIA_PLAY_PAUSE KC_MPLY
-KC_MEDIA_SELECT     KC_MSEL
-KC_MAIL             KC_MAIL
-KC_CALCULATOR       KC_CALC
-KC_MY_COMPUTER      KC_MYCM
-KC_WWW_SEARCH       KC_WSCH
-KC_WWW_HOME         KC_WHOM
-KC_WWW_BACK         KC_WBAK
-KC_WWW_FORWARD      KC_WFWD
-KC_WWW_STOP         KC_WSTP
-KC_WWW_REFRESH      KC_WREF
-KC_WWW_FAVORITES    KC_WFAV
-/* Mousekey */
-KC_MS_UP            KC_MS_U         Mouse Cursor Up
-KC_MS_DOWN          KC_MS_D         Mouse Cursor Down
-KC_MS_LEFT          KC_MS_L         Mouse Cursor Left
-KC_MS_RIGHT         KC_MS_R         Mouse Cursor Right
-KC_MS_BTN1          KC_BTN1         Mouse Button 1
-KC_MS_BTN2          KC_BTN2         Mouse Button 2
-KC_MS_BTN3          KC_BTN3         Mouse Button 3
-KC_MS_BTN4          KC_BTN4         Mouse Button 4
-KC_MS_BTN5          KC_BTN5         Mouse Button 5
-KC_MS_WH_UP         KC_WH_U         Mouse Wheel Up
-KC_MS_WH_DOWN       KC_WH_D         Mouse Wheel Down
-KC_MS_WH_LEFT       KC_WH_L         Mouse Wheel Left
-KC_MS_WH_RIGHT      KC_WH_R         Mouse Wheel Right
-KC_MS_ACCEL0        KC_ACL0         Mouse Acceleration 0
-KC_MS_ACCEL1        KC_ACL1         Mouse Acceleration 1
-KC_MS_ACCEL2        KC_ACL2         Mouse Acceleration 2
-/* Fn key */
-KC_FN0
-KC_FN1
-KC_FN2
-KC_FN3
-KC_FN4
-KC_FN5
-KC_FN6
-KC_FN7
-KC_FN8
-KC_FN9
-KC_FN10
-KC_FN11
-KC_FN12
-KC_FN13
-KC_FN14
-KC_FN15
-KC_FN16
-KC_FN17
-KC_FN18
-KC_FN19
-KC_FN20
-KC_FN21
-KC_FN22
-KC_FN23
-KC_FN24
-KC_FN25
-KC_FN26
-KC_FN27
-KC_FN28
-KC_FN29
-KC_FN30
-KC_FN31
diff --git a/tmk_core/doc/keymap.md b/tmk_core/doc/keymap.md
deleted file mode 100644 (file)
index 4d42fbe..0000000
+++ /dev/null
@@ -1,599 +0,0 @@
-Keymap framework - how to define your keymap
-============================================
-***NOTE: This is not final version, may be inconsistent with source code and changed occasionally for a while.***
-
-## 0. Keymap and layers
-**Keymap** is comprised of multiple layers of key layout, you can define **32 layers** at most.
-**Layer** is an array of **keycodes** to define **actions** for each physical keys.
-respective layers can be validated simultaneously. Layers are indexed with 0 to 31 and higher layer has precedence.
-
-    Keymap: 32 Layers                   Layer: Keycode matrix
-    -----------------                   ---------------------
-    stack of layers                     array_of_keycode[row][column]
-           ____________ precedence               _______________________
-          /           / | high                  / ESC / F1  / F2  / F3   ....
-      31 /___________// |                      /-----/-----/-----/-----
-      30 /___________// |                     / TAB /  Q  /  W  /  E   ....
-      29 /___________/  |                    /-----/-----/-----/-----
-       :   _:_:_:_:_:__ |               :   /LCtrl/  A  /  S  /  D   ....
-       :  / : : : : : / |               :  /  :     :     :     :
-       2 /___________// |               2 `--------------------------
-       1 /___________// |               1 `--------------------------
-       0 /___________/  V low           0 `--------------------------
-
-
-
-### 0.1 Keymap status
-Keymap has its state in two parameters:
-**`default_layer`** indicates a base keymap layer(0-31) which is always valid and to be referred, **`keymap_stat`** is 16bit variable which has current on/off status of layers on its each bit.
-
-Keymap layer '0' is usually `default_layer` and which is the only valid layer and other layers is initially off after boot up firmware, though, you can configured them in `config.h`.
-To change `default_layer` will be useful when you switch key layout completely, say you want Colmak instead of Qwerty.
-
-    Initial state of Keymap          Change base layout              
-    -----------------------          ------------------              
-
-      31                               31
-      30                               30
-      29                               29
-       :                                :
-       :                                :   ____________
-       2   ____________                 2  /           /
-       1  /           /              ,->1 /___________/
-    ,->0 /___________/               |  0
-    |                                |
-    `--- default_layer = 0           `--- default_layer = 1
-         layer_state   = 0x00000001       layer_state   = 0x00000002
-
-On the other hand, you shall change `layer_state` to overlay base layer with some layers for feature such as navigation keys, function key(F1-F12), media keys or special actions.
-
-    Overlay feature layer
-    ---------------------      bit|status
-           ____________        ---+------
-      31  /           /        31 |   0
-      30 /___________// -----> 30 |   1
-      29 /___________/  -----> 29 |   1
-       :                        : |   :
-       :   ____________         : |   :
-       2  /           /         2 |   0
-    ,->1 /___________/  ----->  1 |   1
-    |  0                        0 |   0
-    |                                 +
-    `--- default_layer = 1            |
-         layer_state   = 0x60000002 <-'
-
-
-
-### 0.2 Layer Precedence and Transparency
-Note that ***higher layer has higher priority on stack of layers***, namely firmware falls down from top layer to bottom to look up keycode. Once it spots keycode other than **`KC_TRNS`**(transparent) on a layer it stops searching and lower layers aren't referred.
-
-You can place `KC_TRNS` on overlay layer changes just part of layout to fall back on lower or base layer.
-Key with `KC_TRANS` doesn't has its own keycode and refers to lower valid layers for keycode, instead.
-See example below.
-
-
-### 0.3 Keymap Example
-Keymap is **`keymaps[]`** C array in fact and you can define layers in it with **`KEYMAP()`** C macro and keycodes. To use complex actions you need to define `Fn` keycode in **`fn_actions[]`** array.
-
-This is a keymap example for [HHKB](http://en.wikipedia.org/wiki/Happy_Hacking_Keyboard) keyboard.
-This example has three layers, 'Qwerty' as base layer, 'Cursor' and  'Mousekey'.
-In this example,
-
- `Fn0` is a **momentary layer switching** key, you can use keys on Cursor layer while holding the key.
-
- `Fn1` is a momentary layer switching key with tapping feature, you can get semicolon **';'** with taping the key and switch layers while holding the key. The word **'tap'** or **'tapping'** mean to press and release a key quickly.
-
- `Fn2` is a **toggle layer switch** key, you can stay switched layer after releasing the key unlike momentary switching.
-
-You can find other keymap definitions in file `keymap.c` located on project directories.
-
-    static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-        /* 0: Qwerty
-         * ,-----------------------------------------------------------.
-         * |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|Fn1|  '|Enter   |
-         * |-----------------------------------------------------------|
-         * |Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shift |Fn0|
-         * `-----------------------------------------------------------'
-         *       |Gui|Alt  |Space                  |Alt  |Fn2|
-         *       `-------------------------------------------'
-         */
-        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,   FN1, QUOT,ENT, \
-               LSFT,Z,   X,   C,   V,   B,   N,   M,   COMM,DOT, SLSH,RSFT,FN0, \
-                    LGUI,LALT,          SPC,                RALT,FN2),
-        /* 1: Cursor(HHKB mode)
-         * ,-----------------------------------------------------------.
-         * |Pwr| 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|
-         *      `--------------------------------------------'
-         */ 
-        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, \
-               LCTL,VOLD,VOLU,MUTE,TRNS,TRNS,PAST,PSLS,HOME,PGUP,LEFT,RGHT,ENT, \
-               LSFT,TRNS,TRNS,TRNS,TRNS,TRNS,PPLS,PMNS,END, PGDN,DOWN,RSFT,TRNS, \
-                    LGUI,LALT,          SPC,                RALT,RGUI),
-        /* 2: Mousekey
-         * ,-----------------------------------------------------------.
-         * |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|   |   |Return  |
-         * |-----------------------------------------------------------|
-         * |Shift   |   |   |   |   |Mb3|Mb2|Mb1|Mb4|Mb5|   |Shift |   |
-         * `-----------------------------------------------------------'
-         *      |Gui |Alt  |Mb1                    |Alt  |   |
-         *      `--------------------------------------------'
-         * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel 
-         */
-        KEYMAP(ESC, F1,  F2,  F3,  F4,  F5,  F6,  F7,  F8,  F9,  F10, F11, F12, INS, DEL, \
-               TAB, TRNS,TRNS,TRNS,TRNS,TRNS,WH_L,WH_D,WH_U,WH_R,TRNS,TRNS,TRNS,BSPC, \
-               LCTL,TRNS,ACL0,ACL1,ACL2,TRNS,MS_L,MS_D,MS_U,MS_R,TRNS,QUOT,ENT, \
-               LSFT,TRNS,TRNS,TRNS,TRNS,BTN3,BTN2,BTN1,BTN4,BTN5,SLSH,RSFT,TRNS, \
-                    LGUI,LALT,          BTN1,               RALT,TRNS),
-    };
-
-    static const uint16_t PROGMEM fn_actions[] = {
-        ACTION_LAYER_MOMENTARY(1),                  // FN0
-        ACTION_LAYER_TAP_KEY(2, KC_SCLN),           // FN1
-        ACTION_LAYER_TOGGLE(2),                     // FN2
-    };
-
-
-
-
-## 1. Keycode
-See [`common/keycode.h`](../common/keycode.h) or keycode table below for the detail. Keycode is internal **8bit code** to indicate action performed on key in keymap. Keycode has `KC_` prefixed symbol respectively. Most of keycodes like `KC_A` have simple action registers key to host on press and unregister on release, while some of other keycodes has some special actions like `Fn` keys, Media control keys, System control keys and Mousekeys.
-
- ***In `KEYMAP()` macro you should omit prefix part `KC_` of keycode to keep keymap compact.*** For example, just use `A` instead you place `KC_A` in `KEYMAP()`. Some keycodes has 4-letter **short name** in addition to descriptive name, you'll prefer short one in `KEYMAP()`.
-
-### 1.0 Other key
-- `KC_NO` for no action
-- `KC_TRNS` for layer transparency (See above)
-
-### 1.1 Normal key
-- `KC_A` to `KC_Z`, `KC_1` to `KC_0` for alpha numeric key
-- `KC_MINS`, `KC_EQL`, `KC_GRV`, `KC_RBRC`, `KC_LBRC`, `KC_COMM`, `KC_DOT`, `KC_BSLS`, `KC_SLSH`, `KC_SCLN`, `KC_QUOT`
-- `KC_ESC`, `KC_TAB`, `KC_SPC`, `KC_BSPC`, `KC_ENT`, `KC_DEL`, `KC_INS`
-- `KC_UP`, `KC_DOWN`, `KC_RGHT`, `KC_LEFT`, `KC_PGUP`, `KC_PGDN`, `KC_HOME`, `KC_END`
-- `KC_CAPS`, `KC_NLCK`, `KC_SLCK`, `KC_PSCR`, `KC_PAUS`, `KC_APP`, `KC_F1` to `KC_F24`
-- `KC_P1` to `KC_P0`, `KC_PDOT`, `KC_PCMM`, `KC_PSLS`, `KC_PAST`, `KC_PMNS`, `KC_PPLS`, `KC_PEQL`, `KC_PENT` for keypad.
-
-### 1.2 Modifier
-There are 8 modifiers which has discrimination between left and right. 
-
-- `KC_LCTL` and `KC_RCTL` for Control
-- `KC_LSFT` and `KC_RSFT` for Shift
-- `KC_LALT` and `KC_RALT` for Alt
-- `KC_LGUI` and `KC_RGUI` for Windows key or Command key in Mac
-
-### 1.3 Mousekey
-- `KC_MS_U`, `KC_MS_D`, `KC_MS_L`, `KC_MS_R` for mouse cursor
-- `KC_WH_U`, `KC_WH_D`, `KC_WH_L`, `KC_WH_R` for mouse wheel
-- `KC_BTN1`, `KC_BTN2`, `KC_BTN3`, `KC_BTN4`, `KC_BTN5` for mouse buttons
-
-### 1.4 System & Media key
-- `KC_PWR`, `KC_SLEP`, `KC_WAKE` for Power, Sleep, Wake
-- `KC_MUTE`, `KC_VOLU`, `KC_VOLD` for audio volume control
-- `KC_MNXT`, `KC_MPRV`, `KC_MSTP`, `KC_MPLY`, `KC_MSEL` for media control
-- `KC_MAIL`, `KC_CALC`, `KC_MYCM` for application launch
-- `KC_WSCH`, `KC_WHOM`, `KC_WBAK`, `KC_WFWD`, `KC_WSTP`, `KC_WREF`, `KC_WFAV` for web browser operation
-
-### 1.5 Fn key
-`KC_FNnn` are keycodes for `Fn` key which not given any actions at the beginning unlike most of keycodes has its own inborn action. To use these keycodes in `KEYMAP()` you need to assign action you want at first. Action of `Fn` key is defined in `fn_actions[]` and its index of the array is identical with number part of `KC_FNnn`. Thus `KC_FN0` keycode indicates the action defined in first element of the array. ***32 `Fn` keys can be defined at most.***
-
-### 1.6 Keycode Table
- See keycode table in [`doc/keycode.txt`](./keycode.txt) for description of keycodes.
-
- In regard to implementation side most of keycodes are identical with [HID usage][HID_usage](pdf) sent to host for real and some virtual keycodes are defined to support special actions.
-[HID_usage]: http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
-
-
-
-## 2. Action
-See [`common/action_code.h`](../common/action_code.h). Action is a **16bit code** and defines function to perform on events of a key like press, release, holding and tapping.
-
-Most of keys just register 8bit scancode to host, but to support other complex features needs 16bit extended action codes internally. However, using 16bit action codes in keymap results in double size in memory compared to using just keycodes. To avoid this waste 8bit keycodes are used in `KEYMAP()` instead of action codes.
-
-***You can just use keycodes of `Normal key`, `Modifier`, `Mousekey` and `System & Media key` in keymap*** to indicate corresponding actions instead of using action codes. While ***to use other special actions you should use keycode of `Fn` key defined in `fn_actions[]`.***
-
-
-### 2.1 Key Action
-This is a simple action that registers scancodes(HID usage in fact) to host on press event of key and unregister on release.
-
-#### Parameters
-+ **mods**: { ` MOD_LCTL`, ` MOD_LSFT`, ` MOD_LALT`, ` MOD_LGUI`,
-              ` MOD_RCTL`, ` MOD_RSFT`, ` MOD_RALT`, ` MOD_RGUI` }
-+ **key**: keycode
-
-
-#### 2.1.1 Normal key and Modifier
-***This action usually won't be used expressly in keymap*** because you can just use keycodes in `KEYMAP()` instead.
-
-You can define these actions on *'A'* key and *'left shift'* modifier with:
-
-    ACTION_KEY(KC_A)
-    ACTION_KEY(KC_LSFT)
-
-#### 2.1.2 Modified key
-This action is comprised of strokes of modifiers and a key. `Macro` action is needed if you want more complex key strokes.
-
-Say you want to assign a key to `Shift + 1` to get character *'!'* or `Alt + Tab` to switch application windows.
-
-    ACTION_MODS_KEY(MOD_LSFT, KC_1)
-    ACTION_MODS_KEY(MOD_LALT, KC_TAB)
-
-Or `Alt,Shift + Tab` can be defined. `ACTION_MODS_KEY(mods, key)` requires **4-bit modifier state** and a **keycode** as arguments. See `keycode.h` for `MOD_BIT()` macro.
-
-    ACTION_MODS_KEY(MOD_LALT | MOD_LSFT, KC_TAB)
-
-#### 2.1.3 Multiple Modifiers
-Registers multiple modifiers with pressing a key. To specify multiple modifiers use `|`.
-
-    ACTION_MODS(MOD_ALT | MOD_LSFT)
-
-#### 2.1.3 Modifier with Tap key([Dual role][dual_role])
-Works as a modifier key while holding, but registers a key on tap(press and release quickly).
-
-
-    ACTION_MODS_TAP_KEY(MOD_RCTL, KC_ENT)
-
-
-
-### 2.2 Layer Action
-These actions operate layers of keymap.
-
-#### Parameters
-You can specify a **target layer** of action and **when the action is executed**. Some actions take a **bit value** for bitwise operation.
-
-
-+ **layer**: `0`-`31`
-+ **on**: { `ON_PRESS` | `ON_RELEASE` | `ON_BOTH` }
-+ **bits**: 4-bit value and 1-bit mask bit
-
-
-#### 2.2.1 Default Layer
-Default Layer is a layer which always is valid and referred to when actions is not defined on other overlay layers.
-
-This sets Default Layer to given parameter `layer` and activate it.
-
-    ACTION_DEFAULT_LAYER_SET(layer)
-
-
-#### 2.2.2 Momentary 
-Turns on `layer` momentarily while holding, in other words it activates when key is pressed and deactivate when released.
-
-    ACTION_LAYER_MOMENTARY(layer)
-
-
-#### 2.2.3 Toggle Switch
-Turns on `layer` with first type(press and release) and turns off with next.
-
-    ACTION_LAYER_TOGGLE(layer)
-
-
-#### 2.2.4 Momentary Switch with tap key
-Turns on `layer` momentary while holding, but registers key on tap(press and release quickly).
-
-    ACTION_LAYER_TAP_KEY(layer, key)
-
-
-#### 2.2.5 Momentary Switch with tap toggle
-Turns on `layer` momentary while holding and toggles it with serial taps.
-
-    ACTION_LAYER_TAP_TOGGLE(layer)
-
-
-#### 2.2.6 Invert state of layer
-Inverts current state of `layer`. If the layer is on it becomes off with this action.
-
-    ACTION_LAYER_INVERT(layer, on)
-
-
-#### 2.2.7 Turn On layer
-Turns on layer state.
-
-    ACTION_LAYER_ON(layer, on)
-
-Turns on layer state on press and turns off on release.
-
-    ACTION_LAYER_ON_OFF(layer)
-
-
-#### 2.2.8 Turn Off layer
-Turns off layer state.
-
-    ACTION_LAYER_OFF(layer, on)
-
-Turns off layer state on press and activates on release.
-
-    ACTION_LAYER_OFF_ON(layer)
-
-
-#### 2.2.9 Set layer
-Turn on layer only.
-`layer_state = (1<<layer) [layer: 0-31]`
-
-    ACTION_LAYER_SET(layer, on)
-
-Turns on layer only and clear all layer on release..
-
-    ACTION_LAYER_SET_CLEAR(layer)
-
-
-#### 2.2.10 Bitwise operation
-
-**part** indicates which part of 32bit layer state(0-7). **bits** is 5-bit value. **on** indicates when the action is executed.
-
-    ACTION_LAYER_BIT_AND(part, bits, on)
-    ACTION_LAYER_BIT_OR(part, bits, on)
-    ACTION_LAYER_BIT_XOR(part, bits, on)
-    ACTION_LAYER_BIT_SET(part, bits, on)
-
-These actions works with parameters as following code.
-
-    uint8_t shift = part*4;
-    uint32_t mask = (bits&0x10) ? ~(0xf<<shift) : 0;
-    uint32_t layer_state = layer_state <bitop> ((bits<<shift)|mask);
-
-
-Default Layer also has bitwise operations, they are executed when key is released.
-
-    ACTION_DEFAULT_LAYER_BIT_AND(part, bits)
-    ACTION_DEFAULT_LAYER_BIT_OR(part, bits)
-    ACTION_DEFAULT_LAYER_BIT_XOR(part, bits)
-    ACTION_DEFAULT_LAYER_BIT_SET(part, bits)
-
-
-
-### 2.3 Macro action
-***TBD***
-
-`Macro` action indicates complex key strokes.
-    MACRO( D(LSHIFT), D(D), END )
-    MACRO( U(D), U(LSHIFT), END )
-    MACRO( I(255), T(H), T(E), T(L), T(L), W(255), T(O), END )
-
-#### 2.3.1 Macro Commands
-- **I()**   change interval of stroke.
-- **D()**   press key
-- **U()**   release key
-- **T()**   type key(press and release)
-- **W()**   wait
-- **END**   end mark
-
-#### 2.3.2 Examples
-
-***TODO: sample implementation***
-See `keyboard/hhkb/keymap.c` for sample.
-
-
-
-### 2.4 Function action
-***TBD***
-
-There are two type of action, normal `Function` and tappable `Function`.
-These actions call user defined function with `id`, `opt`, and key event information as arguments.
-
-#### 2.4.1 Function
-To define normal `Function` action in keymap use this.
-
-    ACTION_FUNCTION(id, opt)
-
-#### 2.4.2 Function with tap
-To define tappable `Function` action in keymap use this.
-
-    ACTION_FUNCTION_TAP(id, opt)
-
-#### 2.4.3 Implement user function
-`Function` actions can be defined freely with C by user in callback function:
-
-    void keymap_call_function(keyrecord_t *event, uint8_t id, uint8_t opt)
-
-This C function is called every time key is operated, argument `id` selects action to be performed and `opt` can be used for option. Function `id` can be 0-255 and `opt` can be 0-15.
-
- `keyrecord_t` is comprised of key event and tap count. `keyevent_t` indicates which and when key is pressed or released. From `tap_count` you can know tap state, 0 means no tap. These information will be used in user function to decide how action of key is performed.
-
-    typedef struct {
-        keyevent_t  event;
-        uint8_t     tap_count;
-    } keyrecord_t;
-
-    typedef struct {
-        key_t    key;
-        bool     pressed;
-        uint16_t time;
-    } keyevent_t;
-
-    typedef struct {
-        uint8_t col;
-        uint8_t row;
-    } key_t;
-
-***TODO: sample implementation***
-See `keyboard/hhkb/keymap.c` for sample.
-
-
-
-### 2.5 Backlight Action
-These actions control the backlight.
-
-#### 2.5.1 Change backlight level
-Increase backlight level.
-
-    ACTION_BACKLIGHT_INCREASE()
-
-Decrease backlight level.
-
-    ACTION_BACKLIGHT_DECREASE()
-
-Step through backlight levels.
-
-    ACTION_BACKLIGHT_STEP()
-
-Turn a specific backlight level on or off.
-
-    ACTION_BACKLIGHT_LEVEL(1)
-
-#### 2.5.2 Turn on / off backlight
-Turn the backlight on and off without changing level.
-
-    ACTION_BACKLIGHT_TOGGLE()
-
-
-
-## 3. Layer switching Example
-There are some ways to switch layer with 'Layer' actions.
-
-### 3.1 Momentary switching
-Momentary switching changes layer only while holding Fn key.
-
-This action makes 'Layer 1' active(valid) on key press event and inactive on release event. Namely you can overlay a layer on lower layers or default layer temporarily with this action.
-
-    ACTION_LAYER_MOMENTARY(1)
-
-
-Note that after switching on press the actions on destination layer(Layer 1) are performed.
-***Thus you shall need to place an action to go back on destination layer***, or you will be stuck in destination layer without way to get back. Usually you need to place same action or 'KC_TRNS` on destination layer to get back.
-
-
-### 3.2 Toggle switching
-Toggle switching performed after releasing a key. With this action you can keep staying on the destination layer until you type the key again to return.
-
-This performs toggle switching action of 'Layer 2'.
-
-    ACTION_LAYER_TOGGLE(2)
-
-
-
-### 3.3 Momentary switching with Tap key
-These actions switch a layer only while holding a key but register the key on tap. **Tap** means to press and release a key quickly.
-
-    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
-
-With this you can place a layer switching action on normal key like ';' without losing its original key register function. This action allows you to have layer switching action without necessity of a dedicated key. It means you can have it even on home row of keyboard.
-
-
-
-### 3.4 Momentary switching with Tap Toggle
-This switches layer only while holding a key but toggle layer with several taps. **Tap** means to press and release key quickly.
-
-    ACTION_LAYER_TAP_TOGGLE(1)
-
-Number of taps can be configured with `TAPPING_TOGGLE` in `config.h`, `5` by default.
-
-
-
-### 3.5 Momentary switching with Modifiers
-This registers modifier key(s) simultaneously with layer switching.
-
-    ACTION_LAYER_MODS(2, MOD_LSFT | MOD_LALT)
-
-
-
-## 4. Tapping
-Tapping is to press and release a key quickly. Tapping speed is determined with setting of `TAPPING_TERM`, which can be defined in `config.h`, 200ms by default.
-
-### 4.1 Tap Key
-This is a feature to assign normal key action and modifier including layer switching to just same one physical key. This is a kind of [Dual role key][dual_role]. It works as modifier when holding the key but registers normal key when tapping.
-
-Modifier with tap key:
-
-    ACTION_MODS_TAP_KEY(MOD_RSFT, KC_GRV)
-
-Layer switching with tap key:
-
-    ACTION_LAYER_TAP_KEY(2, KC_SCLN)
-
-[dual_role]: http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys
-
-
-### 4.2 Tap Toggle
-This is a feature to assign both toggle layer and momentary switch layer action to just same one physical key. It works as momentary layer switch when holding a key but toggle switch with several taps.
-
-    ACTION_LAYER_TAP_TOGGLE(1)
-
-
-### 4.3 Oneshot Modifier
-This runs onetime effects which modify only on just one following key. It works as normal modifier key when holding down while oneshot modifier when tapping. The behavior of oneshot modifiers is similar to the [sticky keys](https://en.wikipedia.org/wiki/StickyKeys) functionality found in most operating systems.
-
-    ACTION_MODS_ONESHOT(MOD_LSFT)
-
-Oneshot layer key:
-
-    ACTION_LAYER_ONESHOT(MY_LAYER)
-
-Say you want to type 'The', you have to push and hold Shift key before type 't' then release it before type 'h' and 'e', otherwise you'll get 'THe' or 'the' unintentionally. With Oneshot Modifier you can tap Shift then type 't', 'h' and 'e' normally, you don't need to holding Shift key properly here. This mean you can release Shift before 't' is pressed down.
-
-Oneshot effect is cancel unless following key is pressed down within `ONESHOT_TIMEOUT` of `config.h`. No timeout when it is `0` or not defined.
-
-Most implementations of sticky keys allow you to lock a modifier by double tapping the modifier. The layer then remains locked untill the modifier is tapped again. To enable this behaviour for oneshot modifiers set `ONESHOT_TAP_TOGGLE` to the number taps required. The feature is disabled if `ONESHOT_TAP_TOGGLE<2` or not defined.
-
-
-### 4.4 Tap Toggle Mods
-Similar to layer tap toggle, this works as a momentary modifier when holding, but toggles on with several taps. A single tap will 'unstick' the modifier again.
-
-    ACTION_MODS_TAP_TOGGLE(MOD_LSFT)
-
-
-
-
-## 5. Legacy Keymap
-This was used in prior version and still works due to legacy support code in `common/keymap.c`. Legacy keymap doesn't support many of features that new keymap offers. ***It is not recommended to use Legacy Keymap for new project.***
-
-To enable Legacy Keymap support define this macro in `config.h`.
-
-    #define USE_LEGACY_KEYMAP
-
-Legacy Keymap uses two arrays `fn_layer[]` and `fn_keycode[]` to define Fn key. The index of arrays corresponds with postfix number of `Fn` key. Array `fn_layer[]` indicates destination layer to switch and `fn_keycode[]` has keycodes to send when tapping `Fn` key.
-
-In following setting example, `Fn0`, `Fn1` and `Fn2` switch layer to 1, 2 and 2 respectively. `Fn2` registers `Space` key when tapping while `Fn0` and `Fn1` doesn't send any key.
-
-    static const uint8_t PROGMEM fn_layer[] = {
-        1,              // Fn0
-        2,              // Fn1
-        2,              // Fn2
-    };
-
-    static const uint8_t PROGMEM fn_keycode[] = {
-        KC_NO,          // Fn0
-        KC_NO,          // Fn1
-        KC_SPC,         // Fn2
-    };
-
-
-## 6. Terminology
-***TBD***
-### keymap
-is comprised of multiple layers.
-### layer
-is matrix of keycodes.
-### key
-is physical button on keyboard or logical switch on software.
-### keycode
-is codes used on firmware.
-### action
-is a function assigned on a key.
-### layer transparency
-Using transparent keycode one layer can refer key definition on other lower layer.
-### layer precedence
-Top layer has higher precedence than lower layers.
-### tapping
-is to press and release a key quickly.
-### Fn key
-is key which executes a special action like layer switching, mouse key, macro or etc.
-### dual role key
-<http://en.wikipedia.org/wiki/Modifier_key#Dual-role_keys>
diff --git a/tmk_core/doc/other_projects.md b/tmk_core/doc/other_projects.md
deleted file mode 100644 (file)
index bf980b0..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-Other Keyboard Firmware Projects
-================================
-## PJRC USB Keyboard/Mouse Example[USB][PJRC][Teensy][AVR]
-- <http://www.pjrc.com/teensy/usb_keyboard.html>
-- <http://www.pjrc.com/teensy/usb_mouse.html>
-
-## kbupgrade[USB][V-USB][AVR]
-- <http://github.com/rhomann/kbupgrade>
-- <http://geekhack.org/showwiki.php?title=Island:8406>
-
-## c64key[USB][V-USB][AVR]
-- <http://symlink.dk/projects/c64key/>
-
-## rump[USB][V-USB][AVR]
-- <http://mg8.org/rump/>
-- <http://github.com/clee/rump>
-
-## dulcimer[USB][V-USB][AVR]
-- <http://www.schatenseite.de/dulcimer.html>
-
-## humblehacker-keyboard[USB][LUFA][AVR][Ergo]
-- <http://github.com/humblehacker>
-- <http://www.humblehacker.com/keyboard/>
-- <http://geekhack.org/showwiki.php?title=Island:6292>
-
-## ps2avr[PS/2][AVR]
-- <http://sourceforge.net/projects/ps2avr/>
-
-## ErgoDox[Ergo][Split][USB][AVR]
-- <http://geekhack.org/index.php?topic=22780.0>
-- <https://github.com/benblazak/ergodox-firmware>
-- <https://github.com/cub-uanic/tmk_keyboard>
-
-## Suka's keyboard collection[Ergo][Split][3DPrinting][USB][AVR]
-- <http://deskthority.net/workshop-f7/my-diy-keyboard-collection-or-how-i-became-a-kb-geek-t2534.html>
-- <https://github.com/frobiac/adnw>
-
-## bpiphany's AVR-Keyboard[PJRC][AVR][USB]
-- <https://github.com/BathroomEpiphanies/AVR-Keyboard>
-- <http://deskthority.net/wiki/HID_Liberation_Device_-_DIY_Instructions>
-- <http://deskthority.net/wiki/Phantom>
-
-## USB-USB keyboard remapper[converter][USB-USB][AVR][Arduino]
-- <http://forum.colemak.com/viewtopic.php?pid=10837>
-- <https://github.com/darkytoothpaste/keymapper>
-
-## USB-USB converter threads[converter][USB-USB]
-- <http://deskthority.net/workshop-f7/is-remapping-a-usb-keyboard-using-teensy-possible-t2841-30.html>
-- <http://geekhack.org/index.php?topic=19458.0>
-
-## kbdbabel.org[converter][vintage][protocol][8051]
-Great resource of vintage keyboard protocol information and code
-
-- <http://www.kbdbabel.org/>
-
-## Haata's kiibohd Controller[converter][vintage][protocol][AVR][PJRC][Cortex]
-A lots of vintage keyboard protocol supports
-
-- <http://gitorious.org/kiibohd-controller>
-
-## Kinesis ergonomic keyboard firmware replacement[V-USB][LUFA][Ergo]
-- <https://github.com/chrisandreae/kinesis-firmware>
diff --git a/util/1-setup-path-win.bat b/util/1-setup-path-win.bat
new file mode 100644 (file)
index 0000000..92e91be
--- /dev/null
@@ -0,0 +1,61 @@
+@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
+@ECHO OFF
+SET CMDLINERUNSTR=%SystemRoot%\system32\cmd.exe
+
+CD UTIL
+DEL add-paths.log > NUL 2>&1
+DEL add-paths-detail.log > NUL 2>&1
+DEL UPDATE > NUL 2>&1
+
+ELEVATE -wait %cd%\add-paths.bat > NUL 2>&1
+
+IF ERRORLEVEL 1 (
+       ECHO You denied admin access. Rerun the script, and be sure to press the yes button this time.
+) ELSE (
+       TYPE add-paths.log 2> NUL
+)
+ECHO.
+
+:: Branch to UpdateEnv if we need to update
+IF EXIST UPDATE (
+       DEL UPDATE
+       GOTO UpdateEnv
+)
+
+GOTO ExitBatch
+
+:: -----------------------------------------------------------------------------
+
+:UpdateEnv
+ECHO Making updated PATH go live . . .
+REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
+setx TEMPVAR 1 > NUL
+REG delete HKCU\Environment /F /V TEMPVAR > NUL 2>&1
+IF NOT !cmdcmdline! == !CMDLINERUNSTR! (CALL :KillExplorer)
+GOTO ExitBatch
+
+:: -----------------------------------------------------------------------------
+
+:ExitBatch
+ENDLOCAL
+PAUSE
+EXIT /b
+
+:: -----------------------------------------------------------------------------
+
+:KillExplorer
+ECHO Your desktop will be restarted. 
+ECHO All file explorer windows except for the one you launched this script from WILL BE CLOSED.
+ECHO Press enter when ready, or close this window if you would rather do a full restart of your computer at a later time.
+PAUSE
+ping -n 5 127.0.0.1 > NUL 2>&1
+ECHO Killing process Explorer.exe. . . 
+ECHO.  
+taskkill /f /im explorer.exe > NUL
+ECHO.   
+ECHO Your desktop is now loading. . . 
+ECHO.   
+ping -n 5 127.0.0.1 > NUL 2>&1
+START explorer.exe
+START explorer.exe %CD%\..
+EXIT /b
\ No newline at end of file
diff --git a/util/2-setup-environment-win.bat b/util/2-setup-environment-win.bat
new file mode 100644 (file)
index 0000000..9053380
--- /dev/null
@@ -0,0 +1,63 @@
+@SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
+@ECHO OFF
+
+SET STARTINGDIR=%CD%
+
+:: Check for admin privilages
+SETX /M test test > nul 2>&1
+IF NOT ["%ERRORLEVEL%"]==["0"] (
+       ECHO FAILED. Rerun with administrator privileges.
+       GOTO ExitBatch
+) 
+
+:: Make sure path to MinGW exists - if so, CD to it
+SET MINGWPATH="C:\MinGW\bin"
+IF NOT EXIST !MINGWPATH! (ECHO Path not found: %MINGWPATH% && GOTO ExitBatch)
+CD /D %MINGWPATH%
+
+
+ECHO ------------------------------------------
+ECHO Installing wget and unzip
+ECHO ------------------------------------------
+mingw-get install msys-wget-bin msys-unzip-bin
+
+MKDIR temp
+CD temp
+
+ECHO ------------------------------------------
+ECHO Installing dfu-programmer.
+ECHO ------------------------------------------
+wget http://iweb.dl.sourceforge.net/project/dfu-programmer/dfu-programmer/0.7.2/dfu-programmer-win-0.7.2.zip
+unzip dfu-programmer-win-0.7.2.zip
+COPY dfu-programmer.exe ..
+
+ECHO ------------------------------------------
+ECHO Downloading driver
+ECHO ------------------------------------------
+wget http://iweb.dl.sourceforge.net/project/libusb-win32/libusb-win32-releases/1.2.6.0/libusb-win32-bin-1.2.6.0.zip
+unzip libusb-win32-bin-1.2.6.0.zip
+COPY libusb-win32-bin-1.2.6.0\bin\x86\libusb0_x86.dll ../libusb0.dll
+
+ECHO ------------------------------------------
+ECHO Installing driver. Accept prompt.
+ECHO ------------------------------------------
+IF EXIST "%WinDir%\System32\PnPUtil.exe" (%WinDir%\System32\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND)
+IF EXIST "%WinDir%\Sysnative\PnPUtil.exe" (%WinDir%\Sysnative\PnPUtil.exe -i -a dfu-prog-usb-1.2.2\atmel_usb_dfu.inf && GOTO PNPUTILFOUND)
+
+ECHO FAILED. Could not find PnPUtil.exe in "%WinDir%\System32" or "%WinDir%\Sysnative".
+
+:PNPUTILFOUND
+
+:: Wait then delete directory
+ping -n 5 127.0.0.1 > NUL 2>&1
+CD ..
+RD /s /q temp
+
+ECHO ------------------------------------------
+ECHO Finished!
+
+:ExitBatch
+CD /D %STARTINGDIR%
+ENDLOCAL
+PAUSE
+EXIT /b
\ No newline at end of file
diff --git a/util/Vagrantfile b/util/Vagrantfile
new file mode 100644 (file)
index 0000000..1abe8ff
--- /dev/null
@@ -0,0 +1,88 @@
+# -*- mode: ruby -*-\r
+# vi: set ft=ruby :\r
+\r
+Vagrant.configure(2) do |config|\r
+  # You can only have one config.vm.box uncommented at a time\r
+\r
+  # Comment this and uncomment another if you don't want to use the minimal Arch box\r
+  config.vm.box = "dragon788/arch-ala-elasticdog"\r
+\r
+  # VMware/Virtualbox 64 bit\r
+  # config.vm.box = "phusion/ubuntu-14.04-amd64"\r
+  #\r
+  # VMware/Virtualbox 64 bit\r
+  #config.vm.box = "puphpet/centos65-x64"\r
+  #\r
+  # The opensuse boxes don't have dfu-util in their default repositories\r
+  #\r
+  # The virtualbox version has tools issues\r
+  # VMware/Virtualbox 64 bit\r
+  #config.vm.box = "bento/opensuse-13.2-x86_64"\r
+  #\r
+  # Virtualbox only\r
+  #config.vm.box = "bento/opensuse-13.2-i386"\r
+  # config.vm.box = ""\r
+  # config.vm.box = ""\r
+\r
+  # This section allows you to customize the Virtualbox VM\r
+  # settings, ie showing the GUI or upping the memory\r
+  # or cores if desired\r
+  config.vm.provider "virtualbox" do |vb|\r
+    # Hide the VirtualBox GUI when booting the machine\r
+    vb.gui = false\r
+    # Uncomment the below lines if you want to program\r
+    # your Teensy via the VM rather than your host OS\r
+    #vb.customize ['modifyvm', :id, '--usb', 'on']\r
+    #vb.customize ['usbfilter', 'add', '0',\r
+    #            '--target', :id,\r
+    #            '--name', 'teensy',\r
+    #            '--vendorid', '0x16c0',\r
+    #            '--productid','0x0478'\r
+    #           ] \r
+    # Customize the amount of memory on the VM:\r
+    vb.memory = "512"\r
+  end\r
+\r
+  # This section allows you to customize the VMware VM\r
+  # settings, ie showing the GUI or upping the memory\r
+  # or cores if desired\r
+  config.vm.provider "vmware_workstation" do |vmw|\r
+    # Hide the VMware GUI when booting the machine\r
+    vmw.gui = false \r
\r
+    # Customize the amount of memory on the VM:\r
+    vmw.memory = "512"\r
+  end\r
+\r
+  config.vm.provider "vmware_fusion" do |vmf|\r
+    # Hide the vmfare GUI when booting the machine\r
+    vmf.gui = false\r
\r
+    # Customize the amount of memory on the VM:\r
+    vmf.memory = "512"\r
+  end\r
+  \r
+  # This script ensures the required packages for AVR programming are installed\r
+  # It also ensures the system always gets the latest updates when powered on\r
+  # If this causes issues you can run a 'vagrant destroy' and then\r
+  # add a # before ,args: and run 'vagrant up' to get a working\r
+  # non-updated box and then attempt to troubleshoot or open a Github issue \r
+  \r
+  config.vm.provision "shell", run: "always", path: "avr_setup.sh", args: "-update"\r
+\r
+  config.vm.post_up_message = """\r
+  Log into the VM using 'vagrant ssh' on OSX or from Git Bash (Win)\r
+  or 'vagrant ssh-config' and Putty or Bitvise SSH or another SSH tool\r
+\r
+  Change directory (cd) to the keyboard you wish to program \r
+  (Optionally) modify your layout, \r
+  then run 'make clean' \r
+  and then 'make' to compile the .eep and .hex files.\r
+\r
+  Or you can copy and paste the example line below. \r
\r
+  cd /vagrant; cd keyboard; cd ergodox_ez; make clean; make\r
+  \r
+\r
+  """\r
+end\r
diff --git a/util/avr_setup.sh b/util/avr_setup.sh
new file mode 100644 (file)
index 0000000..34a8a32
--- /dev/null
@@ -0,0 +1,72 @@
+#!/usr/bin/env bash
+# This script will attempt to setup the Linux dependencies for compiling QMK/TMK
+
+# This could probably go much lower, but since we are including an Arch vagrant,
+# making it the first match makes sense
+
+if [[ -n "$(type -P pacman )" ]]; then
+  # Arch linux and derivatives like Apricity
+  # Future improvements:
+  # Allow user to speed up package installs using powerpill/wget tweaks
+  # Always run the pacman mirror update script if possible when vagrant comes up
+  # This will ensure that users never get stalled on a horribly slow mirror
+  pacman -Syyu --needed --noconfirm
+  pacman -S --needed --noconfirm \
+    base-devel \
+    avr-gcc \
+    avr-binutils \
+    avr-libc \
+    dfu-util
+
+elif [[ -n "$(type -P apt-get)" ]]; then
+  # Debian and derivatives
+  # This block performs completely non-interactive updates {{
+  export DEBIAN_FRONTEND=noninteractive
+  export DEBCONF_NONINTERACTIVE_SEEN=true
+  echo "grub-pc hold" | dpkg --set-selections
+  apt-get -y update
+  apt-get -y --allow-unauthenticated upgrade \
+         -o Dpkg::Options::="--force-confdef" \
+         -o Dpkg::Options::="--force-confold"
+  # }}
+  apt-get install -y \
+    build-essential \
+    gcc \
+    unzip \
+    wget \
+    zip \
+    gcc-avr \
+    binutils-avr \
+    avr-libc \
+    dfu-util
+  
+elif [[ -n "$(type -P yum)" ]]; then
+  # Fedora, CentOS or RHEL and derivatives
+  yum -y makecache && yum -y update
+  yum -y install \
+    gcc \
+    glibc-headers \
+    kernel-devel \
+    kernel-headers \
+    make \
+    perl \
+    git \
+    wget \
+    avr-binutils \
+    avr-gcc \
+    avr-libc \
+    dfu-util
+
+elif [[ -n "$(type -P zypper)" ]]; then
+  # openSUSE
+  zypper --non-interactive refresh  && zypper --non-interactive update
+  zypper --non-interactive install \
+    git \
+    make \
+    gcc \
+    kernel-devel \
+    patch \
+    wget \
+    dfu-programmer
+
+fi
diff --git a/util/new_project.sh b/util/new_project.sh
new file mode 100755 (executable)
index 0000000..7def543
--- /dev/null
@@ -0,0 +1,26 @@
+#!/bin/sh
+# Script to make a new quantum project
+# Jack Humbert 2015
+
+if [ -z "$1" ]; then
+       echo "Usage: $0 <keyboard_name>"
+       exit 1
+fi
+
+KEYBOARD=$1
+KEYBOARD_UPPERCASE=$(echo $1 | awk '{print toupper($0)}')
+
+mkdir keyboard/$1
+mkdir keyboard/$1/keymaps
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" -e "s;%KEYBOARD_UPPERCASE%;$KEYBOARD_UPPERCASE;g" quantum/template/template.h > keyboard/$KEYBOARD/$KEYBOARD.h
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/template.c > keyboard/$KEYBOARD/$KEYBOARD.c
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/config.h > keyboard/$KEYBOARD/config.h
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/README.md > keyboard/$KEYBOARD/README.md
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/Makefile > keyboard/$KEYBOARD/Makefile
+sed -e "s;%KEYBOARD%;$KEYBOARD;g" quantum/template/keymaps/default.c > keyboard/$KEYBOARD/keymaps/default.c
+
+echo "######################################################"
+echo "# keyboard/$KEYBOARD project created. To start"
+echo "# working on things, use the following command:"
+echo "# cd keyboard/$KEYBOARD"
+echo "######################################################"