diff options
| author | tmk <nobody@nowhere> | 2012-08-25 15:49:08 +0900 |
|---|---|---|
| committer | tmk <nobody@nowhere> | 2012-08-28 21:56:15 +0900 |
| commit | c5060ea81942b0e3f8577536ff78402a19abe3d3 (patch) | |
| tree | bcdd4cd269be3064982014b0afdc0aea628d7048 /protocol/usb_hid.mk | |
| parent | 9382bf2f765cfbb8f7a9a48157391cac2bb71780 (diff) | |
| download | qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.tar.gz qmk_firmware-c5060ea81942b0e3f8577536ff78402a19abe3d3.zip | |
test build of 'Host shield' in minimal env.
Diffstat (limited to 'protocol/usb_hid.mk')
| -rw-r--r-- | protocol/usb_hid.mk | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/protocol/usb_hid.mk b/protocol/usb_hid.mk new file mode 100644 index 000000000..f3149f7f4 --- /dev/null +++ b/protocol/usb_hid.mk | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | USB_HID_DIR = protocol/usb_hid | ||
| 2 | |||
| 3 | |||
| 4 | # | ||
| 5 | # USB Host Shield | ||
| 6 | # | ||
| 7 | USB_HOST_SHIELD_DIR = $(USB_HID_DIR)/USB_Host_Shield_2.0 | ||
| 8 | USB_HOST_SHIELD_SRC = \ | ||
| 9 | $(USB_HOST_SHIELD_DIR)/Usb.cpp \ | ||
| 10 | $(USB_HOST_SHIELD_DIR)/hid.cpp \ | ||
| 11 | $(USB_HOST_SHIELD_DIR)/parsetools.cpp \ | ||
| 12 | $(USB_HOST_SHIELD_DIR)/message.cpp | ||
| 13 | |||
| 14 | |||
| 15 | |||
| 16 | # | ||
| 17 | # Arduino | ||
| 18 | # | ||
| 19 | ARDUINO_DIR = $(USB_HID_DIR)/arduino-1.0.1 | ||
| 20 | ARDUINO_CORES_DIR = $(ARDUINO_DIR)/cores/arduino | ||
| 21 | ARDUINO_CORES_SRC = \ | ||
| 22 | $(ARDUINO_CORES_DIR)/Print.cpp \ | ||
| 23 | $(ARDUINO_CORES_DIR)/Stream.cpp | ||
| 24 | |||
| 25 | # replaced with override_Serial.c | ||
| 26 | # $(ARDUINO_CORES_DIR)/CDC.cpp \ | ||
| 27 | # $(ARDUINO_CORES_DIR)/HID.cpp \ | ||
| 28 | # $(ARDUINO_CORES_DIR)/USBCore.cpp \ | ||
| 29 | |||
| 30 | # replaced with override_wiring.c and common/timer.c | ||
| 31 | # $(ARDUINO_CORES_DIR)/wiring.c \ | ||
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | # | ||
| 36 | # HID parser | ||
| 37 | # | ||
| 38 | SRC += $(USB_HID_DIR)/parser.cpp | ||
| 39 | |||
| 40 | # replace arduino/CDC.cpp | ||
| 41 | SRC += $(USB_HID_DIR)/override_Serial.cpp | ||
| 42 | |||
| 43 | # replace arduino/wiring.c | ||
| 44 | SRC += $(USB_HID_DIR)/override_wiring.c | ||
| 45 | SRC += common/timer.c | ||
| 46 | |||
| 47 | SRC += $(USB_HOST_SHIELD_SRC) | ||
| 48 | SRC += $(ARDUINO_CORES_SRC) | ||
| 49 | |||
| 50 | |||
| 51 | OPT_DEFS += -DARDUINO=101 | ||
| 52 | # Arduino USBCore needs USB_VID and USB_PID. | ||
| 53 | #OPT_DEFS += -DARDUINO=101 -DUSB_VID=0x2341 -DUSB_PID=0x8036 | ||
| 54 | |||
| 55 | |||
| 56 | |||
| 57 | # | ||
| 58 | # Search Path | ||
| 59 | # | ||
| 60 | VPATH += $(TOP_DIR)/$(USB_HID_DIR) | ||
| 61 | VPATH += $(TOP_DIR)/$(USB_HOST_SHIELD_DIR) | ||
| 62 | |||
| 63 | # for #include "Arduino.h" | ||
| 64 | VPATH += $(TOP_DIR)/$(ARDUINO_CORES_DIR) | ||
| 65 | |||
| 66 | # for #include "pins_arduino.h" | ||
| 67 | VPATH += $(TOP_DIR)/$(ARDUINO_DIR)/variants/leonardo | ||
