Skip to content

Commit

Permalink
More trailing whilespace removal
Browse files Browse the repository at this point in the history
  • Loading branch information
gregory-nutt committed Apr 13, 2014
1 parent 890beea commit 3a13247
Show file tree
Hide file tree
Showing 349 changed files with 1,082 additions and 1,082 deletions.
4 changes: 2 additions & 2 deletions drivers/analog/ad5410.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2011 Li Zhuoyi. All rights reserved.
* Author: Li Zhuoyi <[email protected]>
* History: 0.1 2011-08-05 initial version
*
*
* This file is a part of NuttX:
*
* Copyright (C) 2010 Gregory Nutt. All rights reserved.
Expand Down Expand Up @@ -63,7 +63,7 @@

#define AD5410_CMD_REXT (1<<13)
#define AD5410_CMD_OUTEN (1<<12)
#define AD5410_CMD_SRCLK(x) (x<<8)
#define AD5410_CMD_SRCLK(x) (x<<8)
#define AD5410_CMD_SRSTEP(x) (x<<5)
#define AD5410_CMD_SREN (1<<4)
#define AD5410_CMD_DCEN (1<<3)
Expand Down
2 changes: 1 addition & 1 deletion drivers/analog/ads1255.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2011 Li Zhuoyi. All rights reserved.
* Author: Li Zhuoyi <[email protected]>
* History: 0.1 2011-08-05 initial version
* 0.2 2011-08-25 fix bug in g_adcdev (cd_ops -> ad_ops,cd_priv -> ad_priv)
* 0.2 2011-08-25 fix bug in g_adcdev (cd_ops -> ad_ops,cd_priv -> ad_priv)
*
* This file is a part of NuttX:
*
Expand Down
2 changes: 1 addition & 1 deletion drivers/analog/dac.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Copyright (C) 2011 Li Zhuoyi. All rights reserved.
* Author: Li Zhuoyi <[email protected]>
* History: 0.1 2011-08-04 initial version
*
*
* Derived from drivers/can.c
*
* Copyright (C) 2008-2009Gregory Nutt. All rights reserved.
Expand Down
2 changes: 1 addition & 1 deletion drivers/audio/i2schar.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ int i2schar_register(FAR struct i2s_dev_s *i2s, int minor)

return OK;
}


