From 2d2d6b3ad6d9b02f228a7c95ff8fdfe164222135 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20P=C3=A9rez=20Penichet?= Date: Mon, 29 Oct 2018 11:15:40 +0100 Subject: [PATCH] Fixed code style issues --- arch/cpu/cc2538/dev/cc2538-rf.c | 12 ++++++------ arch/dev/cc2420/cc2420.c | 8 ++++---- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/arch/cpu/cc2538/dev/cc2538-rf.c b/arch/cpu/cc2538/dev/cc2538-rf.c index cee2197e7..e3a548067 100644 --- a/arch/cpu/cc2538/dev/cc2538-rf.c +++ b/arch/cpu/cc2538/dev/cc2538-rf.c @@ -396,9 +396,9 @@ get_sfd_timestamp(void) return RTIMER_NOW() - RADIO_TO_RTIMER(timer_val - sfd); } /*---------------------------------------------------------------------------*/ -/* Enable or disable radio test mode emmiting modulated or unmodulated +/* Enable or disable radio test mode emmiting modulated or unmodulated * (carrier) signal. See User's Guide pages 719 and 741. -*/ + */ static uint32_t prev_FRMCTRL0, prev_MDMTEST1; static uint8_t was_on; @@ -407,7 +407,7 @@ set_test_mode(uint8_t enable, uint8_t modulated) { radio_value_t mode; get_value(RADIO_PARAM_POWER_MODE, &mode); - + if(enable) { if(mode == RADIO_POWER_MODE_CARRIER_ON) { return; @@ -416,7 +416,7 @@ set_test_mode(uint8_t enable, uint8_t modulated) off(); prev_FRMCTRL0 = REG(RFCORE_XREG_FRMCTRL0); /* This constantly transmits random data */ - REG(RFCORE_XREG_FRMCTRL0) = 0x00000042; + REG(RFCORE_XREG_FRMCTRL0) = 0x00000042; if(!modulated) { prev_MDMTEST1 = REG(RFCORE_XREG_MDMTEST1); /* ...adding this we send an unmodulated carrier instead */ @@ -850,7 +850,7 @@ get_value(radio_param_t param, radio_value_t *value) switch(param) { case RADIO_PARAM_POWER_MODE: - if ((REG(RFCORE_XREG_RXENABLE) & RFCORE_XREG_RXENABLE_RXENMASK) == 0) { + if((REG(RFCORE_XREG_RXENABLE) & RFCORE_XREG_RXENABLE_RXENMASK) == 0) { *value = RADIO_POWER_MODE_OFF; } else { *value = (REG(RFCORE_XREG_FRMCTRL0) & RFCORE_XREG_FRMCTRL0_TX_MODE) == 0 @@ -943,7 +943,7 @@ set_value(radio_param_t param, radio_value_t value) if(value == RADIO_POWER_MODE_OFF) { off(); return RADIO_RESULT_OK; - } + } if(value == RADIO_POWER_MODE_CARRIER_ON || value == RADIO_POWER_MODE_CARRIER_OFF) { set_test_mode((value == RADIO_POWER_MODE_CARRIER_ON), 0); diff --git a/arch/dev/cc2420/cc2420.c b/arch/dev/cc2420/cc2420.c index 18b289c1d..545f917ac 100644 --- a/arch/dev/cc2420/cc2420.c +++ b/arch/dev/cc2420/cc2420.c @@ -1132,9 +1132,9 @@ set_send_on_cca(uint8_t enable) send_on_cca = enable; } /*---------------------------------------------------------------------------*/ -/* Enable or disable radio test mode emmiting modulated or unmodulated +/* Enable or disable radio test mode emmiting modulated or unmodulated * (carrier) signal. See datasheet page 55. -*/ + */ static uint16_t prev_MDMCTRL1, prev_DACTST; static uint8_t was_on; @@ -1151,12 +1151,12 @@ set_test_mode(uint8_t enable, uint8_t modulated) was_on = (mode == RADIO_POWER_MODE_ON); off(); prev_MDMCTRL1 = getreg(CC2420_MDMCTRL1); - setreg(CC2420_MDMCTRL1, 0x050C); + setreg(CC2420_MDMCTRL1, 0x050C); if(!modulated) { prev_DACTST = getreg(CC2420_DACTST); setreg(CC2420_DACTST, 0x1800); } - /* actually starts the test mode */ + /* actually starts the test mode */ strobe(CC2420_STXON); } else { if(mode != RADIO_POWER_MODE_CARRIER_ON) {