summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore2
-rw-r--r--common.mk12
-rw-r--r--common/action.c2
-rw-r--r--common/action.h13
-rw-r--r--common/action_layer.c2
-rw-r--r--common/action_layer.h2
-rw-r--r--common/action_macro.c8
-rw-r--r--common/action_macro.h8
-rw-r--r--common/action_util.c20
-rw-r--r--common/action_util.h9
-rw-r--r--common/avr/bootloader.c (renamed from common/bootloader.c)0
-rw-r--r--common/avr/eeconfig.c (renamed from common/eeconfig.c)0
-rw-r--r--common/avr/suspend.c117
-rw-r--r--common/avr/suspend_avr.h27
-rw-r--r--common/avr/timer.c (renamed from common/timer.c)1
-rw-r--r--common/avr/timer_avr.h42
-rw-r--r--common/avr/xprintf.S (renamed from common/xprintf.S)0
-rw-r--r--common/avr/xprintf.h (renamed from common/xprintf.h)0
-rw-r--r--common/bootmagic.c2
-rw-r--r--common/command.c28
-rw-r--r--common/command.h10
-rw-r--r--common/debug.h117
-rw-r--r--common/debug_config.h51
-rw-r--r--common/host.c4
-rw-r--r--common/keyboard.c3
-rw-r--r--common/keyboard.h11
-rw-r--r--common/keymap.c5
-rw-r--r--common/keymap.h2
-rw-r--r--common/matrix.h5
-rw-r--r--common/mbed/bootloader.c4
-rw-r--r--common/mbed/suspend.c6
-rw-r--r--common/mbed/timer.c41
-rw-r--r--common/mbed/xprintf.cpp46
-rw-r--r--common/mbed/xprintf.h17
-rw-r--r--common/mousekey.c1
-rw-r--r--common/mousekey.h20
-rw-r--r--common/nodebug.h30
-rw-r--r--common/print.c22
-rw-r--r--common/print.h144
-rw-r--r--common/progmem.h12
-rw-r--r--common/report.h22
-rw-r--r--common/suspend.c76
-rw-r--r--common/suspend.h23
-rw-r--r--common/timer.h18
-rw-r--r--common/wait.h20
-rw-r--r--converter/adb_usb/keymap_common.c2
-rw-r--r--converter/ascii_usb/keymap.c2
-rw-r--r--converter/ibm4704_usb/keymap_common.c2
-rw-r--r--converter/m0110_usb/keymap.c2
-rw-r--r--converter/m0110_usb/keymap_common.c2
-rw-r--r--converter/next_usb/keymap.c2
-rw-r--r--converter/pc98_usb/keymap.c2
-rw-r--r--converter/ps2_usb/Makefile.mbed44
-rw-r--r--converter/ps2_usb/config_mbed.h60
-rw-r--r--converter/ps2_usb/keymap_common.c3
-rw-r--r--converter/ps2_usb/keymap_common.h1
-rw-r--r--converter/ps2_usb/main.cpp46
-rw-r--r--converter/ps2_usb/matrix.c3
-rw-r--r--converter/serialmouse_usb/keymap.c2
-rw-r--r--converter/serialmouse_usb/keymap_common.c2
-rw-r--r--converter/terminal_bluefruit/keymap.c2
-rw-r--r--keyboard/gh60/keymap_common.c2
-rw-r--r--keyboard/hhkb/keymap_common.c2
-rw-r--r--keyboard/hhkb_rn42/MEMO.txt523
-rw-r--r--keyboard/hhkb_rn42/Makefile157
-rw-r--r--keyboard/hhkb_rn42/PowerSave.txt102
-rw-r--r--keyboard/hhkb_rn42/config.h112
-rw-r--r--keyboard/hhkb_rn42/hhkb_avr.h164
-rw-r--r--keyboard/hhkb_rn42/keymap_common.c33
-rw-r--r--keyboard/hhkb_rn42/keymap_common.h84
-rw-r--r--keyboard/hhkb_rn42/keymap_hasu.c282
-rw-r--r--keyboard/hhkb_rn42/keymap_jp.c50
-rw-r--r--keyboard/hhkb_rn42/led.c33
-rw-r--r--keyboard/hhkb_rn42/matrix.c191
-rw-r--r--keyboard/hhkb_rn42/rn42.mk12
-rw-r--r--keyboard/hhkb_rn42/rn42/battery.c136
-rw-r--r--keyboard/hhkb_rn42/rn42/battery.h35
-rw-r--r--keyboard/hhkb_rn42/rn42/main.c102
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42.c208
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42.h20
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42_task.c294
-rw-r--r--keyboard/hhkb_rn42/rn42/rn42_task.h10
-rw-r--r--keyboard/hhkb_rn42/rn42/suart.S156
-rw-r--r--keyboard/hhkb_rn42/rn42/suart.h8
-rw-r--r--keyboard/hid_liber/keymap.c2
-rw-r--r--keyboard/kitten_paw/keymap.c2
-rw-r--r--keyboard/kmac/keymap.c2
-rw-r--r--keyboard/lightpad/keymap.c2
-rw-r--r--keyboard/lightsaber/keymap.c2
-rw-r--r--keyboard/mbed_onekey/Makefile33
-rw-r--r--keyboard/mbed_onekey/config.h7
-rw-r--r--keyboard/mbed_onekey/main.cpp33
-rw-r--r--keyboard/onekey/keymap.c2
-rw-r--r--keyboard/phantom/keymap.c2
-rw-r--r--protocol.mk1
-rw-r--r--protocol/lufa/lufa.c15
-rw-r--r--protocol/mbed/HIDKeyboard.cpp271
-rw-r--r--protocol/mbed/HIDKeyboard.h31
-rw-r--r--protocol/mbed/mbed_driver.cpp41
-rw-r--r--protocol/mbed/mbed_driver.h3
-rw-r--r--protocol/ps2.h65
-rw-r--r--protocol/ps2_busywait.c16
-rw-r--r--protocol/ps2_io.h15
-rw-r--r--protocol/ps2_io_avr.c74
-rw-r--r--protocol/ps2_io_mbed.c60
-rw-r--r--protocol/serial_uart.c21
-rw-r--r--rules.mk1
-rw-r--r--tool/mbed/common.mk79
-rw-r--r--tool/mbed/gcc.mk80
-rw-r--r--tool/mbed/lpc-vector-checksum.c99
-rw-r--r--tool/mbed/mbed.mk99
111 files changed, 4482 insertions, 474 deletions
diff --git a/.gitignore b/.gitignore
index 0fd85b5314..f3f46872a0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,5 @@
*.sym
tags
*~
+build/
+*.bak
diff --git a/common.mk b/common.mk
index 1cffc3cc22..b854f09cdb 100644
--- a/common.mk
+++ b/common.mk
@@ -7,19 +7,19 @@ SRC += $(COMMON_DIR)/host.c \
$(COMMON_DIR)/action_layer.c \
$(COMMON_DIR)/action_util.c \
$(COMMON_DIR)/keymap.c \
- $(COMMON_DIR)/timer.c \
$(COMMON_DIR)/print.c \
$(COMMON_DIR)/debug.c \
- $(COMMON_DIR)/bootloader.c \
- $(COMMON_DIR)/suspend.c \
- $(COMMON_DIR)/xprintf.S \
- $(COMMON_DIR)/util.c
+ $(COMMON_DIR)/util.c \
+ $(COMMON_DIR)/avr/suspend.c \
+ $(COMMON_DIR)/avr/xprintf.S \
+ $(COMMON_DIR)/avr/timer.c \
+ $(COMMON_DIR)/avr/bootloader.c
# Option modules
ifdef BOOTMAGIC_ENABLE
SRC += $(COMMON_DIR)/bootmagic.c
- SRC += $(COMMON_DIR)/eeconfig.c
+ SRC += $(COMMON_DIR)/avr/eeconfig.c
OPT_DEFS += -DBOOTMAGIC_ENABLE
endif
diff --git a/common/action.c b/common/action.c
index 83bc8a6187..ec8eeae7bc 100644
--- a/common/action.c
+++ b/common/action.c
@@ -509,7 +509,7 @@ void clear_keyboard_but_mods(void)
#endif
}
-bool is_tap_key(key_t key)
+bool is_tap_key(keypos_t key)
{
action_t action = layer_switch_get_action(key);
diff --git a/common/action.h b/common/action.h
index 077711c231..8a4736d7bc 100644
--- a/common/action.h
+++ b/common/action.h
@@ -25,6 +25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "action_macro.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* tapping count and state */
typedef struct {
bool interrupted :1;
@@ -42,12 +46,11 @@ typedef struct {
#endif
} keyrecord_t;
-
/* Execute action per keyevent */
void action_exec(keyevent_t event);
/* action for key */
-action_t action_for_key(uint8_t layer, key_t key);
+action_t action_for_key(uint8_t layer, keypos_t key);
/* macro */
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt);
@@ -65,11 +68,15 @@ void unregister_mods(uint8_t mods);
void clear_keyboard(void);
void clear_keyboard_but_mods(void);
void layer_switch(uint8_t new_layer);
-bool is_tap_key(key_t key);
+bool is_tap_key(keypos_t key);
/* debug */
void debug_event(keyevent_t event);
void debug_record(keyrecord_t record);
void debug_action(action_t action);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* ACTION_H */
diff --git a/common/action_layer.c b/common/action_layer.c
index 526e24d539..c535615f44 100644
--- a/common/action_layer.c
+++ b/common/action_layer.c
@@ -112,7 +112,7 @@ void layer_debug(void)
-action_t layer_switch_get_action(key_t key)
+action_t layer_switch_get_action(keypos_t key)
{
action_t action;
action.code = ACTION_TRANSPARENT;
diff --git a/common/action_layer.h b/common/action_layer.h
index 034e00027b..b6da353cfd 100644
--- a/common/action_layer.h
+++ b/common/action_layer.h
@@ -72,6 +72,6 @@ void layer_xor(uint32_t state);
/* return action depending on current layer status */
-action_t layer_switch_get_action(key_t key);
+action_t layer_switch_get_action(keypos_t key);
#endif
diff --git a/common/action_macro.c b/common/action_macro.c
index d85aee3796..ba93fc8b23 100644
--- a/common/action_macro.c
+++ b/common/action_macro.c
@@ -14,10 +14,10 @@ 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 <util/delay.h>
#include "action.h"
#include "action_util.h"
#include "action_macro.h"
+#include "wait.h"
#ifdef DEBUG_ACTION
#include "debug.h"
@@ -28,7 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#ifndef NO_ACTION_MACRO
-#define MACRO_READ() (macro = pgm_read_byte(macro_p++))
+#define MACRO_READ() (macro = MACRO_GET(macro_p++))
void action_macro_play(const macro_t *macro_p)
{
macro_t macro = END;
@@ -58,7 +58,7 @@