diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-10-12 17:37:15 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2011-10-12 17:37:15 +0000 |
commit | 13b1e4d5c583c69e93f52ada836aabad691e9fd3 (patch) | |
tree | af69144a82d6b45d539f715d78468afd69d2dddc /nuttx/configs/sam3u-ek/src/up_touchscreen.c | |
parent | 707848e89c9ae1163fb94932d67ebdf1161776e3 (diff) | |
download | px4-nuttx-13b1e4d5c583c69e93f52ada836aabad691e9fd3.tar.gz px4-nuttx-13b1e4d5c583c69e93f52ada836aabad691e9fd3.tar.bz2 px4-nuttx-13b1e4d5c583c69e93f52ada836aabad691e9fd3.zip |
ADS7843 updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4042 42af7a65-404d-4744-a932-0658087f49c3
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; } |