Fix dangling white space at the end of lines.

This commit is contained in:
Gregory Nutt 2017-07-03 10:08:49 -06:00
parent dd2ca20bad
commit 053b6e3d9f
5 changed files with 43 additions and 501 deletions

View File

@ -993,226 +993,116 @@ static int at86rf23x_gettxpower(FAR struct ieee802154_radio_s *ieee,
/* Right now we only get negative values */ /* Right now we only get negative values */
reg = at86rf23x_getreg(dev->spi, RF23X_REG_TXPWR); reg = at86rf23x_getreg(dev->spi, RF23X_REG_TXPWR);
switch (reg) switch (reg)
{ {
case RF23X_TXPWR_POS_4: case RF23X_TXPWR_POS_4:
*txpwr = 0; *txpwr = 0;
break; break;
case RF23X_TXPWR_POS_3_7:
*txpwr =0;
case RF23X_TXPWR_POS_3_7:
*txpwr =
0;
break; break;
case RF23X_TXPWR_POS_3_4:
case RF23X_TXPWR_POS_3_4:
*txpwr = 0; *txpwr = 0;
break; break;
case RF23X_TXPWR_POS_3: case RF23X_TXPWR_POS_3:
*txpwr =
0;
break;
case RF23X_
TXPWR_POS_2_5:
*txpwr = 0;
break;
case RF23X_TXPWR_POS_2:
*txpwr = 0; *txpwr = 0;
break; break;
case RF23X_TXPWR_POS_2_5:
*txpwr = 0;
break;
case RF23X_TXPWR_POS_2:
*txpwr = 0;
break;
case RF23X_TXPWR_POS_1: case RF23X_TXPWR_POS_1:
*txpwr = 0; *txpwr = 0;
break; break;
case RF23X_TXPWR_0:
*txpwr =0;
case RF23X_TXPWR_0:
*txpwr =
0;
break; break;
case RF23X_TXPWR_NEG_1:
case RF23X_TXPWR_NEG_1:
*txpwr = 1000; *txpwr = 1000;
break; break;
case RF23X_TXPWR_NEG_2:
case RF23X_TXPWR_NE
G_2:
*txpwr = 2000; *txpwr = 2000;
break; break;
case RF23X_TXPWR_NEG_3: case RF23X_TXPWR_NEG_3:
*txpwr = 3000;
*txpwr = 3000;
break; break;
case RF23X_TXPWR_NEG_4: case RF23X_TXPWR_NEG_4:
*txpwr = 4000;
break;
*txpwr = 4000;
break;
case RF23X_TXPWR_NEG_6: case RF23X_TXPWR_NEG_6:
*txpwr = 6000; *txpwr = 6000;
break; break;
case RF23X_TXPWR_NEG_8: case RF23X_TXPWR_NEG_8:
*txpwr = 8000; *txpwr = 8000;
break; break;
case RF23X_TXPWR_NEG_12:
ca
se RF23X_TXPWR_NEG_12:
*txpwr = 12000; *txpwr = 12000;
break; break;
case RF23X_TXPWR_NEG_17: case RF23X_TXPWR_NEG_17:
*txpwr = 17000;
*txpwr = 17 break;
000;
break;
} }
return OK; return OK;
} }
/****************************************************************************
/****
************************************************************************
* Name: at86rf23x_setcca * Name: at86rf23x_setcca
* *
* Description: * Description:
* Configures if energy detection is used or carrier sense. The base * Configures if energy detection is used or carrier sense. The base
* measurement is configured here as well * measurement is configured here as well
* *
****************************************************************************/
*
*************************************************************************
***/
static static
int at86rf23x_setcca(FAR struct ieee802154_radio_s *ieee, int at86rf23x_setcca(FAR struct ieee802154_radio_s *ieee,
FAR struct ieee802154_cca_s *cca)
FAR struct ieee802154_cca_s *cca)
{ {
FAR struct at86rf23x_dev_s *dev = (struct at86rf23x_dev_s *)ieee; FAR struct at86rf23x_dev_s *dev = (struct at86rf23x_dev_s *)ieee;
/* TODO: This doesn't fit the RF233 completely come back to this */ /* TODO: This doesn't fit the RF233 completely come back to this */
if (!cca->use_ed && !cca->use_cs) if (!cca->use_ed && !cca->use_cs)
{ {
return -EINVAL; return -EINVAL;
} }
if (cca->use_cs && cca->csth > 0x0f) if (cca->use_cs && cca->csth > 0x0f)
{ {
return -EINVAL; return -EINVAL;
} }
if (cca->use_ed) if (cca->use_ed)
{
{
at86rf23x_setregbits(dev->spi, RF23X_CCA_BITS_MODE, RF23X_CCA_MODE_ED); at86rf23x_setregbits(dev->spi, RF23X_CCA_BITS_MODE, RF23X_CCA_MODE_ED);
} }
if (cca->use_cs)
if (cca->use_cs)
{ {
at86rf23x_setregbits(dev->spi, RF23X_CCA_BITS_MODE, RF23X_CCA_MODE_CS);
at86rf23x_setregbits(dev->spi, RF23X_CCA_BITS_MODE, RF23X_CCA
_MODE_CS);
} }
memcpy(&dev->cca, cca, sizeof(struct ieee802154_cca_s));
memcpy(&dev->cca, cca, sizeof(struct ieee802154
_cca_s));
return OK; return OK;
} }

View File

@ -288,351 +288,3 @@
#endif /* __DRIVERS_WIRELESS_IEEE802154_MRF24J40_MRF24J40_H */ #endif /* __DRIVERS_WIRELESS_IEEE802154_MRF24J40_MRF24J40_H */