Massive naming fix: STMPE11->STMPE811

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4782 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2012-05-29 00:54:22 +00:00
parent 3295520ba2
commit 5e0db56108
28 changed files with 617 additions and 544 deletions

View File

@ -88,6 +88,9 @@ config NSH_DISABLE_MOUNT
config NSH_DISABLE_MW config NSH_DISABLE_MW
bool "Disable mw" bool "Disable mw"
default n default n
config NSH_DISABLE_NSFMOUNT
bool "Disable nfsmount"
default n
config NSH_DISABLE_PS config NSH_DISABLE_PS
bool "Disable ps" bool "Disable ps"
default n default n
@ -288,10 +291,78 @@ config NSH_CONSOLE
CONFIG_CDCACM and CONFIG_CDCACM_CONSOLE - Sets up the CONFIG_CDCACM and CONFIG_CDCACM_CONSOLE - Sets up the
CDC/ACM serial device as a console device at dev/console. CDC/ACM serial device as a console device at dev/console.
CONFIG_NSH_USBCONSOLE and CONFIG_NSH_USBCONDEV - Sets up the
some other USB serial device as the NSH console (not necessarily
dev/console).
config NSH_USBCONSOLE
bool "Use a USB console"
default n
depends on NSH_CONSOLE && USBDEV
---help---
If defined, then the an arbitrary USB device may be used
to as the NSH console. In this case, CONFIG_NSH_USBCONDEV
must be defined to indicate which USB device to use as
the console.
config NSH_USBCONDEV
string "USB console device"
default "/dev/ttyACM0"
depends on NSH_USBCONSOLE
---help---
If CONFIG_NSH_USBCONSOLE is set to 'y', then CONFIG_NSH_USBCONDEV
must also be set to select the USB device used to support
the NSH console. This should be set to the quoted name of a
readable/write-able USB driver such as:
CONFIG_NSH_USBCONDEV="/dev/ttyACM0".
config UBSDEV_MINOR
int "USB console device minor number"
default 0
depends on NSH_USBCONSOLE
---help---
If there are more than one USB devices, then a USB device
minor number may also need to be provided. Default: 0
menu "USB Trace Support"
depends on USBDEV && (DEBUG || USBDEV_TRACE)
config NSH_USBDEV_TRACEINIT
bool "Show initialization events"
default n
---help---
Show initialization events
config NSH_USBDEV_TRACECLASS
bool "Show class driver events"
default n
---help---
Show class driver events
config NSH_USBDEV_TRACETRANSFERS
bool "Show data transfer events"
default n
---help---
Show data transfer events
config NSH_USBDEV_TRACECONTROLLER
bool "Show controller events"
default n
---help---
Show controller events
config NSH_USBDEV_TRACEINTERRUPTS
bool "Show interrupt-related events"
default n
---help---
Show interrupt-related events
endmenu
config NSH_CONDEV config NSH_CONDEV
bool "Default console device" bool "Default console device"
default "/dev/console" default "/dev/console"
depends on NSH_CONSOLE depends on NSH_CONSOLE && !NSH_USBCONSOLE
---help--- ---help---
If NSH_CONSOLE is set to 'y', then NSH_CONDEV If NSH_CONSOLE is set to 'y', then NSH_CONDEV
may also be set to select the serial device used to support may also be set to select the serial device used to support

View File

@ -2708,7 +2708,7 @@
position, not an offset. position, not an offset.
* graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three * graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three
colors (instead of just two). colors (instead of just two).
* drivers/input/stmpe11_*: Added a driver to support the STMicro STMPE11 * drivers/input/stmpe811_*: Added a driver to support the STMicro STMPE811
IO Expander and touchscreen driver. IO Expander and touchscreen driver.
* configs/stm3240g-eval/nxwm: Added to configuration for testing the NxWM * configs/stm3240g-eval/nxwm: Added to configuration for testing the NxWM
window manager on the STM3240G-EVAL board. window manager on the STM3240G-EVAL board.
@ -2720,8 +2720,8 @@
Then add CONFIG_NX_WRITEONLY which is the more generic way of saying that Then add CONFIG_NX_WRITEONLY which is the more generic way of saying that
no NX component should try to read from the underlying graphic device (LCD no NX component should try to read from the underlying graphic device (LCD
or other). or other).
* configs/stm3240g-eval/src/up_stmpe11.c: Add board-specific support for the * configs/stm3240g-eval/src/up_stmpe811.c: Add board-specific support for the
the STMPE11 I/O expander on the STM3240G-EVAL board. Verfied that the the STMPE811 I/O expander on the STM3240G-EVAL board. Verfied that the
STM3240G-EVAL touchscreen is now fully functional. STM3240G-EVAL touchscreen is now fully functional.
* include/cxx/cfcntl: Added std:: header file. * include/cxx/cfcntl: Added std:: header file.
* graphics/nxbe/nxbe_filltrapezoid.c and graphics/nxglib/fb/nxglib_filltrapezoid.c: * graphics/nxbe/nxbe_filltrapezoid.c and graphics/nxglib/fb/nxglib_filltrapezoid.c:
@ -2730,14 +2730,14 @@
* configs/sam3u-ek, configs/sim, arch/sim/src/up_touchscreen.c, and * configs/sam3u-ek, configs/sim, arch/sim/src/up_touchscreen.c, and
apps/examples/touchscreen: Standardize the board-specific, touchscreen apps/examples/touchscreen: Standardize the board-specific, touchscreen
initialization interfaces. initialization interfaces.
* drivers/input/stmpe11_base.c and configs/stm3240g-eval: The STMPE11-based * drivers/input/stmpe811_base.c and configs/stm3240g-eval: The STMPE811-based
touchscreen seems to work better with edge (vs. level) interrupts touchscreen seems to work better with edge (vs. level) interrupts
* drivers/input/stmpe11_tsc.c: Fix some status checks so that the touchscreen * drivers/input/stmpe811_tsc.c: Fix some status checks so that the touchscreen
interrupt handling logic does not read data if the fifo is not at the interrupt handling logic does not read data if the fifo is not at the
threshold level. threshold level.
* include/nuttx/wqueue.h: Add macro work_available() to determine if the * include/nuttx/wqueue.h: Add macro work_available() to determine if the
previously scheduled work has completed. previously scheduled work has completed.
* drivers/stmpe11_tsc.c: Correct errors: (1) Since all interrupt logic is done on * drivers/stmpe811_tsc.c: Correct errors: (1) Since all interrupt logic is done on
the worker thread, disabling interrupts does not provide protected; Need to the worker thread, disabling interrupts does not provide protected; Need to
disable pre-emption. (2) Fix handling of touch ID and (2) add some logic to disable pre-emption. (2) Fix handling of touch ID and (2) add some logic to
prevent certain kinds of data overrun. prevent certain kinds of data overrun.
@ -2746,7 +2746,7 @@
other logic can use the defaults. other logic can use the defaults.
* graphics/nxtk/nxtk_events.c: Fixed an important but in the logic that * graphics/nxtk/nxtk_events.c: Fixed an important but in the logic that
translates the mouse/touchscreen position data for framed windows and toolbars. translates the mouse/touchscreen position data for framed windows and toolbars.
* drivers/input/stmpe11_tsc.c, tsc2007.c, and ads7843e.c: Need to keep track of * drivers/input/stmpe811_tsc.c, tsc2007.c, and ads7843e.c: Need to keep track of
when if positional data is valid. When the touch is released, the X/Y position when if positional data is valid. When the touch is released, the X/Y position
of the release must be the same as the X/Y position of the last touch (se that of the release must be the same as the X/Y position of the last touch (se that
the release occurs in the same window as the last touch). the release occurs in the same window as the last touch).
@ -2760,7 +2760,7 @@
window to revert to the previous window. Not good behavior. window to revert to the previous window. Not good behavior.
* sched/sched_mergepending.c: Add task switching instrumentation. There is a case * sched/sched_mergepending.c: Add task switching instrumentation. There is a case
here where instrumentation was missing. Contributed by Petri Tanskanen. here where instrumentation was missing. Contributed by Petri Tanskanen.
* CONFIG_STMPE11_THRESHX, CONFIG_STMPE11_THRESHX, and drivers/stmpe11_tsc.c: Add some * CONFIG_STMPE811_THRESHX, CONFIG_STMPE811_THRESHX, and drivers/stmpe811_tsc.c: Add some
thresholding controls to all slow down processing of touchscreen samples. thresholding controls to all slow down processing of touchscreen samples.
This is a problem with NX in multi-user mode: touchscreen data gets sent This is a problem with NX in multi-user mode: touchscreen data gets sent
via a message and when the message queue gets full the sender blocks and via a message and when the message queue gets full the sender blocks and
@ -2769,7 +2769,7 @@
* include/sched.h: Fix a typo (missing semicolon) in prototype of on_exit(); * include/sched.h: Fix a typo (missing semicolon) in prototype of on_exit();
* sched/on_exit.c and include/nuttx/sched.h: Fix some old typos that caused * sched/on_exit.c and include/nuttx/sched.h: Fix some old typos that caused
compilation errors when CONFIG_SCHED_ONEXIT is defined. compilation errors when CONFIG_SCHED_ONEXIT is defined.
* configs/stm3240g-eval/nxwm/defconfig: The default NxWM now uses the STMPE11 * configs/stm3240g-eval/nxwm/defconfig: The default NxWM now uses the STMPE811
touchscreen. touchscreen.
* include/cxx/csched: Added * include/cxx/csched: Added
* graphic/nxmu/nxmu_sendserver.c, nxmu_sendwindow.c, and nxmu_sendclient.c: * graphic/nxmu/nxmu_sendserver.c, nxmu_sendwindow.c, and nxmu_sendclient.c:
@ -2796,7 +2796,7 @@
keyboard data in multi-user mode. keyboard data in multi-user mode.
* graphics/nxconsole/nxcon_kdbind.c: Fixed unmatched sem_wait and sem_post. * graphics/nxconsole/nxcon_kdbind.c: Fixed unmatched sem_wait and sem_post.
Fix some conditional compilation that included a few too many lines of code. Fix some conditional compilation that included a few too many lines of code.
* drivers/input/stmpe11_tsc.c and stmpe11.h: Add a timeout to catch missed * drivers/input/stmpe811_tsc.c and stmpe811.h: Add a timeout to catch missed
pen up events. Now the STM3240G-EVAL touchscreen works very smoothly. pen up events. Now the STM3240G-EVAL touchscreen works very smoothly.
* configs/stm3240g-eval/nxwm/defconfig: Enable support for NxConsole keyboard * configs/stm3240g-eval/nxwm/defconfig: Enable support for NxConsole keyboard
input. Increasing spacing of icons. input. Increasing spacing of icons.
@ -2830,3 +2830,5 @@
as the corresponding STM3240G-EVAL configurations. This adds FSMC SRAM, as the corresponding STM3240G-EVAL configurations. This adds FSMC SRAM,
touchscreen, and LCD support. touchscreen, and LCD support.
* configs/stm3220g-eval/: Add a NxWM configuration for the STM3220G-EVAL. * configs/stm3220g-eval/: Add a NxWM configuration for the STM3220G-EVAL.
* stmpe11*: Fix a massive naming problem. All references to STMPE11 should be
STMPE811.

View File

