diff options
| -rw-r--r-- | common/command.c | 10 | ||||
| -rw-r--r-- | common/report.h | 2 | ||||
| -rw-r--r-- | protocol/iwrap.mk | 2 | ||||
| -rw-r--r-- | protocol/iwrap/main.c | 14 | ||||
| -rw-r--r-- | protocol/pjrc.mk | 3 | ||||
| -rw-r--r-- | protocol/vusb.mk | 2 |
6 files changed, 15 insertions, 18 deletions
diff --git a/common/command.c b/common/command.c index cf8d969f8..a18eb7800 100644 --- a/common/command.c +++ b/common/command.c | |||
| @@ -34,14 +34,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 34 | #include "mousekey.h" | 34 | #include "mousekey.h" |
| 35 | #endif | 35 | #endif |
| 36 | 36 | ||
| 37 | #ifdef HOST_PJRC | 37 | #ifdef PROTOCOL_PJRC |
| 38 | # include "usb_keyboard.h" | 38 | # include "usb_keyboard.h" |
| 39 | # ifdef EXTRAKEY_ENABLE | 39 | # ifdef EXTRAKEY_ENABLE |
| 40 | # include "usb_extra.h" | 40 | # include "usb_extra.h" |
| 41 | # endif | 41 | # endif |
| 42 | #endif | 42 | #endif |
| 43 | 43 | ||
| 44 | #ifdef HOST_VUSB | 44 | #ifdef PROTOCOL_VUSB |
| 45 | # include "usbdrv.h" | 45 | # include "usbdrv.h" |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| @@ -238,7 +238,7 @@ static bool command_common(uint8_t code) | |||
| 238 | case KC_S: | 238 | case KC_S: |
| 239 | print("\n\n----- Status -----\n"); | 239 | print("\n\n----- Status -----\n"); |
| 240 | print_val_hex8(host_keyboard_leds()); | 240 | print_val_hex8(host_keyboard_leds()); |
| 241 | #ifdef HOST_PJRC | 241 | #ifdef PROTOCOL_PJRC |
| 242 | print_val_hex8(UDCON); | 242 | print_val_hex8(UDCON); |
| 243 | print_val_hex8(UDIEN); | 243 | print_val_hex8(UDIEN); |
| 244 | print_val_hex8(UDINT); | 244 | print_val_hex8(UDINT); |
| @@ -248,7 +248,7 @@ static bool command_common(uint8_t code) | |||
| 248 | print_val_hex8(usb_keyboard_idle_count); | 248 | print_val_hex8(usb_keyboard_idle_count); |
| 249 | #endif | 249 | #endif |
| 250 | 250 | ||
| 251 | #ifdef HOST_VUSB | 251 | #ifdef PROTOCOL_PJRC |
| 252 | # if USB_COUNT_SOF | 252 | # if USB_COUNT_SOF |
| 253 | print_val_hex8(usbSofCount); | 253 | print_val_hex8(usbSofCount); |
| 254 | # endif | 254 | # endif |
| @@ -267,7 +267,7 @@ static bool command_common(uint8_t code) | |||
| 267 | #ifdef EXTRAKEY_ENABLE | 267 | #ifdef EXTRAKEY_ENABLE |
| 268 | case KC_PSCREEN: | 268 | case KC_PSCREEN: |
| 269 | // TODO: Power key should take this feature? otherwise any key during suspend. | 269 | // TODO: Power key should take this feature? otherwise any key during suspend. |
| 270 | #ifdef HOST_PJRC | 270 | #ifdef PROTOCOL_PJRC |
| 271 | if (suspend && remote_wakeup) { | 271 | if (suspend && remote_wakeup) { |
| 272 | usb_remote_wakeup(); | 272 | usb_remote_wakeup(); |
| 273 | } else { | 273 | } else { |
diff --git a/common/report.h b/common/report.h index 0995189b3..480102768 100644 --- a/common/report.h +++ b/common/report.h | |||
| @@ -71,7 +71,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 71 | 71 | ||
| 72 | 72 | ||
| 73 | /* key report size(NKRO or boot mode) */ | 73 | /* key report size(NKRO or boot mode) */ |
| 74 | #if defined(HOST_PJRC) | 74 | #if defined(PROTOCOL_PJRC) |
| 75 | # include "usb.h" | 75 | # include "usb.h" |
| 76 | # if defined(KBD2_REPORT_KEYS) && KBD2_REPORT_KEYS > KBD_REPORT_KEYS | 76 | # if defined(KBD2_REPORT_KEYS) && KBD2_REPORT_KEYS > KBD_REPORT_KEYS |
| 77 | # define REPORT_KEYS KBD2_REPORT_KEYS | 77 | # define REPORT_KEYS KBD2_REPORT_KEYS |
diff --git a/protocol/iwrap.mk b/protocol/iwrap.mk index 9c83075a4..96aa4140c 100644 --- a/protocol/iwrap.mk +++ b/protocol/iwrap.mk | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | IWRAP_DIR = protocol/iwrap | 1 | IWRAP_DIR = protocol/iwrap |
| 2 | 2 | ||
| 3 | OPT_DEFS += -DHOST_IWRAP | 3 | OPT_DEFS += -DPROTOCOL_IWRAP |
| 4 | 4 | ||
| 5 | SRC += $(IWRAP_DIR)/iwrap.c \ | 5 | SRC += $(IWRAP_DIR)/iwrap.c \ |
| 6 | $(IWRAP_DIR)/suart.S \ | 6 | $(IWRAP_DIR)/suart.S \ |
diff --git a/protocol/iwrap/main.c b/protocol/iwrap/main.c index 05a67337f..ac83280f1 100644 --- a/protocol/iwrap/main.c +++ b/protocol/iwrap/main.c | |||
| @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 26 | #include "matrix.h" | 26 | #include "matrix.h" |
| 27 | #include "host.h" | 27 | #include "host.h" |
| 28 | #include "iwrap.h" | 28 | #include "iwrap.h" |
| 29 | #ifdef HOST_VUSB | 29 | #ifdef PROTOCOL_VUSB |
| 30 | # include "vusb.h" | 30 | # include "vusb.h" |
| 31 | # include "usbdrv.h" | 31 | # include "usbdrv.h" |
| 32 | #endif | 32 | #endif |
| @@ -78,7 +78,7 @@ static void pullup_pins(void) | |||
| 78 | */ | 78 | */ |
| 79 | 79 | ||
| 80 | 80 | ||
| 81 | #ifdef HOST_VUSB | 81 | #ifdef PROTOCOL_VUSB |
| 82 | static void disable_vusb(void) | 82 | static void disable_vusb(void) |
| 83 | { | 83 | { |
| 84 | // disable interrupt & disconnect to prevent host from enumerating | 84 | // disable interrupt & disconnect to prevent host from enumerating |
| @@ -131,7 +131,7 @@ int main(void) | |||
| 131 | //pullup_pins(); | 131 | //pullup_pins(); |
| 132 | //set_prr(); | 132 | //set_prr(); |
| 133 | 133 | ||
| 134 | #ifdef HOST_VUSB | 134 | #ifdef PROTOCOL_VUSB |
| 135 | disable_vusb(); | 135 | disable_vusb(); |
| 136 | #endif | 136 | #endif |
| 137 | uart_init(115200); | 137 | uart_init(115200); |
| @@ -159,12 +159,12 @@ int main(void) | |||
| 159 | 159 | ||
| 160 | last_timer = timer_read(); | 160 | last_timer = timer_read(); |
| 161 | while (true) { | 161 | while (true) { |
| 162 | #ifdef HOST_VUSB | 162 | #ifdef PROTOCOL_VUSB |
| 163 | if (host_get_driver() == vusb_driver()) | 163 | if (host_get_driver() == vusb_driver()) |
| 164 | usbPoll(); | 164 | usbPoll(); |
| 165 | #endif | 165 | #endif |
| 166 | keyboard_task(); | 166 | keyboard_task(); |
| 167 | #ifdef HOST_VUSB | 167 | #ifdef PROTOCOL_VUSB |
| 168 | if (host_get_driver() == vusb_driver()) | 168 | if (host_get_driver() == vusb_driver()) |
| 169 | vusb_transfer_keyboard(); | 169 | vusb_transfer_keyboard(); |
| 170 | #endif | 170 | #endif |
| @@ -258,7 +258,7 @@ static uint8_t console_command(uint8_t c) | |||
| 258 | print("r: reset. software reset by watchdog\n"); | 258 | print("r: reset. software reset by watchdog\n"); |
| 259 | print("i: insomniac. prevent KB from sleeping\n"); | 259 | print("i: insomniac. prevent KB from sleeping\n"); |
| 260 | print("c: iwrap_call. CALL for BT connection.\n"); | 260 | print("c: iwrap_call. CALL for BT connection.\n"); |
| 261 | #ifdef HOST_VUSB | 261 | #ifdef PROTOCOL_VUSB |
| 262 | print("u: USB mode. switch to USB.\n"); | 262 | print("u: USB mode. switch to USB.\n"); |
| 263 | print("w: BT mode. switch to Bluetooth.\n"); | 263 | print("w: BT mode. switch to Bluetooth.\n"); |
| 264 | #endif | 264 | #endif |
| @@ -281,7 +281,7 @@ static uint8_t console_command(uint8_t c) | |||
| 281 | print("iwrap_call()\n"); | 281 | print("iwrap_call()\n"); |
| 282 | iwrap_call(); | 282 | iwrap_call(); |
| 283 | return 1; | 283 | return 1; |
| 284 | #ifdef HOST_VUSB | 284 | #ifdef PROTOCOL_VUSB |
| 285 | case 'u': | 285 | case 'u': |
| 286 | print("USB mode\n"); | 286 | print("USB mode\n"); |
| 287 | init_vusb(); | 287 | init_vusb(); |
diff --git a/protocol/pjrc.mk b/protocol/pjrc.mk index f5693ba99..27f908b1c 100644 --- a/protocol/pjrc.mk +++ b/protocol/pjrc.mk | |||
| @@ -19,7 +19,4 @@ endif | |||
| 19 | VPATH += $(TOP_DIR)/$(PJRC_DIR) | 19 | VPATH += $(TOP_DIR)/$(PJRC_DIR) |
| 20 | 20 | ||
| 21 | # This indicates using LUFA stack | 21 | # This indicates using LUFA stack |
| 22 | # TODO: remove HOST_PJRC | ||
| 23 | OPT_DEFS += -DHOST_PJRC | ||
| 24 | OPT_DEFS += -DPROTOCOL_PJRC | 22 | OPT_DEFS += -DPROTOCOL_PJRC |
| 25 | |||
diff --git a/protocol/vusb.mk b/protocol/vusb.mk index 4c5058115..77b1c6337 100644 --- a/protocol/vusb.mk +++ b/protocol/vusb.mk | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | VUSB_DIR = protocol/vusb | 1 | VUSB_DIR = protocol/vusb |
| 2 | 2 | ||
| 3 | OPT_DEFS += -DHOST_VUSB | 3 | OPT_DEFS += -DPROTOCOL_VUSB |
| 4 | 4 | ||
| 5 | SRC += $(VUSB_DIR)/main.c \ | 5 | SRC += $(VUSB_DIR)/main.c \ |
| 6 | $(VUSB_DIR)/vusb.c \ | 6 | $(VUSB_DIR)/vusb.c \ |
