aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2014-09-22 10:53:35 +0900
committertmk <nobody@nowhere>2014-09-22 10:53:35 +0900
commitdd3ab65ec348370e789f4136af2c6cdb95c2532c (patch)
tree671949de54ed5fdbb938503bd417ddf4cb70c859 /common
parentb9e265368fde73daff069788dcb58c8230d01b32 (diff)
parente3f4f7d8c4dd821ff47caa8a22318c674f43a4e9 (diff)
downloadqmk_firmware-dd3ab65ec348370e789f4136af2c6cdb95c2532c.tar.gz
qmk_firmware-dd3ab65ec348370e789f4136af2c6cdb95c2532c.zip
Merge branch 'usb_usb_fix'
Diffstat (limited to 'common')
-rw-r--r--common/debug.c12
-rw-r--r--common/debug_config.h2
-rw-r--r--common/host.h4
-rw-r--r--common/print.h3
-rw-r--r--common/xprintf.h8
5 files changed, 23 insertions, 6 deletions
diff --git a/common/debug.c b/common/debug.c
new file mode 100644
index 000000000..c4fa3a05b
--- /dev/null
+++ b/common/debug.c
@@ -0,0 +1,12 @@
1#include <stdbool.h>
2#include "debug.h"
3
4
5//debug_config_t debug_config = { .enable = false, .matrix = false };
6debug_config_t debug_config = {
7 .enable = false,
8 .matrix = false,
9 .keyboard = false,
10 .mouse = false,
11};
12
diff --git a/common/debug_config.h b/common/debug_config.h
index e00fd1033..43e4c5c55 100644
--- a/common/debug_config.h
+++ b/common/debug_config.h
@@ -36,7 +36,7 @@ typedef union {
36 uint8_t reserved:4; 36 uint8_t reserved:4;
37 }; 37 };
38} debug_config_t; 38} debug_config_t;
39debug_config_t debug_config; 39extern debug_config_t debug_config;
40 40
41/* for backward compatibility */ 41/* for backward compatibility */
42#define debug_enable (debug_config.enable) 42#define debug_enable (debug_config.enable)
diff --git a/common/host.h b/common/host.h
index a56e6c3b0..918af69e8 100644
--- a/common/host.h
+++ b/common/host.h
@@ -32,8 +32,8 @@ extern "C" {
32extern bool keyboard_nkro; 32extern bool keyboard_nkro;
33#endif 33#endif
34 34
35uint8_t keyboard_idle; 35extern uint8_t keyboard_idle;
36uint8_t keyboard_protocol; 36extern uint8_t keyboard_protocol;
37 37
38 38
39/* host driver */ 39/* host driver */
diff --git a/common/print.h b/common/print.h
index 930e84be9..779932891 100644
--- a/common/print.h
+++ b/common/print.h
@@ -34,10 +34,7 @@
34 34
35// this macro allows you to write print("some text") and 35// this macro allows you to write print("some text") and
36// the string is automatically placed into flash memory :) 36// the string is automatically placed into flash memory :)
37// TODO: avoid collision with arduino/Print.h
38#ifndef __cplusplus
39#define print(s) print_P(PSTR(s)) 37#define print(s) print_P(PSTR(s))
40#endif
41#define println(s) print_P(PSTR(s "\n")) 38#define println(s) print_P(PSTR(s "\n"))
42 39
43/* for old name */ 40/* for old name */
diff --git a/common/xprintf.h b/common/xprintf.h
index f58bca817..59c6f2531 100644
--- a/common/xprintf.h
+++ b/common/xprintf.h
@@ -8,6 +8,10 @@
8#include <inttypes.h> 8#include <inttypes.h>
9#include <avr/pgmspace.h> 9#include <avr/pgmspace.h>
10 10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
11extern void (*xfunc_out)(uint8_t); 15extern void (*xfunc_out)(uint8_t);
12#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func) 16#define xdev_out(func) xfunc_out = (void(*)(uint8_t))(func)
13 17
@@ -99,5 +103,9 @@ char xatoi(char **str, long *ret);
99 Pointer to return value 103 Pointer to return value
100*/ 104*/
101 105
106#ifdef __cplusplus
107}
108#endif
109
102#endif 110#endif
103 111