mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
drivers/ft5x06.x and related: Minor cleanup after completing the FT5x06 driver verification.
This commit is contained in:
@@ -29,26 +29,18 @@ STATUS
|
|||||||
|
|
||||||
2017-12-10: The basic NSH configuration is functional at 220MHz with a
|
2017-12-10: The basic NSH configuration is functional at 220MHz with a
|
||||||
Serial console, timer and LED support. Added support for the external
|
Serial console, timer and LED support. Added support for the external
|
||||||
SDRAM and for the RAM test utility -- UNTESTED!
|
SDRAM and for the RAM test utility.
|
||||||
2017-12-11: Fixed an error in board LEDs. SDRAM is partially functional
|
2017-12-11: Fixed an error in board LEDs. Added framework for future
|
||||||
but not reliable. Added framework for future I2C and SPI flexcomm
|
I2C and SPI flexcomm drivers.
|
||||||
drivers (mostly empty files for now)
|
2017-12-12: The SDRAM is now functional and passes the commplete RAM
|
||||||
2017-12-12: The SDRAM is now functional passes the commplete RAM test.
|
test. Added configuration options and logic to add none, portions, or
|
||||||
Included configurations and logic to add none, portions, or all of the
|
all of the external SDRAM to the system heap. Brought in the LPC1788
|
||||||
external SDRAM to the system heap. Brought in the LPC1788 LCD driver.
|
LCD driver. The LPC1788 LCD registers are identical to the LPC54xx
|
||||||
The LPC1788 LCD registers are identical to the LPC54xx (other than a
|
(other than a minor clock source setting).
|
||||||
minor clock source setting). That port required modifications only
|
2017-12-13: Created the fb configuration for testing the LCD.
|
||||||
for differences in some SYSCON and pin-related settings.
|
|
||||||
2017-12-13: Created the fb configuration for testing the LCD. Only
|
|
||||||
minimal testing has been performed. As of this writing, there is
|
|
||||||
some framebuffer functionality. There are recognizable but corrupted
|
|
||||||
patterns on the LCD. There are color formatting problems and some
|
|
||||||
horizontal elongation.
|
|
||||||
2017-12-14: Corrected a misconception about how the video data lines
|
2017-12-14: Corrected a misconception about how the video data lines
|
||||||
were configured. Now the LCD appears to be fully functional.
|
were configured. The LCD now appears to be fully functional.
|
||||||
2017-12-15: Added an I2C driver. This is the first step on the road
|
2017-12-15: Added an I2C driver.
|
||||||
to getting support for the capacitive touchscreen on the TFT panel.
|
|
||||||
The I2C driver appears to be functional but is not yet well-tested.
|
|
||||||
2017-12-16: Added support for LPC54xx GPIO interrupts; added button
|
2017-12-16: Added support for LPC54xx GPIO interrupts; added button
|
||||||
support (with interrupts) to the NSH configuration. The button
|
support (with interrupts) to the NSH configuration. The button
|
||||||
test appears to functional functional. There are noticeable delays
|
test appears to functional functional. There are noticeable delays
|
||||||
@@ -59,15 +51,13 @@ STATUS
|
|||||||
response my be obtainble with filtering off.
|
response my be obtainble with filtering off.
|
||||||
2017-12-17: Added a driver for the FT5x06 capacitive, multi-touch
|
2017-12-17: Added a driver for the FT5x06 capacitive, multi-touch
|
||||||
controller. Add support logic for the LPCXpresso-LPC54528 to
|
controller. Add support logic for the LPCXpresso-LPC54528 to
|
||||||
initialize and the register the FT5x06 driver. Currently, the
|
initialize and the register the FT5x06 driver. Unfortunately, the
|
||||||
system asserts during boot up. This is because the FT5x06 interrupt
|
FT5x06 interrupt is on pin P4.0 but pin interrupts are only supported
|
||||||
is on pin P4.0 but pin interrupts are only supported on P0.m and
|
on P0.m and P1.m, m=0..31.
|
||||||
P1.m, m=0..31. Does this mean that TSC interrupts are not supported?
|
|
||||||
I think so!
|
|
||||||
2017-12-18: Added an option to the FT5x06 driver to support a timer-
|
2017-12-18: Added an option to the FT5x06 driver to support a timer-
|
||||||
based poll instead of interrupts. This is very inefficient in that it
|
based poll instead of interrupts. This is very inefficient in that it
|
||||||
will introduce delays in touchscreen response and will consume more CPU
|
will introduce delays in touchscreen response and will consume more CPU
|
||||||
bandwidth. The driver appears to be functional. Added the nxwm
|
bandwidth. The driver appears to be functional. Added the NxWM
|
||||||
configuration to do some integrated testing. NxWM seems to be fully
|
configuration to do some integrated testing. NxWM seems to be fully
|
||||||
functional. However, the action of the touchscreen could use some
|
functional. However, the action of the touchscreen could use some
|
||||||
human factors improvements. I imagine that this is a consequence of
|
human factors improvements. I imagine that this is a consequence of
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ CONFIG_FS_FAT=y
|
|||||||
CONFIG_FS_PROCFS=y
|
CONFIG_FS_PROCFS=y
|
||||||
CONFIG_FT5X06_POLLMODE=y
|
CONFIG_FT5X06_POLLMODE=y
|
||||||
CONFIG_FT5X06_SINGLEPOINT=y
|
CONFIG_FT5X06_SINGLEPOINT=y
|
||||||
|
CONFIG_FT5X06_SWAPXY=y
|
||||||
CONFIG_GRAPHICS_PDCURSES=y
|
CONFIG_GRAPHICS_PDCURSES=y
|
||||||
CONFIG_I2CTOOL_MAXBUS=9
|
CONFIG_I2CTOOL_MAXBUS=9
|
||||||
CONFIG_INPUT_FT5X06=y
|
CONFIG_INPUT_FT5X06=y
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ CONFIG_NXWM_TASKBAR_LEFT=y
|
|||||||
CONFIG_NXWM_TASKBAR_VSPACING=4
|
CONFIG_NXWM_TASKBAR_VSPACING=4
|
||||||
CONFIG_NXWM_UNITTEST=y
|
CONFIG_NXWM_UNITTEST=y
|
||||||
CONFIG_NXWM=y
|
CONFIG_NXWM=y
|
||||||
CONFIG_PREALLOC_MQ_MSGS=16
|
|
||||||
CONFIG_PREALLOC_TIMERS=4
|
CONFIG_PREALLOC_TIMERS=4
|
||||||
CONFIG_PREALLOC_WDOGS=8
|
CONFIG_PREALLOC_WDOGS=8
|
||||||
CONFIG_RAM_SIZE=163840
|
CONFIG_RAM_SIZE=163840
|
||||||
|
|||||||
+11
-5
@@ -328,7 +328,12 @@ static void ft5x06_data_worker(FAR void *arg)
|
|||||||
|
|
||||||
sample = (FAR struct ft5x06_touch_data_s *)priv->touchbuf;
|
sample = (FAR struct ft5x06_touch_data_s *)priv->touchbuf;
|
||||||
|
|
||||||
/* Notify waiters (only if we ready some valid data) */
|
/* Notify waiters (only if we ready some valid data).
|
||||||
|
*
|
||||||
|
* REVISIT: For improved performance consider moving the duplicate
|
||||||
|
* report and thresholding logic from ft5x06_sample() to here. That
|
||||||
|
* would save a context switch.
|
||||||
|
*/
|
||||||
|
|
||||||
if (sample->tdstatus <= FT5x06_MAX_TOUCHES)
|
if (sample->tdstatus <= FT5x06_MAX_TOUCHES)
|
||||||
{
|
{
|
||||||
@@ -491,7 +496,7 @@ static ssize_t ft5x06_sample(FAR struct ft5x06_dev_s *priv, FAR char *buffer,
|
|||||||
if (event == FT5x06_INVALID)
|
if (event == FT5x06_INVALID)
|
||||||
{
|
{
|
||||||
priv->lastevent = FT5x06_INVALID;
|
priv->lastevent = FT5x06_INVALID;
|
||||||
goto drop;
|
goto reset_and_drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (id == priv->lastid && event == priv->lastevent)
|
if (id == priv->lastid && event == priv->lastevent)
|
||||||
@@ -502,7 +507,7 @@ static ssize_t ft5x06_sample(FAR struct ft5x06_dev_s *priv, FAR char *buffer,
|
|||||||
{
|
{
|
||||||
/* No... no new touch data */
|
/* No... no new touch data */
|
||||||
|
|
||||||
goto drop;
|
goto reset_and_drop;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -563,9 +568,10 @@ static ssize_t ft5x06_sample(FAR struct ft5x06_dev_s *priv, FAR char *buffer,
|
|||||||
priv->valid = false;
|
priv->valid = false;
|
||||||
return SIZEOF_TOUCH_SAMPLE_S(1);
|
return SIZEOF_TOUCH_SAMPLE_S(1);
|
||||||
|
|
||||||
drop:
|
reset_and_drop:
|
||||||
priv->lastx = 0;
|
priv->lastx = 0;
|
||||||
priv->lasty = 0;
|
priv->lasty = 0;
|
||||||
|
drop:
|
||||||
priv->valid = false;
|
priv->valid = false;
|
||||||
return 0; /* No new touches read. */
|
return 0; /* No new touches read. */
|
||||||
}
|
}
|
||||||
@@ -1280,9 +1286,9 @@ int ft5x06_register(FAR struct i2c_master_s *i2c,
|
|||||||
errout_with_timer:
|
errout_with_timer:
|
||||||
#ifdef CONFIG_FT5X06_POLLMODE
|
#ifdef CONFIG_FT5X06_POLLMODE
|
||||||
(void)wd_delete(priv->polltimer);
|
(void)wd_delete(priv->polltimer);
|
||||||
#endif
|
|
||||||
|
|
||||||
errout_with_priv:
|
errout_with_priv:
|
||||||
|
#endif
|
||||||
nxsem_destroy(&priv->devsem);
|
nxsem_destroy(&priv->devsem);
|
||||||
kmm_free(priv);
|
kmm_free(priv);
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user