qmk_firmware

QMK firmware for my keyboards (Corne, Sweep Ferris) and trackball (Ploopy Adept)
Log | Files | Refs | Submodules | LICENSE

usb_hid.mk (1643B)


      1 USB_HID_DIR = protocol/usb_hid
      2 USB_HOST_LIB_DIR = $(LIB_PATH)/usbhost
      3 
      4 #
      5 # USB Host Shield
      6 #
      7 USB_HOST_SHIELD_DIR = $(USB_HOST_LIB_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)/usbhub.cpp \
     12 	$(USB_HOST_SHIELD_DIR)/parsetools.cpp \
     13 	$(USB_HOST_SHIELD_DIR)/message.cpp 
     14 
     15 
     16 
     17 #
     18 # Arduino
     19 #
     20 ARDUINO_DIR = $(USB_HOST_LIB_DIR)/arduino-1.0.1
     21 ARDUINO_CORES_DIR = $(ARDUINO_DIR)/cores/arduino
     22 ARDUINO_CORES_SRC = \
     23 	$(ARDUINO_CORES_DIR)/Print.cpp \
     24 	$(ARDUINO_CORES_DIR)/Stream.cpp
     25 
     26 # replaced with override_Serial.c
     27 #	$(ARDUINO_CORES_DIR)/CDC.cpp \
     28 #	$(ARDUINO_CORES_DIR)/HID.cpp \
     29 #	$(ARDUINO_CORES_DIR)/USBCore.cpp \
     30 
     31 # replaced with override_wiring.c and common/timer.c
     32 #	$(ARDUINO_CORES_DIR)/wiring.c \
     33 
     34 
     35 
     36 #
     37 # HID parser
     38 #
     39 SRC += $(USB_HID_DIR)/parser.cpp
     40 
     41 # replace arduino/CDC.cpp
     42 SRC += $(USB_HID_DIR)/override_Serial.cpp
     43 
     44 # replace arduino/wiring.c
     45 SRC += $(USB_HID_DIR)/override_wiring.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 += $(TMK_DIR)/$(USB_HID_DIR)
     61 VPATH += $(USB_HOST_SHIELD_DIR)
     62 
     63 # for #include "Arduino.h"
     64 VPATH += $(ARDUINO_CORES_DIR)
     65 
     66 # for #include "pins_arduino.h"
     67 VPATH += $(ARDUINO_DIR)/variants/leonardo
     68 
     69 # ad hoc workaround for compile problem on Windows:
     70 #    Windows doesn't know difference between common/print.h and arduino/Print.h.
     71 #    On Linux no problem.
     72 #    Change file name common/print.h to console.h ?
     73 VPATH := $(TMK_DIR)/common $(VPATH)