mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 08:36:24 +08:00
Squashed commit of the following:
Author: Alan Carvalho de Assis <acassis@gmail.com>
Run all .h and .c files modified in last PR through nxstyle.
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Fix stm32l4_otgfshost.c: error: 'ret' undeclared (#32)
result by commit 6a3c2aded6
Change-Id: I68ba79417d8da102da8d91c74496961aef242dd9
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alan Carvalho de Assis
parent
9b2fa8152c
commit
d612fd3dc5
@@ -96,6 +96,7 @@
|
||||
/****************************************************************************
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
/* Low-level SPI helpers */
|
||||
|
||||
static void ads7843e_lock(FAR struct spi_dev_s *spi);
|
||||
@@ -268,7 +269,7 @@ static uint16_t ads7843e_sendcmd(FAR struct ads7843e_dev_s *priv, uint8_t cmd)
|
||||
|
||||
/* Wait a tiny amount to make sure that the acquisition time is complete */
|
||||
|
||||
up_udelay(3); /* 3 microseconds */
|
||||
up_udelay(3); /* 3 microseconds */
|
||||
|
||||
/* Read the 12-bit data (LS 4 bits will be padded with zero) */
|
||||
|
||||
@@ -361,11 +362,11 @@ static int ads7843e_sample(FAR struct ads7843e_dev_s *priv,
|
||||
priv->id++;
|
||||
}
|
||||
else if (sample->contact == CONTACT_DOWN)
|
||||
{
|
||||
{
|
||||
/* First report -- next report will be a movement */
|
||||
|
||||
priv->sample.contact = CONTACT_MOVE;
|
||||
}
|
||||
priv->sample.contact = CONTACT_MOVE;
|
||||
}
|
||||
|
||||
priv->penchange = false;
|
||||
ret = OK;
|
||||
@@ -418,10 +419,6 @@ static int ads7843e_waitsample(FAR struct ads7843e_dev_s *priv,
|
||||
|
||||
if (ret < 0)
|
||||
{
|
||||
/* If we are awakened by a signal, then we need to return
|
||||
* the failure now.
|
||||
*/
|
||||
|
||||
ierr("ERROR: nxsem_wait: %d\n", ret);
|
||||
goto errout;
|
||||
}
|
||||
@@ -588,9 +585,9 @@ static void ads7843e_worker(FAR void *arg)
|
||||
* later.
|
||||
*/
|
||||
|
||||
wd_start(priv->wdog, ADS7843E_WDOG_DELAY, ads7843e_wdog, 1,
|
||||
(uint32_t)priv);
|
||||
goto ignored;
|
||||
wd_start(priv->wdog, ADS7843E_WDOG_DELAY, ads7843e_wdog, 1,
|
||||
(uint32_t)priv);
|
||||
goto ignored;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -877,7 +874,7 @@ static ssize_t ads7843e_read(FAR struct file *filep, FAR char *buffer, size_t le
|
||||
{
|
||||
ret = -EAGAIN;
|
||||
goto errout;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wait for sample data */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user