M common.mk => common.mk +1 -0
@@ 9,6 9,7 @@ SRC += $(COMMON_DIR)/host.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 \
A common/debug.c => common/debug.c +12 -0
@@ 0,0 1,12 @@
+#include <stdbool.h>
+#include "debug.h"
+
+
+//debug_config_t debug_config = { .enable = false, .matrix = false };
+debug_config_t debug_config = {
+ .enable = false,
+ .matrix = false,
+ .keyboard = false,
+ .mouse = false,
+};
+
M common/debug_config.h => common/debug_config.h +1 -1
@@ 36,7 36,7 @@ typedef union {
uint8_t reserved:4;
};
} debug_config_t;
-debug_config_t debug_config;
+extern debug_config_t debug_config;
/* for backward compatibility */
#define debug_enable (debug_config.enable)
M common/host.h => common/host.h +2 -2
@@ 32,8 32,8 @@ extern "C" {
extern bool keyboard_nkro;
#endif
-uint8_t keyboard_idle;
-uint8_t keyboard_protocol;
+extern uint8_t keyboard_idle;
+extern uint8_t keyboard_protocol;
/* host driver */
M common/print.h => common/print.h +0 -3
@@ 34,10 34,7 @@
// this macro allows you to write print("some text") and
// the string is automatically placed into flash memory :)
-// TODO: avoid collision with arduino/Print.h
-#ifndef __cplusplus
#define print(s) print_P(PSTR(s))
-#endif
#define println(s) print_P(PSTR(s "\n"))
/* for old name */
M common/xprintf.h => common/xprintf.h +8 -0
@@ 8,6 8,10 @@
#include <inttypes.h>
#include <avr/pgmspace.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
extern void (*xfunc_out)(uint8_t);
#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)
@@ 99,5 103,9 @@ char xatoi(char **str, long *ret);
Pointer to return value
*/
+#ifdef __cplusplus
+}
+#endif
+
#endif
M converter/usb_usb/README => converter/usb_usb/README +0 -4
@@ 14,12 14,8 @@ Build firmware
--------------
$ git clone git://github.com/tmk/tmk_keyboard.git
$ cd tmk_keyboard
- $ git checkout usb_hid
$ git submodule init
$ git submodule update
-
-and download LUFA and unzip under protocol/lufa and edit LUFA_PATH in protocol/lufa.mk. Then,
-
$ cd converter/usb_usb
$ make
M converter/usb_usb/config.h => converter/usb_usb/config.h +1 -0
@@ 33,6 33,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_ROWS 32
#define MATRIX_COLS 8
+#define USE_LEGACY_KEYMAP
/* key combination for command */
#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)))
M converter/usb_usb/main.cpp => converter/usb_usb/main.cpp +0 -1
@@ 59,7 59,6 @@ int main(void)
LED_TX_INIT;
LED_TX_ON;
- print_enable = true;
debug_enable = true;
debug_matrix = true;
debug_keyboard = true;
M protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.h => protocol/usb_hid/arduino-1.0.1/cores/arduino/WString.h +1 -1
@@ 35,7 35,7 @@
// -std=c++0x
class __FlashStringHelper;
-#define F(string_literal) (reinterpret_cast<__FlashStringHelper *>(PSTR(string_literal)))
+#define F(string_literal) (reinterpret_cast<const __FlashStringHelper *>(PSTR(string_literal)))
// An inherited class for holding the result of a concatenation. These
// result objects are assumed to be writable by subsequent concatenations.
M protocol/usb_hid/override_wiring.c => protocol/usb_hid/override_wiring.c +1 -0
@@ 1,6 1,7 @@
/*
* To keep Timer0 for common/timer.c override arduino/wiring.c.
*/
+#define __DELAY_BACKWARD_COMPATIBLE__
#include <util/delay.h>
#include "common/timer.h"
#include "Arduino.h"
M protocol/usb_hid/parser.cpp => protocol/usb_hid/parser.cpp +0 -2
@@ 1,5 1,3 @@
-#include <cstring.h>
-
#include "parser.h"
#include "usb_hid.h"