mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
ADS7843 updates
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4042 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -161,7 +161,6 @@ void weak_function sam3u_spiinitialize(void)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_SAM3U_SPI
|
||||
int sam3u_spicsnumber(enum spi_dev_e devid)
|
||||
{
|
||||
int cs = -EINVAL;
|
||||
@@ -240,6 +239,5 @@ uint8_t sam3u_spistatus(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_SAM3U_SPI */
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user