From f4125707399d11a7d80587659c464b9bcddb8c56 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 7 Jun 2012 02:25:15 +0900 Subject: [PATCH 1/4] Moved files to common, protocol and doc directory --- LICENSE.txt | 27 --- bootloader.c => common/bootloader.c | 0 bootloader.h => common/bootloader.h | 0 command.c => common/command.c | 0 command.h => common/command.h | 0 .../controller_teensy.h | 0 debug.h => common/debug.h | 0 host.c => common/host.c | 0 host.h => common/host.h | 0 host_driver.h => common/host_driver.h | 0 keyboard.c => common/keyboard.c | 0 keyboard.h => common/keyboard.h | 0 keymap.h => common/keymap.h | 0 layer.c => common/layer.c | 0 layer.h => common/layer.h | 0 led.h => common/led.h | 0 matrix.h => common/matrix.h | 0 mousekey.c => common/mousekey.c | 0 mousekey.h => common/mousekey.h | 0 print.c => common/print.c | 0 print.h => common/print.h | 0 report.h => common/report.h | 0 sendchar.h => common/sendchar.h | 0 sendchar_null.c => common/sendchar_null.c | 0 sendchar_uart.c => common/sendchar_uart.c | 0 timer.c => common/timer.c | 0 timer.h => common/timer.h | 0 uart.c => common/uart.c | 0 uart.h => common/uart.h | 0 usb_keycodes.h => common/usb_keycodes.h | 0 util.c => common/util.c | 0 util.h => common/util.h | 0 COPYING.GPLv2 => doc/COPYING.GPLv2 | 0 COPYING.GPLv3 => doc/COPYING.GPLv3 | 0 {hhkb => doc}/FUSE.txt | 0 POWER.txt => doc/POWER.txt | 0 USB_NKRO.txt => doc/USB_NKRO.txt | 0 pjrc/host.c | 183 ------------------ adb.c => protocol/adb.c | 0 adb.h => protocol/adb.h | 0 iwrap.mk => protocol/iwrap.mk | 0 {iwrap => protocol/iwrap}/iWRAP.txt | 0 {iwrap => protocol/iwrap}/iwrap.c | 0 {iwrap => protocol/iwrap}/iwrap.h | 0 {iwrap => protocol/iwrap}/main.c | 0 {iwrap => protocol/iwrap}/suart.S | 0 {iwrap => protocol/iwrap}/suart.h | 0 {iwrap => protocol/iwrap}/wd.h | 0 m0110.c => protocol/m0110.c | 0 m0110.h => protocol/m0110.h | 0 pjrc.mk => protocol/pjrc.mk | 0 {pjrc => protocol/pjrc}/bootloader_teensy.c | 0 {pjrc => protocol/pjrc}/main.c | 0 {pjrc => protocol/pjrc}/pjrc.c | 0 {pjrc => protocol/pjrc}/pjrc.h | 0 {pjrc => protocol/pjrc}/usb.c | 0 {pjrc => protocol/pjrc}/usb.h | 0 {pjrc => protocol/pjrc}/usb_debug.c | 0 {pjrc => protocol/pjrc}/usb_debug.h | 0 {pjrc => protocol/pjrc}/usb_extra.c | 0 {pjrc => protocol/pjrc}/usb_extra.h | 0 {pjrc => protocol/pjrc}/usb_keyboard.c | 0 {pjrc => protocol/pjrc}/usb_keyboard.h | 0 {pjrc => protocol/pjrc}/usb_mouse.c | 0 {pjrc => protocol/pjrc}/usb_mouse.h | 0 ps2.c => protocol/ps2.c | 0 ps2.h => protocol/ps2.h | 0 ps2_mouse.c => protocol/ps2_mouse.c | 0 ps2_mouse.h => protocol/ps2_mouse.h | 0 ps2_usart.c => protocol/ps2_usart.c | 0 vusb.mk => protocol/vusb.mk | 0 {vusb => protocol/vusb}/bootloader_usbasp.c | 0 {vusb => protocol/vusb}/main.c | 0 {vusb => protocol/vusb}/sendchar_usart.c | 0 {vusb => protocol/vusb}/usbdrv/Changelog.txt | 0 .../vusb}/usbdrv/CommercialLicense.txt | 0 {vusb => protocol/vusb}/usbdrv/License.txt | 0 {vusb => protocol/vusb}/usbdrv/Readme.txt | 0 {vusb => protocol/vusb}/usbdrv/USB-ID-FAQ.txt | 0 .../vusb}/usbdrv/USB-IDs-for-free.txt | 0 {vusb => protocol/vusb}/usbdrv/asmcommon.inc | 0 {vusb => protocol/vusb}/usbdrv/oddebug.c | 0 {vusb => protocol/vusb}/usbdrv/oddebug.h | 0 .../vusb}/usbdrv/usbconfig-prototype.h | 0 {vusb => protocol/vusb}/usbdrv/usbdrv.c | 0 {vusb => protocol/vusb}/usbdrv/usbdrv.h | 0 {vusb => protocol/vusb}/usbdrv/usbdrvasm.S | 0 {vusb => protocol/vusb}/usbdrv/usbdrvasm.asm | 0 .../vusb}/usbdrv/usbdrvasm12.inc | 0 .../vusb}/usbdrv/usbdrvasm128.inc | 0 .../vusb}/usbdrv/usbdrvasm15.inc | 0 .../vusb}/usbdrv/usbdrvasm16.inc | 0 .../vusb}/usbdrv/usbdrvasm165.inc | 0 .../vusb}/usbdrv/usbdrvasm18-crc.inc | 0 .../vusb}/usbdrv/usbdrvasm20.inc | 0 .../vusb}/usbdrv/usbportability.h | 0 {vusb => protocol/vusb}/vusb.c | 0 {vusb => protocol/vusb}/vusb.h | 0 98 files changed, 210 deletions(-) delete mode 100644 LICENSE.txt rename bootloader.c => common/bootloader.c (100%) rename bootloader.h => common/bootloader.h (100%) rename command.c => common/command.c (100%) rename command.h => common/command.h (100%) rename controller_teensy.h => common/controller_teensy.h (100%) rename debug.h => common/debug.h (100%) rename host.c => common/host.c (100%) rename host.h => common/host.h (100%) rename host_driver.h => common/host_driver.h (100%) rename keyboard.c => common/keyboard.c (100%) rename keyboard.h => common/keyboard.h (100%) rename keymap.h => common/keymap.h (100%) rename layer.c => common/layer.c (100%) rename layer.h => common/layer.h (100%) rename led.h => common/led.h (100%) rename matrix.h => common/matrix.h (100%) rename mousekey.c => common/mousekey.c (100%) rename mousekey.h => common/mousekey.h (100%) rename print.c => common/print.c (100%) rename print.h => common/print.h (100%) rename report.h => common/report.h (100%) rename sendchar.h => common/sendchar.h (100%) rename sendchar_null.c => common/sendchar_null.c (100%) rename sendchar_uart.c => common/sendchar_uart.c (100%) rename timer.c => common/timer.c (100%) rename timer.h => common/timer.h (100%) rename uart.c => common/uart.c (100%) rename uart.h => common/uart.h (100%) rename usb_keycodes.h => common/usb_keycodes.h (100%) rename util.c => common/util.c (100%) rename util.h => common/util.h (100%) rename COPYING.GPLv2 => doc/COPYING.GPLv2 (100%) rename COPYING.GPLv3 => doc/COPYING.GPLv3 (100%) rename {hhkb => doc}/FUSE.txt (100%) rename POWER.txt => doc/POWER.txt (100%) rename USB_NKRO.txt => doc/USB_NKRO.txt (100%) delete mode 100644 pjrc/host.c rename adb.c => protocol/adb.c (100%) rename adb.h => protocol/adb.h (100%) rename iwrap.mk => protocol/iwrap.mk (100%) rename {iwrap => protocol/iwrap}/iWRAP.txt (100%) rename {iwrap => protocol/iwrap}/iwrap.c (100%) rename {iwrap => protocol/iwrap}/iwrap.h (100%) rename {iwrap => protocol/iwrap}/main.c (100%) rename {iwrap => protocol/iwrap}/suart.S (100%) rename {iwrap => protocol/iwrap}/suart.h (100%) rename {iwrap => protocol/iwrap}/wd.h (100%) rename m0110.c => protocol/m0110.c (100%) rename m0110.h => protocol/m0110.h (100%) rename pjrc.mk => protocol/pjrc.mk (100%) rename {pjrc => protocol/pjrc}/bootloader_teensy.c (100%) rename {pjrc => protocol/pjrc}/main.c (100%) rename {pjrc => protocol/pjrc}/pjrc.c (100%) rename {pjrc => protocol/pjrc}/pjrc.h (100%) rename {pjrc => protocol/pjrc}/usb.c (100%) rename {pjrc => protocol/pjrc}/usb.h (100%) rename {pjrc => protocol/pjrc}/usb_debug.c (100%) rename {pjrc => protocol/pjrc}/usb_debug.h (100%) rename {pjrc => protocol/pjrc}/usb_extra.c (100%) rename {pjrc => protocol/pjrc}/usb_extra.h (100%) rename {pjrc => protocol/pjrc}/usb_keyboard.c (100%) rename {pjrc => protocol/pjrc}/usb_keyboard.h (100%) rename {pjrc => protocol/pjrc}/usb_mouse.c (100%) rename {pjrc => protocol/pjrc}/usb_mouse.h (100%) rename ps2.c => protocol/ps2.c (100%) rename ps2.h => protocol/ps2.h (100%) rename ps2_mouse.c => protocol/ps2_mouse.c (100%) rename ps2_mouse.h => protocol/ps2_mouse.h (100%) rename ps2_usart.c => protocol/ps2_usart.c (100%) rename vusb.mk => protocol/vusb.mk (100%) rename {vusb => protocol/vusb}/bootloader_usbasp.c (100%) rename {vusb => protocol/vusb}/main.c (100%) rename {vusb => protocol/vusb}/sendchar_usart.c (100%) rename {vusb => protocol/vusb}/usbdrv/Changelog.txt (100%) rename {vusb => protocol/vusb}/usbdrv/CommercialLicense.txt (100%) rename {vusb => protocol/vusb}/usbdrv/License.txt (100%) rename {vusb => protocol/vusb}/usbdrv/Readme.txt (100%) rename {vusb => protocol/vusb}/usbdrv/USB-ID-FAQ.txt (100%) rename {vusb => protocol/vusb}/usbdrv/USB-IDs-for-free.txt (100%) rename {vusb => protocol/vusb}/usbdrv/asmcommon.inc (100%) rename {vusb => protocol/vusb}/usbdrv/oddebug.c (100%) rename {vusb => protocol/vusb}/usbdrv/oddebug.h (100%) rename {vusb => protocol/vusb}/usbdrv/usbconfig-prototype.h (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrv.c (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrv.h (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm.S (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm.asm (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm12.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm128.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm15.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm16.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm165.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm18-crc.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbdrvasm20.inc (100%) rename {vusb => protocol/vusb}/usbdrv/usbportability.h (100%) rename {vusb => protocol/vusb}/vusb.c (100%) rename {vusb => protocol/vusb}/vusb.h (100%) diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index de622df54..000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,27 +0,0 @@ -Codes are released under each license. See heading of each file for details. - -Modified BSD license: - ps2.c - ps2.h - adb.c - adb.h - -GPLv2 or later: - other codes - -PJRC's license: - print.c - print.h - pjrc/ - -GPLv2 or GPLv3 or OBJECTIVE DEVELOPMENT's commercial license: - vusb/ - - - - -This software includes following codes from other parties. - - V-USB from OBJECTIVE DEVELOPMENT - http://www.obdev.at/products/vusb/index.html - - Teensy example codes from PJRC - http://www.pjrc.com/teensy/ diff --git a/bootloader.c b/common/bootloader.c similarity index 100% rename from bootloader.c rename to common/bootloader.c diff --git a/bootloader.h b/common/bootloader.h similarity index 100% rename from bootloader.h rename to common/bootloader.h diff --git a/command.c b/common/command.c similarity index 100% rename from command.c rename to common/command.c diff --git a/command.h b/common/command.h similarity index 100% rename from command.h rename to common/command.h diff --git a/controller_teensy.h b/common/controller_teensy.h similarity index 100% rename from controller_teensy.h rename to common/controller_teensy.h diff --git a/debug.h b/common/debug.h similarity index 100% rename from debug.h rename to common/debug.h diff --git a/host.c b/common/host.c similarity index 100% rename from host.c rename to common/host.c diff --git a/host.h b/common/host.h similarity index 100% rename from host.h rename to common/host.h diff --git a/host_driver.h b/common/host_driver.h similarity index 100% rename from host_driver.h rename to common/host_driver.h diff --git a/keyboard.c b/common/keyboard.c similarity index 100% rename from keyboard.c rename to common/keyboard.c diff --git a/keyboard.h b/common/keyboard.h similarity index 100% rename from keyboard.h rename to common/keyboard.h diff --git a/keymap.h b/common/keymap.h similarity index 100% rename from keymap.h rename to common/keymap.h diff --git a/layer.c b/common/layer.c similarity index 100% rename from layer.c rename to common/layer.c diff --git a/layer.h b/common/layer.h similarity index 100% rename from layer.h rename to common/layer.h diff --git a/led.h b/common/led.h similarity index 100% rename from led.h rename to common/led.h diff --git a/matrix.h b/common/matrix.h similarity index 100% rename from matrix.h rename to common/matrix.h diff --git a/mousekey.c b/common/mousekey.c similarity index 100% rename from mousekey.c rename to common/mousekey.c diff --git a/mousekey.h b/common/mousekey.h similarity index 100% rename from mousekey.h rename to common/mousekey.h diff --git a/print.c b/common/print.c similarity index 100% rename from print.c rename to common/print.c diff --git a/print.h b/common/print.h similarity index 100% rename from print.h rename to common/print.h diff --git a/report.h b/common/report.h similarity index 100% rename from report.h rename to common/report.h diff --git a/sendchar.h b/common/sendchar.h similarity index 100% rename from sendchar.h rename to common/sendchar.h diff --git a/sendchar_null.c b/common/sendchar_null.c similarity index 100% rename from sendchar_null.c rename to common/sendchar_null.c diff --git a/sendchar_uart.c b/common/sendchar_uart.c similarity index 100% rename from sendchar_uart.c rename to common/sendchar_uart.c diff --git a/timer.c b/common/timer.c similarity index 100% rename from timer.c rename to common/timer.c diff --git a/timer.h b/common/timer.h similarity index 100% rename from timer.h rename to common/timer.h diff --git a/uart.c b/common/uart.c similarity index 100% rename from uart.c rename to common/uart.c diff --git a/uart.h b/common/uart.h similarity index 100% rename from uart.h rename to common/uart.h diff --git a/usb_keycodes.h b/common/usb_keycodes.h similarity index 100% rename from usb_keycodes.h rename to common/usb_keycodes.h diff --git a/util.c b/common/util.c similarity index 100% rename from util.c rename to common/util.c diff --git a/util.h b/common/util.h similarity index 100% rename from util.h rename to common/util.h diff --git a/COPYING.GPLv2 b/doc/COPYING.GPLv2 similarity index 100% rename from COPYING.GPLv2 rename to doc/COPYING.GPLv2 diff --git a/COPYING.GPLv3 b/doc/COPYING.GPLv3 similarity index 100% rename from COPYING.GPLv3 rename to doc/COPYING.GPLv3 diff --git a/hhkb/FUSE.txt b/doc/FUSE.txt similarity index 100% rename from hhkb/FUSE.txt rename to doc/FUSE.txt diff --git a/POWER.txt b/doc/POWER.txt similarity index 100% rename from POWER.txt rename to doc/POWER.txt diff --git a/USB_NKRO.txt b/doc/USB_NKRO.txt similarity index 100% rename from USB_NKRO.txt rename to doc/USB_NKRO.txt diff --git a/pjrc/host.c b/pjrc/host.c deleted file mode 100644 index fcf71d579..000000000 --- a/pjrc/host.c +++ /dev/null @@ -1,183 +0,0 @@ -/* -Copyright 2011 Jun Wako - -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 . -*/ - -#include -#include -#include "usb_keycodes.h" -#include "usb_keyboard.h" -#if defined(MOUSEKEY_ENABLE) || defined(PS2_MOUSE_ENABLE) -#include "usb_mouse.h" -#endif -#ifdef EXTRAKEY_ENABLE -#include "usb_extra.h" -#endif -#include "debug.h" -#include "host.h" -#include "util.h" - - -#ifdef NKRO_ENABLE -bool keyboard_nkro = false; -#endif - -static report_keyboard_t report0; -static report_keyboard_t report1; -report_keyboard_t *keyboard_report = &report0; -report_keyboard_t *keyboard_report_prev = &report1; - -static inline void add_key_byte(uint8_t code); -static inline void add_key_bit(uint8_t code); - - -uint8_t host_keyboard_leds(void) -{ - return usb_keyboard_leds; -} - -/* keyboard report operations */ -void host_add_key(uint8_t key) -{ -#ifdef NKRO_ENABLE - if (keyboard_nkro) { - add_key_bit(key); - return; - } -#endif - add_key_byte(key); -} - -void host_add_mod_bit(uint8_t mod) -{ - keyboard_report->mods |= mod; -} - -void host_set_mods(uint8_t mods) -{ - keyboard_report->mods = mods; -} - -void host_add_code(uint8_t code) -{ - if (IS_MOD(code)) { - host_add_mod_bit(MOD_BIT(code)); - } else { - host_add_key(code); - } -} - -void host_swap_keyboard_report(void) -{ - uint8_t sreg = SREG; - cli(); - report_keyboard_t *tmp = keyboard_report_prev; - keyboard_report_prev = keyboard_report; - keyboard_report = tmp; - SREG = sreg; -} - -void host_clear_keyboard_report(void) -{ - keyboard_report->mods = 0; - for (int8_t i = 0; i < REPORT_KEYS; i++) { - keyboard_report->keys[i] = 0; - } -} - -uint8_t host_has_anykey(void) -{ - uint8_t cnt = 0; - for (int i = 0; i < REPORT_KEYS; i++) { - if (keyboard_report->keys[i]) - cnt++; - } - return cnt; -} - -uint8_t host_get_first_key(void) -{ -#ifdef NKRO_ENABLE - if (keyboard_nkro) { - uint8_t i = 0; - for (; i < REPORT_KEYS && !keyboard_report->keys[i]; i++) - ; - return i<<3 | biton(keyboard_report->keys[i]); - } -#endif - return keyboard_report->keys[0]; -} - - -void host_send_keyboard_report(void) -{ - usb_keyboard_send_report(keyboard_report); -} - -#if defined(MOUSEKEY_ENABLE) || defined(PS2_MOUSE_ENABLE) -void host_mouse_send(report_mouse_t *report) -{ - usb_mouse_send(report->x, report->y, report->v, report->h, report->buttons); -} -#endif - -#ifdef EXTRAKEY_ENABLE -void host_system_send(uint16_t data) -{ - usb_extra_system_send(data); -} - -void host_consumer_send(uint16_t data) -{ - static uint16_t last_data = 0; - if (data == last_data) return; - last_data = data; - - usb_extra_consumer_send(data); -} -#endif - - -static inline void add_key_byte(uint8_t code) -{ - // TODO: fix ugly code - int8_t i = 0; - int8_t empty = -1; - for (; i < REPORT_KEYS; i++) { - if (keyboard_report_prev->keys[i] == code) { - keyboard_report->keys[i] = code; - break; - } - if (empty == -1 && - keyboard_report_prev->keys[i] == 0 && - keyboard_report->keys[i] == 0) { - empty = i; - } - } - if (i == REPORT_KEYS) { - if (empty != -1) { - keyboard_report->keys[empty] = code; - } - } -} - -static inline void add_key_bit(uint8_t code) -{ - if ((code>>3) < REPORT_KEYS) { - keyboard_report->keys[code>>3] |= 1<<(code&7); - } else { - debug("add_key_bit: can't add: "); phex(code); debug("\n"); - } -} diff --git a/adb.c b/protocol/adb.c similarity index 100% rename from adb.c rename to protocol/adb.c diff --git a/adb.h b/protocol/adb.h similarity index 100% rename from adb.h rename to protocol/adb.h diff --git a/iwrap.mk b/protocol/iwrap.mk similarity index 100% rename from iwrap.mk rename to protocol/iwrap.mk diff --git a/iwrap/iWRAP.txt b/protocol/iwrap/iWRAP.txt similarity index 100% rename from iwrap/iWRAP.txt rename to protocol/iwrap/iWRAP.txt diff --git a/iwrap/iwrap.c b/protocol/iwrap/iwrap.c similarity index 100% rename from iwrap/iwrap.c rename to protocol/iwrap/iwrap.c diff --git a/iwrap/iwrap.h b/protocol/iwrap/iwrap.h similarity index 100% rename from iwrap/iwrap.h rename to protocol/iwrap/iwrap.h diff --git a/iwrap/main.c b/protocol/iwrap/main.c similarity index 100% rename from iwrap/main.c rename to protocol/iwrap/main.c diff --git a/iwrap/suart.S b/protocol/iwrap/suart.S similarity index 100% rename from iwrap/suart.S rename to protocol/iwrap/suart.S diff --git a/iwrap/suart.h b/protocol/iwrap/suart.h similarity index 100% rename from iwrap/suart.h rename to protocol/iwrap/suart.h diff --git a/iwrap/wd.h b/protocol/iwrap/wd.h similarity index 100% rename from iwrap/wd.h rename to protocol/iwrap/wd.h diff --git a/m0110.c b/protocol/m0110.c similarity index 100% rename from m0110.c rename to protocol/m0110.c diff --git a/m0110.h b/protocol/m0110.h similarity index 100% rename from m0110.h rename to protocol/m0110.h diff --git a/pjrc.mk b/protocol/pjrc.mk similarity index 100% rename from pjrc.mk rename to protocol/pjrc.mk diff --git a/pjrc/bootloader_teensy.c b/protocol/pjrc/bootloader_teensy.c similarity index 100% rename from pjrc/bootloader_teensy.c rename to protocol/pjrc/bootloader_teensy.c diff --git a/pjrc/main.c b/protocol/pjrc/main.c similarity index 100% rename from pjrc/main.c rename to protocol/pjrc/main.c diff --git a/pjrc/pjrc.c b/protocol/pjrc/pjrc.c similarity index 100% rename from pjrc/pjrc.c rename to protocol/pjrc/pjrc.c diff --git a/pjrc/pjrc.h b/protocol/pjrc/pjrc.h similarity index 100% rename from pjrc/pjrc.h rename to protocol/pjrc/pjrc.h diff --git a/pjrc/usb.c b/protocol/pjrc/usb.c similarity index 100% rename from pjrc/usb.c rename to protocol/pjrc/usb.c diff --git a/pjrc/usb.h b/protocol/pjrc/usb.h similarity index 100% rename from pjrc/usb.h rename to protocol/pjrc/usb.h diff --git a/pjrc/usb_debug.c b/protocol/pjrc/usb_debug.c similarity index 100% rename from pjrc/usb_debug.c rename to protocol/pjrc/usb_debug.c diff --git a/pjrc/usb_debug.h b/protocol/pjrc/usb_debug.h similarity index 100% rename from pjrc/usb_debug.h rename to protocol/pjrc/usb_debug.h diff --git a/pjrc/usb_extra.c b/protocol/pjrc/usb_extra.c similarity index 100% rename from pjrc/usb_extra.c rename to protocol/pjrc/usb_extra.c diff --git a/pjrc/usb_extra.h b/protocol/pjrc/usb_extra.h similarity index 100% rename from pjrc/usb_extra.h rename to protocol/pjrc/usb_extra.h diff --git a/pjrc/usb_keyboard.c b/protocol/pjrc/usb_keyboard.c similarity index 100% rename from pjrc/usb_keyboard.c rename to protocol/pjrc/usb_keyboard.c diff --git a/pjrc/usb_keyboard.h b/protocol/pjrc/usb_keyboard.h similarity index 100% rename from pjrc/usb_keyboard.h rename to protocol/pjrc/usb_keyboard.h diff --git a/pjrc/usb_mouse.c b/protocol/pjrc/usb_mouse.c similarity index 100% rename from pjrc/usb_mouse.c rename to protocol/pjrc/usb_mouse.c diff --git a/pjrc/usb_mouse.h b/protocol/pjrc/usb_mouse.h similarity index 100% rename from pjrc/usb_mouse.h rename to protocol/pjrc/usb_mouse.h diff --git a/ps2.c b/protocol/ps2.c similarity index 100% rename from ps2.c rename to protocol/ps2.c diff --git a/ps2.h b/protocol/ps2.h similarity index 100% rename from ps2.h rename to protocol/ps2.h diff --git a/ps2_mouse.c b/protocol/ps2_mouse.c similarity index 100% rename from ps2_mouse.c rename to protocol/ps2_mouse.c diff --git a/ps2_mouse.h b/protocol/ps2_mouse.h similarity index 100% rename from ps2_mouse.h rename to protocol/ps2_mouse.h diff --git a/ps2_usart.c b/protocol/ps2_usart.c similarity index 100% rename from ps2_usart.c rename to protocol/ps2_usart.c diff --git a/vusb.mk b/protocol/vusb.mk similarity index 100% rename from vusb.mk rename to protocol/vusb.mk diff --git a/vusb/bootloader_usbasp.c b/protocol/vusb/bootloader_usbasp.c similarity index 100% rename from vusb/bootloader_usbasp.c rename to protocol/vusb/bootloader_usbasp.c diff --git a/vusb/main.c b/protocol/vusb/main.c similarity index 100% rename from vusb/main.c rename to protocol/vusb/main.c diff --git a/vusb/sendchar_usart.c b/protocol/vusb/sendchar_usart.c similarity index 100% rename from vusb/sendchar_usart.c rename to protocol/vusb/sendchar_usart.c diff --git a/vusb/usbdrv/Changelog.txt b/protocol/vusb/usbdrv/Changelog.txt similarity index 100% rename from vusb/usbdrv/Changelog.txt rename to protocol/vusb/usbdrv/Changelog.txt diff --git a/vusb/usbdrv/CommercialLicense.txt b/protocol/vusb/usbdrv/CommercialLicense.txt similarity index 100% rename from vusb/usbdrv/CommercialLicense.txt rename to protocol/vusb/usbdrv/CommercialLicense.txt diff --git a/vusb/usbdrv/License.txt b/protocol/vusb/usbdrv/License.txt similarity index 100% rename from vusb/usbdrv/License.txt rename to protocol/vusb/usbdrv/License.txt diff --git a/vusb/usbdrv/Readme.txt b/protocol/vusb/usbdrv/Readme.txt similarity index 100% rename from vusb/usbdrv/Readme.txt rename to protocol/vusb/usbdrv/Readme.txt diff --git a/vusb/usbdrv/USB-ID-FAQ.txt b/protocol/vusb/usbdrv/USB-ID-FAQ.txt similarity index 100% rename from vusb/usbdrv/USB-ID-FAQ.txt rename to protocol/vusb/usbdrv/USB-ID-FAQ.txt diff --git a/vusb/usbdrv/USB-IDs-for-free.txt b/protocol/vusb/usbdrv/USB-IDs-for-free.txt similarity index 100% rename from vusb/usbdrv/USB-IDs-for-free.txt rename to protocol/vusb/usbdrv/USB-IDs-for-free.txt diff --git a/vusb/usbdrv/asmcommon.inc b/protocol/vusb/usbdrv/asmcommon.inc similarity index 100% rename from vusb/usbdrv/asmcommon.inc rename to protocol/vusb/usbdrv/asmcommon.inc diff --git a/vusb/usbdrv/oddebug.c b/protocol/vusb/usbdrv/oddebug.c similarity index 100% rename from vusb/usbdrv/oddebug.c rename to protocol/vusb/usbdrv/oddebug.c diff --git a/vusb/usbdrv/oddebug.h b/protocol/vusb/usbdrv/oddebug.h similarity index 100% rename from vusb/usbdrv/oddebug.h rename to protocol/vusb/usbdrv/oddebug.h diff --git a/vusb/usbdrv/usbconfig-prototype.h b/protocol/vusb/usbdrv/usbconfig-prototype.h similarity index 100% rename from vusb/usbdrv/usbconfig-prototype.h rename to protocol/vusb/usbdrv/usbconfig-prototype.h diff --git a/vusb/usbdrv/usbdrv.c b/protocol/vusb/usbdrv/usbdrv.c similarity index 100% rename from vusb/usbdrv/usbdrv.c rename to protocol/vusb/usbdrv/usbdrv.c diff --git a/vusb/usbdrv/usbdrv.h b/protocol/vusb/usbdrv/usbdrv.h similarity index 100% rename from vusb/usbdrv/usbdrv.h rename to protocol/vusb/usbdrv/usbdrv.h diff --git a/vusb/usbdrv/usbdrvasm.S b/protocol/vusb/usbdrv/usbdrvasm.S similarity index 100% rename from vusb/usbdrv/usbdrvasm.S rename to protocol/vusb/usbdrv/usbdrvasm.S diff --git a/vusb/usbdrv/usbdrvasm.asm b/protocol/vusb/usbdrv/usbdrvasm.asm similarity index 100% rename from vusb/usbdrv/usbdrvasm.asm rename to protocol/vusb/usbdrv/usbdrvasm.asm diff --git a/vusb/usbdrv/usbdrvasm12.inc b/protocol/vusb/usbdrv/usbdrvasm12.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm12.inc rename to protocol/vusb/usbdrv/usbdrvasm12.inc diff --git a/vusb/usbdrv/usbdrvasm128.inc b/protocol/vusb/usbdrv/usbdrvasm128.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm128.inc rename to protocol/vusb/usbdrv/usbdrvasm128.inc diff --git a/vusb/usbdrv/usbdrvasm15.inc b/protocol/vusb/usbdrv/usbdrvasm15.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm15.inc rename to protocol/vusb/usbdrv/usbdrvasm15.inc diff --git a/vusb/usbdrv/usbdrvasm16.inc b/protocol/vusb/usbdrv/usbdrvasm16.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm16.inc rename to protocol/vusb/usbdrv/usbdrvasm16.inc diff --git a/vusb/usbdrv/usbdrvasm165.inc b/protocol/vusb/usbdrv/usbdrvasm165.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm165.inc rename to protocol/vusb/usbdrv/usbdrvasm165.inc diff --git a/vusb/usbdrv/usbdrvasm18-crc.inc b/protocol/vusb/usbdrv/usbdrvasm18-crc.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm18-crc.inc rename to protocol/vusb/usbdrv/usbdrvasm18-crc.inc diff --git a/vusb/usbdrv/usbdrvasm20.inc b/protocol/vusb/usbdrv/usbdrvasm20.inc similarity index 100% rename from vusb/usbdrv/usbdrvasm20.inc rename to protocol/vusb/usbdrv/usbdrvasm20.inc diff --git a/vusb/usbdrv/usbportability.h b/protocol/vusb/usbdrv/usbportability.h similarity index 100% rename from vusb/usbdrv/usbportability.h rename to protocol/vusb/usbdrv/usbportability.h diff --git a/vusb/vusb.c b/protocol/vusb/vusb.c similarity index 100% rename from vusb/vusb.c rename to protocol/vusb/vusb.c diff --git a/vusb/vusb.h b/protocol/vusb/vusb.h similarity index 100% rename from vusb/vusb.h rename to protocol/vusb/vusb.h From 63d82fcaeb78d0764f39667b937262ed4a692c17 Mon Sep 17 00:00:00 2001 From: tmk Date: Thu, 7 Jun 2012 12:35:24 +0900 Subject: [PATCH 2/4] Fixed Makefile to adjust new directories. --- adb_usb/Makefile | 8 +++++--- common.mk | 5 +---- common/mousekey.c | 0 hbk/Makefile | 8 +++++--- hhkb/Makefile.iwrap | 10 ++++++---- hhkb/Makefile.pjrc | 8 +++++--- hhkb/Makefile.vusb | 8 +++++--- hhkb/doc/Bluetooth_img/BT_circuit.jpg | Bin m0110_usb/Makefile | 8 +++++--- macway/Makefile | 8 +++++--- protocol/iwrap.mk | 2 +- protocol/pjrc.mk | 2 +- protocol/vusb.mk | 2 +- ps2_usb/Makefile | 8 +++++--- ps2_usb/Makefile.pjrc_usart | 8 +++++--- ps2_usb/Makefile.vusb | 8 +++++--- rules.mk | 12 +++++++++--- sony_usb/Makefile.pjrc | 8 +++++--- terminal_usb/Makefile.102_pjrc | 8 +++++--- terminal_usb/Makefile.122_pjrc | 8 +++++--- x68k_usb/Makefile | 8 +++++--- 21 files changed, 84 insertions(+), 53 deletions(-) mode change 100755 => 100644 common/mousekey.c mode change 100755 => 100644 hhkb/doc/Bluetooth_img/BT_circuit.jpg diff --git a/adb_usb/Makefile b/adb_usb/Makefile index f4c5031cb..97850b0e8 100644 --- a/adb_usb/Makefile +++ b/adb_usb/Makefile @@ -2,7 +2,7 @@ TARGET = adb_usb # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -48,5 +48,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/common.mk b/common.mk index 03cbc296d..d0e04df86 100644 --- a/common.mk +++ b/common.mk @@ -33,7 +33,4 @@ ifdef $(or MOUSEKEY_ENABLE, PS2_MOUSE_ENABLE) endif # Search Path -VPATH += $(COMMON_DIR) - - -include $(COMMON_DIR)/rules.mk +VPATH += $(TOP_DIR)/common diff --git a/common/mousekey.c b/common/mousekey.c old mode 100755 new mode 100644 diff --git a/hbk/Makefile b/hbk/Makefile index e03b45e3a..c441e2d7a 100644 --- a/hbk/Makefile +++ b/hbk/Makefile @@ -2,7 +2,7 @@ TARGET = hbk # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -50,5 +50,7 @@ PROGRAM_CMD = /opt/dfu-programmer-0.5.2/bin/dfu-programmer $(MCU) erase && \ -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/Makefile.iwrap b/hhkb/Makefile.iwrap index cf020b94a..d922b0f50 100644 --- a/hhkb/Makefile.iwrap +++ b/hhkb/Makefile.iwrap @@ -7,7 +7,7 @@ TARGET = hhkb_iwrap # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -85,7 +85,9 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE # Search Path VPATH = $(TARGET_DIR) -include $(COMMON_DIR)/iwrap.mk +include $(TOP_DIR)/protocol/iwrap.mk # To be swatchable btween Bluetooth and USB. Comment out if you don't need USB. -include $(COMMON_DIR)/vusb.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/vusb.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/Makefile.pjrc b/hhkb/Makefile.pjrc index 17aa865dd..28b6b589d 100644 --- a/hhkb/Makefile.pjrc +++ b/hhkb/Makefile.pjrc @@ -7,7 +7,7 @@ TARGET = hhkb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -54,5 +54,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex # Search Path VPATH = $(TARGET_DIR) -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/Makefile.vusb b/hhkb/Makefile.vusb index 371b36690..734b73a02 100644 --- a/hhkb/Makefile.vusb +++ b/hhkb/Makefile.vusb @@ -7,7 +7,7 @@ TARGET = hhkb_vusb # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -85,5 +85,7 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE # Search Path VPATH = $(TARGET_DIR) -include $(COMMON_DIR)/vusb.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/vusb.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/hhkb/doc/Bluetooth_img/BT_circuit.jpg b/hhkb/doc/Bluetooth_img/BT_circuit.jpg old mode 100755 new mode 100644 diff --git a/m0110_usb/Makefile b/m0110_usb/Makefile index fccfaa521..e4fa526c5 100644 --- a/m0110_usb/Makefile +++ b/m0110_usb/Makefile @@ -2,7 +2,7 @@ TARGET = m0110 # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -48,8 +48,10 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk hasu: EXTRAFLAGS += -DHASU hasu: all diff --git a/macway/Makefile b/macway/Makefile index b8b0a85e1..83d31b674 100644 --- a/macway/Makefile +++ b/macway/Makefile @@ -2,7 +2,7 @@ TARGET = macway # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -47,5 +47,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/protocol/iwrap.mk b/protocol/iwrap.mk index ea4a6e972..d9906fd1b 100644 --- a/protocol/iwrap.mk +++ b/protocol/iwrap.mk @@ -7,4 +7,4 @@ SRC += iwrap.c \ # Search Path -VPATH += $(COMMON_DIR)/iwrap +VPATH += $(TOP_DIR)/protocol/iwrap diff --git a/protocol/pjrc.mk b/protocol/pjrc.mk index e13a809a1..1ee45e9ec 100644 --- a/protocol/pjrc.mk +++ b/protocol/pjrc.mk @@ -8,7 +8,7 @@ SRC += pjrc.c \ # Search Path -VPATH += $(COMMON_DIR):$(COMMON_DIR)/pjrc +VPATH += $(TOP_DIR)/protocol/pjrc # Option modules diff --git a/protocol/vusb.mk b/protocol/vusb.mk index 9426efb25..9e8e1fb39 100644 --- a/protocol/vusb.mk +++ b/protocol/vusb.mk @@ -16,4 +16,4 @@ endif # Search Path -VPATH += $(COMMON_DIR)/vusb:$(COMMON_DIR)/vusb/usbdrv +VPATH += $(TOP_DIR)/protocol/vusb:$(TOP_DIR)/protocol/vusb/usbdrv diff --git a/ps2_usb/Makefile b/ps2_usb/Makefile index f003aea01..515e6899f 100644 --- a/ps2_usb/Makefile +++ b/ps2_usb/Makefile @@ -7,7 +7,7 @@ TARGET = ps2_usb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/ps2_usb/Makefile.pjrc_usart b/ps2_usb/Makefile.pjrc_usart index e620e66c2..2e570e710 100644 --- a/ps2_usb/Makefile.pjrc_usart +++ b/ps2_usb/Makefile.pjrc_usart @@ -7,7 +7,7 @@ TARGET = ps2_usb_pjrc_usart # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/ps2_usb/Makefile.vusb b/ps2_usb/Makefile.vusb index 5b6978f01..d85f1d55d 100644 --- a/ps2_usb/Makefile.vusb +++ b/ps2_usb/Makefile.vusb @@ -7,7 +7,7 @@ TARGET = ps2_usb_vusb # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -86,5 +86,7 @@ PROGRAM_CMD = $(AVRDUDE) $(AVRDUDE_FLAGS) $(AVRDUDE_WRITE_FLASH) $(AVRDUDE_WRITE -include $(COMMON_DIR)/vusb.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/vusb.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/rules.mk b/rules.mk index 9143f9bcf..104031fbb 100644 --- a/rules.mk +++ b/rules.mk @@ -121,7 +121,9 @@ CFLAGS += -Wstrict-prototypes CFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) CFLAGS += $(CSTANDARD) -CFLAGS += -include $(CONFIG_H) +ifdef CONFIG_H + CFLAGS += -include $(CONFIG_H) +endif #---------------- Compiler Options C++ ---------------- @@ -149,7 +151,9 @@ CPPFLAGS += -Wundef CPPFLAGS += -Wa,-adhlns=$(@:%.o=%.lst) CPPFLAGS += $(patsubst %,-I%,$(EXTRAINCDIRS)) #CPPFLAGS += $(CSTANDARD) -CPPFLAGS += -include $(CONFIG_H) +ifdef CONFIG_H + CPPFLAGS += -include $(CONFIG_H) +endif #---------------- Assembler Options ---------------- @@ -162,7 +166,9 @@ CPPFLAGS += -include $(CONFIG_H) # -listing-cont-lines: Sets the maximum number of continuation lines of hex # dump that will be displayed for a given single line of source input. ASFLAGS = $(ADEFS) -Wa,-adhlns=$(@:%.o=%.lst),-gstabs,--listing-cont-lines=100 -ASFLAGS += -include $(CONFIG_H) +ifdef CONFIG_H + ASFLAGS += -include $(CONFIG_H) +endif #---------------- Library Options ---------------- diff --git a/sony_usb/Makefile.pjrc b/sony_usb/Makefile.pjrc index 2a4eeff13..b7e22dfac 100644 --- a/sony_usb/Makefile.pjrc +++ b/sony_usb/Makefile.pjrc @@ -7,7 +7,7 @@ TARGET = news_usb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/terminal_usb/Makefile.102_pjrc b/terminal_usb/Makefile.102_pjrc index c1fd397f6..a02877acf 100644 --- a/terminal_usb/Makefile.102_pjrc +++ b/terminal_usb/Makefile.102_pjrc @@ -7,7 +7,7 @@ TARGET = terminal_usb_102_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/terminal_usb/Makefile.122_pjrc b/terminal_usb/Makefile.122_pjrc index b91e484ff..1f21d4e6c 100644 --- a/terminal_usb/Makefile.122_pjrc +++ b/terminal_usb/Makefile.122_pjrc @@ -7,7 +7,7 @@ TARGET = terminal_usb_122_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -52,5 +52,7 @@ PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk diff --git a/x68k_usb/Makefile b/x68k_usb/Makefile index c4b9b221b..0127c0bf8 100644 --- a/x68k_usb/Makefile +++ b/x68k_usb/Makefile @@ -7,7 +7,7 @@ TARGET = x68k_usb_pjrc # Directory common source filess exist -COMMON_DIR = .. +TOP_DIR = .. # Directory keyboard dependent files exist TARGET_DIR = . @@ -81,5 +81,7 @@ PROGRAM_CMD = dfu-programmer atmega32u4 flash $(TARGET).hex -include $(COMMON_DIR)/pjrc.mk -include $(COMMON_DIR)/common.mk +include $(TOP_DIR)/protocol/pjrc.mk +include $(TOP_DIR)/protocol.mk +include $(TOP_DIR)/common.mk +include $(TOP_DIR)/rules.mk From afb08462085132acf7a1962522952f7dbf064519 Mon Sep 17 00:00:00 2001 From: tmk Date: Fri, 8 Jun 2012 00:37:46 +0900 Subject: [PATCH 3/4] Made directories for keyboard and converter projects. --- README | 151 --------------- README.md | 175 ++++++++++++++++++ {adb_usb => converter/adb_usb}/Makefile | 2 +- {adb_usb => converter/adb_usb}/README | 0 {adb_usb => converter/adb_usb}/config.h | 0 {adb_usb => converter/adb_usb}/keymap.c | 0 {adb_usb => converter/adb_usb}/led.c | 0 {adb_usb => converter/adb_usb}/matrix.c | 0 {m0110_usb => converter/m0110_usb}/Makefile | 2 +- {m0110_usb => converter/m0110_usb}/README.md | 0 {m0110_usb => converter/m0110_usb}/config.h | 0 .../m0110_usb}/doc/m0110.jpg | Bin .../m0110_usb}/doc/teensy.jpg | Bin {m0110_usb => converter/m0110_usb}/keymap.c | 0 {m0110_usb => converter/m0110_usb}/led.c | 0 {m0110_usb => converter/m0110_usb}/matrix.c | 0 {ps2_usb => converter/ps2_usb}/Makefile | 2 +- .../ps2_usb}/Makefile.pjrc_usart | 2 +- {ps2_usb => converter/ps2_usb}/Makefile.vusb | 2 +- {ps2_usb => converter/ps2_usb}/README | 0 {ps2_usb => converter/ps2_usb}/README.vusb | 0 {ps2_usb => converter/ps2_usb}/config_pjrc.h | 0 .../ps2_usb}/config_pjrc_usart.h | 0 {ps2_usb => converter/ps2_usb}/config_vusb.h | 0 {ps2_usb => converter/ps2_usb}/keymap.c | 0 {ps2_usb => converter/ps2_usb}/led.c | 0 {ps2_usb => converter/ps2_usb}/matrix.c | 0 {ps2_usb => converter/ps2_usb}/usbconfig.h | 0 .../sony_usb}/Makefile.pjrc | 2 +- .../sony_usb}/config_pjrc.h | 0 {sony_usb => converter/sony_usb}/keymap.c | 0 {sony_usb => converter/sony_usb}/led.c | 0 {sony_usb => converter/sony_usb}/matrix.c | 0 {sony_usb => converter/sony_usb}/news.c | 0 {sony_usb => converter/sony_usb}/news.h | 0 .../terminal_usb}/Makefile.102_pjrc | 2 +- .../terminal_usb}/Makefile.122_pjrc | 2 +- .../terminal_usb}/README | 0 .../terminal_usb}/config_102_pjrc.h | 0 .../terminal_usb}/config_122_pjrc.h | 0 .../terminal_usb}/keymap_102.c | 0 .../terminal_usb}/keymap_122.c | 0 .../terminal_usb}/led.c | 0 .../terminal_usb}/matrix.c | 0 {x68k_usb => converter/x68k_usb}/Makefile | 2 +- {x68k_usb => converter/x68k_usb}/README | 0 .../x68k_usb}/config_pjrc.h | 0 {x68k_usb => converter/x68k_usb}/keymap.c | 0 {x68k_usb => converter/x68k_usb}/led.c | 0 {x68k_usb => converter/x68k_usb}/matrix.c | 0 {x68k_usb => converter/x68k_usb}/x68k.c | 0 {x68k_usb => converter/x68k_usb}/x68k.h | 0 {hbk => keyboard/hbk}/Makefile | 2 +- {hbk => keyboard/hbk}/config.h | 0 {hbk => keyboard/hbk}/controller_teensy.h | 0 {hbk => keyboard/hbk}/keymap.c | 0 {hbk => keyboard/hbk}/led.c | 0 {hbk => keyboard/hbk}/matrix.c | 0 {hhkb => keyboard/hhkb}/Makefile.iwrap | 2 +- {hhkb => keyboard/hhkb}/Makefile.pjrc | 2 +- {hhkb => keyboard/hhkb}/Makefile.vusb | 2 +- {hhkb => keyboard/hhkb}/README | 0 {hhkb => keyboard/hhkb}/config_iwrap.h | 0 {hhkb => keyboard/hhkb}/config_pjrc.h | 0 {hhkb => keyboard/hhkb}/config_vusb.h | 0 {hhkb => keyboard/hhkb}/doc/Bluetooth.txt | 0 .../hhkb}/doc/Bluetooth_img/.picasa.ini | 0 .../hhkb}/doc/Bluetooth_img/BT_circuit.jpg | Bin {hhkb => keyboard/hhkb}/doc/HHKB.txt | 0 .../hhkb}/doc/HHKB_img/HHKB_TP1684.jpg | Bin .../hhkb}/doc/HHKB_img/HHKB_chart1.jpg | Bin .../hhkb}/doc/HHKB_img/HHKB_chart2.jpg | Bin .../hhkb}/doc/HHKB_img/HHKB_connector.jpg | Bin .../hhkb}/doc/HHKB_img/HHKB_controller.jpg | Bin .../hhkb}/doc/HHKB_img/HHKB_keyswitch.jpg | Bin .../hhkb}/doc/HHKB_img/connector_contact.jpg | Bin .../hhkb}/doc/HHKB_img/logic_analyzer.jpg | Bin .../hhkb}/doc/HHKB_img/probe_contact.jpg | Bin .../hhkb}/doc/HHKB_img/teensy_install.jpg | Bin .../hhkb}/doc/HHKB_img/teensy_wiring.jpg | Bin {hhkb => keyboard/hhkb}/keymap.c | 0 {hhkb => keyboard/hhkb}/led.c | 0 {hhkb => keyboard/hhkb}/matrix.c | 0 {hhkb => keyboard/hhkb}/usbconfig.h | 0 {macway => keyboard/macway}/Makefile | 2 +- {macway => keyboard/macway}/config.h | 0 {macway => keyboard/macway}/doc/back.jpg | Bin {macway => keyboard/macway}/doc/case.jpg | Bin {macway => keyboard/macway}/doc/keys.jpg | Bin {macway => keyboard/macway}/doc/side.jpg | Bin {macway => keyboard/macway}/doc/switch.jpg | Bin {macway => keyboard/macway}/doc/teensy.jpg | Bin {macway => keyboard/macway}/doc/wiring.jpg | Bin {macway => keyboard/macway}/doc/withHHKB.jpg | Bin .../macway}/doc/withThinkPad.jpg | Bin {macway => keyboard/macway}/keymap.c | 0 {macway => keyboard/macway}/led.c | 0 {macway => keyboard/macway}/matrix.c | 0 protocol.mk | 2 + 99 files changed, 191 insertions(+), 165 deletions(-) delete mode 100644 README create mode 100644 README.md rename {adb_usb => converter/adb_usb}/Makefile (98%) rename {adb_usb => converter/adb_usb}/README (100%) rename {adb_usb => converter/adb_usb}/config.h (100%) rename {adb_usb => converter/adb_usb}/keymap.c (100%) rename {adb_usb => converter/adb_usb}/led.c (100%) rename {adb_usb => converter/adb_usb}/matrix.c (100%) rename {m0110_usb => converter/m0110_usb}/Makefile (98%) rename {m0110_usb => converter/m0110_usb}/README.md (100%) rename {m0110_usb => converter/m0110_usb}/config.h (100%) rename {m0110_usb => converter/m0110_usb}/doc/m0110.jpg (100%) rename {m0110_usb => converter/m0110_usb}/doc/teensy.jpg (100%) rename {m0110_usb => converter/m0110_usb}/keymap.c (100%) rename {m0110_usb => converter/m0110_usb}/led.c (100%) rename {m0110_usb => converter/m0110_usb}/matrix.c (100%) rename {ps2_usb => converter/ps2_usb}/Makefile (98%) rename {ps2_usb => converter/ps2_usb}/Makefile.pjrc_usart (98%) rename {ps2_usb => converter/ps2_usb}/Makefile.vusb (99%) rename {ps2_usb => converter/ps2_usb}/README (100%) rename {ps2_usb => converter/ps2_usb}/README.vusb (100%) rename {ps2_usb => converter/ps2_usb}/config_pjrc.h (100%) rename {ps2_usb => converter/ps2_usb}/config_pjrc_usart.h (100%) rename {ps2_usb => converter/ps2_usb}/config_vusb.h (100%) rename {ps2_usb => converter/ps2_usb}/keymap.c (100%) rename {ps2_usb => converter/ps2_usb}/led.c (100%) rename {ps2_usb => converter/ps2_usb}/matrix.c (100%) rename {ps2_usb => converter/ps2_usb}/usbconfig.h (100%) rename {sony_usb => converter/sony_usb}/Makefile.pjrc (98%) rename {sony_usb => converter/sony_usb}/config_pjrc.h (100%) rename {sony_usb => converter/sony_usb}/keymap.c (100%) rename {sony_usb => converter/sony_usb}/led.c (100%) rename {sony_usb => converter/sony_usb}/matrix.c (100%) rename {sony_usb => converter/sony_usb}/news.c (100%) rename {sony_usb => converter/sony_usb}/news.h (100%) rename {terminal_usb => converter/terminal_usb}/Makefile.102_pjrc (98%) rename {terminal_usb => converter/terminal_usb}/Makefile.122_pjrc (98%) rename {terminal_usb => converter/terminal_usb}/README (100%) rename {terminal_usb => converter/terminal_usb}/config_102_pjrc.h (100%) rename {terminal_usb => converter/terminal_usb}/config_122_pjrc.h (100%) rename {terminal_usb => converter/terminal_usb}/keymap_102.c (100%) rename {terminal_usb => converter/terminal_usb}/keymap_122.c (100%) rename {terminal_usb => converter/terminal_usb}/led.c (100%) rename {terminal_usb => converter/terminal_usb}/matrix.c (100%) rename {x68k_usb => converter/x68k_usb}/Makefile (99%) rename {x68k_usb => converter/x68k_usb}/README (100%) rename {x68k_usb => converter/x68k_usb}/config_pjrc.h (100%) rename {x68k_usb => converter/x68k_usb}/keymap.c (100%) rename {x68k_usb => converter/x68k_usb}/led.c (100%) rename {x68k_usb => converter/x68k_usb}/matrix.c (100%) rename {x68k_usb => converter/x68k_usb}/x68k.c (100%) rename {x68k_usb => converter/x68k_usb}/x68k.h (100%) rename {hbk => keyboard/hbk}/Makefile (99%) rename {hbk => keyboard/hbk}/config.h (100%) rename {hbk => keyboard/hbk}/controller_teensy.h (100%) rename {hbk => keyboard/hbk}/keymap.c (100%) rename {hbk => keyboard/hbk}/led.c (100%) rename {hbk => keyboard/hbk}/matrix.c (100%) rename {hhkb => keyboard/hhkb}/Makefile.iwrap (99%) rename {hhkb => keyboard/hhkb}/Makefile.pjrc (98%) rename {hhkb => keyboard/hhkb}/Makefile.vusb (99%) rename {hhkb => keyboard/hhkb}/README (100%) rename {hhkb => keyboard/hhkb}/config_iwrap.h (100%) rename {hhkb => keyboard/hhkb}/config_pjrc.h (100%) rename {hhkb => keyboard/hhkb}/config_vusb.h (100%) rename {hhkb => keyboard/hhkb}/doc/Bluetooth.txt (100%) rename {hhkb => keyboard/hhkb}/doc/Bluetooth_img/.picasa.ini (100%) rename {hhkb => keyboard/hhkb}/doc/Bluetooth_img/BT_circuit.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB.txt (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/HHKB_TP1684.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/HHKB_chart1.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/HHKB_chart2.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/HHKB_connector.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/HHKB_controller.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/HHKB_keyswitch.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/connector_contact.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/logic_analyzer.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/probe_contact.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/teensy_install.jpg (100%) rename {hhkb => keyboard/hhkb}/doc/HHKB_img/teensy_wiring.jpg (100%) rename {hhkb => keyboard/hhkb}/keymap.c (100%) rename {hhkb => keyboard/hhkb}/led.c (100%) rename {hhkb => keyboard/hhkb}/matrix.c (100%) rename {hhkb => keyboard/hhkb}/usbconfig.h (100%) rename {macway => keyboard/macway}/Makefile (98%) rename {macway => keyboard/macway}/config.h (100%) rename {macway => keyboard/macway}/doc/back.jpg (100%) rename {macway => keyboard/macway}/doc/case.jpg (100%) rename {macway => keyboard/macway}/doc/keys.jpg (100%) rename {macway => keyboard/macway}/doc/side.jpg (100%) rename {macway => keyboard/macway}/doc/switch.jpg (100%) rename {macway => keyboard/macway}/doc/teensy.jpg (100%) rename {macway => keyboard/macway}/doc/wiring.jpg (100%) rename {macway => keyboard/macway}/doc/withHHKB.jpg (100%) rename {macway => keyboard/macway}/doc/withThinkPad.jpg (100%) rename {macway => keyboard/macway}/keymap.c (100%) rename {macway => keyboard/macway}/led.c (100%) rename {macway => keyboard/macway}/matrix.c (100%) create mode 100644 protocol.mk diff --git a/README b/README deleted file mode 100644 index d85f512c7..000000000 --- a/README +++ /dev/null @@ -1,151 +0,0 @@ -t.m.k. Keyboard Firmware -======================== -This is keyboard firmware for Teensy(AVR USB MCU) and V-USB board. - -source code repository: -http://github.com/tmk/tmk_keyboard - -This firmware is used in following projects: -HHKB mod: http://geekhack.org/showwiki.php?title=Island:12047 -Macway mod: http://geekhack.org/showwiki.php?title=Island:11930 -PS2 to USB: http://geekhack.org/showwiki.php?title=Island:14618 -ADB to USB: http://geekhack.org/showwiki.php?title=Island:14290 - -The project is heavily based on PJRC USB Keyboard/Mouse Example and -owes a debt to preceding keyboard firmware projects. -http://www.pjrc.com/teensy - - -Features --------- -Mouse key - control mouse cursor from keyboard. -System Control Key - Power Down, Sleep, Wake Up & USB Remote Wake up -Media Control Key - Volume Down/Up, Mute -USB NKRO - send 120 keys(+ 8 modifiers) at most simultaneously. -PS/2 mouse support - integrate PS/2 mouse(TrackPoint) into keyboard as composite device. - - -Limitations ------------ - - -Files & Directories -------------------- -Target: -hhkb/ keyboard controller for PFU HHKB pro -macway/ keyboard controller for Macway mod -ps2_usb/ PS2 to USB keyboard converter -adb_usb/ ADB to USB keyboard converter - -USB Protocol Stack: -pjrc/ PJRC USB stack -vusb/ V-USB USB stack -ps2.[ch] PS/2 protocol -adb.[ch] ADB protocol - - -Build ------ -To compile needs AVR GCC, AVR Libc and GNU make. -You can use WinAVR on Windows. http://winavr.sourceforge.net/ - -$ cd -$ make - -The firmware will be compiled as a file tmk_.hex. - - -Build your own firmware ------------------------ -Copying exsistent target(macway) is easy way. -1. Copy contens of macway/ to your own target directory. -2. Edit Makefile. See next section. -3. Edit config.h. See next section. -4. Edit matrix.c. You will need to fix followings at least. - matrix_init() - matrix_scan() - read_col() - unselect_rows() - select_row() -5. Edit keymap.c. NOTE: It is not final design and a bit messy. - You will need to fix followings at least. - KEYMAP - fn_layer[] - fn_keycode[] - keymaps[] -6. Build. - -If you have a build error like following, comment out "--relax" option in Makefile.common. - (.vectors+0x30): relocation truncated to fit: R_AVR_13_PCREL against symbol `__vector_12' - - -Build Options -------------- -/Makefile: -1. Set target name for your firmware. - TARGET = tmk_ -2. Choose a MCU and its frequency. - MCU = atmega32u4 # Teensy 2.0 - #MCU = at90usb1286 # Teensy++ 2.0 - F_CPU = 16000000 -3. Choose optional modules as needed. Comment out to disable optional modules. - MOUSEKEY_ENABLE = yes # Mouse keys - PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support - EXTRAKEY_ENABLE = yes # Enhanced feature for Windows(Audio control and System control) - NKRO_ENABLE = yes # USB Nkey Rollover - -/config.h: -1. USB vendor/product ID and device description - #define VENDOR_ID 0xFEED - #define PRODUCT_ID 0xBEEF - /* device description */ - #define MANUFACTURER t.m.k. - #define PRODUCT Macway mod - #define DESCRIPTION t.m.k. keyboard firmware for Macway mod -2. Keyboard matrix configuration - #define MATRIX_ROWS 8 - #define MATRIX_COLS 8 - #define MATRIX_HAS_GHOST -3. Mouse keys configuration if needed. -4. PS/2 mouse configuration if needed. - - -Debuging & Rescue ------------------ -Use PJRC's hid_listen.exe to see debug messages. -Press + H to debug menu. -(see config.h for key combination.) - -Pressing any 3 keys when connected enables debug output. -Pressing any 4 keys when connected makes bootloader comes up. - - -Projects related ----------------- -PJRC USB Keyboard/Mouse Example - http://www.pjrc.com/teensy/usb_keyboard.html - http://www.pjrc.com/teensy/usb_mouse.html -kbupgrade - http://github.com/rhomann/kbupgrade - http://geekhack.org/showwiki.php?title=Island:8406 -c64key - http://symlink.dk/projects/c64key/ -rump - http://mg8.org/rump/ - http://github.com/clee/rump -dulcimer - http://www.schatenseite.de/dulcimer.html -humblehacker-keyboard - http://github.com/humblehacker - http://www.humblehacker.com/keyboard/ - http://geekhack.org/showwiki.php?title=Island:6292 -ps2avr - http://sourceforge.net/projects/ps2avr/ - - -EOF diff --git a/README.md b/README.md new file mode 100644 index 000000000..0361e2ad9 --- /dev/null +++ b/README.md @@ -0,0 +1,175 @@ +t.m.k. Keyboard Firmware Collection +==================================== +This is a keyboard firmware with some features for Atmel AVR controller. + +Source code is available here: + + +Features +-------- +* Mouse key - Mouse control by 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 - Can send 120 keys(+ 8 modifiers) simultaneously. +* PS/2 mouse support - integrate PS/2 mouse(TrackPoint) into keyboard as composite device. + + +Projects +-------- +### converter +* ps2_usb - PS/2 keyboard to USB +* adb_usb - ADB keyboard to USB +* m0110_usb - Machintosh 128K/512K/Plus keyboard to USB +* terminal_usb - IBM Model M terminal keyboard(PS/2 scancode set3) to USB +* sony_usb - Sony NEWS keyboard to USB +* x68k_usb - Sharp X68000 keyboard to USB + +### keyboard +* hhkb - Happy Hacking Keyboard professional +* macway - Compact keyboard mod +* hbk - Happy Buckling sprint keyboard(IBM Model M mod) + +[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_sony]: 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_hbk]: http://geekhack.org/showwiki.php?title=Island:29483 + + + +Files & Directories +------------------- +### Top +* common/ common codes +* protocol/ keyboard protocol support +* keyboard/ keyboard projects +* converter/ protocol converter projects +* doc/ documents + +### Keyboard Protocols +* pjrc/ PJRC USB stack +* vusb/ Objective Development V-USB +* iwrap/ Bluetooth HID for Bluegiga iWRAP +* ps2 PS/2 protocol +* adb Apple Desktop Bus protocol +* m0110 Macintosh 128K/512K/Plus keyboard protocol +* news Sony NEWS keyboard protocol +* x68k Sharp X68000 keyboard protocol + + +Build & Program +--------------- +### Build firmware +To compile you need `AVR GCC`, `AVR Libc` and `GNU make`. +You can use [WinAVR][1] on Windows and [CrossPack][2] on Mac. + + $ cd + $ make + +The firmware will be compiled as a file tmk_.hex. + +[1]: http://winavr.sourceforge.net/ +[2]: http://www.obdev.at/products/crosspack/index.html + +### Program Controller +If you have proper program command in Makefile just type this. + + $ make program + +As for `Teensy` you can use `PJRC's loader` to program hex file. + + + +Build Options +------------- +### `Makefile` +#### 1. MCU and Frequency. + MCU = atmega32u4 # Teensy 2.0 + #MCU = at90usb1286 # Teensy++ 2.0 + F_CPU = 16000000 + +#### 2. Features +Note that ***comment out*** to disable them. + MOUSEKEY_ENABLE = yes # Mouse keys + PS2_MOUSE_ENABLE = yes # PS/2 mouse(TrackPoint) support + EXTRAKEY_ENABLE = yes # Enhanced feature for Windows(Audio control and System control) + NKRO_ENABLE = yes # USB Nkey Rollover + +#### 3. Programmer +Set proper command for your controller, bootloader and programmer. + # for PJRC Teensy + PROGRAM_CMD = teensy_loader_cli -mmcu=$(MCU) -w -v $(TARGET).hex + + # for Atmel AT90USBKEY + PROGRAM_CMD = dfu-programmer $(MCU) flash $(TARGET).hex + + # avrdude + PROGRAM_CMD = avrdude -p $(MCU) -c avrispmkII -P USB -U flash:w:$(TARGET).hex + PROGRAM_CMD = avrdude -p $(MCU) -c usbasp -U flash:w:$(TARGET).hex + PROGRAM_CMD = avrdude -p $(MCU) -c arduino -P COM1 -b 57600 -U flash:w:$(TARGET).hex + +### `config.h` +#### 1. USB vendor/product ID and device description + #define VENDOR_ID 0xFEED + #define PRODUCT_ID 0xBEEF + /* device description */ + #define MANUFACTURER t.m.k. + #define PRODUCT Macway mod + #define DESCRIPTION t.m.k. keyboard firmware for Macway mod + +#### 2. Keyboard matrix configuration + #define MATRIX_ROWS 8 + #define MATRIX_COLS 8 + #define MATRIX_HAS_GHOST + +### 3. Mouse keys configuration + +### 4. PS/2 mouse configuration + + +Keymap +------ + + +Build your own firmware +----------------------- + + +Debuging +-------- +Use PJRC's `hid_listen` to see debug messages and press ` + H` to debug menu. +See `config.h` for definition of `` key combination. + + +Other Keyboard Projects +----------------------- +### PJRC USB Keyboard/Mouse Example +- +- + +### kbupgrade +- +- + +### c64key +- + +### rump +- +- + +### dulcimer +- + +### humblehacker-keyboard +- +- +- + +### ps2avr +- diff --git a/adb_usb/Makefile b/converter/adb_usb/Makefile similarity index 98% rename from adb_usb/Makefile rename to converter/adb_usb/Makefile index 97850b0e8..64a23d09d 100644 --- a/adb_usb/Makefile +++ b/converter/adb_usb/Makefile @@ -2,7 +2,7 @@ TARGET = adb_usb # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/adb_usb/README b/converter/adb_usb/README similarity index 100% rename from adb_usb/README rename to converter/adb_usb/README diff --git a/adb_usb/config.h b/converter/adb_usb/config.h similarity index 100% rename from adb_usb/config.h rename to converter/adb_usb/config.h diff --git a/adb_usb/keymap.c b/converter/adb_usb/keymap.c similarity index 100% rename from adb_usb/keymap.c rename to converter/adb_usb/keymap.c diff --git a/adb_usb/led.c b/converter/adb_usb/led.c similarity index 100% rename from adb_usb/led.c rename to converter/adb_usb/led.c diff --git a/adb_usb/matrix.c b/converter/adb_usb/matrix.c similarity index 100% rename from adb_usb/matrix.c rename to converter/adb_usb/matrix.c diff --git a/m0110_usb/Makefile b/converter/m0110_usb/Makefile similarity index 98% rename from m0110_usb/Makefile rename to converter/m0110_usb/Makefile index e4fa526c5..4a687b933 100644 --- a/m0110_usb/Makefile +++ b/converter/m0110_usb/Makefile @@ -2,7 +2,7 @@ TARGET = m0110 # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/m0110_usb/README.md b/converter/m0110_usb/README.md similarity index 100% rename from m0110_usb/README.md rename to converter/m0110_usb/README.md diff --git a/m0110_usb/config.h b/converter/m0110_usb/config.h similarity index 100% rename from m0110_usb/config.h rename to converter/m0110_usb/config.h diff --git a/m0110_usb/doc/m0110.jpg b/converter/m0110_usb/doc/m0110.jpg similarity index 100% rename from m0110_usb/doc/m0110.jpg rename to converter/m0110_usb/doc/m0110.jpg diff --git a/m0110_usb/doc/teensy.jpg b/converter/m0110_usb/doc/teensy.jpg similarity index 100% rename from m0110_usb/doc/teensy.jpg rename to converter/m0110_usb/doc/teensy.jpg diff --git a/m0110_usb/keymap.c b/converter/m0110_usb/keymap.c similarity index 100% rename from m0110_usb/keymap.c rename to converter/m0110_usb/keymap.c diff --git a/m0110_usb/led.c b/converter/m0110_usb/led.c similarity index 100% rename from m0110_usb/led.c rename to converter/m0110_usb/led.c diff --git a/m0110_usb/matrix.c b/converter/m0110_usb/matrix.c similarity index 100% rename from m0110_usb/matrix.c rename to converter/m0110_usb/matrix.c diff --git a/ps2_usb/Makefile b/converter/ps2_usb/Makefile similarity index 98% rename from ps2_usb/Makefile rename to converter/ps2_usb/Makefile index 515e6899f..0bba191a3 100644 --- a/ps2_usb/Makefile +++ b/converter/ps2_usb/Makefile @@ -7,7 +7,7 @@ TARGET = ps2_usb_pjrc # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/ps2_usb/Makefile.pjrc_usart b/converter/ps2_usb/Makefile.pjrc_usart similarity index 98% rename from ps2_usb/Makefile.pjrc_usart rename to converter/ps2_usb/Makefile.pjrc_usart index 2e570e710..3dad7e2f8 100644 --- a/ps2_usb/Makefile.pjrc_usart +++ b/converter/ps2_usb/Makefile.pjrc_usart @@ -7,7 +7,7 @@ TARGET = ps2_usb_pjrc_usart # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/ps2_usb/Makefile.vusb b/converter/ps2_usb/Makefile.vusb similarity index 99% rename from ps2_usb/Makefile.vusb rename to converter/ps2_usb/Makefile.vusb index d85f1d55d..4d5240c30 100644 --- a/ps2_usb/Makefile.vusb +++ b/converter/ps2_usb/Makefile.vusb @@ -7,7 +7,7 @@ TARGET = ps2_usb_vusb # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/ps2_usb/README b/converter/ps2_usb/README similarity index 100% rename from ps2_usb/README rename to converter/ps2_usb/README diff --git a/ps2_usb/README.vusb b/converter/ps2_usb/README.vusb similarity index 100% rename from ps2_usb/README.vusb rename to converter/ps2_usb/README.vusb diff --git a/ps2_usb/config_pjrc.h b/converter/ps2_usb/config_pjrc.h similarity index 100% rename from ps2_usb/config_pjrc.h rename to converter/ps2_usb/config_pjrc.h diff --git a/ps2_usb/config_pjrc_usart.h b/converter/ps2_usb/config_pjrc_usart.h similarity index 100% rename from ps2_usb/config_pjrc_usart.h rename to converter/ps2_usb/config_pjrc_usart.h diff --git a/ps2_usb/config_vusb.h b/converter/ps2_usb/config_vusb.h similarity index 100% rename from ps2_usb/config_vusb.h rename to converter/ps2_usb/config_vusb.h diff --git a/ps2_usb/keymap.c b/converter/ps2_usb/keymap.c similarity index 100% rename from ps2_usb/keymap.c rename to converter/ps2_usb/keymap.c diff --git a/ps2_usb/led.c b/converter/ps2_usb/led.c similarity index 100% rename from ps2_usb/led.c rename to converter/ps2_usb/led.c diff --git a/ps2_usb/matrix.c b/converter/ps2_usb/matrix.c similarity index 100% rename from ps2_usb/matrix.c rename to converter/ps2_usb/matrix.c diff --git a/ps2_usb/usbconfig.h b/converter/ps2_usb/usbconfig.h similarity index 100% rename from ps2_usb/usbconfig.h rename to converter/ps2_usb/usbconfig.h diff --git a/sony_usb/Makefile.pjrc b/converter/sony_usb/Makefile.pjrc similarity index 98% rename from sony_usb/Makefile.pjrc rename to converter/sony_usb/Makefile.pjrc index b7e22dfac..376133ad5 100644 --- a/sony_usb/Makefile.pjrc +++ b/converter/sony_usb/Makefile.pjrc @@ -7,7 +7,7 @@ TARGET = news_usb_pjrc # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/sony_usb/config_pjrc.h b/converter/sony_usb/config_pjrc.h similarity index 100% rename from sony_usb/config_pjrc.h rename to converter/sony_usb/config_pjrc.h diff --git a/sony_usb/keymap.c b/converter/sony_usb/keymap.c similarity index 100% rename from sony_usb/keymap.c rename to converter/sony_usb/keymap.c diff --git a/sony_usb/led.c b/converter/sony_usb/led.c similarity index 100% rename from sony_usb/led.c rename to converter/sony_usb/led.c diff --git a/sony_usb/matrix.c b/converter/sony_usb/matrix.c similarity index 100% rename from sony_usb/matrix.c rename to converter/sony_usb/matrix.c diff --git a/sony_usb/news.c b/converter/sony_usb/news.c similarity index 100% rename from sony_usb/news.c rename to converter/sony_usb/news.c diff --git a/sony_usb/news.h b/converter/sony_usb/news.h similarity index 100% rename from sony_usb/news.h rename to converter/sony_usb/news.h diff --git a/terminal_usb/Makefile.102_pjrc b/converter/terminal_usb/Makefile.102_pjrc similarity index 98% rename from terminal_usb/Makefile.102_pjrc rename to converter/terminal_usb/Makefile.102_pjrc index a02877acf..e9d14e7a0 100644 --- a/terminal_usb/Makefile.102_pjrc +++ b/converter/terminal_usb/Makefile.102_pjrc @@ -7,7 +7,7 @@ TARGET = terminal_usb_102_pjrc # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/terminal_usb/Makefile.122_pjrc b/converter/terminal_usb/Makefile.122_pjrc similarity index 98% rename from terminal_usb/Makefile.122_pjrc rename to converter/terminal_usb/Makefile.122_pjrc index 1f21d4e6c..bec00510e 100644 --- a/terminal_usb/Makefile.122_pjrc +++ b/converter/terminal_usb/Makefile.122_pjrc @@ -7,7 +7,7 @@ TARGET = terminal_usb_122_pjrc # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/terminal_usb/README b/converter/terminal_usb/README similarity index 100% rename from terminal_usb/README rename to converter/terminal_usb/README diff --git a/terminal_usb/config_102_pjrc.h b/converter/terminal_usb/config_102_pjrc.h similarity index 100% rename from terminal_usb/config_102_pjrc.h rename to converter/terminal_usb/config_102_pjrc.h diff --git a/terminal_usb/config_122_pjrc.h b/converter/terminal_usb/config_122_pjrc.h similarity index 100% rename from terminal_usb/config_122_pjrc.h rename to converter/terminal_usb/config_122_pjrc.h diff --git a/terminal_usb/keymap_102.c b/converter/terminal_usb/keymap_102.c similarity index 100% rename from terminal_usb/keymap_102.c rename to converter/terminal_usb/keymap_102.c diff --git a/terminal_usb/keymap_122.c b/converter/terminal_usb/keymap_122.c similarity index 100% rename from terminal_usb/keymap_122.c rename to converter/terminal_usb/keymap_122.c diff --git a/terminal_usb/led.c b/converter/terminal_usb/led.c similarity index 100% rename from terminal_usb/led.c rename to converter/terminal_usb/led.c diff --git a/terminal_usb/matrix.c b/converter/terminal_usb/matrix.c similarity index 100% rename from terminal_usb/matrix.c rename to converter/terminal_usb/matrix.c diff --git a/x68k_usb/Makefile b/converter/x68k_usb/Makefile similarity index 99% rename from x68k_usb/Makefile rename to converter/x68k_usb/Makefile index 0127c0bf8..c3b5fa29f 100644 --- a/x68k_usb/Makefile +++ b/converter/x68k_usb/Makefile @@ -7,7 +7,7 @@ TARGET = x68k_usb_pjrc # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/x68k_usb/README b/converter/x68k_usb/README similarity index 100% rename from x68k_usb/README rename to converter/x68k_usb/README diff --git a/x68k_usb/config_pjrc.h b/converter/x68k_usb/config_pjrc.h similarity index 100% rename from x68k_usb/config_pjrc.h rename to converter/x68k_usb/config_pjrc.h diff --git a/x68k_usb/keymap.c b/converter/x68k_usb/keymap.c similarity index 100% rename from x68k_usb/keymap.c rename to converter/x68k_usb/keymap.c diff --git a/x68k_usb/led.c b/converter/x68k_usb/led.c similarity index 100% rename from x68k_usb/led.c rename to converter/x68k_usb/led.c diff --git a/x68k_usb/matrix.c b/converter/x68k_usb/matrix.c similarity index 100% rename from x68k_usb/matrix.c rename to converter/x68k_usb/matrix.c diff --git a/x68k_usb/x68k.c b/converter/x68k_usb/x68k.c similarity index 100% rename from x68k_usb/x68k.c rename to converter/x68k_usb/x68k.c diff --git a/x68k_usb/x68k.h b/converter/x68k_usb/x68k.h similarity index 100% rename from x68k_usb/x68k.h rename to converter/x68k_usb/x68k.h diff --git a/hbk/Makefile b/keyboard/hbk/Makefile similarity index 99% rename from hbk/Makefile rename to keyboard/hbk/Makefile index c441e2d7a..26be322e0 100644 --- a/hbk/Makefile +++ b/keyboard/hbk/Makefile @@ -2,7 +2,7 @@ TARGET = hbk # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/hbk/config.h b/keyboard/hbk/config.h similarity index 100% rename from hbk/config.h rename to keyboard/hbk/config.h diff --git a/hbk/controller_teensy.h b/keyboard/hbk/controller_teensy.h similarity index 100% rename from hbk/controller_teensy.h rename to keyboard/hbk/controller_teensy.h diff --git a/hbk/keymap.c b/keyboard/hbk/keymap.c similarity index 100% rename from hbk/keymap.c rename to keyboard/hbk/keymap.c diff --git a/hbk/led.c b/keyboard/hbk/led.c similarity index 100% rename from hbk/led.c rename to keyboard/hbk/led.c diff --git a/hbk/matrix.c b/keyboard/hbk/matrix.c similarity index 100% rename from hbk/matrix.c rename to keyboard/hbk/matrix.c diff --git a/hhkb/Makefile.iwrap b/keyboard/hhkb/Makefile.iwrap similarity index 99% rename from hhkb/Makefile.iwrap rename to keyboard/hhkb/Makefile.iwrap index d922b0f50..ef7ad2eac 100644 --- a/hhkb/Makefile.iwrap +++ b/keyboard/hhkb/Makefile.iwrap @@ -7,7 +7,7 @@ TARGET = hhkb_iwrap # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/hhkb/Makefile.pjrc b/keyboard/hhkb/Makefile.pjrc similarity index 98% rename from hhkb/Makefile.pjrc rename to keyboard/hhkb/Makefile.pjrc index 28b6b589d..f6d133eae 100644 --- a/hhkb/Makefile.pjrc +++ b/keyboard/hhkb/Makefile.pjrc @@ -7,7 +7,7 @@ TARGET = hhkb_pjrc # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/hhkb/Makefile.vusb b/keyboard/hhkb/Makefile.vusb similarity index 99% rename from hhkb/Makefile.vusb rename to keyboard/hhkb/Makefile.vusb index 734b73a02..6dd628807 100644 --- a/hhkb/Makefile.vusb +++ b/keyboard/hhkb/Makefile.vusb @@ -7,7 +7,7 @@ TARGET = hhkb_vusb # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/hhkb/README b/keyboard/hhkb/README similarity index 100% rename from hhkb/README rename to keyboard/hhkb/README diff --git a/hhkb/config_iwrap.h b/keyboard/hhkb/config_iwrap.h similarity index 100% rename from hhkb/config_iwrap.h rename to keyboard/hhkb/config_iwrap.h diff --git a/hhkb/config_pjrc.h b/keyboard/hhkb/config_pjrc.h similarity index 100% rename from hhkb/config_pjrc.h rename to keyboard/hhkb/config_pjrc.h diff --git a/hhkb/config_vusb.h b/keyboard/hhkb/config_vusb.h similarity index 100% rename from hhkb/config_vusb.h rename to keyboard/hhkb/config_vusb.h diff --git a/hhkb/doc/Bluetooth.txt b/keyboard/hhkb/doc/Bluetooth.txt similarity index 100% rename from hhkb/doc/Bluetooth.txt rename to keyboard/hhkb/doc/Bluetooth.txt diff --git a/hhkb/doc/Bluetooth_img/.picasa.ini b/keyboard/hhkb/doc/Bluetooth_img/.picasa.ini similarity index 100% rename from hhkb/doc/Bluetooth_img/.picasa.ini rename to keyboard/hhkb/doc/Bluetooth_img/.picasa.ini diff --git a/hhkb/doc/Bluetooth_img/BT_circuit.jpg b/keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg similarity index 100% rename from hhkb/doc/Bluetooth_img/BT_circuit.jpg rename to keyboard/hhkb/doc/Bluetooth_img/BT_circuit.jpg diff --git a/hhkb/doc/HHKB.txt b/keyboard/hhkb/doc/HHKB.txt similarity index 100% rename from hhkb/doc/HHKB.txt rename to keyboard/hhkb/doc/HHKB.txt diff --git a/hhkb/doc/HHKB_img/HHKB_TP1684.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg similarity index 100% rename from hhkb/doc/HHKB_img/HHKB_TP1684.jpg rename to keyboard/hhkb/doc/HHKB_img/HHKB_TP1684.jpg diff --git a/hhkb/doc/HHKB_img/HHKB_chart1.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg similarity index 100% rename from hhkb/doc/HHKB_img/HHKB_chart1.jpg rename to keyboard/hhkb/doc/HHKB_img/HHKB_chart1.jpg diff --git a/hhkb/doc/HHKB_img/HHKB_chart2.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg similarity index 100% rename from hhkb/doc/HHKB_img/HHKB_chart2.jpg rename to keyboard/hhkb/doc/HHKB_img/HHKB_chart2.jpg diff --git a/hhkb/doc/HHKB_img/HHKB_connector.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg similarity index 100% rename from hhkb/doc/HHKB_img/HHKB_connector.jpg rename to keyboard/hhkb/doc/HHKB_img/HHKB_connector.jpg diff --git a/hhkb/doc/HHKB_img/HHKB_controller.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg similarity index 100% rename from hhkb/doc/HHKB_img/HHKB_controller.jpg rename to keyboard/hhkb/doc/HHKB_img/HHKB_controller.jpg diff --git a/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg b/keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg similarity index 100% rename from hhkb/doc/HHKB_img/HHKB_keyswitch.jpg rename to keyboard/hhkb/doc/HHKB_img/HHKB_keyswitch.jpg diff --git a/hhkb/doc/HHKB_img/connector_contact.jpg b/keyboard/hhkb/doc/HHKB_img/connector_contact.jpg similarity index 100% rename from hhkb/doc/HHKB_img/connector_contact.jpg rename to keyboard/hhkb/doc/HHKB_img/connector_contact.jpg diff --git a/hhkb/doc/HHKB_img/logic_analyzer.jpg b/keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg similarity index 100% rename from hhkb/doc/HHKB_img/logic_analyzer.jpg rename to keyboard/hhkb/doc/HHKB_img/logic_analyzer.jpg diff --git a/hhkb/doc/HHKB_img/probe_contact.jpg b/keyboard/hhkb/doc/HHKB_img/probe_contact.jpg similarity index 100% rename from hhkb/doc/HHKB_img/probe_contact.jpg rename to keyboard/hhkb/doc/HHKB_img/probe_contact.jpg diff --git a/hhkb/doc/HHKB_img/teensy_install.jpg b/keyboard/hhkb/doc/HHKB_img/teensy_install.jpg similarity index 100% rename from hhkb/doc/HHKB_img/teensy_install.jpg rename to keyboard/hhkb/doc/HHKB_img/teensy_install.jpg diff --git a/hhkb/doc/HHKB_img/teensy_wiring.jpg b/keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg similarity index 100% rename from hhkb/doc/HHKB_img/teensy_wiring.jpg rename to keyboard/hhkb/doc/HHKB_img/teensy_wiring.jpg diff --git a/hhkb/keymap.c b/keyboard/hhkb/keymap.c similarity index 100% rename from hhkb/keymap.c rename to keyboard/hhkb/keymap.c diff --git a/hhkb/led.c b/keyboard/hhkb/led.c similarity index 100% rename from hhkb/led.c rename to keyboard/hhkb/led.c diff --git a/hhkb/matrix.c b/keyboard/hhkb/matrix.c similarity index 100% rename from hhkb/matrix.c rename to keyboard/hhkb/matrix.c diff --git a/hhkb/usbconfig.h b/keyboard/hhkb/usbconfig.h similarity index 100% rename from hhkb/usbconfig.h rename to keyboard/hhkb/usbconfig.h diff --git a/macway/Makefile b/keyboard/macway/Makefile similarity index 98% rename from macway/Makefile rename to keyboard/macway/Makefile index 83d31b674..afee38b12 100644 --- a/macway/Makefile +++ b/keyboard/macway/Makefile @@ -2,7 +2,7 @@ TARGET = macway # Directory common source filess exist -TOP_DIR = .. +TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . diff --git a/macway/config.h b/keyboard/macway/config.h similarity index 100% rename from macway/config.h rename to keyboard/macway/config.h diff --git a/macway/doc/back.jpg b/keyboard/macway/doc/back.jpg similarity index 100% rename from macway/doc/back.jpg rename to keyboard/macway/doc/back.jpg diff --git a/macway/doc/case.jpg b/keyboard/macway/doc/case.jpg similarity index 100% rename from macway/doc/case.jpg rename to keyboard/macway/doc/case.jpg diff --git a/macway/doc/keys.jpg b/keyboard/macway/doc/keys.jpg similarity index 100% rename from macway/doc/keys.jpg rename to keyboard/macway/doc/keys.jpg diff --git a/macway/doc/side.jpg b/keyboard/macway/doc/side.jpg similarity index 100% rename from macway/doc/side.jpg rename to keyboard/macway/doc/side.jpg diff --git a/macway/doc/switch.jpg b/keyboard/macway/doc/switch.jpg similarity index 100% rename from macway/doc/switch.jpg rename to keyboard/macway/doc/switch.jpg diff --git a/macway/doc/teensy.jpg b/keyboard/macway/doc/teensy.jpg similarity index 100% rename from macway/doc/teensy.jpg rename to keyboard/macway/doc/teensy.jpg diff --git a/macway/doc/wiring.jpg b/keyboard/macway/doc/wiring.jpg similarity index 100% rename from macway/doc/wiring.jpg rename to keyboard/macway/doc/wiring.jpg diff --git a/macway/doc/withHHKB.jpg b/keyboard/macway/doc/withHHKB.jpg similarity index 100% rename from macway/doc/withHHKB.jpg rename to keyboard/macway/doc/withHHKB.jpg diff --git a/macway/doc/withThinkPad.jpg b/keyboard/macway/doc/withThinkPad.jpg similarity index 100% rename from macway/doc/withThinkPad.jpg rename to keyboard/macway/doc/withThinkPad.jpg diff --git a/macway/keymap.c b/keyboard/macway/keymap.c similarity index 100% rename from macway/keymap.c rename to keyboard/macway/keymap.c diff --git a/macway/led.c b/keyboard/macway/led.c similarity index 100% rename from macway/led.c rename to keyboard/macway/led.c diff --git a/macway/matrix.c b/keyboard/macway/matrix.c similarity index 100% rename from macway/matrix.c rename to keyboard/macway/matrix.c diff --git a/protocol.mk b/protocol.mk new file mode 100644 index 000000000..1442c5206 --- /dev/null +++ b/protocol.mk @@ -0,0 +1,2 @@ +# Search Path +VPATH += $(TOP_DIR)/protocol From 81706d1130fdc3c0d6d110f4d8665c47ffd7fb59 Mon Sep 17 00:00:00 2001 From: tmk Date: Sun, 10 Jun 2012 23:50:47 +0900 Subject: [PATCH 4/4] Moved protocol files; news and x68k. Renamed sony_usb to news_usb Renamed hbk to hbkb --- README.md | 65 +++++++++++-------- .../{sony_usb => news_usb}/Makefile.pjrc | 0 .../{sony_usb => news_usb}/config_pjrc.h | 0 converter/{sony_usb => news_usb}/keymap.c | 0 converter/{sony_usb => news_usb}/led.c | 0 converter/{sony_usb => news_usb}/matrix.c | 0 keyboard/{hbk => hbkb}/Makefile | 0 keyboard/{hbk => hbkb}/config.h | 0 keyboard/{hbk => hbkb}/controller_teensy.h | 0 keyboard/{hbk => hbkb}/keymap.c | 0 keyboard/{hbk => hbkb}/led.c | 0 keyboard/{hbk => hbkb}/matrix.c | 0 {converter/sony_usb => protocol}/news.c | 0 {converter/sony_usb => protocol}/news.h | 0 {converter/x68k_usb => protocol}/x68k.c | 0 {converter/x68k_usb => protocol}/x68k.h | 0 16 files changed, 37 insertions(+), 28 deletions(-) rename converter/{sony_usb => news_usb}/Makefile.pjrc (100%) rename converter/{sony_usb => news_usb}/config_pjrc.h (100%) rename converter/{sony_usb => news_usb}/keymap.c (100%) rename converter/{sony_usb => news_usb}/led.c (100%) rename converter/{sony_usb => news_usb}/matrix.c (100%) rename keyboard/{hbk => hbkb}/Makefile (100%) rename keyboard/{hbk => hbkb}/config.h (100%) rename keyboard/{hbk => hbkb}/controller_teensy.h (100%) rename keyboard/{hbk => hbkb}/keymap.c (100%) rename keyboard/{hbk => hbkb}/led.c (100%) rename keyboard/{hbk => hbkb}/matrix.c (100%) rename {converter/sony_usb => protocol}/news.c (100%) rename {converter/sony_usb => protocol}/news.h (100%) rename {converter/x68k_usb => protocol}/x68k.c (100%) rename {converter/x68k_usb => protocol}/x68k.h (100%) diff --git a/README.md b/README.md index 0361e2ad9..d6d8fb4ec 100644 --- a/README.md +++ b/README.md @@ -17,64 +17,73 @@ Features Projects -------- ### converter -* ps2_usb - PS/2 keyboard to USB -* adb_usb - ADB keyboard to USB -* m0110_usb - Machintosh 128K/512K/Plus keyboard to USB -* terminal_usb - IBM Model M terminal keyboard(PS/2 scancode set3) to USB -* sony_usb - Sony NEWS keyboard to USB -* x68k_usb - Sharp X68000 keyboard to USB +* [ps2_usb][c1] - [PS/2 keyboard to USB][GH_ps2] +* [adb_usb][c2] - [ADB keyboard to USB][GH_adb] +* [m0110_usb][c3] - [Machintosh 128K/512K/Plus keyboard to USB][GH_m0110] +* [terminal_usb][c4] - [IBM Model M terminal keyboard(PS/2 scancode set3) to USB][GH_terminal] +* [news_usb][c5] - [Sony NEWS keyboard to USB][GH_news] +* [x68k_usb][c6] - [Sharp X68000 keyboard to USB][GH_x68k] ### keyboard -* hhkb - Happy Hacking Keyboard professional -* macway - Compact keyboard mod -* hbk - Happy Buckling sprint keyboard(IBM Model M mod) +* [hhkb][k1] - [Happy Hacking Keyboard professional][GH_hhkb] +* [macway][k2] - [Compact keyboard mod][GH_macway] +* [hbkb][k3] - [Happy Buckling sprint keyboard(IBM Model M mod)][GH_hbkb] +[c1]: converter/ps2_usb/ +[c2]: converter/adb_usb/ +[c3]: converter/m0110_usb/ +[c4]: converter/terminal_usb/ +[c5]: converter/news_usb/ +[c6]: converter/x68k_usb/ +[k1]: keyboard/hhkb +[k2]: keyboard/macway +[k3]: keyboard/hbkb [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_sony]: http://geekhack.org/showwiki.php?title=Island:25759 +[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_hbk]: http://geekhack.org/showwiki.php?title=Island:29483 +[GH_hbkb]: http://geekhack.org/showwiki.php?title=Island:29483 Files & Directories ------------------- ### Top -* common/ common codes -* protocol/ keyboard protocol support -* keyboard/ keyboard projects -* converter/ protocol converter projects -* doc/ documents +* [common/](common/) - common codes +* [protocol/](protocol/) - keyboard protocol support +* [keyboard/](keyboard/) - keyboard projects +* [converter/](converter/) - protocol converter projects +* [doc/](doc/) - documents ### Keyboard Protocols -* pjrc/ PJRC USB stack -* vusb/ Objective Development V-USB -* iwrap/ Bluetooth HID for Bluegiga iWRAP -* ps2 PS/2 protocol -* adb Apple Desktop Bus protocol -* m0110 Macintosh 128K/512K/Plus keyboard protocol -* news Sony NEWS keyboard protocol -* x68k Sharp X68000 keyboard protocol +* [pjrc/](protocol/pjrc/) - PJRC USB stack +* [vusb/](protocol/vusb/) - Objective Development V-USB +* [iwrap/](protocol/iwrap) - Bluetooth HID for Bluegiga iWRAP +* [ps2.c](protocol/ps2.c) - PS/2 protocol +* [adb.c](protocol/adb.c) - Apple Desktop Bus protocol +* [m0110.c](protocol/m0110.c) - Macintosh 128K/512K/Plus keyboard protocol +* [news.c](protocol/news.c) - Sony NEWS keyboard protocol +* [x68k.c](protocol/x68k.c) - Sharp X68000 keyboard protocol Build & Program --------------- ### Build firmware To compile you need `AVR GCC`, `AVR Libc` and `GNU make`. -You can use [WinAVR][1] on Windows and [CrossPack][2] on Mac. +You can use [WinAVR][winavr] on Windows and [CrossPack][crosspack] on Mac. $ cd $ make -The firmware will be compiled as a file tmk_.hex. +The firmware will be compiled as a file `tmk_.hex`. -[1]: http://winavr.sourceforge.net/ -[2]: http://www.obdev.at/products/crosspack/index.html +[winavr]: http://winavr.sourceforge.net/ +[crosspack]: http://www.obdev.at/products/crosspack/index.html ### Program Controller If you have proper program command in Makefile just type this. diff --git a/converter/sony_usb/Makefile.pjrc b/converter/news_usb/Makefile.pjrc similarity index 100% rename from converter/sony_usb/Makefile.pjrc rename to converter/news_usb/Makefile.pjrc diff --git a/converter/sony_usb/config_pjrc.h b/converter/news_usb/config_pjrc.h similarity index 100% rename from converter/sony_usb/config_pjrc.h rename to converter/news_usb/config_pjrc.h diff --git a/converter/sony_usb/keymap.c b/converter/news_usb/keymap.c similarity index 100% rename from converter/sony_usb/keymap.c rename to converter/news_usb/keymap.c diff --git a/converter/sony_usb/led.c b/converter/news_usb/led.c similarity index 100% rename from converter/sony_usb/led.c rename to converter/news_usb/led.c diff --git a/converter/sony_usb/matrix.c b/converter/news_usb/matrix.c similarity index 100% rename from converter/sony_usb/matrix.c rename to converter/news_usb/matrix.c diff --git a/keyboard/hbk/Makefile b/keyboard/hbkb/Makefile similarity index 100% rename from keyboard/hbk/Makefile rename to keyboard/hbkb/Makefile diff --git a/keyboard/hbk/config.h b/keyboard/hbkb/config.h similarity index 100% rename from keyboard/hbk/config.h rename to keyboard/hbkb/config.h diff --git a/keyboard/hbk/controller_teensy.h b/keyboard/hbkb/controller_teensy.h similarity index 100% rename from keyboard/hbk/controller_teensy.h rename to keyboard/hbkb/controller_teensy.h diff --git a/keyboard/hbk/keymap.c b/keyboard/hbkb/keymap.c similarity index 100% rename from keyboard/hbk/keymap.c rename to keyboard/hbkb/keymap.c diff --git a/keyboard/hbk/led.c b/keyboard/hbkb/led.c similarity index 100% rename from keyboard/hbk/led.c rename to keyboard/hbkb/led.c diff --git a/keyboard/hbk/matrix.c b/keyboard/hbkb/matrix.c similarity index 100% rename from keyboard/hbk/matrix.c rename to keyboard/hbkb/matrix.c diff --git a/converter/sony_usb/news.c b/protocol/news.c similarity index 100% rename from converter/sony_usb/news.c rename to protocol/news.c diff --git a/converter/sony_usb/news.h b/protocol/news.h similarity index 100% rename from converter/sony_usb/news.h rename to protocol/news.h diff --git a/converter/x68k_usb/x68k.c b/protocol/x68k.c similarity index 100% rename from converter/x68k_usb/x68k.c rename to protocol/x68k.c diff --git a/converter/x68k_usb/x68k.h b/protocol/x68k.h similarity index 100% rename from converter/x68k_usb/x68k.h rename to protocol/x68k.h