소스 검색

Add support of LiquidTWI2-based panels to Makefile

Use LIQUID_TWI2=1 as make argument to enable this support
Guillaume Seguin 11 년 전
부모
커밋
374bc99fa3
1개의 변경된 파일20개의 추가작업 그리고 2개의 파일을 삭제
  1. 20
    2
      Marlin/Makefile

+ 20
- 2
Marlin/Makefile 파일 보기

@@ -54,6 +54,9 @@ UPLOAD_PORT        ?= /dev/arduino
54 54
 #Directory used to build files in, contains all the build files, from object files to the final hex file.
55 55
 BUILD_DIR          ?= applet
56 56
 
57
+# This defines whether Liquid_TWI2 support will be built
58
+LIQUID_TWI2 ?= 0
59
+
57 60
 ############################################################################
58 61
 # Below here nothing should be changed...
59 62
 
@@ -199,9 +202,19 @@ VPATH += $(HARDWARE_SRC)
199 202
 ifeq ($(HARDWARE_VARIANT), arduino)
200 203
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidCrystal
201 204
 VPATH += $(ARDUINO_INSTALL_DIR)/libraries/SPI
205
+ifeq ($(LIQUID_TWI2), 1)
206
+VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire
207
+VPATH += $(ARDUINO_INSTALL_DIR)/libraries/Wire/utility
208
+VPATH += $(ARDUINO_INSTALL_DIR)/libraries/LiquidTWI2
209
+endif
202 210
 else
203 211
 VPATH += $(HARDWARE_DIR)/libraries/LiquidCrystal
204 212
 VPATH += $(HARDWARE_DIR)/libraries/SPI
213
+ifeq ($(LIQUID_TWI2), 1)
214
+VPATH += $(HARDWARE_DIR)/libraries/Wire
215
+VPATH += $(HARDWARE_DIR)/libraries/Wire/utility
216
+VPATH += $(HARDWARE_DIR)/libraries/LiquidTWI2
217
+endif
205 218
 endif
206 219
 ifeq ($(HARDWARE_VARIANT), arduino)
207 220
 HARDWARE_SUB_VARIANT ?= mega
@@ -218,8 +231,13 @@ CXXSRC = WMath.cpp WString.cpp Print.cpp Marlin_main.cpp	\
218 231
 	MarlinSerial.cpp Sd2Card.cpp SdBaseFile.cpp SdFatUtil.cpp	\
219 232
 	SdFile.cpp SdVolume.cpp motion_control.cpp planner.cpp		\
220 233
 	stepper.cpp temperature.cpp cardreader.cpp ConfigurationStore.cpp \
221
-	watchdog.cpp
222
-CXXSRC += LiquidCrystal.cpp ultralcd.cpp SPI.cpp Servo.cpp Tone.cpp
234
+	watchdog.cpp SPI.cpp Servo.cpp Tone.cpp ultralcd.cpp
235
+ifeq ($(LIQUID_TWI2), 0)
236
+CXXSRC += LiquidCrystal.cpp
237
+else
238
+SRC += twi.c
239
+CXXSRC += Wire.cpp LiquidTWI2.cpp
240
+endif
223 241
 
224 242
 #Check for Arduino 1.0.0 or higher and use the correct sourcefiles for that version
225 243
 ifeq ($(shell [ $(ARDUINO_VERSION) -ge 100 ] && echo true), true)

Loading…
취소
저장