diff options
author | Jun Wako <wakojun@gmail.com> | 2015-01-04 17:03:47 +0900 |
---|---|---|
committer | Jun Wako <wakojun@gmail.com> | 2015-01-04 17:21:43 +0900 |
commit | d0fefb76f8a1430c749e67bc72b4dba00c7143c9 (patch) | |
tree | 2cf2fe560e83fef19c9a99adcc5d2b2300145bfc /common | |
parent | c6e533ce83d6ae4393e6cdf1f6d39ffefc790115 (diff) | |
download | qmk_firmware-d0fefb76f8a1430c749e67bc72b4dba00c7143c9.tar.gz qmk_firmware-d0fefb76f8a1430c749e67bc72b4dba00c7143c9.zip |
infinity: Add initial files for keyboard support
Diffstat (limited to 'common')
-rw-r--r-- | common/matrix.h | 9 | ||||
-rw-r--r-- | common/mbed/xprintf.cpp | 5 |
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 | ||
39 | extern "C" { | ||
40 | #endif | ||
41 | |||
38 | /* number of matrix rows */ | 42 | /* number of matrix rows */ |
39 | uint8_t matrix_rows(void); | 43 | uint8_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 */ |
49 | bool matrix_is_on(uint8_t row, uint8_t col); | 53 | bool matrix_is_on(uint8_t row, uint8_t col); |
50 | /* matrix state on row */ | 54 | /* matrix state on row */ |
51 | matrix_row_t matrix_get_row(uint8_t row); | 55 | matrix_row_t matrix_get_row(uint8_t row); |
52 | /* print matrix for debug */ | 56 | /* print matrix for debug */ |
53 | void matrix_print(void); | 57 | void matrix_print(void); |
54 | 58 | ||
@@ -57,5 +61,8 @@ void matrix_print(void); | |||
57 | void matrix_power_up(void); | 61 | void matrix_power_up(void); |
58 | void matrix_power_down(void); | 62 | void 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 | ||
10 | int xprintf(const char* format, ...) { return 0; } | ||
11 | |||
12 | #if 0 | ||
9 | /* mbed Serial */ | 13 | /* mbed Serial */ |
10 | Serial ser(UART_TX, UART_RX); | 14 | Serial 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 | ||