summaryrefslogtreecommitdiff
path: root/apps/examples/touchscreen/Kconfig
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-04-14 12:26:49 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-04-14 12:26:49 -0600
commit09c8278b8677125f5160be9593fccfd53286bbfc (patch)
tree3a9ab0b135a77d6f3c97e134afdb1315699cdc56 /apps/examples/touchscreen/Kconfig
parentdf4aeab705353232c78e614b56296e585f833fa4 (diff)
downloadnuttx-09c8278b8677125f5160be9593fccfd53286bbfc.tar.gz
nuttx-09c8278b8677125f5160be9593fccfd53286bbfc.tar.bz2
nuttx-09c8278b8677125f5160be9593fccfd53286bbfc.zip
examples/touchscreen: Add a configuration option to indicate that there is or is not an architecture-specific initialization function
Diffstat (limited to 'apps/examples/touchscreen/Kconfig')
-rw-r--r--apps/examples/touchscreen/Kconfig21
1 files changed, 21 insertions, 0 deletions
diff --git a/apps/examples/touchscreen/Kconfig b/apps/examples/touchscreen/Kconfig
index 5e7739c35..b75546c8b 100644
--- a/apps/examples/touchscreen/Kconfig
+++ b/apps/examples/touchscreen/Kconfig
@@ -43,4 +43,25 @@ config EXAMPLES_TOUCHSCREEN_MOUSE
The touchscreen test can also be configured to work with a mouse
driver by setting this option.
+config EXAMPLES_TOUCHSCREEN_ARCHINIT
+ bool "Architecture-specific initialization"
+ default y
+ ---help---
+ By default, the touchscreen example will call arch_tcinitialize() to
+ register the touchscreen device before it attempts to open it.
+ Similarly, it will call arch_tcuninitialize() to unregister the
+ touchscreen device when it is finished.
+
+ This works well for the typical touchscreen controller but there are
+ other devices that cannot be initialized and uninitialized in this
+ fashion. Consider a USB mouse, fo example. The USB mouse will be
+ registered when the mouse is connected and unregistered when the
+ mouse is disconnected.
+
+ So, in cases like this, there are two options: (1) provide dummy
+ arch_tcinitialize() and arch_tcuninitialize() just to satisfy the
+ linking requirements or, (2) select this option. if this option is
+ de-selected, then the arch_tcinitialize() and arch_tcuninitialize() will
+ never be called.
+
endif