summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun Wako <wakojun@gmail.com>2014-12-05 09:59:08 +0900
committerJun Wako <wakojun@gmail.com>2014-12-05 09:59:08 +0900
commitf6f698dda0a1cc9e92b75927b0273205402de9e2 (patch)
tree28f550f00a19e86b151b3a66c4370a13a0509da8
parent4192bce16b6cf4c5acc10ea6b26fb714fc132e01 (diff)
usb_usb: Update for new core layout
-rw-r--r--common/print.h5
-rw-r--r--converter/usb_usb/matrix.c6
-rw-r--r--protocol/usb_hid.mk2
3 files changed, 4 insertions, 9 deletions
diff --git a/common/print.h b/common/print.h
index a8dbbc020a..c0e9e14309 100644
--- a/common/print.h
+++ b/common/print.h
@@ -38,12 +38,7 @@
#if defined(__AVR__)
#include "avr/xprintf.h"
-
-
-// TODO: avoid collision with arduino/Print.h
-#ifndef __cplusplus
#define print(s) xputs(PSTR(s))
-#endif
#define println(s) xputs(PSTR(s "\r\n"))
#ifdef __cplusplus
diff --git a/converter/usb_usb/matrix.c b/converter/usb_usb/matrix.c
index 3cdb0860d5..83d5ab6c83 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) {
return true;
}
}
- for (uint8_t i = 0; i < REPORT_KEYS; i++) {
+ for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
if (usb_hid_keyboard_report.keys[i] == code) {
return true;
}
@@ -96,7 +96,7 @@ uint8_t matrix_get_row(uint8_t row) {
row_bits |= usb_hid_keyboard_report.mods;
}
- for (uint8_t i = 0; i < REPORT_KEYS; i++) {
+ for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
if (IS_ANY(usb_hid_keyboard_report.keys[i])) {
if (row == ROW(usb_hid_keyboard_report.keys[i])) {
row_bits |= ROW_BITS(usb_hid_keyboard_report.keys[i]);
@@ -110,7 +110,7 @@ uint8_t matrix_key_count(void) {
uint8_t count = 0;
count += bitpop(usb_hid_keyboard_report.mods);
- for (uint8_t i = 0; i < REPORT_KEYS; i++) {
+ for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) {
if (IS_ANY(usb_hid_keyboard_report.keys[i])) {
count++;
}
diff --git a/protocol/usb_hid.mk b/protocol/usb_hid.mk
index fb4916d562..6914dce809 100644
--- a/protocol/usb_hid.mk
+++ b/protocol/usb_hid.mk
@@ -42,7 +42,7 @@ SRC += $(USB_HID_DIR)/override_Serial.cpp
# replace arduino/wiring.c
SRC += $(USB_HID_DIR)/override_wiring.c
-SRC += common/timer.c
+SRC += common/avr/timer.c
SRC += $(USB_HOST_SHIELD_SRC)
SRC += $(ARDUINO_CORES_SRC)