diff --git a/NxWidgets/nxwm/images/play.png b/NxWidgets/nxwm/images/play.png index ab7c29249b..02ff75414a 100644 Binary files a/NxWidgets/nxwm/images/play.png and b/NxWidgets/nxwm/images/play.png differ diff --git a/NxWidgets/nxwm/src/ccalibration.cxx b/NxWidgets/nxwm/src/ccalibration.cxx index 82c12ebb36..9ba0c0917a 100644 --- a/NxWidgets/nxwm/src/ccalibration.cxx +++ b/NxWidgets/nxwm/src/ccalibration.cxx @@ -223,8 +223,12 @@ bool CCalibration::waitCalibrationData(struct SCalibrationData &data) while (m_state != CALIB_COMPLETE) { +#ifdef CONFIG_DEBUG int ret = sem_wait(&m_waitSem); DEBUGASSERT(ret == 0 || errno == EINTR); +#else + (void)sem_wait(&m_waitSem); +#endif } // Recover the window instance contained in the full screen window diff --git a/NxWidgets/nxwm/src/ctouchscreen.cxx b/NxWidgets/nxwm/src/ctouchscreen.cxx index 737c7d9e33..f5e476cced 100644 --- a/NxWidgets/nxwm/src/ctouchscreen.cxx +++ b/NxWidgets/nxwm/src/ctouchscreen.cxx @@ -295,19 +295,19 @@ FAR void *CTouchscreen::listener(FAR void *arg) DEBUGASSERT(sample); ssize_t nbytes = read(This->m_touchFd, sample, sizeof(struct touch_sample_s)); - vdbg("Received nbytes=%d\n", nbytes); // Check for errors if (nbytes < 0) { // The only expect error is to be interrupt by a signal - +#ifdef CONFIG_DEBUG int errval = errno; dbg("read %s failed: %d\n", CONFIG_NXWM_TOUCHSCREEN_DEVPATH, errval); DEBUGASSERT(errval == EINTR); +#endif } // On a truly success read, the size of the returned data will diff --git a/NxWidgets/nxwm/src/glyph_play.cxx b/NxWidgets/nxwm/src/glyph_play.cxx index 1c6ce8cd93..8c16addaed 100644 --- a/NxWidgets/nxwm/src/glyph_play.cxx +++ b/NxWidgets/nxwm/src/glyph_play.cxx @@ -56,9 +56,9 @@ * Pre-Processor Definitions ********************************************************************************************/ -#define BITMAP_NROWS 25 -#define BITMAP_NCOLUMNS 25 -#define BITMAP_NLUTCODES 6 +#define BITMAP_NROWS 24 +#define BITMAP_NCOLUMNS 24 +#define BITMAP_NLUTCODES 5 #define DARK_PLAY_ICON 1 @@ -76,13 +76,13 @@ using namespace NxWM; static const uint32_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x00a200, 0x006300, 0x004e00, 0x008100, 0x003600 /* Codes 1-5 */ + 0x00bd00, 0x008100, 0x006300, 0x003600 /* Codes 1-4 */ }; static const uint32_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x00d800, 0x008400, 0x006800, 0x00ac00, 0x004800, /* Codes 1-5 */ + 0x00fc00, 0x00ac00, 0x008400, 0x004800 /* Codes 1-4 */ }; # else /* DARK_PLAY_ICON */ @@ -90,13 +90,13 @@ static const uint32_t g_playBrightlLut[BITMAP_NLUTCODES] = static const uint32_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x00d800, 0x008400, 0x006800, 0x00ac00, 0x004800, /* Codes 1-5 */ + 0x00fc00, 0x00ac00, 0x008400, 0x004800 /* Codes 1-4 */ }; static const uint32_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x3fe13f, 0x3fa23f, 0x3f8d3f, 0x3fc03f, 0x3f753f /* Codes 1-5 */ + 0x00fc00, 0x00c000, 0x00a200, 0x007500 /* Codes 1-4 */ }; # endif /* DARK_PLAY_ICON */ @@ -108,13 +108,13 @@ static const uint32_t g_playBrightlLut[BITMAP_NLUTCODES] = static const uint16_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x0500, 0x0300, 0x0260, 0x0400, 0x01a0 /* Codes 1-5 */ + 0x05e0, 0x0400, 0x0300, 0x01a0 /* Codes 1-4 */ }; static const uint16_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x06c0, 0x0420, 0x0340, 0x0560, 0x0240, /* Codes 1-5 */ + 0x07e0, 0x0560, 0x0420, 0x0240 /* Codes 1-4 */ }; # else /* DARK_PLAY_ICON */ @@ -122,13 +122,13 @@ static const uint16_t g_playBrightlLut[BITMAP_NLUTCODES] = static const uint16_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x06c0, 0x0420, 0x0340, 0x0560, 0x0240, /* Codes 0-5 */ + 0x07e0, 0x0560, 0x0420, 0x0240 /* Codes 1-4 */ }; static const uint16_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x3f07, 0x3d07, 0x3c67, 0x3e07, 0x3ba7, /* Codes 0-5 */ + 0x07e0, 0x0600, 0x0500, 0x03a0 /* Codes 1-4 */ }; # endif /* DARK_PLAY_ICON */ @@ -150,13 +150,13 @@ static const uint16_t g_playBrightlLut[BITMAP_NLUTCODES] = static const uint8_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x5f, 0x3a, 0x2d, 0x4b, 0x1f /* Codes 1-5 */ + 0x6e, 0x4b, 0x3a, 0x1f /* Codes 1-4 */ }; static const uint8_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x7e, 0x4d, 0x3d, 0x64, 0x2a /* Codes 1-5 */ + 0x93, 0x64, 0x4d, 0x2a /* Codes 1-4 */ }; # else /* DARK_PLAY_ICON */ @@ -164,13 +164,13 @@ static const uint8_t g_playBrightlLut[BITMAP_NLUTCODES] = static const uint8_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x7e, 0x4d, 0x3d, 0x64, 0x2a /* Codes 1-5 */ + 0x93, 0x64, 0x4d, 0x2a /* Codes 1-4 */ }; static const uint8_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x9e, 0x79, 0x6c, 0x8a, 0x5e /* Codes 1-5 */ + 0x93, 0x70, 0x5f, 0x44 /* Codes 1-4 */ }; # endif /* DARK_PLAY_ICON */ @@ -182,13 +182,13 @@ static const uint8_t g_playBrightlLut[BITMAP_NLUTCODES] = static const nxgl_mxpixel_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x14, 0x0c, 0x08, 0x10, 0x04 /* Codes 1-5 */ + 0x14, 0x10, 0x0c, 0x04 /* Codes 1-4 */ }; static const nxgl_mxpixel_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x18, 0x10, 0x0c, 0x14, 0x08 /* Codes 1-5 */ + 0x1c, 0x14, 0x10, 0x08 /* Codes 1-4 */ }; # else /* DARK_PLAY_ICON */ @@ -196,13 +196,13 @@ static const nxgl_mxpixel_t g_playBrightlLut[BITMAP_NLUTCODES] = static const nxgl_mxpixel_t g_playNormalLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x18, 0x10, 0x0c, 0x14, 0x08 /* Codes 0-5 */ + 0x1c, 0x14, 0x10, 0x08 /* Codes 1-4 */ }; static const nxgl_mxpixel_t g_playBrightlLut[BITMAP_NLUTCODES] = { CONFIG_NXWM_DEFAULT_BACKGROUNDCOLOR, /* Code 0 */ - 0x3c, 0x34, 0x30, 0x38, 0x2c /* Codes 0-5 */ + 0x1c, 0x18, 0x14, 0x0c /* Codes 1-4 */ }; # endif /* DARK_PLAY_ICON */ @@ -213,51 +213,30 @@ static const nxgl_mxpixel_t g_playBrightlLut[BITMAP_NLUTCODES] = static const struct NXWidgets::SRlePaletteBitmapEntry g_playRleEntries[] = { - { 25, 0}, /* Row 0 */ - { 9, 0}, { 1, 1}, { 1, 2}, { 3, 3}, { 1, 2}, { 1, 1}, { 9, 0}, /* Row 1 */ - { 7, 0}, { 1, 1}, { 1, 3}, { 2, 2}, { 3, 1}, { 1, 4}, { 1, 3}, { 1, 5}, /* Row 2 */ - { 1, 2}, { 7, 0}, - { 6, 0}, { 1, 1}, { 1, 5}, { 1, 2}, { 7, 0}, { 1, 1}, { 1, 5}, { 1, 3}, /* Row 3 */ - { 6, 0}, - { 4, 0}, { 1, 1}, { 1, 2}, { 1, 5}, { 1, 4}, { 9, 0}, { 1, 1}, { 1, 2}, /* Row 4 */ - { 1, 5}, { 1, 3}, { 4, 0}, - { 3, 0}, { 1, 1}, { 1, 2}, { 1, 3}, { 1, 4}, { 1, 0}, { 1, 1}, { 10, 0}, /* Row 5 */ - { 1, 4}, { 1, 5}, { 1, 2}, { 3, 0}, - { 3, 0}, { 1, 3}, { 1, 5}, { 3, 0}, { 2, 1}, { 10, 0}, { 2, 3}, { 1, 4}, /* Row 6 */ - { 2, 0}, - { 2, 0}, { 1, 1}, { 1, 5}, { 1, 4}, { 3, 0}, { 1, 1}, { 1, 4}, { 2, 1}, /* Row 7 */ - { 8, 0}, { 1, 1}, { 1, 5}, { 1, 2}, { 2, 0}, - { 2, 0}, { 1, 3}, { 1, 2}, { 4, 0}, { 1, 1}, { 5, 4}, { 7, 0}, { 1, 1}, /* Row 8 */ - { 1, 5}, { 1, 2}, { 1, 0}, - { 1, 0}, { 1, 1}, { 1, 3}, { 1, 4}, { 4, 0}, { 1, 1}, { 7, 4}, { 6, 0}, /* Row 9 */ - { 1, 2}, { 1, 3}, { 1, 0}, - { 1, 1}, { 1, 3}, { 1, 5}, { 5, 0}, { 1, 1}, { 9, 4}, { 4, 0}, { 1, 4}, /* Row 10 */ - { 1, 2}, { 1, 4}, - { 1, 1}, { 1, 3}, { 1, 4}, { 5, 0}, { 1, 1}, { 11, 4}, { 2, 0}, { 1, 4}, /* Row 11 */ - { 1, 2}, { 1, 4}, - { 1, 1}, { 1, 5}, { 1, 1}, { 5, 0}, { 1, 4}, { 9, 2}, { 2, 3}, { 1, 5}, /* Row 12 */ - { 1, 0}, { 1, 4}, { 1, 2}, { 1, 4}, - { 1, 1}, { 1, 3}, { 1, 1}, { 5, 0}, { 1, 4}, { 7, 2}, { 3, 3}, { 1, 5}, /* Row 13 */ - { 2, 0}, { 1, 4}, { 1, 2}, { 1, 4}, - { 1, 1}, { 1, 3}, { 1, 4}, { 5, 0}, { 1, 4}, { 5, 2}, { 3, 3}, { 1, 5}, /* Row 14 */ - { 4, 0}, { 1, 2}, { 1, 3}, { 1, 4}, - { 1, 0}, { 1, 2}, { 1, 3}, { 5, 0}, { 1, 4}, { 3, 2}, { 3, 3}, { 1, 5}, /* Row 15 */ - { 5, 0}, { 1, 1}, { 1, 5}, { 1, 2}, { 1, 0}, - { 2, 0}, { 1, 5}, { 1, 4}, { 4, 0}, { 1, 4}, { 2, 2}, { 2, 3}, { 1, 5}, /* Row 16 */ - { 7, 0}, { 1, 2}, { 1, 5}, { 2, 0}, - { 2, 0}, { 1, 2}, { 1, 5}, { 1, 1}, { 3, 0}, { 1, 4}, { 2, 3}, { 1, 5}, /* Row 17 */ - { 8, 0}, { 1, 1}, { 1, 3}, { 1, 2}, { 2, 0}, - { 3, 0}, { 1, 2}, { 1, 3}, { 3, 0}, { 1, 3}, { 1, 5}, { 9, 0}, { 1, 1}, /* Row 18 */ - { 2, 3}, { 3, 0}, - { 3, 0}, { 1, 1}, { 1, 5}, { 1, 2}, { 2, 0}, { 1, 5}, { 9, 0}, { 1, 1}, /* Row 19 */ - { 1, 4}, { 1, 5}, { 4, 0}, - { 4, 0}, { 1, 1}, { 1, 5}, { 1, 3}, { 10, 0}, { 1, 1}, { 1, 3}, { 1, 5}, /* Row 20 */ - { 5, 0}, - { 6, 0}, { 1, 2}, { 1, 5}, { 1, 4}, { 6, 0}, { 1, 1}, { 1, 2}, { 1, 5}, /* Row 21 */ - { 1, 2}, { 6, 0}, - { 7, 0}, { 1, 3}, { 3, 5}, { 3, 3}, { 2, 5}, { 1, 3}, { 1, 2}, { 7, 0}, /* Row 22 */ - { 9, 0}, { 1, 4}, { 2, 2}, { 1, 3}, { 2, 2}, { 1, 4}, { 9, 0}, /* Row 23 */ - { 25, 0}, /* Row 24 */ + { 2, 1}, { 22, 0}, /* Row 0 */ + { 2, 2}, { 2, 1}, { 20, 0}, /* Row 1 */ + { 4, 2}, { 2, 1}, { 18, 0}, /* Row 2 */ + { 6, 2}, { 2, 1}, { 16, 0}, /* Row 3 */ + { 8, 2}, { 2, 1}, { 14, 0}, /* Row 4 */ + { 10, 2}, { 2, 1}, { 12, 0}, /* Row 5 */ + { 12, 2}, { 2, 1}, { 10, 0}, /* Row 6 */ + { 14, 2}, { 2, 1}, { 8, 0}, /* Row 7 */ + { 16, 2}, { 2, 1}, { 6, 0}, /* Row 8 */ + { 18, 2}, { 2, 1}, { 4, 0}, /* Row 9 */ + { 20, 2}, { 2, 1}, { 2, 0}, /* Row 10 */ + { 22, 2}, { 2, 1}, /* Row 11 */ + { 22, 3}, { 2, 4}, /* Row 12 */ + { 20, 3}, { 2, 4}, { 2, 0}, /* Row 13 */ + { 18, 3}, { 2, 4}, { 4, 0}, /* Row 14 */ + { 16, 3}, { 2, 4}, { 6, 0}, /* Row 15 */ + { 14, 3}, { 2, 4}, { 8, 0}, /* Row 16 */ + { 12, 3}, { 2, 4}, { 10, 0}, /* Row 17 */ + { 10, 3}, { 2, 4}, { 12, 0}, /* Row 18 */ + { 8, 3}, { 2, 4}, { 14, 0}, /* Row 19 */ + { 6, 3}, { 2, 4}, { 16, 0}, /* Row 20 */ + { 4, 3}, { 2, 4}, { 18, 0}, /* Row 21 */ + { 2, 3}, { 2, 4}, { 20, 0}, /* Row 22 */ + { 2, 4}, { 22, 0}, /* Row 23 */ }; /******************************************************************************************** diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 0f7e5af3a5..b33ad446f6 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2730,5 +2730,9 @@ * configs/sam3u-ek, configs/sim, arch/sim/src/up_touchscreen.c, and apps/examples/touchscreen: Standardize the board-specific, touchscreen initialization interfaces. - + * drivers/input/stmpe11_base.c and configs/stm3240g-eval: The STMPE11-based + touchscreen seems to work better with edge (vs. level) interrupts + * drivers/input/stmpe11_tsc.c: Fix some status checks so that the touchscreen + interrupt handling logic does not read data if the fifo is not at the + threshold level. diff --git a/nuttx/Documentation/NuttxPortingGuide.html b/nuttx/Documentation/NuttxPortingGuide.html index 0eec8d12af..4ded08f0fb 100644 --- a/nuttx/Documentation/NuttxPortingGuide.html +++ b/nuttx/Documentation/NuttxPortingGuide.html @@ -4690,7 +4690,11 @@ build
CONFIG_STMPE11_ACTIVELOW:
- Interrupt is generated by an active low signal.
+ Interrupt is generated by an active low signal (or falling edge).
+ CONFIG_STMPE11_EDGE:
+ Interrupt is generated on an edge (vs. on the active level)
CONFIG_STMPE11_NPOLLWAITERS:
diff --git a/nuttx/configs/README.txt b/nuttx/configs/README.txt
index 6bd4598017..15ff30e114 100644
--- a/nuttx/configs/README.txt
+++ b/nuttx/configs/README.txt
@@ -793,7 +793,9 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_STMPE11_MULTIPLE
Can be defined to support multiple STMPE11 devices on board.
CONFIG_STMPE11_ACTIVELOW
- Interrupt is generated by an active low signal.
+ Interrupt is generated by an active low signal (or falling edge).
+ CONFIG_STMPE11_EDGE
+ Interrupt is generated on an edge (vs. on the active level)
CONFIG_STMPE11_NPOLLWAITERS
Maximum number of threads that can be waiting on poll() (ignored if
CONFIG_DISABLE_POLL is set).
diff --git a/nuttx/configs/stm3240g-eval/nsh/defconfig b/nuttx/configs/stm3240g-eval/nsh/defconfig
index 5f89450756..a0131c9932 100644
--- a/nuttx/configs/stm3240g-eval/nsh/defconfig
+++ b/nuttx/configs/stm3240g-eval/nsh/defconfig
@@ -968,7 +968,9 @@ CONFIG_INPUT_TSC2007=n
# CONFIG_STMPE11_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board.
# CONFIG_STMPE11_ACTIVELOW
-# Interrupt is generated by an active low signal.
+# Interrupt is generated by an active low signal (or falling edge).
+# CONFIG_STMPE11_EDGE
+# Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set).
@@ -994,6 +996,7 @@ CONFIG_STMPE11_SPI=n
CONFIG_STMPE11_I2C=y
CONFIG_STMPE11_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y
+CONFIG_STMPE11_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y
diff --git a/nuttx/configs/stm3240g-eval/nxwm/defconfig b/nuttx/configs/stm3240g-eval/nxwm/defconfig
index 10ffa08795..3242948f30 100644
--- a/nuttx/configs/stm3240g-eval/nxwm/defconfig
+++ b/nuttx/configs/stm3240g-eval/nxwm/defconfig
@@ -968,7 +968,9 @@ CONFIG_INPUT_TSC2007=n
# CONFIG_STMPE11_MULTIPLE
# Can be defined to support multiple STMPE11 devices on board.
# CONFIG_STMPE11_ACTIVELOW
-# Interrupt is generated by an active low signal.
+# Interrupt is generated by an active low signal (or falling edge).
+# CONFIG_STMPE11_EDGE
+# Interrupt is generated on an edge (vs. on the active level)
# CONFIG_STMPE11_NPOLLWAITERS
# Maximum number of threads that can be waiting on poll() (ignored if
# CONFIG_DISABLE_POLL is set).
@@ -994,6 +996,7 @@ CONFIG_STMPE11_SPI=n
CONFIG_STMPE11_I2C=y
CONFIG_STMPE11_MULTIPLE=y
CONFIG_STMPE11_ACTIVELOW=y
+CONFIG_STMPE11_EDGE=y
#CONFIG_STMPE11_NPOLLWAITERS
CONFIG_STMPE11_TSC_DISABLE=n
CONFIG_STMPE11_ADC_DISABLE=y
diff --git a/nuttx/configs/stm3240g-eval/src/up_stmpe11.c b/nuttx/configs/stm3240g-eval/src/up_stmpe11.c
index e06e203e71..72482c92cc 100644
--- a/nuttx/configs/stm3240g-eval/src/up_stmpe11.c
+++ b/nuttx/configs/stm3240g-eval/src/up_stmpe11.c
@@ -49,6 +49,8 @@
#include