Fix code style: platform/zoul

This commit is contained in:
George Oikonomou 2015-11-24 12:09:23 +00:00 committed by Antonio Lignan
parent a30154c43e
commit 8727fef05b
11 changed files with 50 additions and 53 deletions

View File

@ -74,7 +74,7 @@ typedef uint32_t uip_stats_t;
* RTIMER_CLOCK_LT to override this
*/
typedef uint32_t rtimer_clock_t;
#define RTIMER_CLOCK_LT(a,b) ((int32_t)((a)-(b)) < 0)
#define RTIMER_CLOCK_LT(a, b) ((int32_t)((a) - (b)) < 0)
/** @} */
/*---------------------------------------------------------------------------*/
/**
@ -225,7 +225,7 @@ typedef uint32_t rtimer_clock_t;
* This will keep working while UIP_FALLBACK_INTERFACE and CMD_CONF_OUTPUT
* keep using SLIP
*/
#if defined (UIP_FALLBACK_INTERFACE) || defined (CMD_CONF_OUTPUT)
#if defined(UIP_FALLBACK_INTERFACE) || defined(CMD_CONF_OUTPUT)
#define SLIP_ARCH_CONF_ENABLED 1
#endif
#endif

View File

@ -99,7 +99,7 @@ cc1200_arch_spi_select(void)
/* The MISO pin should go low before chip is fully enabled. */
BUSYWAIT_UNTIL(
GPIO_READ_PIN(CC1200_SPI_MISO_PORT_BASE, CC1200_SPI_MISO_PIN_MASK) == 0,
RTIMER_SECOND/100);
RTIMER_SECOND / 100);
}
/*---------------------------------------------------------------------------*/
void
@ -129,7 +129,6 @@ cc1200_arch_spi_rw(uint8_t *inbuf, const uint8_t *write_buf, uint16_t len)
if((inbuf == NULL && write_buf == NULL) || len <= 0) {
return 1;
} else if(inbuf == NULL) {
for(i = 0; i < len; i++) {
SPI_WAITFORTx_BEFORE();
@ -140,7 +139,6 @@ cc1200_arch_spi_rw(uint8_t *inbuf, const uint8_t *write_buf, uint16_t len)
/* read and discard to avoid "variable set but not used" warning */
(void)c;
}
} else if(write_buf == NULL) {
for(i = 0; i < len; i++) {
SPI_WAITFORTx_BEFORE();
@ -149,7 +147,6 @@ cc1200_arch_spi_rw(uint8_t *inbuf, const uint8_t *write_buf, uint16_t len)
SPIX_WAITFOREORx(CC1200_SPI_INSTANCE);
inbuf[i] = SPIX_BUF(CC1200_SPI_INSTANCE);
}
} else {
for(i = 0; i < len; i++) {
SPI_WAITFORTx_BEFORE();
@ -171,7 +168,7 @@ cc1200_arch_gpio0_setup_irq(int rising)
GPIO_DETECT_EDGE(CC1200_GDO0_PORT_BASE, CC1200_GDO0_PIN_MASK);
GPIO_TRIGGER_SINGLE_EDGE(CC1200_GDO0_PORT_BASE, CC1200_GDO0_PIN_MASK);
if (rising){
if(rising) {
GPIO_DETECT_RISING(CC1200_GDO0_PORT_BASE, CC1200_GDO0_PIN_MASK);
} else {
GPIO_DETECT_FALLING(CC1200_GDO0_PORT_BASE, CC1200_GDO0_PIN_MASK);
@ -193,7 +190,7 @@ cc1200_arch_gpio2_setup_irq(int rising)
GPIO_DETECT_EDGE(CC1200_GDO2_PORT_BASE, CC1200_GDO2_PIN_MASK);
GPIO_TRIGGER_SINGLE_EDGE(CC1200_GDO2_PORT_BASE, CC1200_GDO2_PIN_MASK);
if (rising){
if(rising) {
GPIO_DETECT_RISING(CC1200_GDO2_PORT_BASE, CC1200_GDO2_PIN_MASK);
} else {
GPIO_DETECT_FALLING(CC1200_GDO2_PORT_BASE, CC1200_GDO2_PIN_MASK);
@ -279,7 +276,7 @@ cc1200_arch_init(void)
/* Ensure MISO is high */
BUSYWAIT_UNTIL(
GPIO_READ_PIN(CC1200_SPI_MISO_PORT_BASE, CC1200_SPI_MISO_PIN_MASK),
RTIMER_SECOND/10);
RTIMER_SECOND / 10);
}
/*---------------------------------------------------------------------------*/
/**

View File

@ -113,7 +113,7 @@ sht25_read(uint8_t variable, uint16_t *rd)
return SHT25_ERROR;
}
if (sht25_read_reg(variable, buf, 2) == SHT25_SUCCESS){
if(sht25_read_reg(variable, buf, 2) == SHT25_SUCCESS) {
raw = (buf[0] << 8) + buf[1];
*rd = sht25_convert(variable, raw);
return SHT25_SUCCESS;
@ -125,7 +125,7 @@ static int
value(int type)
{
uint16_t val;
if (sht25_read(type, &val) == SHT25_SUCCESS){
if(sht25_read(type, &val) == SHT25_SUCCESS) {
return val;
}
return SHT25_ERROR;

View File

@ -44,7 +44,7 @@
static void
configure_unused_pins(void)
{
// FIXME
/* FIXME */
}
/*---------------------------------------------------------------------------*/
void

View File

@ -45,7 +45,7 @@
static void
configure_unused_pins(void)
{
// FIXME
/* FIXME */
}
/*---------------------------------------------------------------------------*/
void