@ -970,7 +970,7 @@
<ul> <ul>
<li><b>Drivers</b>. <li><b>Drivers</b>.
Added a watchdog timer driver infrastructure. Added a watchdog timer driver infrastructure.
Add general support for STMicro STMPE11 I/O Expander/touchscreen device. Add general support for STMicro STMPE811 I/O Expander/touchscreen device.
</li> </li>
<li><b>STM32</b>. <li><b>STM32</b>.
Add support for the STM32 IWDG and WWDG watchodog timers. Add support for the STM32 IWDG and WWDG watchodog timers.
@ -978,7 +978,7 @@
serial driver now uses circular DMA to improve Rx performance (Contributed by Mike Smith). serial driver now uses circular DMA to improve Rx performance (Contributed by Mike Smith).
</li> </li>
<li><b>STM3240G-EVAL Board</b>. <li><b>STM3240G-EVAL Board</b>.
Add support for the LCD and for the STMPE11 I/O Expander as a touchscreen controller. Add support for the LCD and for the STMPE811 I/O Expander as a touchscreen controller.
</li> </li>
<li><b>PIC32 Boards</b>. <li><b>PIC32 Boards</b>.
Board support for the Mikroelektronika PIC32MX7 Multimedia Board (MMB) and for the Sparkfun UBW32 PIC32 board. Board support for the Mikroelektronika PIC32MX7 Multimedia Board (MMB) and for the Sparkfun UBW32 PIC32 board.
@ -1856,7 +1856,7 @@
A more complete port would include support for SDIO and USB OTG which are not available in NuttX 6.13. A more complete port would include support for SDIO and USB OTG which are not available in NuttX 6.13.
The USB OTG device controller driver, and LCD driver and a function I2C driver were added in NuttX 6.17. The USB OTG device controller driver, and LCD driver and a function I2C driver were added in NuttX 6.17.
STM32 IWDG and WWDG watchdog timer drivers were added in NuttX 6.18 (should be compatible with F1 and F2). STM32 IWDG and WWDG watchdog timer drivers were added in NuttX 6.18 (should be compatible with F1 and F2).
An LCD driver and a touchscreen driver for the STM3240G-EVAL based on the STMPE11 I/O expander were also added in NuttX 6.18. An LCD driver and a touchscreen driver for the STM3240G-EVAL based on the STMPE811 I/O expander were also added in NuttX 6.18.
</p> </p>
</ul> </ul>
</td> </td>
@ -2913,7 +2913,7 @@ nuttx-6.18 2012-05-19 Gregory Nutt &lt;gnutt@nuttx.org&gt;
position, not an offset. position, not an offset.
* graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three * graphics/nxtk/nxtk_drawframe.c: Framed windows are now drawn in three
colors (instead of just two). colors (instead of just two).
* drivers/input/stmpe11_*: Added a driver to support the STMicro STMPE11 * drivers/input/stmpe811_*: Added a driver to support the STMicro STMPE811
IO Expander and touchscreen driver. IO Expander and touchscreen driver.
* configs/stm3240g-eval/nxwm: Added to configuration for testing the NxWM * configs/stm3240g-eval/nxwm: Added to configuration for testing the NxWM
window manager on the STM3240G-EVAL board. window manager on the STM3240G-EVAL board.
@ -2925,8 +2925,8 @@ nuttx-6.18 2012-05-19 Gregory Nutt &lt;gnutt@nuttx.org&gt;
Then add CONFIG_NX_WRITEONLY which is the more generic way of saying that Then add CONFIG_NX_WRITEONLY which is the more generic way of saying that
no NX component should try to read from the underlying graphic device (LCD no NX component should try to read from the underlying graphic device (LCD
or other). or other).
* configs/stm3240g-eval/src/up_stmpe11.c: Add board-specific support for the * configs/stm3240g-eval/src/up_stmpe811.c: Add board-specific support for the
the STMPE11 I/O expander on the STM3240G-EVAL board. Verfied that the the STMPE811 I/O expander on the STM3240G-EVAL board. Verfied that the
STM3240G-EVAL touchscreen is now fully functional. STM3240G-EVAL touchscreen is now fully functional.
* include/cxx/cfcntl: Added std:: header file. * include/cxx/cfcntl: Added std:: header file.
* graphics/nxbe/nxbe_filltrapezoid.c and graphics/nxglib/fb/nxglib_filltrapezoid.c: * graphics/nxbe/nxbe_filltrapezoid.c and graphics/nxglib/fb/nxglib_filltrapezoid.c:
@ -2935,14 +2935,14 @@ nuttx-6.18 2012-05-19 Gregory Nutt &lt;gnutt@nuttx.org&gt;
* configs/sam3u-ek, configs/sim, arch/sim/src/up_touchscreen.c, and * configs/sam3u-ek, configs/sim, arch/sim/src/up_touchscreen.c, and
apps/examples/touchscreen: Standardize the board-specific, touchscreen apps/examples/touchscreen: Standardize the board-specific, touchscreen
initialization interfaces. initialization interfaces.
* drivers/input/stmpe11_base.c and configs/stm3240g-eval: The STMPE11-based * drivers/input/stmpe811_base.c and configs/stm3240g-eval: The STMPE811-based
touchscreen seems to work better with edge (vs. level) interrupts touchscreen seems to work better with edge (vs. level) interrupts
* drivers/input/stmpe11_tsc.c: Fix some status checks so that the touchscreen * drivers/input/stmpe811_tsc.c: Fix some status checks so that the touchscreen
interrupt handling logic does not read data if the fifo is not at the interrupt handling logic does not read data if the fifo is not at the
threshold level. threshold level.
* include/nuttx/wqueue.h: Add macro work_available() to determine if the * include/nuttx/wqueue.h: Add macro work_available() to determine if the
previously scheduled work has completed. previously scheduled work has completed.
* drivers/stmpe11_tsc.c: Correct errors: (1) Since all interrupt logic is done on * drivers/stmpe811_tsc.c: Correct errors: (1) Since all interrupt logic is done on
the worker thread, disabling interrupts does not provide protected; Need to the worker thread, disabling interrupts does not provide protected; Need to
disable pre-emption. (2) Fix handling of touch ID and (2) add some logic to disable pre-emption. (2) Fix handling of touch ID and (2) add some logic to
prevent certain kinds of data overrun. prevent certain kinds of data overrun.
@ -2951,7 +2951,7 @@ nuttx-6.18 2012-05-19 Gregory Nutt &lt;gnutt@nuttx.org&gt;
other logic can use the defaults. other logic can use the defaults.
* graphics/nxtk/nxtk_events.c: Fixed an important but in the logic that * graphics/nxtk/nxtk_events.c: Fixed an important but in the logic that
translates the mouse/touchscreen position data for framed windows and toolbars. translates the mouse/touchscreen position data for framed windows and toolbars.
* drivers/input/stmpe11_tsc.c, tsc2007.c, and ads7843e.c: Need to keep track of * drivers/input/stmpe811_tsc.c, tsc2007.c, and ads7843e.c: Need to keep track of
when if positional data is valid. When the touch is released, the X/Y position when if positional data is valid. When the touch is released, the X/Y position
of the release must be the same as the X/Y position of the last touch (se that of the release must be the same as the X/Y position of the last touch (se that
the release occurs in the same window as the last touch). the release occurs in the same window as the last touch).
@ -2965,7 +2965,7 @@ nuttx-6.18 2012-05-19 Gregory Nutt &lt;gnutt@nuttx.org&gt;
window to revert to the previous window. Not good behavior. window to revert to the previous window. Not good behavior.
* sched/sched_mergepending.c: Add task switching instrumentation. There is a case * sched/sched_mergepending.c: Add task switching instrumentation. There is a case
here where instrumentation was missing. Contributed by Petri Tanskanen. here where instrumentation was missing. Contributed by Petri Tanskanen.
* CONFIG_STMPE11_THRESHX, CONFIG_STMPE11_THRESHX, and drivers/stmpe11_tsc.c: Add some * CONFIG_STMPE811_THRESHX, CONFIG_STMPE811_THRESHX, and drivers/stmpe811_tsc.c: Add some
thresholding controls to all slow down processing of touchscreen samples. thresholding controls to all slow down processing of touchscreen samples.
This is a problem with NX in multi-user mode: touchscreen data gets sent This is a problem with NX in multi-user mode: touchscreen data gets sent
via a message and when the message queue gets full the sender blocks and via a message and when the message queue gets full the sender blocks and
@ -2974,7 +2974,7 @@ nuttx-6.18 2012-05-19 Gregory Nutt &lt;gnutt@nuttx.org&gt;
* include/sched.h: Fix a typo (missing semicolon) in prototype of on_exit(); * include/sched.h: Fix a typo (missing semicolon) in prototype of on_exit();
* sched/on_exit.c and include/nuttx/sched.h: Fix some old typos that caused * sched/on_exit.c and include/nuttx/sched.h: Fix some old typos that caused
compilation errors when CONFIG_SCHED_ONEXIT is defined. compilation errors when CONFIG_SCHED_ONEXIT is defined.
* configs/stm3240g-eval/nxwm/defconfig: The default NxWM now uses the STMPE11 * configs/stm3240g-eval/nxwm/defconfig: The default NxWM now uses the STMPE811
touchscreen. touchscreen.
* include/cxx/csched: Added * include/cxx/csched: Added
* graphic/nxmu/nxmu_sendserver.c, nxmu_sendwindow.c, and nxmu_sendclient.c: * graphic/nxmu/nxmu_sendserver.c, nxmu_sendwindow.c, and nxmu_sendclient.c:

View File

@ -4673,69 +4673,69 @@ build
multiple touchscreens with the same driver. multiple touchscreens with the same driver.
</li> </li>
<li> <li>
<code>CONFIG_INPUT_STMPE11</code>: <code>CONFIG_INPUT_STMPE811</code>:
Enables support for the STMPE11 driver (Needs <code>CONFIG_INPUT</code>) Enables support for the STMPE811 driver (Needs <code>CONFIG_INPUT</code>)
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_SPI</code>: <code>CONFIG_STMPE811_SPI</code>:
Enables support for the SPI interface (not currenly supported) Enables support for the SPI interface (not currenly supported)
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_I2C</code>: <code>CONFIG_STMPE811_I2C</code>:
Enables support for the I2C interface Enables support for the I2C interface
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_MULTIPLE </code>: <code>CONFIG_STMPE811_MULTIPLE </code>:
Can be defined to support multiple STMPE11 devices on board. Can be defined to support multiple STMPE811 devices on board.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_ACTIVELOW</code>: <code>CONFIG_STMPE811_ACTIVELOW</code>:
Interrupt is generated by an active low signal (or falling edge). Interrupt is generated by an active low signal (or falling edge).
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_EDGE</code>: <code>CONFIG_STMPE811_EDGE</code>:
Interrupt is generated on an edge (vs. on the active level) Interrupt is generated on an edge (vs. on the active level)
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_NPOLLWAITERS</code>: <code>CONFIG_STMPE811_NPOLLWAITERS</code>:
Maximum number of threads that can be waiting on poll() (ignored if Maximum number of threads that can be waiting on poll() (ignored if
<code>CONFIG_DISABLE_POLL</code> is set). <code>CONFIG_DISABLE_POLL</code> is set).
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_TSC_DISABLE</code>: <code>CONFIG_STMPE811_TSC_DISABLE</code>:
Disable driver touchscreen functionality. Disable driver touchscreen functionality.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_ADC_DISABLE</code>: <code>CONFIG_STMPE811_ADC_DISABLE</code>:
Disable driver ADC functionality. Disable driver ADC functionality.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_GPIO_DISABLE</code>: <code>CONFIG_STMPE811_GPIO_DISABLE</code>:
Disable driver GPIO functionlaity. Disable driver GPIO functionlaity.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_GPIOINT_DISABLE</code>: <code>CONFIG_STMPE811_GPIOINT_DISABLE</code>:
Disable driver GPIO interrupt functionality (ignored if GPIO Disable driver GPIO interrupt functionality (ignored if GPIO
functionality is disabled). functionality is disabled).
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_SWAPXY</code>: <code>CONFIG_STMPE811_SWAPXY</code>:
Reverse the meaning of X and Y to handle different LCD orientations. Reverse the meaning of X and Y to handle different LCD orientations.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_TEMP_DISABLE</code>: <code>CONFIG_STMPE811_TEMP_DISABLE</code>:
Disable driver temperature sensor functionality. Disable driver temperature sensor functionality.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_REGDEBUG</code>: <code>CONFIG_STMPE811_REGDEBUG</code>:
Enabled very low register-level debug output. Requires <code>CONFIG_DEBUG</code>. Enabled very low register-level debug output. Requires <code>CONFIG_DEBUG</code>.
</li> </li>
<li> <li>
<code>CONFIG_STMPE11_THRESHX</code> and <code>CONFIG_STMPE11_THRESHY</code>: <code>CONFIG_STMPE811_THRESHX</code> and <code>CONFIG_STMPE811_THRESHY</code>:
STMPE11 touchscreen data comes in a a very high rate. New touch positions STMPE811 touchscreen data comes in a a very high rate. New touch positions
will only be reported when the X or Y data changes by these thresholds. will only be reported when the X or Y data changes by these thresholds.
This trades reduces data rate for some loss in dragging accuracy. The This trades reduces data rate for some loss in dragging accuracy. The
STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
would correspond to one pixel. Default: 12 would correspond to one pixel. Default: 12
</li> </li>

View File

@ -2772,13 +2772,13 @@ upon many of the changes in this NuttX release.
New features and extended functionality: New features and extended functionality:
* Drivers. Added a watchdog timer driver infrastructure. Add general * Drivers. Added a watchdog timer driver infrastructure. Add general
support for STMicro STMPE11 I/O Expander/touchscreen device. support for STMicro STMPE811 I/O Expander/touchscreen device.
* STM32. Add support for the STM32 IWDG and WWDG watchodog timers. DMA * STM32. Add support for the STM32 IWDG and WWDG watchodog timers. DMA
now supports cicular buffer mode; serial driver now uses circular now supports cicular buffer mode; serial driver now uses circular
DMA to improve Rx performance (Contributed by Mike Smith). DMA to improve Rx performance (Contributed by Mike Smith).
* STM3240G-EVAL Board. Add support for the LCD and for the STMPE11 * STM3240G-EVAL Board. Add support for the LCD and for the STMPE811
I/O Expander as a touchscreen controller. I/O Expander as a touchscreen controller.
* PIC32 Boards. Board support for the Mikroelektronika PIC32MX7 * PIC32 Boards. Board support for the Mikroelektronika PIC32MX7

View File

@ -784,41 +784,41 @@ defconfig -- This is a configuration file similar to the Linux
there are multiple TSC2007 touchscreens, this setting will enable there are multiple TSC2007 touchscreens, this setting will enable
multiple touchscreens with the same driver. multiple touchscreens with the same driver.
CONFIG_INPUT_STMPE11 CONFIG_INPUT_STMPE811
Enables support for the STMPE11 driver (Needs CONFIG_INPUT) Enables support for the STMPE811 driver (Needs CONFIG_INPUT)
CONFIG_STMPE11_SPI CONFIG_STMPE811_SPI
Enables support for the SPI interface (not currenly supported) Enables support for the SPI interface (not currenly supported)
CONFIG_STMPE11_I2C CONFIG_STMPE811_I2C
Enables support for the I2C interface Enables support for the I2C interface
CONFIG_STMPE11_MULTIPLE CONFIG_STMPE811_MULTIPLE
Can be defined to support multiple STMPE11 devices on board. Can be defined to support multiple STMPE811 devices on board.
CONFIG_STMPE11_ACTIVELOW CONFIG_STMPE811_ACTIVELOW
Interrupt is generated by an active low signal (or falling edge). Interrupt is generated by an active low signal (or falling edge).
CONFIG_STMPE11_EDGE CONFIG_STMPE811_EDGE
Interrupt is generated on an edge (vs. on the active level) Interrupt is generated on an edge (vs. on the active level)
CONFIG_STMPE11_NPOLLWAITERS CONFIG_STMPE811_NPOLLWAITERS
Maximum number of threads that can be waiting on poll() (ignored if Maximum number of threads that can be waiting on poll() (ignored if
CONFIG_DISABLE_POLL is set). CONFIG_DISABLE_POLL is set).
CONFIG_STMPE11_TSC_DISABLE CONFIG_STMPE811_TSC_DISABLE
Disable driver touchscreen functionality. Disable driver touchscreen functionality.
CONFIG_STMPE11_ADC_DISABLE CONFIG_STMPE811_ADC_DISABLE
Disable driver ADC functionality. Disable driver ADC functionality.
CONFIG_STMPE11_GPIO_DISABLE CONFIG_STMPE811_GPIO_DISABLE
Disable driver GPIO functionlaity. Disable driver GPIO functionlaity.
CONFIG_STMPE11_GPIOINT_DISABLE CONFIG_STMPE811_GPIOINT_DISABLE
Disable driver GPIO interrupt functionality (ignored if GPIO Disable driver GPIO interrupt functionality (ignored if GPIO
functionality is disabled). functionality is disabled).
CONFIG_STMPE11_SWAPXY CONFIG_STMPE811_SWAPXY
Reverse the meaning of X and Y to handle different LCD orientations. Reverse the meaning of X and Y to handle different LCD orientations.
CONFIG_STMPE11_TEMP_DISABLE CONFIG_STMPE811_TEMP_DISABLE
Disable driver temperature sensor functionality. Disable driver temperature sensor functionality.
CONFIG_STMPE11_REGDEBUG CONFIG_STMPE811_REGDEBUG
Enabled very low register-level debug output. Requires CONFIG_DEBUG. Enabled very low register-level debug output. Requires CONFIG_DEBUG.
CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
STMPE11 touchscreen data comes in a a very high rate. New touch positions STMPE811 touchscreen data comes in a a very high rate. New touch positions
will only be reported when the X or Y data changes by these thresholds. will only be reported when the X or Y data changes by these thresholds.
This trades reduces data rate for some loss in dragging accuracy. The This trades reduces data rate for some loss in dragging accuracy. The
STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
would correspond to one pixel. Default: 12 would correspond to one pixel. Default: 12

View File

@ -386,10 +386,10 @@ There are 2 possible SRAM configurations:
I/O Expanders I/O Expanders
============= =============
The STM3220G-EVAL has two STMPE11QTR I/O expanders on board both connected to The STM3220G-EVAL has two STMPE811QTR I/O expanders on board both connected to
the STM32 via I2C1. They share a common interrupt line: PI2. the STM32 via I2C1. They share a common interrupt line: PI2.
STMPE11 U24, I2C address 0x41 (7-bit) STMPE811 U24, I2C address 0x41 (7-bit)
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------
STPE11 PIN BOARD SIGNAL BOARD CONNECTION STPE11 PIN BOARD SIGNAL BOARD CONNECTION
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------
@ -402,7 +402,7 @@ STPE11 PIN BOARD SIGNAL BOARD CONNECTION
IN1 EXP_IO11 IN1 EXP_IO11
IN0 EXP_IO12 IN0 EXP_IO12
STMPE11 U29, I2C address 0x44 (7-bit) STMPE811 U29, I2C address 0x44 (7-bit)
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------
STPE11 PIN BOARD SIGNAL BOARD CONNECTION STPE11 PIN BOARD SIGNAL BOARD CONNECTION
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------

View File

@ -80,7 +80,7 @@ ifeq ($(CONFIG_WATCHDOG),y)
CONFIGURED_APPS += examples/watchdog CONFIGURED_APPS += examples/watchdog
endif endif
ifeq ($(CONFIG_INPUT_STMPE11),y) ifeq ($(CONFIG_INPUT_STMPE811),y)
CONFIGURED_APPS += examples/touchscreen CONFIGURED_APPS += examples/touchscreen
endif endif

