aboutsummaryrefslogtreecommitdiff
path: root/protocol
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-03-11 00:14:58 +0900
committertmk <nobody@nowhere>2013-03-11 00:14:58 +0900
commit09bd1aef12e42b44f90b8275ae95b578294957c0 (patch)
treeddf33c9c2e269beafcb67930d026626aa2ed6563 /protocol
parentdb024b6b1803eb752070422e7240b1ffe52d39f6 (diff)
downloadqmk_firmware-09bd1aef12e42b44f90b8275ae95b578294957c0.tar.gz
qmk_firmware-09bd1aef12e42b44f90b8275ae95b578294957c0.zip
Rename HOST_* to PROTOCOL_* in protocol/*.mk
Diffstat (limited to 'protocol')
-rw-r--r--protocol/iwrap.mk2
-rw-r--r--protocol/iwrap/main.c14
-rw-r--r--protocol/pjrc.mk3
-rw-r--r--protocol/vusb.mk2
4 files changed, 9 insertions, 12 deletions
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 @@
1IWRAP_DIR = protocol/iwrap 1IWRAP_DIR = protocol/iwrap
2 2
3OPT_DEFS += -DHOST_IWRAP 3OPT_DEFS += -DPROTOCOL_IWRAP
4 4
5SRC += $(IWRAP_DIR)/iwrap.c \ 5SRC += $(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
82static void disable_vusb(void) 82static 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
19VPATH += $(TOP_DIR)/$(PJRC_DIR) 19VPATH += $(TOP_DIR)/$(PJRC_DIR)
20 20
21# This indicates using LUFA stack 21# This indicates using LUFA stack
22# TODO: remove HOST_PJRC
23OPT_DEFS += -DHOST_PJRC
24OPT_DEFS += -DPROTOCOL_PJRC 22OPT_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 @@
1VUSB_DIR = protocol/vusb 1VUSB_DIR = protocol/vusb
2 2
3OPT_DEFS += -DHOST_VUSB 3OPT_DEFS += -DPROTOCOL_VUSB
4 4
5SRC += $(VUSB_DIR)/main.c \ 5SRC += $(VUSB_DIR)/main.c \
6 $(VUSB_DIR)/vusb.c \ 6 $(VUSB_DIR)/vusb.c \