-
-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathArduinoTouchLibraryIntegration.xml
98 lines (85 loc) · 5.69 KB
/
ArduinoTouchLibraryIntegration.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<TcMenuPlugin name="%touch.lib.name"
id="406a3089-6bc6-491e-9e3b-2cc2ec20a3cb" subsystem="INPUT"
requiresDesigner="2.2"
xmlns="https://www.thecoderscorner.com/libraries/tcmenuPluginItem" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.thecoderscorner.com/libraries/tcmenuPluginItem https://tcmenu.github.io/documentation/arduino-libraries/libraries/tcmenu-plugin-item.xsd">
<SupportedPlatforms>
<PlatformGroup>Arduino</PlatformGroup>
</SupportedPlatforms>
<Description>%touch.lib.desc</Description>
<Documentation link="https://tcmenu.github.io/documentation/arduino-libraries/tc-menu/tcmenu-plugins/ft6206-xt2046-touch-screen-plugin/"/>
<RequiredLibraries/>
<ImageFile>resistive-touch.jpg</ImageFile>
<Properties>
<Property id="TOUCH_LIBRARY" name="%touch.lib.prop" initial="Adafruit_FT6206" type="choice"
desc="%touch.lib.prop.desc">
<Choices>
<Choice desc="FT6206 - AdaFruit">Adafruit_FT6206</Choice>
<Choice desc="XPT2046 - Paul Stoffregen">XPT2046_Touchscreen</Choice>
</Choices>
</Property>
<Property id="TOUCH_INTERRUPT_PIN" name="Touch device interrupt pin" initial="0xFF" whenProperty="TOUCH_LIBRARY" isNotValue="Adafruit_FT6206"
desc="Interrupt pin reduces polling so the library will only read upon changes" type="pin" />
<Property id="TOUCH_CS_PIN" name="Touch CS pin" initial="9" whenProperty="TOUCH_LIBRARY" isNotValue="Adafruit_FT6206"
desc="As the touch device is on SPI, it must have a CS pin to select it" type="pin" />
<Property id="HARDWARE_TOUCH_ROTATION" name="Library Touch Rotation (0..3)" initial="0" type="int" min="0" max="3"
desc="The library level touch rotation as provided to setRotation - XPT only" whenProperty="TOUCH_LIBRARY" isValue="XPT2046_Touchscreen"/>
<Property id="ORIENTATION_SEPARATOR" name="%core.touch.orientation" initial="" desc="%core.touch.orientation.desc" type="separator"/>
<Property id="LIB_TOUCH_SWAP_XY" name="%core.touch.swap.xy" initial="false" desc="%core.touch.swap.xy.desc" type="boolean" />
<Property id="LIB_TOUCH_X_INVERTED" name="%core.touch.x.inverted" initial="false" type="boolean" desc="%core.touch.x.inverted.desc"/>
<Property id="LIB_TOUCH_Y_INVERTED" name="%core.touch.y.inverted" initial="false" type="boolean" desc="%core.touch.y.inverted.desc"/>
<Property id="CALIB_SEPARATOR" name="%core.touch.calibration" initial="" desc="%core.touch.calibration.desc" type="separator"/>
<Property id="TOUCH_SCREEN_CALIBRATE" name="%core.enable.touch.calib" initial="true"
desc="%core.enable.touch.calib.desc" type="boolean" />
<Property id="TOUCH_CALIBRATION_STORAGE_LOC" name="%core.touch.calib.addr" initial="400" type="int"
desc="%core.touch.calib.addr.desc" min="4" max="65535" />
</Properties>
<ApplicabilityDefs/>
<SourceFiles>
<Replacement find="XPT2046_Touchscreen" replace="${TOUCH_LIBRARY}"/>
<Replacement find="KNOWN_DEVICE_TOUCH_RANGE_X 4096.0F" replace="KNOWN_DEVICE_TOUCH_RANGE_X 240.0F" whenProperty="TOUCH_LIBRARY" isValue="Adafruit_FT6206"/>
<Replacement find="KNOWN_DEVICE_TOUCH_RANGE_Y 4096.0F" replace="KNOWN_DEVICE_TOUCH_RANGE_Y 320.0F" whenProperty="TOUCH_LIBRARY" isValue="Adafruit_FT6206"/>
<SourceFile name="adaTouchDriver/tcMenuAdaTouchDriver.h" />
</SourceFiles>
<IncludeFiles>
<Header name="graphics/MenuTouchScreenEncoder.h" inSource="false" />
<Header name="tcMenuAdaTouchDriver.h" inSource="true" />
<Header name="extras/DrawableTouchCalibrator.h" inSource="false" whenProperty="TOUCH_SCREEN_CALIBRATE" isValue="true"/>
</IncludeFiles>
<GlobalVariables>
<Variable name="touchDevice" type="${TOUCH_LIBRARY}" export="true" whenProperty="TOUCH_LIBRARY" isValue="Adafruit_FT6206"/>
<Variable name="touchDevice" type="${TOUCH_LIBRARY}" export="true" whenProperty="TOUCH_LIBRARY" isValue="XPT2046_Touchscreen">
<Param value="${TOUCH_CS_PIN}"/>
<Param value="${TOUCH_INTERRUPT_PIN}"/>
</Variable>
<Variable name="touchInterrogator" type="iotouch::AdaLibTouchInterrogator" export="true">
<Param value="touchDevice"/>
</Variable>
<Variable name="touchOrientation" type="iotouch::TouchOrientationSettings" export="false">
<Param value="${LIB_TOUCH_SWAP_XY}"/>
<Param value="${LIB_TOUCH_X_INVERTED}"/>
<Param value="${LIB_TOUCH_Y_INVERTED}"/>
</Variable>
<Variable name="touchScreen" type="MenuTouchScreenManager" export="true">
<Param ref="touchInterrogator"/>
<Param ref="renderer"/>
<Param value="touchOrientation"/>
</Variable>
<Variable name="touchCalibrator" type="tcextras::IoaTouchScreenCalibrator" export="true" whenProperty="TOUCH_SCREEN_CALIBRATE" isValue="true">
<Param ref="touchScreen"/>
<Param ref="renderer"/>
<Param value="${TOUCH_CALIBRATION_STORAGE_LOC}"/>
</Variable>
</GlobalVariables>
<SetupFunctions>
<Function name="init" object="touchInterrogator"/>
<Function name="start" object="touchScreen"/>
<Function name="initWithoutInput" object="menuMgr">
<Param ref="renderer"/>
<Param ref="${ROOT}"/>
</Function>
<Function name="setRotation" object="touchDevice" whenProperty="TOUCH_LIBRARY" isValue="XPT2046_Touchscreen">
<Param value="${HARDWARE_TOUCH_ROTATION}"/>
</Function>
</SetupFunctions>
</TcMenuPlugin>