diff options
| -rw-r--r-- | keyboard/hhkb/Makefile (renamed from keyboard/hhkb/Makefile.lufa) | 4 | ||||
| -rw-r--r-- | keyboard/hhkb/README.md | 72 | ||||
| -rw-r--r-- | keyboard/hhkb/config.h | 19 |
3 files changed, 29 insertions, 66 deletions
diff --git a/keyboard/hhkb/Makefile.lufa b/keyboard/hhkb/Makefile index 262282a01..1ef0a0187 100644 --- a/keyboard/hhkb/Makefile.lufa +++ b/keyboard/hhkb/Makefile | |||
| @@ -57,7 +57,9 @@ CONFIG_H = config.h | |||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | # MCU name | 59 | # MCU name |
| 60 | # PJRC Teensy++ 2.0 | ||
| 60 | #MCU = at90usb1286 | 61 | #MCU = at90usb1286 |
| 62 | # TMK Alt Controller or PJRC Teensy 2.0 | ||
| 61 | MCU = atmega32u4 | 63 | MCU = atmega32u4 |
| 62 | 64 | ||
| 63 | # Processor frequency. | 65 | # Processor frequency. |
| @@ -100,7 +102,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT | |||
| 100 | # Boot Section Size in *bytes* | 102 | # Boot Section Size in *bytes* |
| 101 | # Teensy halfKay 512 | 103 | # Teensy halfKay 512 |
| 102 | # Teensy++ halfKay 1024 | 104 | # Teensy++ halfKay 1024 |
| 103 | # Atmel DFU loader 4096 | 105 | # Atmel DFU loader 4096 (TMK Alt Controller) |
| 104 | # LUFA bootloader 4096 | 106 | # LUFA bootloader 4096 |
| 105 | # USBaspLoader 2048 | 107 | # USBaspLoader 2048 |
| 106 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 | 108 | OPT_DEFS += -DBOOTLOADER_SIZE=4096 |
diff --git a/keyboard/hhkb/README.md b/keyboard/hhkb/README.md index b9e0b534a..3959ae85a 100644 --- a/keyboard/hhkb/README.md +++ b/keyboard/hhkb/README.md | |||
| @@ -8,7 +8,6 @@ See [this thread][AltController] in geekhack.org. | |||
| 8 | 8 | ||
| 9 | [HHKB]: http://www.pfu.fujitsu.com/hhkeyboard/ | 9 | [HHKB]: http://www.pfu.fujitsu.com/hhkeyboard/ |
| 10 | [AltController]: http://geekhack.org/index.php?topic=12047.0 | 10 | [AltController]: http://geekhack.org/index.php?topic=12047.0 |
| 11 | [Teensy]: http://www.pjrc.com/teensy/ | ||
| 12 | 11 | ||
| 13 | 12 | ||
| 14 | ##Features | 13 | ##Features |
| @@ -22,8 +21,8 @@ See README of [tmk_keyboard] for more. | |||
| 22 | [tmk_keyboard]: http://github.com/tmk/tmk_keyboard | 21 | [tmk_keyboard]: http://github.com/tmk/tmk_keyboard |
| 23 | 22 | ||
| 24 | ###Pros | 23 | ###Pros |
| 25 | * No risk: Everything is all reversible | 24 | * No risks: Everything is all reversible |
| 26 | * Without PCB trace cutting, case mod or any destructives | 25 | * No need for PCB trace patching, case cutting or any other destructive mod |
| 27 | * Can keep original controller intact | 26 | * Can keep original controller intact |
| 28 | * Can change all HHKB behaviour as you like | 27 | * Can change all HHKB behaviour as you like |
| 29 | 28 | ||
| @@ -41,61 +40,35 @@ See [doc/HHKB.txt](doc/HHKB.txt) and files under [doc/](doc/) for internal of HH | |||
| 41 | 40 | ||
| 42 | 41 | ||
| 43 | ##Build Firmware & Program | 42 | ##Build Firmware & Program |
| 44 | You can choose some combination of hardware and USB protocol stack([LUFA], [PJRC]). | 43 | See [this document](../../doc/build.md) first. |
| 45 | 44 | ||
| 46 | ### Install Tools | 45 | ### Configuration |
| 47 | See [this document](../../doc/build.md). | 46 | Set `MCU`, `BOOTLOADER_SIZE` and other build options in `Makefile` and `config.h`. |
| 48 | 47 | ||
| 49 | ### TMK Alt Controller Board | 48 | ### Build |
| 50 | $ make -f Makefile.tmk | 49 | Just run make after intall tools. |
| 51 | 50 | ||
| 52 | This programs the controller with [dfu-programmer] if the tool is intalled and configured properly. | 51 | $ make |
| 53 | 52 | ||
| 54 | $ make -f Makefile.tmk dfu | 53 | Use `Makefile.pjrc` if you want to use PJRC stack instead of LUFA.(LUFA is recommended.) |
| 55 | |||
| 56 | Push reset button and program with [FLIP]. The tool should be intalled and configured properly. | ||
| 57 | |||
| 58 | $ make -f Makefile.tmk flip | ||
| 59 | |||
| 60 | Or you can also program with FLIP GUI. | ||
| 61 | |||
| 62 | [dfu-programmer]: http://dfu-programmer.sourceforge.net/ | ||
| 63 | [FLIP]: http://www.atmel.com/tools/FLIP.aspx | ||
| 64 | |||
| 65 | |||
| 66 | ### PJRC Teensy++ | ||
| 67 | Build with [LUFA] USB stack: | ||
| 68 | |||
| 69 | $ make -f Makefile.lufa | ||
| 70 | |||
| 71 | or with [PJRC] USB stack: | ||
| 72 | 54 | ||
| 73 | $ make -f Makefile.pjrc | 55 | $ make -f Makefile.pjrc |
| 74 | 56 | ||
| 75 | Push reset button and program with [Teensy Loader(command line)]. The tool should be intalled and configured properly. | 57 | Use `Makefile.vusb` for [V-USB] controller.(not supported actively any more.) |
| 76 | 58 | $ make -f Makefile.vusb | |
| 77 | $ make -f Makefile.lufa teensy | ||
| 78 | $ make -f Makefile.pjrc teensy | ||
| 79 | |||
| 80 | Or you can also program with [Teensy Loader(GUI)]. | ||
| 81 | 59 | ||
| 82 | [LUFA]: http://www.fourwalledcubicle.com/LUFA.php | 60 | ### Program |
| 83 | [PJRC]: http://www.pjrc.com/teensy/usb_keyboard.html | 61 | First, push reset button on board to start bootloader. |
| 84 | [Teensy Loader(command line)]: http://www.pjrc.com/teensy/loader_cli.html | ||
| 85 | [Teensy Loader(GUI)]: http://www.pjrc.com/teensy/loader.html | ||
| 86 | 62 | ||
| 63 | This command programs the controller with [dfu-programmer] if the tool is intalled and configured properly. | ||
| 87 | 64 | ||
| 88 | ###AVR Mega with [V-USB] | 65 | $ make dfu |
| 89 | Build: | ||
| 90 | $ make -f Makefile.vusb | ||
| 91 | 66 | ||
| 92 | Program [USBaspLoader] on MCU with AVR programmer like [AVRISPmkII] and tool like [avrdude]. | 67 | Or you can also use [FLIP] command to program. Also the tool should be intalled and configured properly. FLIP GUI app is also available. |
| 93 | 68 | ||
| 94 | You can programs with [avrdude] once you have programmed [USBaspLoader] on MCU. | 69 | $ make flip |
| 95 | $ make -f Makefile.vusb program | ||
| 96 | 70 | ||
| 97 | [AVRISPmkII]: http://www.atmel.com/tools/AVRISPMKII.aspx | 71 | Use [Teensy Loader] if your controller is Teensy/Teensy++. |
| 98 | [avrdude]: http://www.nongnu.org/avrdude/ | ||
| 99 | 72 | ||
| 100 | 73 | ||
| 101 | ##How to Customize | 74 | ##How to Customize |
| @@ -103,7 +76,7 @@ See [tmk_keyboard] documents. | |||
| 103 | 76 | ||
| 104 | 77 | ||
| 105 | ##Hardware | 78 | ##Hardware |
| 106 | You have some options for hardware. Development boards with USB AVR family(ATMega32U4, AT90USB1286) like Teensy will work while MegaAVR with V-USB library is also cheapear option for DIY. | 79 | You have some options for hardware. Development boards with USB AVR family(ATMega32U4, AT90USB1286) like Teensy will work while MegaAVR with [V-USB] library is also cheapear option for DIY. |
| 107 | 80 | ||
| 108 | ###1. TMK Alt Controller Board | 81 | ###1. TMK Alt Controller Board |
| 109 | TMK designed [Keyboard Controller Board for HHKB Pro2(KiCad project)](https://github.com/tmk/HHKB_controller). | 82 | TMK designed [Keyboard Controller Board for HHKB Pro2(KiCad project)](https://github.com/tmk/HHKB_controller). |
| @@ -127,7 +100,6 @@ See [this post](http://geekhack.org/index.php?topic=12047.msg948923#msg948923). | |||
| 127 | +---------------+ | 100 | +---------------+ |
| 128 | 101 | ||
| 129 | - NOTE: PJRC [Teensy](http://www.pjrc.com/teensy/) | 102 | - NOTE: PJRC [Teensy](http://www.pjrc.com/teensy/) |
| 130 | [Teensy Loader]: http://www.pjrc.com/teensy/loader.html | ||
| 131 | 103 | ||
| 132 | ###3. V-USB connection | 104 | ###3. V-USB connection |
| 133 | +---+ +---------------+ | 105 | +---+ +---------------+ |
| @@ -156,5 +128,11 @@ See [this post](http://geekhack.org/index.php?topic=12047.msg948923#msg948923). | |||
| 156 | - NOTE: See [V-USB] documentation for more detail of hardware and the USB stack. | 128 | - NOTE: See [V-USB] documentation for more detail of hardware and the USB stack. |
| 157 | - NOTE: [USBaspLoader] is very useful for firmware update. | 129 | - NOTE: [USBaspLoader] is very useful for firmware update. |
| 158 | 130 | ||
| 131 | |||
| 132 | [LUFA]: http://www.fourwalledcubicle.com/LUFA.php | ||
| 133 | [PJRC]: http://www.pjrc.com/teensy/usb_keyboard.html | ||
| 134 | [dfu-programmer]: http://dfu-programmer.sourceforge.net/ | ||
| 135 | [FLIP]: http://www.atmel.com/tools/FLIP.aspx | ||
| 136 | [Teensy Loader]: http://www.pjrc.com/teensy/loader.html | ||
| 159 | [V-USB]: http://www.obdev.at/products/vusb/index.html | 137 | [V-USB]: http://www.obdev.at/products/vusb/index.html |
| 160 | [USBaspLoader]: http://www.obdev.at/products/vusb/usbasploader.html | 138 | [USBaspLoader]: http://www.obdev.at/products/vusb/usbasploader.html |
diff --git a/keyboard/hhkb/config.h b/keyboard/hhkb/config.h index ebee0c036..83a911bea 100644 --- a/keyboard/hhkb/config.h +++ b/keyboard/hhkb/config.h | |||
| @@ -31,27 +31,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 31 | #define MATRIX_ROWS 8 | 31 | #define MATRIX_ROWS 8 |
| 32 | #define MATRIX_COLS 8 | 32 | #define MATRIX_COLS 8 |
| 33 | 33 | ||
| 34 | /* | ||
| 35 | * Boot magic keys | ||
| 36 | * call some function by pressing key when pluging cable or powering on. | ||
| 37 | */ | ||
| 38 | /* key position on matrix(ROW:COL) */ | ||
| 39 | #define KEY_FN 0x54 | ||
| 40 | #define KEY_D 0x14 | ||
| 41 | #define KEY_IS_ON(key) matrix_is_on((key)>>4, (key)&0xF) | ||
| 42 | /* kick up bootloader */ | ||
| 43 | #define IS_BOOTMAGIC_BOOTLOADER() KEY_IS_ON(KEY_FN) | ||
| 44 | /* debug on */ | ||
| 45 | #define IS_BOOTMAGIC_DEBUG() KEY_IS_ON(KEY_D) | ||
| 46 | |||
| 47 | 34 | ||
| 48 | /* key combination for command */ | 35 | /* key combination for command */ |
| 49 | #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) | 36 | #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) |
| 50 | 37 | ||
| 51 | /* mouse keys */ | ||
| 52 | #ifdef MOUSEKEY_ENABLE | ||
| 53 | # define MOUSEKEY_DELAY_TIME 100 | ||
| 54 | #endif | ||
| 55 | 38 | ||
| 56 | /* period of tapping(ms) */ | 39 | /* period of tapping(ms) */ |
| 57 | #define TAPPING_TERM 300 | 40 | #define TAPPING_TERM 300 |
| @@ -62,11 +45,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 62 | /* Boot Magic salt key: Space */ | 45 | /* Boot Magic salt key: Space */ |
| 63 | #define BOOTMAGIC_KEY_SALT KC_FN6 | 46 | #define BOOTMAGIC_KEY_SALT KC_FN6 |
| 64 | 47 | ||
| 48 | |||
| 65 | /* | 49 | /* |
| 66 | * Feature disable options | 50 | * Feature disable options |
| 67 | * These options are also useful to firmware size reduction. | 51 | * These options are also useful to firmware size reduction. |
| 68 | */ | 52 | */ |
| 69 | |||
| 70 | /* disable debug print */ | 53 | /* disable debug print */ |
| 71 | //#define NO_DEBUG | 54 | //#define NO_DEBUG |
| 72 | 55 | ||