View File

@ -944,66 +944,66 @@ CONFIG_INPUT=n
CONFIG_INPUT_TSC2007=n CONFIG_INPUT_TSC2007=n
# #
# STMPE11 input device configuration # STMPE811 input device configuration
# #
# Prerequisites: CONFIG_INPUT=y # Prerequisites: CONFIG_INPUT=y
# Other settings that effect the driver: CONFIG_DISABLE_POLL # Other settings that effect the driver: CONFIG_DISABLE_POLL
# #
# CONFIG_INPUT_STMPE11 # CONFIG_INPUT_STMPE811
# Enables support for the STMPE11 driver (Needs CONFIG_INPUT) # Enables support for the STMPE811 driver (Needs CONFIG_INPUT)
# CONFIG_STMPE11_SPI # CONFIG_STMPE811_SPI
# Enables support for the SPI interface (not currenly supported) # Enables support for the SPI interface (not currenly supported)
# CONFIG_STMPE11_I2C # CONFIG_STMPE811_I2C
# Enables support for the I2C interface # Enables support for the I2C interface
# CONFIG_STMPE11_MULTIPLE # CONFIG_STMPE811_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board. # Can be defined to support multiple STMPE811 devices on board.
# CONFIG_STMPE11_ACTIVELOW # CONFIG_STMPE811_ACTIVELOW
# Interrupt is generated by an active low signal (or falling edge). # Interrupt is generated by an active low signal (or falling edge).
# CONFIG_STMPE11_EDGE # CONFIG_STMPE811_EDGE
# Interrupt is generated on an edge (vs. on the active level) # Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS # CONFIG_STMPE811_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if # Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set). # CONFIG_DISABLE_POLL is set).
# CONFIG_STMPE11_TSC_DISABLE # CONFIG_STMPE811_TSC_DISABLE
# Disable driver touchscreen functionality. # Disable driver touchscreen functionality.
# CONFIG_STMPE11_ADC_DISABLE # CONFIG_STMPE811_ADC_DISABLE
# Disable driver ADC functionality. # Disable driver ADC functionality.
# CONFIG_STMPE11_GPIO_DISABLE # CONFIG_STMPE811_GPIO_DISABLE
# Disable driver GPIO functionality. # Disable driver GPIO functionality.
# CONFIG_STMPE11_GPIOINT_DISABLE # CONFIG_STMPE811_GPIOINT_DISABLE
# Disable driver GPIO interrupt functionality (ignored if GPIO functionality is # Disable driver GPIO interrupt functionality (ignored if GPIO functionality is
# disabled). # disabled).
# CONFIG_STMPE11_SWAPXY # CONFIG_STMPE811_SWAPXY
# Reverse the meaning of X and Y to handle different LCD orientations. # Reverse the meaning of X and Y to handle different LCD orientations.
# For the STM3220G-EVAL, X and Y should be swapped in PORTRAIT modes # For the STM3220G-EVAL, X and Y should be swapped in PORTRAIT modes
# CONFIG_STMPE11_TEMP_DISABLE # CONFIG_STMPE811_TEMP_DISABLE
# Disable driver temperature sensor functionality. # Disable driver temperature sensor functionality.
# CONFIG_STMPE11_REGDBUG # CONFIG_STMPE811_REGDBUG
# Enabled very low register-level debug output. Requires CONFIG_DEBUG. # Enabled very low register-level debug output. Requires CONFIG_DEBUG.
# CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY # CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
# STMPE11 touchscreen data comes in a a very high rate. New touch positions # STMPE811 touchscreen data comes in a a very high rate. New touch positions
# will only be reported when the X or Y data changes by these thresholds. # will only be reported when the X or Y data changes by these thresholds.
# This trades reduces data rate for some loss in dragging accuracy. The # This trades reduces data rate for some loss in dragging accuracy. The
# STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So # STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
# for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 # for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
# would correspond to one pixel. Default: 12 # would correspond to one pixel. Default: 12
# #
CONFIG_INPUT_STMPE11=n CONFIG_INPUT_STMPE811=n
CONFIG_STMPE11_SPI=n CONFIG_STMPE811_SPI=n
CONFIG_STMPE11_I2C=y CONFIG_STMPE811_I2C=y
CONFIG_STMPE11_MULTIPLE=y CONFIG_STMPE811_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y CONFIG_STMPE811_ACTIVELOW=y
CONFIG_STMPE11_EDGE=y CONFIG_STMPE811_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS #CONFIG_STMPE811_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n CONFIG_STMPE811_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y CONFIG_STMPE811_ADC_DISABLE=y
CONFIG_STMPE11_GPIO_DISABLE=y CONFIG_STMPE811_GPIO_DISABLE=y
CONFIG_STMPE11_GPIOINT_DISABLE=y CONFIG_STMPE811_GPIOINT_DISABLE=y
CONFIG_STMPE11_SWAPXY=y CONFIG_STMPE811_SWAPXY=y
CONFIG_STMPE11_TEMP_DISABLE=y CONFIG_STMPE811_TEMP_DISABLE=y
CONFIG_STMPE11_REGDEBUG=n CONFIG_STMPE811_REGDEBUG=n
CONFIG_STMPE11_THRESHX=26 CONFIG_STMPE811_THRESHX=26
CONFIG_STMPE11_THRESHY=34 CONFIG_STMPE811_THRESHY=34
# #
# USB Device Configuration # USB Device Configuration

View File

@ -945,66 +945,66 @@ CONFIG_INPUT=y
CONFIG_INPUT_TSC2007=n CONFIG_INPUT_TSC2007=n
# #
# STMPE11 input device configuration # STMPE811 input device configuration
# #
# Prerequisites: CONFIG_INPUT=y # Prerequisites: CONFIG_INPUT=y
# Other settings that effect the driver: CONFIG_DISABLE_POLL # Other settings that effect the driver: CONFIG_DISABLE_POLL
# #
# CONFIG_INPUT_STMPE11 # CONFIG_INPUT_STMPE811
# Enables support for the STMPE11 driver (Needs CONFIG_INPUT) # Enables support for the STMPE811 driver (Needs CONFIG_INPUT)
# CONFIG_STMPE11_SPI # CONFIG_STMPE811_SPI
# Enables support for the SPI interface (not currenly supported) # Enables support for the SPI interface (not currenly supported)
# CONFIG_STMPE11_I2C # CONFIG_STMPE811_I2C
# Enables support for the I2C interface # Enables support for the I2C interface
# CONFIG_STMPE11_MULTIPLE # CONFIG_STMPE811_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board. # Can be defined to support multiple STMPE811 devices on board.
# CONFIG_STMPE11_ACTIVELOW # CONFIG_STMPE811_ACTIVELOW
# Interrupt is generated by an active low signal (or falling edge). # Interrupt is generated by an active low signal (or falling edge).
# CONFIG_STMPE11_EDGE # CONFIG_STMPE811_EDGE
# Interrupt is generated on an edge (vs. on the active level) # Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS # CONFIG_STMPE811_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if # Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set). # CONFIG_DISABLE_POLL is set).
# CONFIG_STMPE11_TSC_DISABLE # CONFIG_STMPE811_TSC_DISABLE
# Disable driver touchscreen functionality. # Disable driver touchscreen functionality.
# CONFIG_STMPE11_ADC_DISABLE # CONFIG_STMPE811_ADC_DISABLE
# Disable driver ADC functionality. # Disable driver ADC functionality.
# CONFIG_STMPE11_GPIO_DISABLE # CONFIG_STMPE811_GPIO_DISABLE
# Disable driver GPIO functionality. # Disable driver GPIO functionality.
# CONFIG_STMPE11_GPIOINT_DISABLE # CONFIG_STMPE811_GPIOINT_DISABLE
# Disable driver GPIO interrupt functionality (ignored if GPIO functionality is # Disable driver GPIO interrupt functionality (ignored if GPIO functionality is
# disabled). # disabled).
# CONFIG_STMPE11_SWAPXY # CONFIG_STMPE811_SWAPXY
# Reverse the meaning of X and Y to handle different LCD orientations. # Reverse the meaning of X and Y to handle different LCD orientations.
# For the STM3220G-EVAL, X and Y should be swapped in PORTRAIT modes # For the STM3220G-EVAL, X and Y should be swapped in PORTRAIT modes
# CONFIG_STMPE11_TEMP_DISABLE # CONFIG_STMPE811_TEMP_DISABLE
# Disable driver temperature sensor functionality. # Disable driver temperature sensor functionality.
# CONFIG_STMPE11_REGDBUG # CONFIG_STMPE811_REGDBUG
# Enabled very low register-level debug output. Requires CONFIG_DEBUG. # Enabled very low register-level debug output. Requires CONFIG_DEBUG.
# CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY # CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
# STMPE11 touchscreen data comes in a a very high rate. New touch positions # STMPE811 touchscreen data comes in a a very high rate. New touch positions
# will only be reported when the X or Y data changes by these thresholds. # will only be reported when the X or Y data changes by these thresholds.
# This trades reduces data rate for some loss in dragging accuracy. The # This trades reduces data rate for some loss in dragging accuracy. The
# STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So # STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
# for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 # for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
# would correspond to one pixel. Default: 12 # would correspond to one pixel. Default: 12
# #
CONFIG_INPUT_STMPE11=y CONFIG_INPUT_STMPE811=y
CONFIG_STMPE11_SPI=n CONFIG_STMPE811_SPI=n
CONFIG_STMPE11_I2C=y CONFIG_STMPE811_I2C=y
CONFIG_STMPE11_MULTIPLE=y CONFIG_STMPE811_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y CONFIG_STMPE811_ACTIVELOW=y
CONFIG_STMPE11_EDGE=y CONFIG_STMPE811_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS #CONFIG_STMPE811_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n CONFIG_STMPE811_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y CONFIG_STMPE811_ADC_DISABLE=y
CONFIG_STMPE11_GPIO_DISABLE=y CONFIG_STMPE811_GPIO_DISABLE=y
CONFIG_STMPE11_GPIOINT_DISABLE=y CONFIG_STMPE811_GPIOINT_DISABLE=y
CONFIG_STMPE11_SWAPXY=n CONFIG_STMPE811_SWAPXY=n
CONFIG_STMPE11_TEMP_DISABLE=y CONFIG_STMPE811_TEMP_DISABLE=y
CONFIG_STMPE11_REGDEBUG=n CONFIG_STMPE811_REGDEBUG=n
CONFIG_STMPE11_THRESHX=39 CONFIG_STMPE811_THRESHX=39
CONFIG_STMPE11_THRESHY=51 CONFIG_STMPE811_THRESHY=51
# #
# USB Device Configuration # USB Device Configuration

View File

@ -84,8 +84,8 @@ ifeq ($(CONFIG_WATCHDOG),y)
CSRCS += up_watchdog.c CSRCS += up_watchdog.c
endif endif
ifeq ($(CONFIG_INPUT_STMPE11),y) ifeq ($(CONFIG_INPUT_STMPE811),y)
CSRCS += up_stmpe11.c CSRCS += up_stmpe811.c
endif endif
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))

View File

@ -138,10 +138,10 @@
#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN5) #define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN5)
#define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN11) #define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN11)
/* The STM3220G-EVAL has two STMPE11QTR I/O expanders on board both connected /* The STM3220G-EVAL has two STMPE811QTR I/O expanders on board both connected
* to the STM32 via I2C1. They share a common interrupt line: PI2. * to the STM32 via I2C1. They share a common interrupt line: PI2.
* *
* STMPE11 U24, I2C address 0x41 (7-bit) * STMPE811 U24, I2C address 0x41 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -154,7 +154,7 @@
* IN1 EXP_IO11 * IN1 EXP_IO11
* IN0 EXP_IO12 * IN0 EXP_IO12
* *
* STMPE11 U29, I2C address 0x44 (7-bit) * STMPE811 U29, I2C address 0x44 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -168,8 +168,8 @@
* IN0 EXP_IO8 * IN0 EXP_IO8
*/ */
#define STMPE11_ADDR1 0x41 #define STMPE811_ADDR1 0x41
#define STMPE11_ADDR2 0x44 #define STMPE811_ADDR2 0x44
#define GPIO_IO_EXPANDER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTI|GPIO_PIN2) #define GPIO_IO_EXPANDER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTI|GPIO_PIN2)

View File

