]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Moved files to common, protocol and doc directory
authortmk <nobody@nowhere>
Wed, 6 Jun 2012 17:25:15 +0000 (02:25 +0900)
committertmk <nobody@nowhere>
Wed, 6 Jun 2012 17:47:33 +0000 (02:47 +0900)
98 files changed:
LICENSE.txt [deleted file]
common/bootloader.c [moved from bootloader.c with 100% similarity]
common/bootloader.h [moved from bootloader.h with 100% similarity]
common/command.c [moved from command.c with 100% similarity]
common/command.h [moved from command.h with 100% similarity]
common/controller_teensy.h [moved from controller_teensy.h with 100% similarity]
common/debug.h [moved from debug.h with 100% similarity]
common/host.c [moved from host.c with 100% similarity]
common/host.h [moved from host.h with 100% similarity]
common/host_driver.h [moved from host_driver.h with 100% similarity]
common/keyboard.c [moved from keyboard.c with 100% similarity]
common/keyboard.h [moved from keyboard.h with 100% similarity]
common/keymap.h [moved from keymap.h with 100% similarity]
common/layer.c [moved from layer.c with 100% similarity]
common/layer.h [moved from layer.h with 100% similarity]
common/led.h [moved from led.h with 100% similarity]
common/matrix.h [moved from matrix.h with 100% similarity]
common/mousekey.c [moved from mousekey.c with 100% similarity]
common/mousekey.h [moved from mousekey.h with 100% similarity]
common/print.c [moved from print.c with 100% similarity]
common/print.h [moved from print.h with 100% similarity]
common/report.h [moved from report.h with 100% similarity]
common/sendchar.h [moved from sendchar.h with 100% similarity]
common/sendchar_null.c [moved from sendchar_null.c with 100% similarity]
common/sendchar_uart.c [moved from sendchar_uart.c with 100% similarity]
common/timer.c [moved from timer.c with 100% similarity]
common/timer.h [moved from timer.h with 100% similarity]
common/uart.c [moved from uart.c with 100% similarity]
common/uart.h [moved from uart.h with 100% similarity]
common/usb_keycodes.h [moved from usb_keycodes.h with 100% similarity]
common/util.c [moved from util.c with 100% similarity]
common/util.h [moved from util.h with 100% similarity]
doc/COPYING.GPLv2 [moved from COPYING.GPLv2 with 100% similarity]
doc/COPYING.GPLv3 [moved from COPYING.GPLv3 with 100% similarity]
doc/FUSE.txt [moved from hhkb/FUSE.txt with 100% similarity]
doc/POWER.txt [moved from POWER.txt with 100% similarity]
doc/USB_NKRO.txt [moved from USB_NKRO.txt with 100% similarity]
pjrc/host.c [deleted file]
protocol/adb.c [moved from adb.c with 100% similarity]
protocol/adb.h [moved from adb.h with 100% similarity]
protocol/iwrap.mk [moved from iwrap.mk with 100% similarity]
protocol/iwrap/iWRAP.txt [moved from iwrap/iWRAP.txt with 100% similarity]
protocol/iwrap/iwrap.c [moved from iwrap/iwrap.c with 100% similarity]
protocol/iwrap/iwrap.h [moved from iwrap/iwrap.h with 100% similarity]
protocol/iwrap/main.c [moved from iwrap/main.c with 100% similarity]
protocol/iwrap/suart.S [moved from iwrap/suart.S with 100% similarity]
protocol/iwrap/suart.h [moved from iwrap/suart.h with 100% similarity]
protocol/iwrap/wd.h [moved from iwrap/wd.h with 100% similarity]
protocol/m0110.c [moved from m0110.c with 100% similarity]
protocol/m0110.h [moved from m0110.h with 100% similarity]
protocol/pjrc.mk [moved from pjrc.mk with 100% similarity]
protocol/pjrc/bootloader_teensy.c [moved from pjrc/bootloader_teensy.c with 100% similarity]
protocol/pjrc/main.c [moved from pjrc/main.c with 100% similarity]
protocol/pjrc/pjrc.c [moved from pjrc/pjrc.c with 100% similarity]
protocol/pjrc/pjrc.h [moved from pjrc/pjrc.h with 100% similarity]
protocol/pjrc/usb.c [moved from pjrc/usb.c with 100% similarity]
protocol/pjrc/usb.h [moved from pjrc/usb.h with 100% similarity]
protocol/pjrc/usb_debug.c [moved from pjrc/usb_debug.c with 100% similarity]
protocol/pjrc/usb_debug.h [moved from pjrc/usb_debug.h with 100% similarity]
protocol/pjrc/usb_extra.c [moved from pjrc/usb_extra.c with 100% similarity]
protocol/pjrc/usb_extra.h [moved from pjrc/usb_extra.h with 100% similarity]
protocol/pjrc/usb_keyboard.c [moved from pjrc/usb_keyboard.c with 100% similarity]
protocol/pjrc/usb_keyboard.h [moved from pjrc/usb_keyboard.h with 100% similarity]
protocol/pjrc/usb_mouse.c [moved from pjrc/usb_mouse.c with 100% similarity]
protocol/pjrc/usb_mouse.h [moved from pjrc/usb_mouse.h with 100% similarity]
protocol/ps2.c [moved from ps2.c with 100% similarity]
protocol/ps2.h [moved from ps2.h with 100% similarity]
protocol/ps2_mouse.c [moved from ps2_mouse.c with 100% similarity]
protocol/ps2_mouse.h [moved from ps2_mouse.h with 100% similarity]
protocol/ps2_usart.c [moved from ps2_usart.c with 100% similarity]
protocol/vusb.mk [moved from vusb.mk with 100% similarity]
protocol/vusb/bootloader_usbasp.c [moved from vusb/bootloader_usbasp.c with 100% similarity]
protocol/vusb/main.c [moved from vusb/main.c with 100% similarity]
protocol/vusb/sendchar_usart.c [moved from vusb/sendchar_usart.c with 100% similarity]
protocol/vusb/usbdrv/Changelog.txt [moved from vusb/usbdrv/Changelog.txt with 100% similarity]
protocol/vusb/usbdrv/CommercialLicense.txt [moved from vusb/usbdrv/CommercialLicense.txt with 100% similarity]
protocol/vusb/usbdrv/License.txt [moved from vusb/usbdrv/License.txt with 100% similarity]
protocol/vusb/usbdrv/Readme.txt [moved from vusb/usbdrv/Readme.txt with 100% similarity]
protocol/vusb/usbdrv/USB-ID-FAQ.txt [moved from vusb/usbdrv/USB-ID-FAQ.txt with 100% similarity]
protocol/vusb/usbdrv/USB-IDs-for-free.txt [moved from vusb/usbdrv/USB-IDs-for-free.txt with 100% similarity]
protocol/vusb/usbdrv/asmcommon.inc [moved from vusb/usbdrv/asmcommon.inc with 100% similarity]
protocol/vusb/usbdrv/oddebug.c [moved from vusb/usbdrv/oddebug.c with 100% similarity]
protocol/vusb/usbdrv/oddebug.h [moved from vusb/usbdrv/oddebug.h with 100% similarity]
protocol/vusb/usbdrv/usbconfig-prototype.h [moved from vusb/usbdrv/usbconfig-prototype.h with 100% similarity]
protocol/vusb/usbdrv/usbdrv.c [moved from vusb/usbdrv/usbdrv.c with 100% similarity]
protocol/vusb/usbdrv/usbdrv.h [moved from vusb/usbdrv/usbdrv.h with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm.S [moved from vusb/usbdrv/usbdrvasm.S with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm.asm [moved from vusb/usbdrv/usbdrvasm.asm with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm12.inc [moved from vusb/usbdrv/usbdrvasm12.inc with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm128.inc [moved from vusb/usbdrv/usbdrvasm128.inc with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm15.inc [moved from vusb/usbdrv/usbdrvasm15.inc with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm16.inc [moved from vusb/usbdrv/usbdrvasm16.inc with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm165.inc [moved from vusb/usbdrv/usbdrvasm165.inc with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm18-crc.inc [moved from vusb/usbdrv/usbdrvasm18-crc.inc with 100% similarity]
protocol/vusb/usbdrv/usbdrvasm20.inc [moved from vusb/usbdrv/usbdrvasm20.inc with 100% similarity]
protocol/vusb/usbdrv/usbportability.h [moved from vusb/usbdrv/usbportability.h with 100% similarity]
protocol/vusb/vusb.c [moved from vusb/vusb.c with 100% similarity]
protocol/vusb/vusb.h [moved from vusb/vusb.h with 100% similarity]

diff --git a/LICENSE.txt b/LICENSE.txt
deleted file mode 100644 (file)
index de622df..0000000
+++ /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/
similarity index 100%
rename from bootloader.c
rename to common/bootloader.c
similarity index 100%
rename from bootloader.h
rename to common/bootloader.h
similarity index 100%
rename from command.c
rename to common/command.c
similarity index 100%
rename from command.h
rename to common/command.h
similarity index 100%
rename from debug.h
rename to common/debug.h
similarity index 100%
rename from host.c
rename to common/host.c
similarity index 100%
rename from host.h
rename to common/host.h
similarity index 100%
rename from host_driver.h
rename to common/host_driver.h
similarity index 100%
rename from keyboard.c
rename to common/keyboard.c
similarity index 100%
rename from keyboard.h
rename to common/keyboard.h
similarity index 100%
rename from keymap.h
rename to common/keymap.h
similarity index 100%
rename from layer.c
rename to common/layer.c
similarity index 100%
rename from layer.h
rename to common/layer.h
similarity index 100%
rename from led.h
rename to common/led.h
similarity index 100%
rename from matrix.h
rename to common/matrix.h
similarity index 100%
rename from mousekey.c
rename to common/mousekey.c
similarity index 100%
rename from mousekey.h
rename to common/mousekey.h
similarity index 100%
rename from print.c
rename to common/print.c
similarity index 100%
rename from print.h
rename to common/print.h
similarity index 100%
rename from report.h
rename to common/report.h
similarity index 100%
rename from sendchar.h
rename to common/sendchar.h
similarity index 100%
rename from sendchar_null.c
rename to common/sendchar_null.c
similarity index 100%
rename from sendchar_uart.c
rename to common/sendchar_uart.c
similarity index 100%
rename from timer.c
rename to common/timer.c
similarity index 100%
rename from timer.h
rename to common/timer.h
similarity index 100%
rename from uart.c
rename to common/uart.c
similarity index 100%
rename from uart.h
rename to common/uart.h
similarity index 100%
rename from usb_keycodes.h
rename to common/usb_keycodes.h
similarity index 100%
rename from util.c
rename to common/util.c
similarity index 100%
rename from util.h
rename to common/util.h
similarity index 100%
rename from COPYING.GPLv2
rename to doc/COPYING.GPLv2
similarity index 100%
rename from COPYING.GPLv3
rename to doc/COPYING.GPLv3
similarity index 100%
rename from hhkb/FUSE.txt
rename to doc/FUSE.txt
similarity index 100%
rename from POWER.txt
rename to doc/POWER.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 (file)
index fcf71d5..0000000
+++ /dev/null
@@ -1,183 +0,0 @@
-/*
-Copyright 2011 Jun Wako <wakojun@gmail.com>
-
-This program is free software: you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 2 of the License, or
-(at your option) any later version.
-
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program.  If not, see <http://www.gnu.org/licenses/>.
-*/
-
-#include <stdint.h>
-#include <avr/interrupt.h>
-#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");
-    }
-}
similarity index 100%
rename from adb.c
rename to protocol/adb.c
similarity index 100%
rename from adb.h
rename to protocol/adb.h
similarity index 100%
rename from iwrap.mk
rename to protocol/iwrap.mk
similarity index 100%
rename from iwrap/iWRAP.txt
rename to protocol/iwrap/iWRAP.txt
similarity index 100%
rename from iwrap/iwrap.c
rename to protocol/iwrap/iwrap.c
similarity index 100%
rename from iwrap/iwrap.h
rename to protocol/iwrap/iwrap.h
similarity index 100%
rename from iwrap/main.c
rename to protocol/iwrap/main.c
similarity index 100%
rename from iwrap/suart.S
rename to protocol/iwrap/suart.S
similarity index 100%
rename from iwrap/suart.h
rename to protocol/iwrap/suart.h
similarity index 100%
rename from iwrap/wd.h
rename to protocol/iwrap/wd.h
similarity index 100%
rename from m0110.c
rename to protocol/m0110.c
similarity index 100%
rename from m0110.h
rename to protocol/m0110.h
similarity index 100%
rename from pjrc.mk
rename to protocol/pjrc.mk
similarity index 100%
rename from pjrc/main.c
rename to protocol/pjrc/main.c
similarity index 100%
rename from pjrc/pjrc.c
rename to protocol/pjrc/pjrc.c
similarity index 100%
rename from pjrc/pjrc.h
rename to protocol/pjrc/pjrc.h
similarity index 100%
rename from pjrc/usb.c
rename to protocol/pjrc/usb.c
similarity index 100%
rename from pjrc/usb.h
rename to protocol/pjrc/usb.h
similarity index 100%
rename from pjrc/usb_debug.c
rename to protocol/pjrc/usb_debug.c
similarity index 100%
rename from pjrc/usb_debug.h
rename to protocol/pjrc/usb_debug.h
similarity index 100%
rename from pjrc/usb_extra.c
rename to protocol/pjrc/usb_extra.c
similarity index 100%
rename from pjrc/usb_extra.h
rename to protocol/pjrc/usb_extra.h
similarity index 100%
rename from pjrc/usb_mouse.c
rename to protocol/pjrc/usb_mouse.c
similarity index 100%
rename from pjrc/usb_mouse.h
rename to protocol/pjrc/usb_mouse.h
similarity index 100%
rename from ps2.c
rename to protocol/ps2.c
similarity index 100%
rename from ps2.h
rename to protocol/ps2.h
similarity index 100%
rename from ps2_mouse.c
rename to protocol/ps2_mouse.c
similarity index 100%
rename from ps2_mouse.h
rename to protocol/ps2_mouse.h
similarity index 100%
rename from ps2_usart.c
rename to protocol/ps2_usart.c
similarity index 100%
rename from vusb.mk
rename to protocol/vusb.mk
similarity index 100%
rename from vusb/main.c
rename to protocol/vusb/main.c
similarity index 100%
rename from vusb/vusb.c
rename to protocol/vusb/vusb.c
similarity index 100%
rename from vusb/vusb.h
rename to protocol/vusb/vusb.h