NxWM::CTouchscreen: Add CONFIG_NXWM_TOUCHSCREEN_DEVINIT to suppress attempts to initialize the touchscreen from NxWM in the kernel build
This commit is contained in:
parent
39f42b1cf8
commit
80495b7ae5
@ -417,3 +417,10 @@
|
|||||||
This is because in the kernel build mode, the NX server must be initialized
|
This is because in the kernel build mode, the NX server must be initialized
|
||||||
in kernel mode by the RTOS before applications using the server run in
|
in kernel mode by the RTOS before applications using the server run in
|
||||||
user mode.
|
user mode.
|
||||||
|
* NxWm: Added CONFIG_NXWM_NXCONSOLE that can be used to disable the NxConsole
|
||||||
|
window (2013-12-30).
|
||||||
|
* NxWm::CTouchscreen: Added CONFIG_NXWM_TOUCHSCREEN_DEVINIT that can be used
|
||||||
|
to suppress calls to initialize the touchscreen device from the listener
|
||||||
|
thread. This is necessary if the kernel mode build is used: In that case,
|
||||||
|
the touchscreen must be initialized in kernel space before NxWM is started
|
||||||
|
(2013-12-30).
|
||||||
|
16
Kconfig
16
Kconfig
@ -738,6 +738,22 @@ if NXWM_TOUCHSCREEN
|
|||||||
|
|
||||||
comment "Touchscreen device settings"
|
comment "Touchscreen device settings"
|
||||||
|
|
||||||
|
config NXWM_TOUCHSCREEN_DEVINIT
|
||||||
|
bool "Touchscreen Device Initialization"
|
||||||
|
default y
|
||||||
|
depends on !NUTTX_KERNEL
|
||||||
|
---help---
|
||||||
|
It this option is selected, then the NxWM:CTouchscreen listener
|
||||||
|
thread will call a function arch_tcinitialize(NXWM_TOUCHSCREEN_DEVNO)
|
||||||
|
in order to instantiate the touchscreen driver at path
|
||||||
|
NXWM_TOUCHSCREEN_DEVPATH. If NXWM_TOUCHSCREEN_DEVINIT is not
|
||||||
|
selected, then the NxWM:CTouchscreen listener thread will assume
|
||||||
|
that the driver has already been initialized at
|
||||||
|
NXWM_TOUCHSCREEN_DEVPATH.
|
||||||
|
|
||||||
|
NOTE that in the kernel build, all touchscreen initialize must be
|
||||||
|
performed in kernel logic prior to the execution of NxWM.
|
||||||
|
|
||||||
config NXWM_TOUCHSCREEN_DEVNO
|
config NXWM_TOUCHSCREEN_DEVNO
|
||||||
int "Touchscreen Device Number"
|
int "Touchscreen Device Number"
|
||||||
default 0
|
default 0
|
||||||
|
@ -235,6 +235,7 @@ void CImage::drawContents(CGraphicsPort *port)
|
|||||||
// This is the number of rows that we have to pad on the right if the display
|
// This is the number of rows that we have to pad on the right if the display
|
||||||
// width is wider than the image width
|
// width is wider than the image width
|
||||||
|
|
||||||
|
#if 0 // Not used
|
||||||
nxgl_coord_t nRightPad;
|
nxgl_coord_t nRightPad;
|
||||||
if (nLeftPixels >= rect.getWidth())
|
if (nLeftPixels >= rect.getWidth())
|
||||||
{
|
{
|
||||||
@ -244,6 +245,7 @@ void CImage::drawContents(CGraphicsPort *port)
|
|||||||
{
|
{
|
||||||
nRightPad = rect.getWidth() - nLeftPixels;
|
nRightPad = rect.getWidth() - nLeftPixels;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Apply the padding to the right hand side
|
// Apply the padding to the right hand side
|
||||||
|
|
||||||
|
@ -278,6 +278,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
|
|||||||
|
|
||||||
vdbg("Listener started\n");
|
vdbg("Listener started\n");
|
||||||
|
|
||||||
|
#ifdef CONFIG_NXWM_TOUCHSCREEN_DEVINIT
|
||||||
// Initialize the touchscreen device
|
// Initialize the touchscreen device
|
||||||
|
|
||||||
int ret = arch_tcinitialize(CONFIG_NXWM_TOUCHSCREEN_DEVNO);
|
int ret = arch_tcinitialize(CONFIG_NXWM_TOUCHSCREEN_DEVNO);
|
||||||
@ -288,6 +289,7 @@ FAR void *CTouchscreen::listener(FAR void *arg)
|
|||||||
sem_post(&This->m_waitSem);
|
sem_post(&This->m_waitSem);
|
||||||
return (FAR void *)0;
|
return (FAR void *)0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Open the touchscreen device that we just created.
|
// Open the touchscreen device that we just created.
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user