@ -47,7 +47,7 @@
#include <nuttx/i2c.h> #include <nuttx/i2c.h>
#include <nuttx/input/touchscreen.h> #include <nuttx/input/touchscreen.h>
#include <nuttx/input/stmpe11.h> #include <nuttx/input/stmpe811.h>
#include <arch/irq.h> #include <arch/irq.h>
@ -59,44 +59,44 @@
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
#ifdef CONFIG_INPUT_STMPE11 #ifdef CONFIG_INPUT_STMPE811
#ifndef CONFIG_INPUT #ifndef CONFIG_INPUT
# error "STMPE11 support requires CONFIG_INPUT" # error "STMPE811 support requires CONFIG_INPUT"
#endif #endif
#ifndef CONFIG_STM32_I2C1 #ifndef CONFIG_STM32_I2C1
# error "STMPE11 support requires CONFIG_STM32_I2C1" # error "STMPE811 support requires CONFIG_STM32_I2C1"
#endif #endif
#ifndef CONFIG_STMPE11_I2C #ifndef CONFIG_STMPE811_I2C
# error "Only the STMPE11 I2C interface is supported" # error "Only the STMPE811 I2C interface is supported"
#endif #endif
#ifdef CONFIG_STMPE11_SPI #ifdef CONFIG_STMPE811_SPI
# error "Only the STMPE11 SPI interface is supported" # error "Only the STMPE811 SPI interface is supported"
#endif #endif
#ifndef CONFIG_STMPE11_FREQUENCY #ifndef CONFIG_STMPE811_FREQUENCY
# define CONFIG_STMPE11_FREQUENCY 100000 # define CONFIG_STMPE811_FREQUENCY 100000
#endif #endif
#ifndef CONFIG_STMPE11_I2CDEV #ifndef CONFIG_STMPE811_I2CDEV
# define CONFIG_STMPE11_I2CDEV 1 # define CONFIG_STMPE811_I2CDEV 1
#endif #endif
#if CONFIG_STMPE11_I2CDEV != 1 #if CONFIG_STMPE811_I2CDEV != 1
# error "CONFIG_STMPE11_I2CDEV must be one" # error "CONFIG_STMPE811_I2CDEV must be one"
#endif #endif
#ifndef CONFIG_STMPE11_DEVMINOR #ifndef CONFIG_STMPE811_DEVMINOR
# define CONFIG_STMPE11_DEVMINOR 0 # define CONFIG_STMPE811_DEVMINOR 0
#endif #endif
/* Board definitions ********************************************************/ /* Board definitions ********************************************************/
/* The STM3220G-EVAL has two STMPE11QTR I/O expanders on board both connected /* The STM3220G-EVAL has two STMPE811QTR I/O expanders on board both connected
* to the STM32 via I2C1. They share a common interrupt line: PI2. * to the STM32 via I2C1. They share a common interrupt line: PI2.
* *
* STMPE11 U24, I2C address 0x41 (7-bit) * STMPE811 U24, I2C address 0x41 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -109,7 +109,7 @@
* IN1 EXP_IO11 * IN1 EXP_IO11
* IN0 EXP_IO12 * IN0 EXP_IO12
* *
* STMPE11 U29, I2C address 0x44 (7-bit) * STMPE811 U29, I2C address 0x44 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -127,16 +127,16 @@
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
struct stm32_stmpe11config_s struct stm32_stmpe811config_s
{ {
/* Configuration structure as seen by the STMPE11 driver */ /* Configuration structure as seen by the STMPE811 driver */
struct stmpe11_config_s config; struct stmpe811_config_s config;
/* Additional private definitions only known to this driver */ /* Additional private definitions only known to this driver */
STMPE11_HANDLE handle; /* The STMPE11 driver handle */ STMPE811_HANDLE handle; /* The STMPE811 driver handle */
xcpt_t handler; /* The STMPE11 interrupt handler */ xcpt_t handler; /* The STMPE811 interrupt handler */
}; };
/**************************************************************************** /****************************************************************************
@ -144,25 +144,25 @@ struct stm32_stmpe11config_s
****************************************************************************/ ****************************************************************************/
/* IRQ/GPIO access callbacks. These operations all hidden behind callbacks /* IRQ/GPIO access callbacks. These operations all hidden behind callbacks
* to isolate the STMPE11 driver from differences in GPIO * to isolate the STMPE811 driver from differences in GPIO
* interrupt handling by varying boards and MCUs.* so that contact and loss-of-contact events can be detected. * interrupt handling by varying boards and MCUs.* so that contact and loss-of-contact events can be detected.
* *
* attach - Attach the STMPE11 interrupt handler to the GPIO interrupt * attach - Attach the STMPE811 interrupt handler to the GPIO interrupt
* enable - Enable or disable the GPIO interrupt * enable - Enable or disable the GPIO interrupt
* clear - Acknowledge/clear any pending GPIO interrupt * clear - Acknowledge/clear any pending GPIO interrupt
*/ */
static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr); static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr);
static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable); static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable);
static void stmpe11_clear(FAR struct stmpe11_config_s *state); static void stmpe811_clear(FAR struct stmpe811_config_s *state);
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* A reference to a structure of this type must be passed to the STMPE11 /* A reference to a structure of this type must be passed to the STMPE811
* driver. This structure provides information about the configuration * driver. This structure provides information about the configuration
* of the STMPE11 and provides some board-specific hooks. * of the STMPE811 and provides some board-specific hooks.
* *
* Memory for this structure is provided by the caller. It is not copied * Memory for this structure is provided by the caller. It is not copied
* by the driver and is presumed to persist while the driver is active. The * by the driver and is presumed to persist while the driver is active. The
@ -170,25 +170,25 @@ static void stmpe11_clear(FAR struct stmpe11_config_s *state);
* may modify frequency or X plate resistance values. * may modify frequency or X plate resistance values.
*/ */
#ifndef CONFIG_STMPE11_TSC_DISABLE #ifndef CONFIG_STMPE811_TSC_DISABLE
static struct stm32_stmpe11config_s g_stmpe11config = static struct stm32_stmpe811config_s g_stmpe811config =
{ {
.config = .config =
{ {
#ifdef CONFIG_STMPE11_I2C #ifdef CONFIG_STMPE811_I2C
.address = STMPE11_ADDR1, .address = STMPE811_ADDR1,
#endif #endif
.frequency = CONFIG_STMPE11_FREQUENCY, .frequency = CONFIG_STMPE811_FREQUENCY,
#ifdef CONFIG_STMPE11_MULTIPLE #ifdef CONFIG_STMPE811_MULTIPLE
.irq = STM32_IRQ_EXTI2, .irq = STM32_IRQ_EXTI2,
#endif #endif
.ctrl1 = (ADC_CTRL1_SAMPLE_TIME_80 | ADC_CTRL1_MOD_12B), .ctrl1 = (ADC_CTRL1_SAMPLE_TIME_80 | ADC_CTRL1_MOD_12B),
.ctrl2 = ADC_CTRL2_ADC_FREQ_3p25, .ctrl2 = ADC_CTRL2_ADC_FREQ_3p25,
.attach = stmpe11_attach, .attach = stmpe811_attach,
.enable = stmpe11_enable, .enable = stmpe811_enable,
.clear = stmpe11_clear, .clear = stmpe811_clear,
}, },
.handler = NULL, .handler = NULL,
}; };
@ -199,17 +199,17 @@ static struct stm32_stmpe11config_s g_stmpe11config =
****************************************************************************/ ****************************************************************************/
/* IRQ/GPIO access callbacks. These operations all hidden behind /* IRQ/GPIO access callbacks. These operations all hidden behind
* callbacks to isolate the STMPE11 driver from differences in GPIO * callbacks to isolate the STMPE811 driver from differences in GPIO
* interrupt handling by varying boards and MCUs. * interrupt handling by varying boards and MCUs.
* *
* attach - Attach the STMPE11 interrupt handler to the GPIO interrupt * attach - Attach the STMPE811 interrupt handler to the GPIO interrupt
* enable - Enable or disable the GPIO interrupt * enable - Enable or disable the GPIO interrupt
* clear - Acknowledge/clear any pending GPIO interrupt * clear - Acknowledge/clear any pending GPIO interrupt
*/ */
static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr) static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr)
{ {
FAR struct stm32_stmpe11config_s *priv = (FAR struct stm32_stmpe11config_s *)state; FAR struct stm32_stmpe811config_s *priv = (FAR struct stm32_stmpe811config_s *)state;
ivdbg("Saving handler %p\n", isr); ivdbg("Saving handler %p\n", isr);
DEBUGASSERT(priv); DEBUGASSERT(priv);
@ -220,9 +220,9 @@ static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr)
return OK; return OK;
} }
static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable) static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable)
{ {
FAR struct stm32_stmpe11config_s *priv = (FAR struct stm32_stmpe11config_s *)state; FAR struct stm32_stmpe811config_s *priv = (FAR struct stm32_stmpe811config_s *)state;
irqstate_t flags; irqstate_t flags;
/* Attach and enable, or detach and disable. Enabling and disabling GPIO /* Attach and enable, or detach and disable. Enabling and disabling GPIO
@ -246,7 +246,7 @@ static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable)
irqrestore(flags); irqrestore(flags);
} }
static void stmpe11_clear(FAR struct stmpe11_config_s *state) static void stmpe811_clear(FAR struct stmpe811_config_s *state)
{ {
/* Does nothing */ /* Does nothing */
} }
@ -275,7 +275,7 @@ static void stmpe11_clear(FAR struct stmpe11_config_s *state)
int arch_tcinitialize(int minor) int arch_tcinitialize(int minor)
{ {
#ifndef CONFIG_STMPE11_TSC_DISABLE #ifndef CONFIG_STMPE811_TSC_DISABLE
FAR struct i2c_dev_s *dev; FAR struct i2c_dev_s *dev;
int ret; int ret;
@ -284,36 +284,36 @@ int arch_tcinitialize(int minor)
/* Check if we are already initialized */ /* Check if we are already initialized */
if (!g_stmpe11config.handle) if (!g_stmpe811config.handle)
{ {
ivdbg("Initializing\n"); ivdbg("Initializing\n");
/* Configure the STMPE11 interrupt pin as an input */ /* Configure the STMPE811 interrupt pin as an input */
(void)stm32_configgpio(GPIO_IO_EXPANDER); (void)stm32_configgpio(GPIO_IO_EXPANDER);
/* Get an instance of the I2C interface */ /* Get an instance of the I2C interface */
dev = up_i2cinitialize(CONFIG_STMPE11_I2CDEV); dev = up_i2cinitialize(CONFIG_STMPE811_I2CDEV);
if (!dev) if (!dev)
{ {
idbg("Failed to initialize I2C bus %d\n", CONFIG_STMPE11_I2CDEV); idbg("Failed to initialize I2C bus %d\n", CONFIG_STMPE811_I2CDEV);
return -ENODEV; return -ENODEV;
} }
/* Instantiate the STMPE11 driver */ /* Instantiate the STMPE811 driver */
g_stmpe11config.handle = g_stmpe811config.handle =
stmpe11_instantiate(dev, (FAR struct stmpe11_config_s *)&g_stmpe11config); stmpe811_instantiate(dev, (FAR struct stmpe811_config_s *)&g_stmpe811config);
if (!g_stmpe11config.handle) if (!g_stmpe811config.handle)
{ {
idbg("Failed to instantiate the STMPE11 driver\n"); idbg("Failed to instantiate the STMPE811 driver\n");
return -ENODEV; return -ENODEV;
} }
/* Initialize and register the I2C touchscreen device */ /* Initialize and register the I2C touchscreen device */
ret = stmpe11_register(g_stmpe11config.handle, CONFIG_STMPE11_DEVMINOR); ret = stmpe811_register(g_stmpe811config.handle, CONFIG_STMPE811_DEVMINOR);
if (ret < 0) if (ret < 0)
{ {
idbg("Failed to register STMPE driver: %d\n", ret); idbg("Failed to register STMPE driver: %d\n", ret);
@ -346,8 +346,8 @@ int arch_tcinitialize(int minor)
void arch_tcuninitialize(void) void arch_tcuninitialize(void)
{ {
/* No support for un-initializing the touchscreen STMPE11 device yet */ /* No support for un-initializing the touchscreen STMPE811 device yet */
} }
#endif /* CONFIG_INPUT_STMPE11 */ #endif /* CONFIG_INPUT_STMPE811 */

View File

@ -500,10 +500,10 @@ There are 4 possible SRAM configurations:
I/O Expanders I/O Expanders
============= =============
The STM3240G-EVAL has two STMPE11QTR I/O expanders on board both connected to The STM3240G-EVAL has two STMPE811QTR I/O expanders on board both connected to
the STM32 via I2C1. They share a common interrupt line: PI2. the STM32 via I2C1. They share a common interrupt line: PI2.
STMPE11 U24, I2C address 0x41 (7-bit) STMPE811 U24, I2C address 0x41 (7-bit)
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------
STPE11 PIN BOARD SIGNAL BOARD CONNECTION STPE11 PIN BOARD SIGNAL BOARD CONNECTION
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------
@ -516,7 +516,7 @@ STPE11 PIN BOARD SIGNAL BOARD CONNECTION
IN1 EXP_IO11 IN1 EXP_IO11
IN0 EXP_IO12 IN0 EXP_IO12
STMPE11 U29, I2C address 0x44 (7-bit) STMPE811 U29, I2C address 0x44 (7-bit)
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------
STPE11 PIN BOARD SIGNAL BOARD CONNECTION STPE11 PIN BOARD SIGNAL BOARD CONNECTION
------ ---- ---------------- -------------------------------------------- ------ ---- ---------------- --------------------------------------------

View File

@ -80,7 +80,7 @@ ifeq ($(CONFIG_WATCHDOG),y)
CONFIGURED_APPS += examples/watchdog CONFIGURED_APPS += examples/watchdog
endif endif
ifeq ($(CONFIG_INPUT_STMPE11),y) ifeq ($(CONFIG_INPUT_STMPE811),y)
CONFIGURED_APPS += examples/touchscreen CONFIGURED_APPS += examples/touchscreen
endif endif

View File

@ -954,66 +954,66 @@ CONFIG_INPUT=n
CONFIG_INPUT_TSC2007=n CONFIG_INPUT_TSC2007=n
# #
# STMPE11 input device configuration # STMPE811 input device configuration
# #
# Prerequisites: CONFIG_INPUT=y # Prerequisites: CONFIG_INPUT=y
# Other settings that effect the driver: CONFIG_DISABLE_POLL # Other settings that effect the driver: CONFIG_DISABLE_POLL
# #
# CONFIG_INPUT_STMPE11 # CONFIG_INPUT_STMPE811
# Enables support for the STMPE11 driver (Needs CONFIG_INPUT) # Enables support for the STMPE811 driver (Needs CONFIG_INPUT)
# CONFIG_STMPE11_SPI # CONFIG_STMPE811_SPI
# Enables support for the SPI interface (not currenly supported) # Enables support for the SPI interface (not currenly supported)
# CONFIG_STMPE11_I2C # CONFIG_STMPE811_I2C
# Enables support for the I2C interface # Enables support for the I2C interface
# CONFIG_STMPE11_MULTIPLE # CONFIG_STMPE811_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board. # Can be defined to support multiple STMPE811 devices on board.
# CONFIG_STMPE11_ACTIVELOW # CONFIG_STMPE811_ACTIVELOW
# Interrupt is generated by an active low signal (or falling edge). # Interrupt is generated by an active low signal (or falling edge).
# CONFIG_STMPE11_EDGE # CONFIG_STMPE811_EDGE
# Interrupt is generated on an edge (vs. on the active level) # Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS # CONFIG_STMPE811_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if # Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set). # CONFIG_DISABLE_POLL is set).
# CONFIG_STMPE11_TSC_DISABLE # CONFIG_STMPE811_TSC_DISABLE
# Disable driver touchscreen functionality. # Disable driver touchscreen functionality.
# CONFIG_STMPE11_ADC_DISABLE # CONFIG_STMPE811_ADC_DISABLE
# Disable driver ADC functionality. # Disable driver ADC functionality.
# CONFIG_STMPE11_GPIO_DISABLE # CONFIG_STMPE811_GPIO_DISABLE
# Disable driver GPIO functionality. # Disable driver GPIO functionality.
# CONFIG_STMPE11_GPIOINT_DISABLE # CONFIG_STMPE811_GPIOINT_DISABLE
# Disable driver GPIO interrupt functionality (ignored if GPIO functionality is # Disable driver GPIO interrupt functionality (ignored if GPIO functionality is
# disabled). # disabled).
# CONFIG_STMPE11_SWAPXY # CONFIG_STMPE811_SWAPXY
# Reverse the meaning of X and Y to handle different LCD orientations. # Reverse the meaning of X and Y to handle different LCD orientations.
# For the STM3240G-EVAL, X and Y should be swapped in PORTRAIT modes # For the STM3240G-EVAL, X and Y should be swapped in PORTRAIT modes
# CONFIG_STMPE11_TEMP_DISABLE # CONFIG_STMPE811_TEMP_DISABLE
# Disable driver temperature sensor functionality. # Disable driver temperature sensor functionality.
# CONFIG_STMPE11_REGDBUG # CONFIG_STMPE811_REGDBUG
# Enabled very low register-level debug output. Requires CONFIG_DEBUG. # Enabled very low register-level debug output. Requires CONFIG_DEBUG.
# CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY # CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
# STMPE11 touchscreen data comes in a a very high rate. New touch positions # STMPE811 touchscreen data comes in a a very high rate. New touch positions
# will only be reported when the X or Y data changes by these thresholds. # will only be reported when the X or Y data changes by these thresholds.
# This trades reduces data rate for some loss in dragging accuracy. The # This trades reduces data rate for some loss in dragging accuracy. The
# STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So # STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
# for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 # for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
# would correspond to one pixel. Default: 12 # would correspond to one pixel. Default: 12
# #
CONFIG_INPUT_STMPE11=n CONFIG_INPUT_STMPE811=n
CONFIG_STMPE11_SPI=n CONFIG_STMPE811_SPI=n
CONFIG_STMPE11_I2C=y CONFIG_STMPE811_I2C=y
CONFIG_STMPE11_MULTIPLE=y CONFIG_STMPE811_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y CONFIG_STMPE811_ACTIVELOW=y
CONFIG_STMPE11_EDGE=y CONFIG_STMPE811_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS #CONFIG_STMPE811_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n CONFIG_STMPE811_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y CONFIG_STMPE811_ADC_DISABLE=y
CONFIG_STMPE11_GPIO_DISABLE=y CONFIG_STMPE811_GPIO_DISABLE=y
CONFIG_STMPE11_GPIOINT_DISABLE=y CONFIG_STMPE811_GPIOINT_DISABLE=y
CONFIG_STMPE11_SWAPXY=y CONFIG_STMPE811_SWAPXY=y
CONFIG_STMPE11_TEMP_DISABLE=y CONFIG_STMPE811_TEMP_DISABLE=y
CONFIG_STMPE11_REGDEBUG=n CONFIG_STMPE811_REGDEBUG=n
CONFIG_STMPE11_THRESHX=26 CONFIG_STMPE811_THRESHX=26
CONFIG_STMPE11_THRESHY=34 CONFIG_STMPE811_THRESHY=34
# #
# USB Device Configuration # USB Device Configuration

View File

@ -956,66 +956,66 @@ CONFIG_INPUT=y
CONFIG_INPUT_TSC2007=n CONFIG_INPUT_TSC2007=n
# #
# STMPE11 input device configuration # STMPE811 input device configuration
# #
# Prerequisites: CONFIG_INPUT=y # Prerequisites: CONFIG_INPUT=y
# Other settings that effect the driver: CONFIG_DISABLE_POLL # Other settings that effect the driver: CONFIG_DISABLE_POLL
# #
# CONFIG_INPUT_STMPE11 # CONFIG_INPUT_STMPE811
# Enables support for the STMPE11 driver (Needs CONFIG_INPUT) # Enables support for the STMPE811 driver (Needs CONFIG_INPUT)
# CONFIG_STMPE11_SPI # CONFIG_STMPE811_SPI
# Enables support for the SPI interface (not currenly supported) # Enables support for the SPI interface (not currenly supported)
# CONFIG_STMPE11_I2C # CONFIG_STMPE811_I2C
# Enables support for the I2C interface # Enables support for the I2C interface
# CONFIG_STMPE11_MULTIPLE # CONFIG_STMPE811_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board. # Can be defined to support multiple STMPE811 devices on board.
# CONFIG_STMPE11_ACTIVELOW # CONFIG_STMPE811_ACTIVELOW
# Interrupt is generated by an active low signal (or falling edge). # Interrupt is generated by an active low signal (or falling edge).
# CONFIG_STMPE11_EDGE # CONFIG_STMPE811_EDGE
# Interrupt is generated on an edge (vs. on the active level) # Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS # CONFIG_STMPE811_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if # Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set). # CONFIG_DISABLE_POLL is set).
# CONFIG_STMPE11_TSC_DISABLE # CONFIG_STMPE811_TSC_DISABLE
# Disable driver touchscreen functionality. # Disable driver touchscreen functionality.
# CONFIG_STMPE11_ADC_DISABLE # CONFIG_STMPE811_ADC_DISABLE
# Disable driver ADC functionality. # Disable driver ADC functionality.
# CONFIG_STMPE11_GPIO_DISABLE # CONFIG_STMPE811_GPIO_DISABLE
# Disable driver GPIO functionality. # Disable driver GPIO functionality.
# CONFIG_STMPE11_GPIOINT_DISABLE # CONFIG_STMPE811_GPIOINT_DISABLE
# Disable driver GPIO interrupt functionality (ignored if GPIO functionality is # Disable driver GPIO interrupt functionality (ignored if GPIO functionality is
# disabled). # disabled).
# CONFIG_STMPE11_SWAPXY # CONFIG_STMPE811_SWAPXY
# Reverse the meaning of X and Y to handle different LCD orientations. # Reverse the meaning of X and Y to handle different LCD orientations.
# For the STM3240G-EVAL, X and Y should be swapped in PORTRAIT modes # For the STM3240G-EVAL, X and Y should be swapped in PORTRAIT modes
# CONFIG_STMPE11_TEMP_DISABLE # CONFIG_STMPE811_TEMP_DISABLE
# Disable driver temperature sensor functionality. # Disable driver temperature sensor functionality.
# CONFIG_STMPE11_REGDBUG # CONFIG_STMPE811_REGDBUG
# Enabled very low register-level debug output. Requires CONFIG_DEBUG. # Enabled very low register-level debug output. Requires CONFIG_DEBUG.
# CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY # CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
# STMPE11 touchscreen data comes in a a very high rate. New touch positions # STMPE811 touchscreen data comes in a a very high rate. New touch positions
# will only be reported when the X or Y data changes by these thresholds. # will only be reported when the X or Y data changes by these thresholds.
# This trades reduces data rate for some loss in dragging accuracy. The # This trades reduces data rate for some loss in dragging accuracy. The
# STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So # STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
# for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 # for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
# would correspond to one pixel. Default: 12 # would correspond to one pixel. Default: 12
# #
CONFIG_INPUT_STMPE11=y CONFIG_INPUT_STMPE811=y
CONFIG_STMPE11_SPI=n CONFIG_STMPE811_SPI=n
CONFIG_STMPE11_I2C=y CONFIG_STMPE811_I2C=y
CONFIG_STMPE11_MULTIPLE=y CONFIG_STMPE811_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y CONFIG_STMPE811_ACTIVELOW=y
CONFIG_STMPE11_EDGE=y CONFIG_STMPE811_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS #CONFIG_STMPE811_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n CONFIG_STMPE811_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y CONFIG_STMPE811_ADC_DISABLE=y
CONFIG_STMPE11_GPIO_DISABLE=y CONFIG_STMPE811_GPIO_DISABLE=y
CONFIG_STMPE11_GPIOINT_DISABLE=y CONFIG_STMPE811_GPIOINT_DISABLE=y
CONFIG_STMPE11_SWAPXY=n CONFIG_STMPE811_SWAPXY=n
CONFIG_STMPE11_TEMP_DISABLE=y CONFIG_STMPE811_TEMP_DISABLE=y
CONFIG_STMPE11_REGDEBUG=n CONFIG_STMPE811_REGDEBUG=n
CONFIG_STMPE11_THRESHX=39 CONFIG_STMPE811_THRESHX=39
CONFIG_STMPE11_THRESHY=51 CONFIG_STMPE811_THRESHY=51
# #
# USB Device Configuration # USB Device Configuration

View File

@ -88,8 +88,8 @@ ifeq ($(CONFIG_WATCHDOG),y)
CSRCS += up_watchdog.c CSRCS += up_watchdog.c
endif endif
ifeq ($(CONFIG_INPUT_STMPE11),y) ifeq ($(CONFIG_INPUT_STMPE811),y)
CSRCS += up_stmpe11.c CSRCS += up_stmpe811.c
endif endif
COBJS = $(CSRCS:.c=$(OBJEXT)) COBJS = $(CSRCS:.c=$(OBJEXT))

View File

@ -138,10 +138,10 @@
#define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN5) #define GPIO_OTGFS_PWRON (GPIO_OUTPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTH|GPIO_PIN5)
#define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN11) #define GPIO_OTGFS_OVER (GPIO_INPUT|GPIO_FLOAT|GPIO_SPEED_100MHz|GPIO_PUSHPULL|GPIO_PORTF|GPIO_PIN11)
/* The STM3240G-EVAL has two STMPE11QTR I/O expanders on board both connected /* The STM3240G-EVAL has two STMPE811QTR I/O expanders on board both connected
* to the STM32 via I2C1. They share a common interrupt line: PI2. * to the STM32 via I2C1. They share a common interrupt line: PI2.
* *
* STMPE11 U24, I2C address 0x41 (7-bit) * STMPE811 U24, I2C address 0x41 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -154,7 +154,7 @@
* IN1 EXP_IO11 * IN1 EXP_IO11
* IN0 EXP_IO12 * IN0 EXP_IO12
* *
* STMPE11 U29, I2C address 0x44 (7-bit) * STMPE811 U29, I2C address 0x44 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -168,8 +168,8 @@
* IN0 EXP_IO8 * IN0 EXP_IO8
*/ */
#define STMPE11_ADDR1 0x41 #define STMPE811_ADDR1 0x41
#define STMPE11_ADDR2 0x44 #define STMPE811_ADDR2 0x44
#define GPIO_IO_EXPANDER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTI|GPIO_PIN2) #define GPIO_IO_EXPANDER (GPIO_INPUT|GPIO_FLOAT|GPIO_EXTI|GPIO_PORTI|GPIO_PIN2)

View File

@ -47,7 +47,7 @@
#include <nuttx/i2c.h> #include <nuttx/i2c.h>
#include <nuttx/input/touchscreen.h> #include <nuttx/input/touchscreen.h>
#include <nuttx/input/stmpe11.h> #include <nuttx/input/stmpe811.h>
#include <arch/irq.h> #include <arch/irq.h>
@ -59,44 +59,44 @@
****************************************************************************/ ****************************************************************************/
/* Configuration ************************************************************/ /* Configuration ************************************************************/
#ifdef CONFIG_INPUT_STMPE11 #ifdef CONFIG_INPUT_STMPE811
#ifndef CONFIG_INPUT #ifndef CONFIG_INPUT
# error "STMPE11 support requires CONFIG_INPUT" # error "STMPE811 support requires CONFIG_INPUT"
#endif #endif
#ifndef CONFIG_STM32_I2C1 #ifndef CONFIG_STM32_I2C1
# error "STMPE11 support requires CONFIG_STM32_I2C1" # error "STMPE811 support requires CONFIG_STM32_I2C1"
#endif #endif
#ifndef CONFIG_STMPE11_I2C #ifndef CONFIG_STMPE811_I2C
# error "Only the STMPE11 I2C interface is supported" # error "Only the STMPE811 I2C interface is supported"
#endif #endif
#ifdef CONFIG_STMPE11_SPI #ifdef CONFIG_STMPE811_SPI
# error "Only the STMPE11 SPI interface is supported" # error "Only the STMPE811 SPI interface is supported"
#endif #endif
#ifndef CONFIG_STMPE11_FREQUENCY #ifndef CONFIG_STMPE811_FREQUENCY
# define CONFIG_STMPE11_FREQUENCY 100000 # define CONFIG_STMPE811_FREQUENCY 100000
#endif #endif
#ifndef CONFIG_STMPE11_I2CDEV #ifndef CONFIG_STMPE811_I2CDEV
# define CONFIG_STMPE11_I2CDEV 1 # define CONFIG_STMPE811_I2CDEV 1
#endif #endif
#if CONFIG_STMPE11_I2CDEV != 1 #if CONFIG_STMPE811_I2CDEV != 1
# error "CONFIG_STMPE11_I2CDEV must be one" # error "CONFIG_STMPE811_I2CDEV must be one"
#endif #endif
#ifndef CONFIG_STMPE11_DEVMINOR #ifndef CONFIG_STMPE811_DEVMINOR
# define CONFIG_STMPE11_DEVMINOR 0 # define CONFIG_STMPE811_DEVMINOR 0
#endif #endif
/* Board definitions ********************************************************/ /* Board definitions ********************************************************/
/* The STM3240G-EVAL has two STMPE11QTR I/O expanders on board both connected /* The STM3240G-EVAL has two STMPE811QTR I/O expanders on board both connected
* to the STM32 via I2C1. They share a common interrupt line: PI2. * to the STM32 via I2C1. They share a common interrupt line: PI2.
* *
* STMPE11 U24, I2C address 0x41 (7-bit) * STMPE811 U24, I2C address 0x41 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -109,7 +109,7 @@
* IN1 EXP_IO11 * IN1 EXP_IO11
* IN0 EXP_IO12 * IN0 EXP_IO12
* *
* STMPE11 U29, I2C address 0x44 (7-bit) * STMPE811 U29, I2C address 0x44 (7-bit)
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
* STPE11 PIN BOARD SIGNAL BOARD CONNECTION * STPE11 PIN BOARD SIGNAL BOARD CONNECTION
* ------ ---- ---------------- -------------------------------------------- * ------ ---- ---------------- --------------------------------------------
@ -127,16 +127,16 @@
* Private Types * Private Types
****************************************************************************/ ****************************************************************************/
struct stm32_stmpe11config_s struct stm32_stmpe811config_s
{ {
/* Configuration structure as seen by the STMPE11 driver */ /* Configuration structure as seen by the STMPE811 driver */
struct stmpe11_config_s config; struct stmpe811_config_s config;
/* Additional private definitions only known to this driver */ /* Additional private definitions only known to this driver */
STMPE11_HANDLE handle; /* The STMPE11 driver handle */ STMPE811_HANDLE handle; /* The STMPE811 driver handle */
xcpt_t handler; /* The STMPE11 interrupt handler */ xcpt_t handler; /* The STMPE811 interrupt handler */
}; };
/**************************************************************************** /****************************************************************************
@ -144,25 +144,25 @@ struct stm32_stmpe11config_s
****************************************************************************/ ****************************************************************************/
/* IRQ/GPIO access callbacks. These operations all hidden behind callbacks /* IRQ/GPIO access callbacks. These operations all hidden behind callbacks
* to isolate the STMPE11 driver from differences in GPIO * to isolate the STMPE811 driver from differences in GPIO
* interrupt handling by varying boards and MCUs.* so that contact and loss-of-contact events can be detected. * interrupt handling by varying boards and MCUs.* so that contact and loss-of-contact events can be detected.
* *
* attach - Attach the STMPE11 interrupt handler to the GPIO interrupt * attach - Attach the STMPE811 interrupt handler to the GPIO interrupt
* enable - Enable or disable the GPIO interrupt * enable - Enable or disable the GPIO interrupt
* clear - Acknowledge/clear any pending GPIO interrupt * clear - Acknowledge/clear any pending GPIO interrupt
*/ */
static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr); static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr);
static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable); static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable);
static void stmpe11_clear(FAR struct stmpe11_config_s *state); static void stmpe811_clear(FAR struct stmpe811_config_s *state);
/**************************************************************************** /****************************************************************************
* Private Data * Private Data
****************************************************************************/ ****************************************************************************/
/* A reference to a structure of this type must be passed to the STMPE11 /* A reference to a structure of this type must be passed to the STMPE811
* driver. This structure provides information about the configuration * driver. This structure provides information about the configuration
* of the STMPE11 and provides some board-specific hooks. * of the STMPE811 and provides some board-specific hooks.
* *
* Memory for this structure is provided by the caller. It is not copied * Memory for this structure is provided by the caller. It is not copied
* by the driver and is presumed to persist while the driver is active. The * by the driver and is presumed to persist while the driver is active. The
@ -170,25 +170,25 @@ static void stmpe11_clear(FAR struct stmpe11_config_s *state);
* may modify frequency or X plate resistance values. * may modify frequency or X plate resistance values.
*/ */
#ifndef CONFIG_STMPE11_TSC_DISABLE #ifndef CONFIG_STMPE811_TSC_DISABLE
static struct stm32_stmpe11config_s g_stmpe11config = static struct stm32_stmpe811config_s g_stmpe811config =
{ {
.config = .config =
{ {
#ifdef CONFIG_STMPE11_I2C #ifdef CONFIG_STMPE811_I2C
.address = STMPE11_ADDR1, .address = STMPE811_ADDR1,
#endif #endif
.frequency = CONFIG_STMPE11_FREQUENCY, .frequency = CONFIG_STMPE811_FREQUENCY,
#ifdef CONFIG_STMPE11_MULTIPLE #ifdef CONFIG_STMPE811_MULTIPLE
.irq = STM32_IRQ_EXTI2, .irq = STM32_IRQ_EXTI2,
#endif #endif
.ctrl1 = (ADC_CTRL1_SAMPLE_TIME_80 | ADC_CTRL1_MOD_12B), .ctrl1 = (ADC_CTRL1_SAMPLE_TIME_80 | ADC_CTRL1_MOD_12B),
.ctrl2 = ADC_CTRL2_ADC_FREQ_3p25, .ctrl2 = ADC_CTRL2_ADC_FREQ_3p25,
.attach = stmpe11_attach, .attach = stmpe811_attach,
.enable = stmpe11_enable, .enable = stmpe811_enable,
.clear = stmpe11_clear, .clear = stmpe811_clear,
}, },
.handler = NULL, .handler = NULL,
}; };
@ -199,17 +199,17 @@ static struct stm32_stmpe11config_s g_stmpe11config =
****************************************************************************/ ****************************************************************************/
/* IRQ/GPIO access callbacks. These operations all hidden behind /* IRQ/GPIO access callbacks. These operations all hidden behind
* callbacks to isolate the STMPE11 driver from differences in GPIO * callbacks to isolate the STMPE811 driver from differences in GPIO
* interrupt handling by varying boards and MCUs. * interrupt handling by varying boards and MCUs.
* *
* attach - Attach the STMPE11 interrupt handler to the GPIO interrupt * attach - Attach the STMPE811 interrupt handler to the GPIO interrupt
* enable - Enable or disable the GPIO interrupt * enable - Enable or disable the GPIO interrupt
* clear - Acknowledge/clear any pending GPIO interrupt * clear - Acknowledge/clear any pending GPIO interrupt
*/ */
static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr) static int stmpe811_attach(FAR struct stmpe811_config_s *state, xcpt_t isr)
{ {
FAR struct stm32_stmpe11config_s *priv = (FAR struct stm32_stmpe11config_s *)state; FAR struct stm32_stmpe811config_s *priv = (FAR struct stm32_stmpe811config_s *)state;
ivdbg("Saving handler %p\n", isr); ivdbg("Saving handler %p\n", isr);
DEBUGASSERT(priv); DEBUGASSERT(priv);
@ -220,9 +220,9 @@ static int stmpe11_attach(FAR struct stmpe11_config_s *state, xcpt_t isr)
return OK; return OK;
} }
static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable) static void stmpe811_enable(FAR struct stmpe811_config_s *state, bool enable)
{ {
FAR struct stm32_stmpe11config_s *priv = (FAR struct stm32_stmpe11config_s *)state; FAR struct stm32_stmpe811config_s *priv = (FAR struct stm32_stmpe811config_s *)state;
irqstate_t flags; irqstate_t flags;
/* Attach and enable, or detach and disable. Enabling and disabling GPIO /* Attach and enable, or detach and disable. Enabling and disabling GPIO
@ -246,7 +246,7 @@ static void stmpe11_enable(FAR struct stmpe11_config_s *state, bool enable)
irqrestore(flags); irqrestore(flags);
} }
static void stmpe11_clear(FAR struct stmpe11_config_s *state) static void stmpe811_clear(FAR struct stmpe811_config_s *state)
{ {
/* Does nothing */ /* Does nothing */
} }
@ -275,7 +275,7 @@ static void stmpe11_clear(FAR struct stmpe11_config_s *state)
int arch_tcinitialize(int minor) int arch_tcinitialize(int minor)
{ {
#ifndef CONFIG_STMPE11_TSC_DISABLE #ifndef CONFIG_STMPE811_TSC_DISABLE
FAR struct i2c_dev_s *dev; FAR struct i2c_dev_s *dev;
int ret; int ret;
@ -284,36 +284,36 @@ int arch_tcinitialize(int minor)
/* Check if we are already initialized */ /* Check if we are already initialized */
if (!g_stmpe11config.handle) if (!g_stmpe811config.handle)
{ {
ivdbg("Initializing\n"); ivdbg("Initializing\n");
/* Configure the STMPE11 interrupt pin as an input */ /* Configure the STMPE811 interrupt pin as an input */
(void)stm32_configgpio(GPIO_IO_EXPANDER); (void)stm32_configgpio(GPIO_IO_EXPANDER);
/* Get an instance of the I2C interface */ /* Get an instance of the I2C interface */
dev = up_i2cinitialize(CONFIG_STMPE11_I2CDEV); dev = up_i2cinitialize(CONFIG_STMPE811_I2CDEV);
if (!dev) if (!dev)
{ {
idbg("Failed to initialize I2C bus %d\n", CONFIG_STMPE11_I2CDEV); idbg("Failed to initialize I2C bus %d\n", CONFIG_STMPE811_I2CDEV);
return -ENODEV; return -ENODEV;
} }
/* Instantiate the STMPE11 driver */ /* Instantiate the STMPE811 driver */
g_stmpe11config.handle = g_stmpe811config.handle =
stmpe11_instantiate(dev, (FAR struct stmpe11_config_s *)&g_stmpe11config); stmpe811_instantiate(dev, (FAR struct stmpe811_config_s *)&g_stmpe811config);
if (!g_stmpe11config.handle) if (!g_stmpe811config.handle)
{ {
idbg("Failed to instantiate the STMPE11 driver\n"); idbg("Failed to instantiate the STMPE811 driver\n");
return -ENODEV; return -ENODEV;
} }
/* Initialize and register the I2C touchscreen device */ /* Initialize and register the I2C touchscreen device */
ret = stmpe11_register(g_stmpe11config.handle, CONFIG_STMPE11_DEVMINOR); ret = stmpe811_register(g_stmpe811config.handle, CONFIG_STMPE811_DEVMINOR);
if (ret < 0) if (ret < 0)
{ {
idbg("Failed to register STMPE driver: %d\n", ret); idbg("Failed to register STMPE driver: %d\n", ret);
@ -346,8 +346,8 @@ int arch_tcinitialize(int minor)
void arch_tcuninitialize(void) void arch_tcuninitialize(void)
{ {
/* No support for un-initializing the touchscreen STMPE11 device yet */ /* No support for un-initializing the touchscreen STMPE811 device yet */
} }
#endif /* CONFIG_INPUT_STMPE11 */ #endif /* CONFIG_INPUT_STMPE811 */

View File

@ -47,19 +47,19 @@ ifeq ($(CONFIG_INPUT_ADS7843E),y)
CSRCS += ads7843e.c CSRCS += ads7843e.c
endif endif
ifeq ($(CONFIG_INPUT_STMPE11),y) ifeq ($(CONFIG_INPUT_STMPE811),y)
CSRCS += stmpe11_base.c CSRCS += stmpe811_base.c
ifneq ($(CONFIG_INPUT_STMPE11_TSC_DISABLE),y) ifneq ($(CONFIG_INPUT_STMPE811_TSC_DISABLE),y)
CSRCS += stmpe11_tsc.c CSRCS += stmpe811_tsc.c
endif endif
ifneq ($(CONFIG_INPUT_STMPE11_GPIO_DISABLE),y) ifneq ($(CONFIG_INPUT_STMPE811_GPIO_DISABLE),y)
CSRCS += stmpe11_gpio.c CSRCS += stmpe811_gpio.c
endif endif
ifneq ($(CONFIG_INPUT_STMPE11_ADC_DISABLE),y) ifneq ($(CONFIG_INPUT_STMPE811_ADC_DISABLE),y)
CSRCS += stmpe11_adc.c CSRCS += stmpe811_adc.c
endif endif
ifneq ($(CONFIG_INPUT_STMPE11_TEMP_DISABLE),y) ifneq ($(CONFIG_INPUT_STMPE811_TEMP_DISABLE),y)
CSRCS += stmpe11_temp.c CSRCS += stmpe811_temp.c
endif endif
endif endif

View File

@ -1,5 +1,5 @@
/******************************************************************************************** /********************************************************************************************
* include/nuttx/input/stmpe11.h * include/nuttx/input/stmpe811.h
* *
* Copyright (C) 2012 Gregory Nutt. All rights reserved. * Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org> * Author: Gregory Nutt <gnutt@nuttx.org>
@ -37,8 +37,8 @@
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef __INCLUDE_NUTTX_INPUT_STMPE11_H #ifndef __INCLUDE_NUTTX_INPUT_STMPE811_H
#define __INCLUDE_NUTTX_INPUT_STMPE11_H #define __INCLUDE_NUTTX_INPUT_STMPE811_H
/******************************************************************************************** /********************************************************************************************
* Included Files * Included Files
@ -51,7 +51,7 @@
#include <nuttx/irq.h> #include <nuttx/irq.h>
#if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_STMPE11) #if defined(CONFIG_INPUT) && defined(CONFIG_INPUT_STMPE811)
/******************************************************************************************** /********************************************************************************************
* Pre-Processor Definitions * Pre-Processor Definitions
@ -60,37 +60,37 @@
/* Prerequisites: CONFIG_INPUT=y /* Prerequisites: CONFIG_INPUT=y
* Other settings that effect the driver: CONFIG_DISABLE_POLL * Other settings that effect the driver: CONFIG_DISABLE_POLL
* *
* CONFIG_INPUT_STMPE11 * CONFIG_INPUT_STMPE811
* Enables support for the STMPE11 driver (Needs CONFIG_INPUT) * Enables support for the STMPE811 driver (Needs CONFIG_INPUT)
* CONFIG_STMPE11_SPI * CONFIG_STMPE811_SPI
* Enables support for the SPI interface (not currenly supported) * Enables support for the SPI interface (not currenly supported)
* CONFIG_STMPE11_I2C * CONFIG_STMPE811_I2C
* Enables support for the I2C interface * Enables support for the I2C interface
* CONFIG_STMPE11_MULTIPLE * CONFIG_STMPE811_MULTIPLE
* Can be defined to support multiple STMPE11 devices on board. * Can be defined to support multiple STMPE811 devices on board.
* CONFIG_STMPE11_NPOLLWAITERS * CONFIG_STMPE811_NPOLLWAITERS
* Maximum number of threads that can be waiting on poll() (ignored if * Maximum number of threads that can be waiting on poll() (ignored if
* CONFIG_DISABLE_POLL is set). * CONFIG_DISABLE_POLL is set).
* CONFIG_STMPE11_TSC_DISABLE * CONFIG_STMPE811_TSC_DISABLE
* Disable driver touchscreen functionality. * Disable driver touchscreen functionality.
* CONFIG_STMPE11_ADC_DISABLE * CONFIG_STMPE811_ADC_DISABLE
* Disable driver ADC functionality. * Disable driver ADC functionality.
* CONFIG_STMPE11_GPIO_DISABLE * CONFIG_STMPE811_GPIO_DISABLE
* Disable driver GPIO functionality. * Disable driver GPIO functionality.
* CONFIG_STMPE11_GPIOINT_DISABLE * CONFIG_STMPE811_GPIOINT_DISABLE
* Disable driver GPIO interrupt functionlality (ignored if GPIO functionality is * Disable driver GPIO interrupt functionlality (ignored if GPIO functionality is
* disabled). * disabled).
* CONFIG_STMPE11_SWAPXY * CONFIG_STMPE811_SWAPXY
* Reverse the meaning of X and Y to handle different LCD orientations. * Reverse the meaning of X and Y to handle different LCD orientations.
* CONFIG_STMPE11_TEMP_DISABLE * CONFIG_STMPE811_TEMP_DISABLE
* Disable driver temperature sensor functionality. * Disable driver temperature sensor functionality.
* CONFIG_STMPE11_REGDEBUG * CONFIG_STMPE811_REGDEBUG
* Enabled very low register-level debug output. Requires CONFIG_DEBUG. * Enabled very low register-level debug output. Requires CONFIG_DEBUG.
* CONFIG_STMPE11_THRESHX and CONFIG_STMPE11_THRESHY * CONFIG_STMPE811_THRESHX and CONFIG_STMPE811_THRESHY
* STMPE11 touchscreen data comes in a a very high rate. New touch positions * STMPE811 touchscreen data comes in a a very high rate. New touch positions
* will only be reported when the X or Y data changes by these thresholds. * will only be reported when the X or Y data changes by these thresholds.
* This trades reduces data rate for some loss in dragging accuracy. The * This trades reduces data rate for some loss in dragging accuracy. The
* STMPE11 is configure for 12-bit values so the raw ranges are 0-4095. So * STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
* for example, if your display is 320x240, then THRESHX=13 and THRESHY=17 * for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
* would correspond to one pixel. Default: 12 * would correspond to one pixel. Default: 12
*/ */
@ -99,25 +99,25 @@
* allows the selection of interface protocol at reset state. * allows the selection of interface protocol at reset state.
*/ */
#if !defined(CONFIG_STMPE11_SPI) && !defined(CONFIG_STMPE11_I2C) #if !defined(CONFIG_STMPE811_SPI) && !defined(CONFIG_STMPE811_I2C)
# error "One of CONFIG_STMPE11_SPI or CONFIG_STMPE11_I2C must be defined" # error "One of CONFIG_STMPE811_SPI or CONFIG_STMPE811_I2C must be defined"
#endif #endif
#if defined(CONFIG_STMPE11_SPI) && defined(CONFIG_STMPE11_I2C) #if defined(CONFIG_STMPE811_SPI) && defined(CONFIG_STMPE811_I2C)
# error "Only one of CONFIG_STMPE11_SPI or CONFIG_STMPE11_I2C can be defined" # error "Only one of CONFIG_STMPE811_SPI or CONFIG_STMPE811_I2C can be defined"
#endif #endif
/* Maximum number of threads than can be waiting for POLL events */ /* Maximum number of threads than can be waiting for POLL events */
#ifndef CONFIG_STMPE11_NPOLLWAITERS #ifndef CONFIG_STMPE811_NPOLLWAITERS
# define CONFIG_STMPE11_NPOLLWAITERS 2 # define CONFIG_STMPE811_NPOLLWAITERS 2
#endif #endif
/* Check for some required settings. This can save the user a lot of time /* Check for some required settings. This can save the user a lot of time
* in getting the right configuration. * in getting the right configuration.
*/ */
#ifdef CONFIG_STMPE11_I2C #ifdef CONFIG_STMPE811_I2C
# ifndef CONFIG_I2C # ifndef CONFIG_I2C
# error "CONFIG_I2C is required in the I2C support" # error "CONFIG_I2C is required in the I2C support"
# endif # endif
@ -136,100 +136,100 @@
/* Thresholds */ /* Thresholds */
#ifndef CONFIG_STMPE11_THRESHX #ifndef CONFIG_STMPE811_THRESHX
# define CONFIG_STMPE11_THRESHX 12 # define CONFIG_STMPE811_THRESHX 12
#endif #endif
#ifndef CONFIG_STMPE11_THRESHY #ifndef CONFIG_STMPE811_THRESHY
# define CONFIG_STMPE11_THRESHY 12 # define CONFIG_STMPE811_THRESHY 12
#endif #endif
/* Debug output */ /* Debug output */
#ifndef CONFIG_DEBUG #ifndef CONFIG_DEBUG
# undef CONFIG_STMPE11_REGDEBUG # undef CONFIG_STMPE811_REGDEBUG
#endif #endif
/* I2C **************************************************************************************/ /* I2C **************************************************************************************/
/* STMPE11 Address: The STMPE11 may have 7-bit address 0x41 or 0x44, depending upon the /* STMPE811 Address: The STMPE811 may have 7-bit address 0x41 or 0x44, depending upon the
* state of the ADDR0 pin. * state of the ADDR0 pin.
*/ */
#define STMPE11_I2C_ADDRESS_MASK (0x78) /* Bits 3-7: Invariant part of STMPE11 address */ #define STMPE811_I2C_ADDRESS_MASK (0x78) /* Bits 3-7: Invariant part of STMPE811 address */
#define STMPE11_I2C_ADDRESS (0x40) /* Bits 3-7: Always set at '0100 0xxR' */ #define STMPE811_I2C_ADDRESS (0x40) /* Bits 3-7: Always set at '0100 0xxR' */
#define STMPE11_I2C_A1 (1 << 2) /* Bit 2: A1 */ #define STMPE811_I2C_A1 (1 << 2) /* Bit 2: A1 */
#define STMPE11_I2C_A0 (1 << 1) /* Bit 1: A0 */ #define STMPE811_I2C_A0 (1 << 1) /* Bit 1: A0 */
#define STMPE11_I2C_READ (1 << 0) /* Bit 0=1: Selects read operation */ #define STMPE811_I2C_READ (1 << 0) /* Bit 0=1: Selects read operation */
#define STMPE11_I2C_WRITE (0) /* Bit 0=0: Selects write operation */ #define STMPE811_I2C_WRITE (0) /* Bit 0=0: Selects write operation */
/* I2C frequency */ /* I2C frequency */
#define STMPE11_I2C_MAXFREQUENCY 400000 /* 400KHz */ #define STMPE811_I2C_MAXFREQUENCY 400000 /* 400KHz */
/* SPI **************************************************************************************/ /* SPI **************************************************************************************/
/* The device always operates in mode 0 */ /* The device always operates in mode 0 */
#define STMPE11_SPI_MODE SPIDEV_MODE0 /* Mode 0 */ #define STMPE811_SPI_MODE SPIDEV_MODE0 /* Mode 0 */
/* I2C frequency */ /* I2C frequency */
#define STMPE11_SPI_MAXFREQUENCY 1000000 /* 1MHz */ #define STMPE811_SPI_MAXFREQUENCY 1000000 /* 1MHz */
/* STMPE11 Registers ************************************************************************/ /* STMPE811 Registers ************************************************************************/
/* Register Addresses */ /* Register Addresses */
#define STMPE11_CHIP_ID 0x00 /* Device identification (16-bit) */ #define STMPE811_CHIP_ID 0x00 /* Device identification (16-bit) */
#define STMPE11_ID_VER 0x02 /* Revision number: 0x01=sample 0x03=final silicon */ #define STMPE811_ID_VER 0x02 /* Revision number: 0x01=sample 0x03=final silicon */
#define STMPE11_SYS_CTRL1 0x03 /* Reset control */ #define STMPE811_SYS_CTRL1 0x03 /* Reset control */
#define STMPE11_SYS_CTRL2 0x04 /* Clock control */ #define STMPE811_SYS_CTRL2 0x04 /* Clock control */
#define STMPE11_SPI_CFG 0x08 /* SPI interface configuration */ #define STMPE811_SPI_CFG 0x08 /* SPI interface configuration */
#define STMPE11_INT_CTRL 0x09 /* Interrupt control register */ #define STMPE811_INT_CTRL 0x09 /* Interrupt control register */
#define STMPE11_INT_EN 0x0a /* Interrupt enable register */ #define STMPE811_INT_EN 0x0a /* Interrupt enable register */
#define STMPE11_INT_STA 0x0b /* Interrupt status register */ #define STMPE811_INT_STA 0x0b /* Interrupt status register */
#define STMPE11_GPIO_EN 0x0c /* GPIO interrupt enable register */ #define STMPE811_GPIO_EN 0x0c /* GPIO interrupt enable register */
#define STMPE11_GPIO_INTSTA 0x0d /* GPIO interrupt status register */ #define STMPE811_GPIO_INTSTA 0x0d /* GPIO interrupt status register */
#define STMPE11_ADC_INTEN 0x0e /* ADC interrupt enable register */ #define STMPE811_ADC_INTEN 0x0e /* ADC interrupt enable register */
#define STMPE11_ADC_INTSTA 0x0f /* ADC interrupt status register */ #define STMPE811_ADC_INTSTA 0x0f /* ADC interrupt status register */
#define STMPE11_GPIO_SETPIN 0x10 /* GPIO set pin register */ #define STMPE811_GPIO_SETPIN 0x10 /* GPIO set pin register */
#define STMPE11_GPIO_CLRPIN 0x11 /* GPIO clear pin register */ #define STMPE811_GPIO_CLRPIN 0x11 /* GPIO clear pin register */
#define STMPE11_GPIO_MPSTA 0x12 /* GPIO monitor pin state register */ #define STMPE811_GPIO_MPSTA 0x12 /* GPIO monitor pin state register */
#define STMPE11_GPIO_DIR 0x13 /* GPIO direction register */ #define STMPE811_GPIO_DIR 0x13 /* GPIO direction register */
#define STMPE11_GPIO_ED 0x14 /* GPIO edge detect register */ #define STMPE811_GPIO_ED 0x14 /* GPIO edge detect register */
#define STMPE11_GPIO_RE 0x15 /* GPIO rising edge register */ #define STMPE811_GPIO_RE 0x15 /* GPIO rising edge register */
#define STMPE11_GPIO_FE 0x16 /* GPIO falling edge register */ #define STMPE811_GPIO_FE 0x16 /* GPIO falling edge register */
#define STMPE11_GPIO_AF 0x17 /* Alternate function register */ #define STMPE811_GPIO_AF 0x17 /* Alternate function register */
#define STMPE11_ADC_CTRL1 0x20 /* ADC control */ #define STMPE811_ADC_CTRL1 0x20 /* ADC control */
#define STMPE11_ADC_CTRL2 0x21 /* ADC control */ #define STMPE811_ADC_CTRL2 0x21 /* ADC control */
#define STMPE11_ADC_CAPT 0x22 /* To initiate ADC data acquisition */ #define STMPE811_ADC_CAPT 0x22 /* To initiate ADC data acquisition */
#define STMPE11_ADC_DATACH(n) (0x30 + ((n) << 1)) /* ADC channel n (16-bit) */ #define STMPE811_ADC_DATACH(n) (0x30 + ((n) << 1)) /* ADC channel n (16-bit) */
#define STMPE11_ADC_DATACH0 0x30 /* ADC channel 0 (16-bit) */ #define STMPE811_ADC_DATACH0 0x30 /* ADC channel 0 (16-bit) */
#define STMPE11_ADC_DATACH1 0x32 /* ADC channel 1 (16_bit) */ #define STMPE811_ADC_DATACH1 0x32 /* ADC channel 1 (16_bit) */
#define STMPE11_ADC_DATACH2 0x34 /* ADC channel 2 (16-bit) */ #define STMPE811_ADC_DATACH2 0x34 /* ADC channel 2 (16-bit) */
#define STMPE11_ADC_DATACH3 0x36 /* ADC channel 3 (16-bit) */ #define STMPE811_ADC_DATACH3 0x36 /* ADC channel 3 (16-bit) */
#define STMPE11_ADC_DATACH4 0x38 /* ADC channel 4 (16-bit) */ #define STMPE811_ADC_DATACH4 0x38 /* ADC channel 4 (16-bit) */
#define STMPE11_ADC_DATACH5 0x3a /* ADC channel 5 (16-bit) */ #define STMPE811_ADC_DATACH5 0x3a /* ADC channel 5 (16-bit) */
#define STMPE11_ADC_DATACH6 0x3c /* ADC channel 6 (16-bit) */ #define STMPE811_ADC_DATACH6 0x3c /* ADC channel 6 (16-bit) */
#define STMPE11_ADC_DATACH7 0x3e /* ADC channel 7 (16-bit) */ #define STMPE811_ADC_DATACH7 0x3e /* ADC channel 7 (16-bit) */
#define STMPE11_TSC_CTRL 0x40 /* 4-wire touchscreen controller setup */ #define STMPE811_TSC_CTRL 0x40 /* 4-wire touchscreen controller setup */
#define STMPE11_TSC_CFG 0x41 /* Touchscreen controller configuration */ #define STMPE811_TSC_CFG 0x41 /* Touchscreen controller configuration */
#define STMPE11_WDW_TRX 0x42 /* Window setup for top right X (16-bit) */ #define STMPE811_WDW_TRX 0x42 /* Window setup for top right X (16-bit) */
#define STMPE11_WDW_TRY 0x44 /* Window setup for top right Y (16-bit) */ #define STMPE811_WDW_TRY 0x44 /* Window setup for top right Y (16-bit) */
#define STMPE11_WDW_BLX 0x46 /* Window setup for bottom left X (16-bit) */ #define STMPE811_WDW_BLX 0x46 /* Window setup for bottom left X (16-bit) */
#define STMPE11_WDW_BLY 0x48 /* Window setup for bottom left Y (16-bit) */ #define STMPE811_WDW_BLY 0x48 /* Window setup for bottom left Y (16-bit) */
#define STMPE11_FIFO_TH 0x4a /* FIFO level to generate interrupt */ #define STMPE811_FIFO_TH 0x4a /* FIFO level to generate interrupt */
#define STMPE11_FIFO_STA 0x4b /* Current status of FIFO */ #define STMPE811_FIFO_STA 0x4b /* Current status of FIFO */
#define STMPE11_FIFO_SIZE 0x4c /* Current filled level of FIFO */ #define STMPE811_FIFO_SIZE 0x4c /* Current filled level of FIFO */
#define STMPE11_TSC_DATAX 0x4d /* Data port for touchscreen (16-bit) */ #define STMPE811_TSC_DATAX 0x4d /* Data port for touchscreen (16-bit) */
#define STMPE11_TSC_DATAY 0x4f /* Data port for touchscreen (16-bit) */ #define STMPE811_TSC_DATAY 0x4f /* Data port for touchscreen (16-bit) */
#define STMPE11_TSC_DATAZ 0x51 /* Data port for touchscreen */ #define STMPE811_TSC_DATAZ 0x51 /* Data port for touchscreen */
#define STMPE11_TSC_DATAXYZ 0x52 /* Data port for touchscreen (32-bit) */ #define STMPE811_TSC_DATAXYZ 0x52 /* Data port for touchscreen (32-bit) */
#define STMPE11_TSC_FRACTIONZ 0x56 /* Touchscreen controller FRACTION_Z */ #define STMPE811_TSC_FRACTIONZ 0x56 /* Touchscreen controller FRACTION_Z */
#define STMPE11_TSC_DATA 0x57 /* Data port for touchscreen */ #define STMPE811_TSC_DATA 0x57 /* Data port for touchscreen */
#define STMPE11_TSC_IDRIVE 0x58 /* Touchscreen controller drive I */ #define STMPE811_TSC_IDRIVE 0x58 /* Touchscreen controller drive I */
#define STMPE11_TSC_SHIELD 0x59 /* Touchscreen controller shield */ #define STMPE811_TSC_SHIELD 0x59 /* Touchscreen controller shield */
#define STMPE11_TEMP_CTRL 0x60 /* Temperature sensor setup */ #define STMPE811_TEMP_CTRL 0x60 /* Temperature sensor setup */
#define STMPE11_TEMP_DATA 0x61 /* Temperature data access port */ #define STMPE811_TEMP_DATA 0x61 /* Temperature data access port */
#define STMPE11_TEMP_TH 0x62 /* Threshold for temperature controlled interrupt */ #define STMPE811_TEMP_TH 0x62 /* Threshold for temperature controlled interrupt */
/* Register bit definitions */ /* Register bit definitions */
@ -402,7 +402,7 @@
#define TEMP_CTRL_THRES_RANGE (1 << 4) /* Bit 4: temperature threshold enable, 0='>=' 1='<' */ #define TEMP_CTRL_THRES_RANGE (1 << 4) /* Bit 4: temperature threshold enable, 0='>=' 1='<' */
/* GPIO Configuration ***********************************************************************/ /* GPIO Configuration ***********************************************************************/
/* The STMPE11 GPIO interfaces take an 8-bit bit-encoded parameter to describe the GPIO pin. /* The STMPE811 GPIO interfaces take an 8-bit bit-encoded parameter to describe the GPIO pin.
* The following definitions describe the bit-encoding of that parameter. * The following definitions describe the bit-encoding of that parameter.
* *
* 7654 3210 * 7654 3210
@ -416,37 +416,37 @@
* Bits 7 is the pin direction. * Bits 7 is the pin direction.
*/ */
#define STMPE11_GPIO_DIR (1 << 7) /* Bit7: Direction bit */ #define STMPE811_GPIO_DIR (1 << 7) /* Bit7: Direction bit */
#define STMPE11_GPIO_INPUT (1 << 7) /* Input pin (possibly interrupting) */ #define STMPE811_GPIO_INPUT (1 << 7) /* Input pin (possibly interrupting) */
#define STMPE11_GPIO_OUTPUT (0) /* Configure as in output */ #define STMPE811_GPIO_OUTPUT (0) /* Configure as in output */
/* Bit 6 indicates that the pin will generate an interrupt (inputs only) */ /* Bit 6 indicates that the pin will generate an interrupt (inputs only) */
#define STMPE11_GPIO_IN (1 << 6) /* Bit 6: Input interrupting pin */ #define STMPE811_GPIO_IN (1 << 6) /* Bit 6: Input interrupting pin */
/* The bits 4-5 select the rising and/or the falling edge detection. */ /* The bits 4-5 select the rising and/or the falling edge detection. */
#define STMPE11_GPIO_RISING (1 << 5) /* Bit 5: Input interrupting pin */ #define STMPE811_GPIO_RISING (1 << 5) /* Bit 5: Input interrupting pin */
#define STMPE11_GPIO_FALLING (1 << 4) /* Bit 4: Input interrupting pin */ #define STMPE811_GPIO_FALLING (1 << 4) /* Bit 4: Input interrupting pin */
/* Bit 3 is the initial value for output pins */ /* Bit 3 is the initial value for output pins */
#define STMPE11_GPIO_VALUE (1 << 3) /* Bit 3: The initial value of an output pin */ #define STMPE811_GPIO_VALUE (1 << 3) /* Bit 3: The initial value of an output pin */
# define STMPE11_GPIO_ONE (1 << 3) /* Bit 3: The initial value is logic 1 */ # define STMPE811_GPIO_ONE (1 << 3) /* Bit 3: The initial value is logic 1 */
# define STMPE11_GPIO_ZERO (0) /* Bit 3: The initial value is logic 0 */ # define STMPE811_GPIO_ZERO (0) /* Bit 3: The initial value is logic 0 */
/* Bits 0-2 is the pin number */ /* Bits 0-2 is the pin number */
#define STMPE11_GPIO_PIN_SHIFT (0) #define STMPE811_GPIO_PIN_SHIFT (0)
#define STMPE11_GPIO_PIN_MASK (7 << STMPE11_GPIO_PIN_SHIFT) #define STMPE811_GPIO_PIN_MASK (7 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN0 (0 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN0 (0 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN1 (1 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN1 (1 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN2 (2 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN2 (2 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN3 (3 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN3 (3 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN4 (4 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN4 (4 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN5 (5 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN5 (5 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN6 (6 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN6 (6 << STMPE811_GPIO_PIN_SHIFT)
# define STMPE11_GPIO_PIN7 (7 << STMPE11_GPIO_PIN_SHIFT) # define STMPE811_GPIO_PIN7 (7 << STMPE811_GPIO_PIN_SHIFT)
/******************************************************************************************** /********************************************************************************************
* Public Types * Public Types
@ -456,31 +456,31 @@
* handler but rather from the context of the worker thread with interrupts enabled. * handler but rather from the context of the worker thread with interrupts enabled.
*/ */
typedef void (*stmpe11_handler_t)(int pin); typedef void (*stmpe811_handler_t)(int pin);
/* A reference to a structure of this type must be passed to the STMPE11 driver when the /* A reference to a structure of this type must be passed to the STMPE811 driver when the
* driver is instantiaed. This structure provides information about the configuration of the * driver is instantiaed. This structure provides information about the configuration of the
* STMPE11 and provides some board-specific hooks. * STMPE811 and provides some board-specific hooks.
* *
* Memory for this structure is provided by the caller. It is not copied by the driver * Memory for this structure is provided by the caller. It is not copied by the driver
* and is presumed to persist while the driver is active. The memory must be writable * and is presumed to persist while the driver is active. The memory must be writable
* because, under certain circumstances, the driver may modify the frequency. * because, under certain circumstances, the driver may modify the frequency.
*/ */
struct stmpe11_config_s struct stmpe811_config_s
{ {
/* Device characterization */ /* Device characterization */
#ifdef CONFIG_STMPE11_I2C #ifdef CONFIG_STMPE811_I2C
uint8_t address; /* 7-bit I2C address (only bits 0-6 used) */ uint8_t address; /* 7-bit I2C address (only bits 0-6 used) */
#endif #endif
uint32_t frequency; /* I2C or SPI frequency */ uint32_t frequency; /* I2C or SPI frequency */
/* If multiple STMPE11 devices are supported, then an IRQ number must /* If multiple STMPE811 devices are supported, then an IRQ number must
* be provided for each so that their interrupts can be distinguished. * be provided for each so that their interrupts can be distinguished.
*/ */
#ifdef CONFIG_STMPE11_MULTIPLE #ifdef CONFIG_STMPE811_MULTIPLE
int irq; /* IRQ number received by interrupt handler. */ int irq; /* IRQ number received by interrupt handler. */
#endif #endif
@ -489,32 +489,32 @@ struct stmpe11_config_s
* determine the characteristics of sampling. * determine the characteristics of sampling.
*/ */
#if !defined(CONFIG_STMPE11_ADC_DISABLE) || !defined(CONFIG_STMPE11_TSC_DISABLE) #if !defined(CONFIG_STMPE811_ADC_DISABLE) || !defined(CONFIG_STMPE811_TSC_DISABLE)
uint8_t ctrl1; /* Initialization value for ADC CTRL1 */ uint8_t ctrl1; /* Initialization value for ADC CTRL1 */
uint8_t ctrl2; /* Initialization value for ADC CTRL1 */ uint8_t ctrl2; /* Initialization value for ADC CTRL1 */
#endif #endif
/* IRQ/GPIO access callbacks. These operations all hidden behind /* IRQ/GPIO access callbacks. These operations all hidden behind
* callbacks to isolate the STMPE11 driver from differences in GPIO * callbacks to isolate the STMPE811 driver from differences in GPIO
* interrupt handling by varying boards and MCUs. * interrupt handling by varying boards and MCUs.
* *
* attach - Attach the STMPE11 interrupt handler to the GPIO interrupt * attach - Attach the STMPE811 interrupt handler to the GPIO interrupt
* enable - Enable or disable the GPIO interrupt * enable - Enable or disable the GPIO interrupt
* clear - Acknowledge/clear any pending GPIO interrupt * clear - Acknowledge/clear any pending GPIO interrupt
*/ */
int (*attach)(FAR struct stmpe11_config_s *state, xcpt_t isr); int (*attach)(FAR struct stmpe811_config_s *state, xcpt_t isr);
void (*enable)(FAR struct stmpe11_config_s *state, bool enable); void (*enable)(FAR struct stmpe811_config_s *state, bool enable);
void (*clear)(FAR struct stmpe11_config_s *state); void (*clear)(FAR struct stmpe811_config_s *state);
}; };
/* Since the STMPE11 is a multi-function device, no functionality is assumed when the device /* Since the STMPE811 is a multi-function device, no functionality is assumed when the device
* is first created. Rather, a multi-step initialization is required. When * is first created. Rather, a multi-step initialization is required. When
* stmpe11_instantiate is called, it returns a handle of the following type. That handle may * stmpe811_instantiate is called, it returns a handle of the following type. That handle may
* then be used to enable a configure the STMPE11 functionality. * then be used to enable a configure the STMPE811 functionality.
*/ */
typedef FAR void *STMPE11_HANDLE; typedef FAR void *STMPE811_HANDLE;
/******************************************************************************************** /********************************************************************************************
* Public Function Prototypes * Public Function Prototypes
@ -528,10 +528,10 @@ extern "C" {
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_instantiate * Name: stmpe811_instantiate
* *
* Description: * Description:
* Instantiate and configure the STMPE11 device driver to use the provided I2C or SPI * Instantiate and configure the STMPE811 device driver to use the provided I2C or SPI
* device instance. * device instance.
* *
* Input Parameters: * Input Parameters:
@ -540,27 +540,27 @@ extern "C" {
* *
* Returned Value: * Returned Value:
* A non-zero handle is returned on success. This handle may then be used to configure * A non-zero handle is returned on success. This handle may then be used to configure
* the STMPE11 driver as necessary. A NULL handle value is returned on failure. * the STMPE811 driver as necessary. A NULL handle value is returned on failure.
* *
********************************************************************************************/ ********************************************************************************************/
#ifdef CONFIG_STMPE11_SPI #ifdef CONFIG_STMPE811_SPI
EXTERN STMPE11_HANDLE stmpe11_instantiate(FAR struct spi_dev_s *dev, EXTERN STMPE811_HANDLE stmpe811_instantiate(FAR struct spi_dev_s *dev,
FAR struct stmpe11_config_s *config); FAR struct stmpe811_config_s *config);
#else #else
EXTERN STMPE11_HANDLE stmpe11_instantiate(FAR struct i2c_dev_s *dev, EXTERN STMPE811_HANDLE stmpe811_instantiate(FAR struct i2c_dev_s *dev,
FAR struct stmpe11_config_s *config); FAR struct stmpe811_config_s *config);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_register * Name: stmpe811_register
* *
* Description: * Description:
* Enable TSC functionality. GPIO4-7 must be available. This function will register the * Enable TSC functionality. GPIO4-7 must be available. This function will register the
* touchsceen driver as /dev/inputN where N is the minor device number * touchsceen driver as /dev/inputN where N is the minor device number
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* minor - The input device minor number * minor - The input device minor number
* *
* Returned Value: * Returned Value:
@ -569,18 +569,18 @@ EXTERN STMPE11_HANDLE stmpe11_instantiate(FAR struct i2c_dev_s *dev,
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_TSC_DISABLE #ifndef CONFIG_STMPE811_TSC_DISABLE
EXTERN int stmpe11_register(STMPE11_HANDLE handle, int minor); EXTERN int stmpe811_register(STMPE811_HANDLE handle, int minor);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_gpioconfig * Name: stmpe811_gpioconfig
* *
* Description: * Description:
* Configure an STMPE11 GPIO pin * Configure an STMPE811 GPIO pin
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* pinconfig - Bit-encoded pin configuration * pinconfig - Bit-encoded pin configuration
* *
* Returned Value: * Returned Value:
@ -589,18 +589,18 @@ EXTERN int stmpe11_register(STMPE11_HANDLE handle, int minor);
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_GPIO_DISABLE #ifndef CONFIG_STMPE811_GPIO_DISABLE
EXTERN int stmpe11_gpioconfig(STMPE11_HANDLE handle, uint8_t pinconfig); EXTERN int stmpe811_gpioconfig(STMPE811_HANDLE handle, uint8_t pinconfig);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_gpiowrite * Name: stmpe811_gpiowrite
* *
* Description: * Description:
* Set or clear the GPIO output * Set or clear the GPIO output
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* pinconfig - Bit-encoded pin configuration * pinconfig - Bit-encoded pin configuration
* value = true: write logic '1'; false: write logic '0; * value = true: write logic '1'; false: write logic '0;
* *
@ -609,18 +609,18 @@ EXTERN int stmpe11_gpioconfig(STMPE11_HANDLE handle, uint8_t pinconfig);
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_GPIO_DISABLE #ifndef CONFIG_STMPE811_GPIO_DISABLE
EXTERN void stmpe11_gpiowrite(STMPE11_HANDLE handle, uint8_t pinconfig, bool value); EXTERN void stmpe811_gpiowrite(STMPE811_HANDLE handle, uint8_t pinconfig, bool value);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_gpioread * Name: stmpe811_gpioread
* *
* Description: * Description:
* Set or clear the GPIO output * Set or clear the GPIO output
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* pinconfig - Bit-encoded pin configuration * pinconfig - Bit-encoded pin configuration
* value - The location to return the state of the GPIO pin * value - The location to return the state of the GPIO pin
* *
@ -630,12 +630,12 @@ EXTERN void stmpe11_gpiowrite(STMPE11_HANDLE handle, uint8_t pinconfig, bool val
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_GPIO_DISABLE #ifndef CONFIG_STMPE811_GPIO_DISABLE
EXTERN int stmpe11_gpioread(STMPE11_HANDLE handle, uint8_t pinconfig, bool *value); EXTERN int stmpe811_gpioread(STMPE811_HANDLE handle, uint8_t pinconfig, bool *value);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_gpioattach * Name: stmpe811_gpioattach
* *
* Description: * Description:
* Attach to a GPIO interrupt input pin and enable interrupts on the pin. Using the value * Attach to a GPIO interrupt input pin and enable interrupts on the pin. Using the value
@ -645,7 +645,7 @@ EXTERN int stmpe11_gpioread(STMPE11_HANDLE handle, uint8_t pinconfig, bool *valu
* of the worker thread with interrupts enabled. * of the worker thread with interrupts enabled.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* pinconfig - Bit-encoded pin configuration * pinconfig - Bit-encoded pin configuration
* handler - The handler that will be called when the interrupt occurs. * handler - The handler that will be called when the interrupt occurs.
* *
@ -655,19 +655,19 @@ EXTERN int stmpe11_gpioread(STMPE11_HANDLE handle, uint8_t pinconfig, bool *valu
* *
********************************************************************************************/ ********************************************************************************************/
#if !defined(CONFIG_STMPE11_GPIO_DISABLE) && !defined(CONFIG_STMPE11_GPIOINT_DISABLE) #if !defined(CONFIG_STMPE811_GPIO_DISABLE) && !defined(CONFIG_STMPE811_GPIOINT_DISABLE)
EXTERN int stmpe11_gpioattach(STMPE11_HANDLE handle, uint8_t pinconfig, EXTERN int stmpe811_gpioattach(STMPE811_HANDLE handle, uint8_t pinconfig,
stmpe11_handler_t handler); stmpe811_handler_t handler);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_adcinitialize * Name: stmpe811_adcinitialize
* *
* Description: * Description:
* Configure for ADC mode operation. Set overall ADC ADC timing that applies to all pins. * Configure for ADC mode operation. Set overall ADC ADC timing that applies to all pins.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* *
* Returned Value: * Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate * Zero is returned on success. Otherwise, a negated errno value is returned to indicate
@ -675,18 +675,18 @@ EXTERN int stmpe11_gpioattach(STMPE11_HANDLE handle, uint8_t pinconfig,
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_ADC_DISABLE #ifndef CONFIG_STMPE811_ADC_DISABLE
EXTERN int stmpe11_adcinitialize(STMPE11_HANDLE handle); EXTERN int stmpe811_adcinitialize(STMPE811_HANDLE handle);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_adcconfig * Name: stmpe811_adcconfig
* *
* Description: * Description:
* Configure a pin for ADC input. * Configure a pin for ADC input.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* pin - The ADC pin number * pin - The ADC pin number
* *
* Returned Value: * Returned Value:
@ -695,18 +695,18 @@ EXTERN int stmpe11_adcinitialize(STMPE11_HANDLE handle);
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_ADC_DISABLE #ifndef CONFIG_STMPE811_ADC_DISABLE
EXTERN int stmpe11_adcconfig(STMPE11_HANDLE handle, int pin); EXTERN int stmpe811_adcconfig(STMPE811_HANDLE handle, int pin);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_adcread * Name: stmpe811_adcread
* *
* Description: * Description:
* Read the converted analog input value from the select pin. * Read the converted analog input value from the select pin.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* pin - The ADC pin number * pin - The ADC pin number
* *
* Returned Value: * Returned Value:
@ -714,18 +714,18 @@ EXTERN int stmpe11_adcconfig(STMPE11_HANDLE handle, int pin);
* *
********************************************************************************************/ ********************************************************************************************/
#ifndef CONFIG_STMPE11_ADC_DISABLE #ifndef CONFIG_STMPE811_ADC_DISABLE
EXTERN uint16_t stmpe11_adcread(STMPE11_HANDLE handle, int pin); EXTERN uint16_t stmpe811_adcread(STMPE811_HANDLE handle, int pin);
#endif #endif
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_tempinitialize * Name: stmpe811_tempinitialize
* *
* Description: * Description:
* Configure the temperature sensor. * Configure the temperature sensor.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* *
* Returned Value: * Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate * Zero is returned on success. Otherwise, a negated errno value is returned to indicate
@ -733,16 +733,16 @@ EXTERN uint16_t stmpe11_adcread(STMPE11_HANDLE handle, int pin);
* *
********************************************************************************************/ ********************************************************************************************/
EXTERN int stmpe11_tempinitialize(STMPE11_HANDLE handle); EXTERN int stmpe811_tempinitialize(STMPE811_HANDLE handle);
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_tempread * Name: stmpe811_tempread
* *
* Description: * Description:
* Configure the temperature sensor. * Configure the temperature sensor.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* *
* Returned Value: * Returned Value:
* Zero is returned on success. Otherwise, a negated errno value is returned to indicate * Zero is returned on success. Otherwise, a negated errno value is returned to indicate
@ -750,10 +750,10 @@ EXTERN int stmpe11_tempinitialize(STMPE11_HANDLE handle);
* *
********************************************************************************************/ ********************************************************************************************/
EXTERN uint16_t stmpe11_tempread(STMPE11_HANDLE handle); EXTERN uint16_t stmpe811_tempread(STMPE811_HANDLE handle);
/******************************************************************************************** /********************************************************************************************
* Name: stmpe11_tempinterrupt * Name: stmpe811_tempinterrupt
* *
* Description: * Description:
* Configure the temperature sensor to sample the temperature periodically. * Configure the temperature sensor to sample the temperature periodically.
@ -761,7 +761,7 @@ EXTERN uint16_t stmpe11_tempread(STMPE11_HANDLE handle);
* to the client using the provide callback function pointer. * to the client using the provide callback function pointer.
* *
* Input Parameters: * Input Parameters:
* handle - The handle previously returned by stmpe11_instantiate * handle - The handle previously returned by stmpe811_instantiate
* threshold - The threshold temperature value * threshold - The threshold temperature value
* direction - True: Generate an interrupt if the temperate exceeds the * direction - True: Generate an interrupt if the temperate exceeds the
* threshold value; False: Generate an interrupt if the * threshold value; False: Generate an interrupt if the
@ -781,5 +781,5 @@ EXTERN uint16_t stmpe11_tempread(STMPE11_HANDLE handle);
} }
#endif #endif
#endif /* CONFIG_INPUT && CONFIG_INPUT_STMPE11 */ #endif /* CONFIG_INPUT && CONFIG_INPUT_STMPE811 */
#endif /* __INCLUDE_NUTTX_INPUT_STMPE11_H */ #endif /* __INCLUDE_NUTTX_INPUT_STMPE811_H */