]> git.donarmstrong.com Git - tmk_firmware.git/commitdiff
Rename HOST_* to PROTOCOL_* in protocol/*.mk
authortmk <nobody@nowhere>
Sun, 10 Mar 2013 15:14:58 +0000 (00:14 +0900)
committertmk <nobody@nowhere>
Sun, 10 Mar 2013 15:14:58 +0000 (00:14 +0900)
common/command.c
common/report.h
protocol/iwrap.mk
protocol/iwrap/main.c
protocol/pjrc.mk
protocol/vusb.mk

index cf8d969f8175cfa1ae789c7b0cf0e654fd17514c..a18eb780063053bd97c95099c57d9c25aa1cb67c 100644 (file)
@@ -34,14 +34,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "mousekey.h"
 #endif
 
-#ifdef HOST_PJRC
+#ifdef PROTOCOL_PJRC
 #   include "usb_keyboard.h"
 #   ifdef EXTRAKEY_ENABLE
 #       include "usb_extra.h"
 #   endif
 #endif
 
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
 #   include "usbdrv.h"
 #endif
 
@@ -238,7 +238,7 @@ static bool command_common(uint8_t code)
         case KC_S:
             print("\n\n----- Status -----\n");
             print_val_hex8(host_keyboard_leds());
-#ifdef HOST_PJRC
+#ifdef PROTOCOL_PJRC
             print_val_hex8(UDCON);
             print_val_hex8(UDIEN);
             print_val_hex8(UDINT);
@@ -248,7 +248,7 @@ static bool command_common(uint8_t code)
             print_val_hex8(usb_keyboard_idle_count);
 #endif
 
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_PJRC
 #   if USB_COUNT_SOF
             print_val_hex8(usbSofCount);
 #   endif
@@ -267,7 +267,7 @@ static bool command_common(uint8_t code)
 #ifdef EXTRAKEY_ENABLE
         case KC_PSCREEN:
             // TODO: Power key should take this feature? otherwise any key during suspend.
-#ifdef HOST_PJRC
+#ifdef PROTOCOL_PJRC
             if (suspend && remote_wakeup) {
                 usb_remote_wakeup();
             } else {
index 0995189b399087668dd3373ff50d85b39b5279ba..48010276874fb9b3e64ba2e18fdcc9d44d02e02e 100644 (file)
@@ -71,7 +71,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 
 /* key report size(NKRO or boot mode) */
-#if defined(HOST_PJRC)
+#if defined(PROTOCOL_PJRC)
 #   include "usb.h"
 #   if defined(KBD2_REPORT_KEYS) && KBD2_REPORT_KEYS > KBD_REPORT_KEYS
 #       define REPORT_KEYS KBD2_REPORT_KEYS
index 9c83075a4ac0c4d3e9174ccef4d1491fb49a8e4d..96aa4140cad04229330ecc1eab9569db5ac7cb1f 100644 (file)
@@ -1,6 +1,6 @@
 IWRAP_DIR = protocol/iwrap
 
-OPT_DEFS += -DHOST_IWRAP
+OPT_DEFS += -DPROTOCOL_IWRAP
 
 SRC += $(IWRAP_DIR)/iwrap.c \
        $(IWRAP_DIR)/suart.S \
index 05a67337fd3db16b2c1f369282ae0949123f6450..ac83280f130e5a5525f60d6da7a54d2b923396cc 100644 (file)
@@ -26,7 +26,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #include "matrix.h"
 #include "host.h"
 #include "iwrap.h"
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
 #   include "vusb.h"
 #   include "usbdrv.h"
 #endif
@@ -78,7 +78,7 @@ static void pullup_pins(void)
 */
 
 
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
 static void disable_vusb(void)
 {
     // disable interrupt & disconnect to prevent host from enumerating
@@ -131,7 +131,7 @@ int main(void)
     //pullup_pins();
     //set_prr();
 
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
     disable_vusb();
 #endif
     uart_init(115200);
@@ -159,12 +159,12 @@ int main(void)
 
     last_timer = timer_read();
     while (true) {
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
         if (host_get_driver() == vusb_driver())
             usbPoll();
 #endif
         keyboard_task();
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
         if (host_get_driver() == vusb_driver())
             vusb_transfer_keyboard();
 #endif
@@ -258,7 +258,7 @@ static uint8_t console_command(uint8_t c)
             print("r: reset. software reset by watchdog\n");
             print("i: insomniac. prevent KB from sleeping\n");
             print("c: iwrap_call. CALL for BT connection.\n");
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
             print("u: USB mode. switch to USB.\n");
             print("w: BT mode. switch to Bluetooth.\n");
 #endif
@@ -281,7 +281,7 @@ static uint8_t console_command(uint8_t c)
             print("iwrap_call()\n");
             iwrap_call();
             return 1;
-#ifdef HOST_VUSB
+#ifdef PROTOCOL_VUSB
         case 'u':
             print("USB mode\n");
             init_vusb();
index f5693ba99db7f6d33ee9fe9d44d6004c818b689d..27f908b1c205d966949ce3dfea94ad8d1b291f05 100644 (file)
@@ -19,7 +19,4 @@ endif
 VPATH += $(TOP_DIR)/$(PJRC_DIR)
 
 # This indicates using LUFA stack
-# TODO: remove HOST_PJRC
-OPT_DEFS += -DHOST_PJRC
 OPT_DEFS += -DPROTOCOL_PJRC
-
index 4c5058115b00878a4d96f819f12958f67c891c3c..77b1c6337bbe7a606d26d90638757b48f5c9a4b2 100644 (file)
@@ -1,6 +1,6 @@
 VUSB_DIR = protocol/vusb
 
-OPT_DEFS += -DHOST_VUSB
+OPT_DEFS += -DPROTOCOL_VUSB
 
 SRC += $(VUSB_DIR)/main.c \
        $(VUSB_DIR)/vusb.c \