diff options
Diffstat (limited to 'nuttx/configs/sam3u-ek/src/up_touchscreen.c')
-rwxr-xr-x | nuttx/configs/sam3u-ek/src/up_touchscreen.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/nuttx/configs/sam3u-ek/src/up_touchscreen.c b/nuttx/configs/sam3u-ek/src/up_touchscreen.c index 9b58f151c..0de367ec9 100755 --- a/nuttx/configs/sam3u-ek/src/up_touchscreen.c +++ b/nuttx/configs/sam3u-ek/src/up_touchscreen.c @@ -179,10 +179,20 @@ static void tsc_clear(FAR struct ads7843e_config_s *state) static bool tsc_busy(FAR struct ads7843e_config_s *state) { +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) + static bool last = (bool)-1; +#endif + /* REVISIT: This might need to be inverted */ bool busy = sam3u_gpioread(GPIO_TCS_BUSY); - ivdbg("busy:%d\n", busy); +#if defined(CONFIG_DEBUG_INPUT) && defined(CONFIG_DEBUG_VERBOSE) + if (busy != last) + { + ivdbg("busy:%d\n", busy); + last = busy; + } +#endif return busy; } |