Skip to content

Commit 4709b57

Browse files
committed
CMake: Add DRIVER_TOUCH configuration option
This option may be DYNAMIC, GESTURE, or REPORT and defines how the touch controller was configured in the factory.
1 parent efd3579 commit 4709b57

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

CMakeLists.txt

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ set_property(CACHE TARGET_DEVICE PROPERTY STRINGS PINETIME P8)
5757
set(LF_CLK "XTAL" CACHE STRING "Low frequency clock source")
5858
set_property(CACHE LF_CLK PROPERTY STRINGS RC XTAL SYNT)
5959

60+
set(DRIVER_TOUCH "DYNAMIC" CACHE STRING "Touch sensor driver factory configuration")
61+
set_property(CACHE DRIVER_TOUCH PROPERTY STRINGS DYNAMIC GESTURE REPORT)
62+
6063
set(PROJECT_GIT_COMMIT_HASH "")
6164

6265
execute_process(COMMAND git rev-parse --short HEAD
@@ -100,6 +103,7 @@ message("DEVICE CONFIGURATION")
100103
message("--------------------")
101104
message(" * Target Pin Mapping : " ${TARGET_DEVICE})
102105
message(" * LF clock source : " ${LF_CLK})
106+
message(" * Touch sensor config : " ${DRIVER_TOUCH})
103107
message("")
104108

105109
set(VERSION_EDIT_WARNING "// Do not edit this file, it is automatically generated by CMAKE!")

doc/buildAndProgram.md

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ CMake configures the project according to variables you specify the command line
3737
**BUILD_DFU (\*\*)**|Build DFU files while building (needs [adafruit-nrfutil](https://github.com/adafruit/Adafruit_nRF52_nrfutil)).|`-DBUILD_DFU=1`
3838
**TARGET_DEVICE**|Target device, used for pin map. Allowed: `PINETIME, P8`|`-DTARGET_DEVICE=PINETIME` (Default)
3939
**LF_CLK**|Configures the LF clock source. Allowed: `RC, XTAL, SYNT`|`-DLF_CLK=XTAL` (Default)
40+
**DRIVER_TOUCH**|Touch sensor driver factory configuration selection. Allowed: `DYNAMIC, GESTURE, REPORT`|`-DDRIVER_TOUCH=DYNAMIC` (Default)
4041
4142
####(**) Note about **CMAKE_BUILD_TYPE**:
4243
By default, this variable is set to *Release*. It compiles the code with size and speed optimizations. We use this value for all the binaries we publish when we [release](https://github.com/InfiniTimeOrg/InfiniTime/releases) new versions of InfiniTime.

src/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -809,6 +809,8 @@ elseif(LF_CLK STREQUAL "SYNT")
809809
else()
810810
message(FATAL_ERROR "Invalid LF_CLK")
811811
endif()
812+
add_definitions(-DDRIVER_TOUCH_${DRIVER_TOUCH})
813+
812814
# NOTE : Add the following defines to enable debug mode of the NRF SDK:
813815
#add_definitions(-DDEBUG)
814816
#add_definitions(-DDEBUG_NRF_USER)

0 commit comments

Comments
 (0)