return -ENOMEM;
}
2 changes: 1 addition & 1 deletion drivers/bch/bchlib_read.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset, size_t le
{
nbytes = bch->sectsize - sectoffset;
}
else
else
{
nbytes = len;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/bch/bchlib_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ ssize_t bchlib_write(FAR void *handle, FAR const char *buffer, size_t offset, si
{
nbytes = bch->sectsize - sectoffset;
}
else
else
{
nbytes = len;
}
Expand Down
8 changes: 4 additions & 4 deletions drivers/input/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ config INPUT_ADS7843E
---help---
Enable support for the TI/Burr-Brown ADS7842 touchscreen controller. I believe
that driver should be compatibile with the TI/Burr-Brown TSC2046 and XPT2046
touchscreen controllers as well.
touchscreen controllers as well.

if INPUT_ADS7843E

Expand Down Expand Up @@ -116,7 +116,7 @@ config ADS7843E_THRESHX
thresholds. This trades reduces data rate for some loss in dragging accuracy. For
12-bit values so the raw ranges are 0-4095. So for example, if your display is
320x240, then THRESHX=13 and THRESHY=17 would correspond to one pixel. Default: 12

config ADS7843E_THRESHY
int "Y threshold"
default 12
Expand All @@ -132,7 +132,7 @@ config INPUT_STMPE811
bool "STMicro STMPE811 Driver"
default n
---help---
Enables support for the STMPE811 driver
Enables support for the STMPE811 driver

if INPUT_STMPE811

Expand Down Expand Up @@ -210,7 +210,7 @@ config STMPE811_THRESHX
STMPE811 is configure for 12-bit values so the raw ranges are 0-4095. So
for example, if your display is 320x240, then THRESHX=13 and THRESHY=17
would correspond to one pixel. Default: 12

config STMPE811_THRESHY
int "Y threshold"
default 12
Expand Down
36 changes: 18 additions & 18 deletions drivers/input/max11802.c
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ static uint16_t max11802_sendcmd(FAR struct max11802_dev_s *priv, uint8_t cmd, i
/* Send the command */

(void)SPI_SEND(priv->spi, cmd);

/* Read the data */

SPI_RECVBLOCK(priv->spi, buffer, 2);
Expand All @@ -278,7 +278,7 @@ static uint16_t max11802_sendcmd(FAR struct max11802_dev_s *priv, uint8_t cmd, i
result = ((uint16_t)buffer[0] << 8) | (uint16_t)buffer[1];
*tags = result & 0xF;
result >>= 4; // Get rid of tags

ivdbg("cmd:%02x response:%04x\n", cmd, result);
return result;
}
Expand All @@ -303,7 +303,7 @@ static void max11802_notify(FAR struct max11802_dev_s *priv)
* is no longer available.
*/

sem_post(&priv->waitsem);
sem_post(&priv->waitsem);
}

/* If there are threads waiting on poll() for MAX11802 data to become available,
Expand Down Expand Up @@ -415,7 +415,7 @@ static int max11802_waitsample(FAR struct max11802_dev_s *priv,
while (max11802_sample(priv, sample) < 0)
{
/* Wait for a change in the MAX11802 state */

ivdbg("Waiting..\n");
priv->nwaiters++;
ret = sem_wait(&priv->waitsem);
Expand Down Expand Up @@ -548,10 +548,10 @@ static void max11802_worker(FAR void *arg)
/* Lock the SPI bus so that we have exclusive access */

max11802_lock(priv->spi);

/* Start coordinate measurement */
(void)max11802_sendcmd(priv, MAX11802_CMD_MEASUREXY, &tags);

/* Get exclusive access to the driver data structure */

do
Expand All @@ -576,7 +576,7 @@ static void max11802_worker(FAR void *arg)
ivdbg("\nPD\n");
else
ivdbg("\nPU\n");

if (!pendown)
{
/* The pen is up.. reset thresholding variables. */
Expand All @@ -589,7 +589,7 @@ static void max11802_worker(FAR void *arg)
*/

ivdbg("\nPC%d\n", priv->sample.contact);

if (priv->sample.contact == CONTACT_NONE ||
priv->sample.contact == CONTACT_UP)

Expand Down Expand Up @@ -632,11 +632,11 @@ static void max11802_worker(FAR void *arg)
* the hardware value can change in the middle of the readout,
* causing the upper bits to be still invalid even though lower
* bits indicate valid result.
*
*
* We work around this by reading the registers once more after
* the tags indicate they are ready.
*/

int readycount = 0;
do {
#ifdef CONFIG_MAX11802_SWAPXY
Expand All @@ -651,17 +651,17 @@ static void max11802_worker(FAR void *arg)
readycount++;
}
} while (readycount < 2);

/* Continue to sample the position while the pen is down */
wd_start(priv->wdog, MAX11802_WDOG_DELAY, max11802_wdog, 1, (uint32_t)priv);

/* Check if data is valid */
if ((tags & 0x03) != 0)
{
ivdbg("Touch ended before measurement\n");
goto ignored;
}

/* Perform a thresholding operation so that the results will be more stable.
* If the difference from the last sample is small, then ignore the event.
* REVISIT: Should a large change in pressure also generate a event?
Expand Down Expand Up @@ -1253,27 +1253,27 @@ int max11802_register(FAR struct spi_dev_s *spi,
(void)SPI_SEND(priv->spi, MAX11802_CMD_TIMING_WR);
(void)SPI_SEND(priv->spi, MAX11802_TIMING);
SPI_SELECT(priv->spi, SPIDEV_TOUCHSCREEN, false);

SPI_SELECT(priv->spi, SPIDEV_TOUCHSCREEN, true);
(void)SPI_SEND(priv->spi, MAX11802_CMD_DELAY_WR);
(void)SPI_SEND(priv->spi, MAX11802_DELAY);
SPI_SELECT(priv->spi, SPIDEV_TOUCHSCREEN, false);

/* Test that the device access was successful. */
SPI_SELECT(priv->spi, SPIDEV_TOUCHSCREEN, true);
(void)SPI_SEND(priv->spi, MAX11802_CMD_MODE_RD);
ret = SPI_SEND(priv->spi, 0);
SPI_SELECT(priv->spi, SPIDEV_TOUCHSCREEN, false);

/* Unlock the bus */
max11802_unlock(spi);

if (ret != MAX11802_MODE)
{
idbg("max11802 mode readback failed: %02x\n", ret);
goto errout_with_priv;
}

/* Register the device as an input device */

(void)snprintf(devname, DEV_NAMELEN, DEV_FORMAT, minor);
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/stmpe811_adc.c
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ uint16_t stmpe811_adcread(STMPE811_HANDLE handle, int pin)
/* At the completion of the conversion, return whatever we read from
* from the channel register associated with the pin.
*/

return stmpe811_getreg16(priv, STMPE811_ADC_DATACH(pin));
}

Expand Down
8 changes: 4 additions & 4 deletions drivers/input/stmpe811_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ uint8_t stmpe811_getreg8(FAR struct stmpe811_dev_s *priv, uint8_t regaddr)
{
/* 8-bit data read sequence:
*
* Start - I2C_Write_Address - STMPE811_Reg_Address -
* Start - I2C_Write_Address - STMPE811_Reg_Address -
* Repeated_Start - I2C_Read_Address - STMPE811_Read_Data - STOP
*/

Expand All @@ -414,7 +414,7 @@ uint8_t stmpe811_getreg8(FAR struct stmpe811_dev_s *priv, uint8_t regaddr)
* (no STOP) */

/* Set up the 8-bit STMPE811 data read message */

msg[1].addr = priv->config->address; /* 7-bit address */
msg[1].flags = I2C_M_READ; /* Read transaction, beginning with Re-START */
msg[1].buffer = &regval; /* Transfer to this address */
Expand Down Expand Up @@ -500,7 +500,7 @@ uint16_t stmpe811_getreg16(FAR struct stmpe811_dev_s *priv, uint8_t regaddr)
{
/* 16-bit data read sequence:
*
* Start - I2C_Write_Address - STMPE811_Reg_Address -
* Start - I2C_Write_Address - STMPE811_Reg_Address -
* Repeated_Start - I2C_Read_Address - STMPE811_Read_Data_1 -
* STMPE811_Read_Data_2 - STOP
*/
Expand All @@ -519,7 +519,7 @@ uint16_t stmpe811_getreg16(FAR struct stmpe811_dev_s *priv, uint8_t regaddr)
* (no STOP) */

/* Set up the 8-bit STMPE811 data read message */

msg[1].addr = priv->config->address; /* 7-bit address */
msg[1].flags = I2C_M_READ; /* Read transaction, beginning with Re-START */
msg[1].buffer = rxbuffer; /* Transfer to this address */
Expand Down
2 changes: 1 addition & 1 deletion drivers/input/stmpe811_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ int stmpe811_gpioconfig(STMPE811_HANDLE handle, uint8_t pinconfig)
regval &= pinmask;
}
stmpe811_putreg8(priv, STMPE811_GPIO_RE, regval);

/* Disable interrupts for now */

regval = stmpe811_getreg8(priv, STMPE811_GPIO_EN);
Expand Down
10 changes: 5 additions & 5 deletions drivers/input/stmpe811_temp.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ int stmpe811_tempinitialize(STMPE811_HANDLE handle)
/* Enable the temperature sensor */

stmpe811_putreg8(priv, STMPE811_TEMP_CTRL, TEMP_CTRL_ENABLE);

/* Aquire data enable */

stmpe811_putreg8(priv, STMPE811_TEMP_CTRL, (TEMP_CTRL_ACQ|TEMP_CTRL_ENABLE));

return OK;
}

Expand All @@ -124,14 +124,14 @@ int stmpe811_tempinitialize(STMPE811_HANDLE handle)
uint16_t stmpe811_tempread(STMPE811_HANDLE handle)
{
FAR struct stmpe811_dev_s *priv = (FAR struct stmpe811_dev_s *)handle;
uint32_t temp = 0;
uint32_t temp = 0;
uint8_t temp1;
uint8_t temp2;

/* Acquire data enable */

stmpe811_putreg8(priv, STMPE811_TEMP_CTRL, (TEMP_CTRL_ACQ|TEMP_CTRL_ENABLE));

/* Read the temperature */

temp1 = stmpe811_getreg8(priv, STMPE811_SYS_CTRL2);
Expand Down
6 changes: 3 additions & 3 deletions drivers/input/stmpe811_tsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ static void stmpe811_notify(FAR struct stmpe811_dev_s *priv)
* is no longer available.
*/

sem_post(&priv->waitsem);
sem_post(&priv->waitsem);
}

/* If there are threads waiting on poll() for STMPE811 data to become available,
Expand Down Expand Up @@ -297,7 +297,7 @@ static inline int stmpe811_waitsample(FAR struct stmpe811_dev_s *priv,
while (stmpe811_sample(priv, sample) < 0)
{
/* Wait for a change in the STMPE811 state */

priv->nwaiters++;
ret = sem_wait(&priv->waitsem);
priv->nwaiters--;
Expand Down Expand Up @@ -1133,7 +1133,7 @@ void stmpe811_tscworker(FAR struct stmpe811_dev_s *priv, uint8_t intsta)
(void)wd_start(priv->wdog, STMPE811_PENUP_TICKS, stmpe811_timeout,
1, (uint32_t)((uintptr_t)priv));
}

/* Reset and clear all data in the FIFO */

stmpe811_putreg8(priv, STMPE811_FIFO_STA, FIFO_STA_FIFO_RESET);
Expand Down
Loading

0 comments on commit 3a13247

Please sign in to comment.