aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorJun Wako <wakojun@gmail.com>2015-01-04 17:03:47 +0900
committerJun Wako <wakojun@gmail.com>2015-01-04 17:21:43 +0900
commitd0fefb76f8a1430c749e67bc72b4dba00c7143c9 (patch)
tree2cf2fe560e83fef19c9a99adcc5d2b2300145bfc /common
parentc6e533ce83d6ae4393e6cdf1f6d39ffefc790115 (diff)
downloadqmk_firmware-d0fefb76f8a1430c749e67bc72b4dba00c7143c9.tar.gz
qmk_firmware-d0fefb76f8a1430c749e67bc72b4dba00c7143c9.zip
infinity: Add initial files for keyboard support
Diffstat (limited to 'common')
-rw-r--r--common/matrix.h9
-rw-r--r--common/mbed/xprintf.cpp5
2 files changed, 13 insertions, 1 deletions
diff --git a/common/matrix.h b/common/matrix.h
index 23fef78f7..107ee7265 100644
--- a/common/matrix.h
+++ b/common/matrix.h
@@ -35,6 +35,10 @@ typedef uint32_t matrix_row_t;
35#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col)) 35#define MATRIX_IS_ON(row, col) (matrix_get_row(row) && (1<<col))
36 36
37 37
38#ifdef __cplusplus
39extern "C" {
40#endif
41
38/* number of matrix rows */ 42/* number of matrix rows */
39uint8_t matrix_rows(void); 43uint8_t matrix_rows(void);
40/* number of matrix columns */ 44/* number of matrix columns */
@@ -48,7 +52,7 @@ bool matrix_is_modified(void) __attribute__ ((deprecated));
48/* whether a swtich is on */ 52/* whether a swtich is on */
49bool matrix_is_on(uint8_t row, uint8_t col); 53bool matrix_is_on(uint8_t row, uint8_t col);
50/* matrix state on row */ 54/* matrix state on row */
51matrix_row_t matrix_get_row(uint8_t row); 55matrix_row_t matrix_get_row(uint8_t row);
52/* print matrix for debug */ 56/* print matrix for debug */
53void matrix_print(void); 57void matrix_print(void);
54 58
@@ -57,5 +61,8 @@ void matrix_print(void);
57void matrix_power_up(void); 61void matrix_power_up(void);
58void matrix_power_down(void); 62void matrix_power_down(void);
59 63
64#ifdef __cplusplus
65}
66#endif
60 67
61#endif 68#endif
diff --git a/common/mbed/xprintf.cpp b/common/mbed/xprintf.cpp
index 4342b79f8..3647ece75 100644
--- a/common/mbed/xprintf.cpp
+++ b/common/mbed/xprintf.cpp
@@ -6,6 +6,10 @@
6 6
7#define STRING_STACK_LIMIT 120 7#define STRING_STACK_LIMIT 120
8 8
9//TODO
10int xprintf(const char* format, ...) { return 0; }
11
12#if 0
9/* mbed Serial */ 13/* mbed Serial */
10Serial ser(UART_TX, UART_RX); 14Serial ser(UART_TX, UART_RX);
11 15
@@ -44,3 +48,4 @@ int xprintf(const char* format, ...)
44 return r; 48 return r;
45*/ 49*/
46} 50}
51#endif