$(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 \
--- /dev/null
+#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,
+};
+
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)
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 */
// 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 */
#include <inttypes.h>\r
#include <avr/pgmspace.h>\r
\r
+#ifdef __cplusplus\r
+extern "C" {\r
+#endif\r
+\r
extern void (*xfunc_out)(uint8_t);\r
#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)\r
\r
Pointer to return value\r
*/\r
\r
+#ifdef __cplusplus\r
+}\r
+#endif\r
+\r
#endif\r
\r
#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)))
LED_TX_INIT;
LED_TX_ON;
- print_enable = true;
debug_enable = true;
debug_matrix = true;
debug_keyboard = true;
// -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.
/*
* 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"
-#include <cstring.h>
-
#include "parser.h"
#include "usb_hid.h"