diff options
| author | Jun Wako <wakojun@gmail.com> | 2014-12-05 09:59:08 +0900 |
|---|---|---|
| committer | Jun Wako <wakojun@gmail.com> | 2014-12-05 09:59:08 +0900 |
| commit | f6f698dda0a1cc9e92b75927b0273205402de9e2 (patch) | |
| tree | 28f550f00a19e86b151b3a66c4370a13a0509da8 | |
| parent | 4192bce16b6cf4c5acc10ea6b26fb714fc132e01 (diff) | |
| download | qmk_firmware-f6f698dda0a1cc9e92b75927b0273205402de9e2.tar.gz qmk_firmware-f6f698dda0a1cc9e92b75927b0273205402de9e2.zip | |
usb_usb: Update for new core layout
| -rw-r--r-- | common/print.h | 5 | ||||
| -rw-r--r-- | converter/usb_usb/matrix.c | 6 | ||||
| -rw-r--r-- | protocol/usb_hid.mk | 2 |
3 files changed, 4 insertions, 9 deletions
diff --git a/common/print.h b/common/print.h index a8dbbc020..c0e9e1430 100644 --- a/common/print.h +++ b/common/print.h | |||
| @@ -38,12 +38,7 @@ | |||
| 38 | #if defined(__AVR__) | 38 | #if defined(__AVR__) |
| 39 | 39 | ||
| 40 | #include "avr/xprintf.h" | 40 | #include "avr/xprintf.h" |
| 41 | |||
| 42 | |||
| 43 | // TODO: avoid collision with arduino/Print.h | ||
| 44 | #ifndef __cplusplus | ||
| 45 | #define print(s) xputs(PSTR(s)) | 41 | #define print(s) xputs(PSTR(s)) |
| 46 | #endif | ||
| 47 | #define println(s) xputs(PSTR(s "\r\n")) | 42 | #define println(s) xputs(PSTR(s "\r\n")) |
| 48 | 43 | ||
| 49 | #ifdef __cplusplus | 44 | #ifdef __cplusplus |
diff --git a/converter/usb_usb/matrix.c b/converter/usb_usb/matrix.c index 3cdb0860d..83d5ab6c8 100644 --- a/converter/usb_usb/matrix.c +++ b/converter/usb_usb/matrix.c | |||
| @@ -81,7 +81,7 @@ bool matrix_is_on(uint8_t row, uint8_t col) { | |||
| 81 | return true; | 81 | return true; |
| 82 | } | 82 | } |
| 83 | } | 83 | } |
| 84 | for (uint8_t i = 0; i < REPORT_KEYS; i++) { | 84 | for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { |
| 85 | if (usb_hid_keyboard_report.keys[i] == code) { | 85 | if (usb_hid_keyboard_report.keys[i] == code) { |
| 86 | return true; | 86 | return true; |
| 87 | } | 87 | } |
| @@ -96,7 +96,7 @@ uint8_t matrix_get_row(uint8_t row) { | |||
| 96 | row_bits |= usb_hid_keyboard_report.mods; | 96 | row_bits |= usb_hid_keyboard_report.mods; |
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | for (uint8_t i = 0; i < REPORT_KEYS; i++) { | 99 | for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { |
| 100 | if (IS_ANY(usb_hid_keyboard_report.keys[i])) { | 100 | if (IS_ANY(usb_hid_keyboard_report.keys[i])) { |
| 101 | if (row == ROW(usb_hid_keyboard_report.keys[i])) { | 101 | if (row == ROW(usb_hid_keyboard_report.keys[i])) { |
| 102 | row_bits |= ROW_BITS(usb_hid_keyboard_report.keys[i]); | 102 | row_bits |= ROW_BITS(usb_hid_keyboard_report.keys[i]); |
| @@ -110,7 +110,7 @@ uint8_t matrix_key_count(void) { | |||
| 110 | uint8_t count = 0; | 110 | uint8_t count = 0; |
| 111 | 111 | ||
| 112 | count += bitpop(usb_hid_keyboard_report.mods); | 112 | count += bitpop(usb_hid_keyboard_report.mods); |
| 113 | for (uint8_t i = 0; i < REPORT_KEYS; i++) { | 113 | for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { |
| 114 | if (IS_ANY(usb_hid_keyboard_report.keys[i])) { | 114 | if (IS_ANY(usb_hid_keyboard_report.keys[i])) { |
| 115 | count++; | 115 | count++; |
| 116 | } | 116 | } |
diff --git a/protocol/usb_hid.mk b/protocol/usb_hid.mk index fb4916d56..6914dce80 100644 --- a/protocol/usb_hid.mk +++ b/protocol/usb_hid.mk | |||
| @@ -42,7 +42,7 @@ SRC += $(USB_HID_DIR)/override_Serial.cpp | |||
| 42 | 42 | ||
| 43 | # replace arduino/wiring.c | 43 | # replace arduino/wiring.c |
| 44 | SRC += $(USB_HID_DIR)/override_wiring.c | 44 | SRC += $(USB_HID_DIR)/override_wiring.c |
| 45 | SRC += common/timer.c | 45 | SRC += common/avr/timer.c |
| 46 | 46 | ||
| 47 | SRC += $(USB_HOST_SHIELD_SRC) | 47 | SRC += $(USB_HOST_SHIELD_SRC) |
| 48 | SRC += $(ARDUINO_CORES_SRC) | 48 | SRC += $(ARDUINO_CORES_SRC) |
