From 21052dc9cf5df187a4afc52eded724cc58859d65 Mon Sep 17 00:00:00 2001 From: mmaroti Date: Fri, 27 Mar 2009 21:54:56 +0000 Subject: [PATCH] simplify default channel configuration --- tos/chips/rf2xx/rf212/RF212ActiveMessageP.nc | 5 ----- tos/chips/rf2xx/rf212/RF212DriverConfig.nc | 6 ------ tos/chips/rf2xx/rf212/RF212DriverLayerP.nc | 2 +- tos/chips/rf2xx/rf230/RF230ActiveMessageP.nc | 5 ----- tos/chips/rf2xx/rf230/RF230DriverConfig.nc | 6 ------ tos/chips/rf2xx/rf230/RF230DriverLayerP.nc | 2 +- 6 files changed, 2 insertions(+), 24 deletions(-) diff --git a/tos/chips/rf2xx/rf212/RF212ActiveMessageP.nc b/tos/chips/rf2xx/rf212/RF212ActiveMessageP.nc index 34391dad..5e8104fd 100644 --- a/tos/chips/rf2xx/rf212/RF212ActiveMessageP.nc +++ b/tos/chips/rf2xx/rf212/RF212ActiveMessageP.nc @@ -84,11 +84,6 @@ implementation return sizeof(rf212packet_header_t) - 1 + TOSH_DATA_LENGTH + sizeof(ieee154_footer_t); } - async command uint8_t RF212DriverConfig.getDefaultChannel() - { - return RF212_DEF_CHANNEL; - } - async command bool RF212DriverConfig.requiresRssiCca(message_t* msg) { return call IEEE154Packet.isDataFrame(msg); diff --git a/tos/chips/rf2xx/rf212/RF212DriverConfig.nc b/tos/chips/rf2xx/rf212/RF212DriverConfig.nc index 49d53b35..150b3424 100644 --- a/tos/chips/rf2xx/rf212/RF212DriverConfig.nc +++ b/tos/chips/rf2xx/rf212/RF212DriverConfig.nc @@ -57,12 +57,6 @@ interface RF212DriverConfig */ async command uint8_t getMaxLength(); - /** - * This command is used at power up to set the default channel. - * The default CC2420 channel is 26. - */ - async command uint8_t getDefaultChannel(); - /** * Returns TRUE if before sending this message we should make sure that * the channel is clear via a very basic (and quick) RSSI check. diff --git a/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc b/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc index e594bab1..2a9d35a3 100644 --- a/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc +++ b/tos/chips/rf2xx/rf212/RF212DriverLayerP.nc @@ -225,7 +225,7 @@ implementation writeRegister(RF212_PHY_TX_PWR, RF212_DEF_RFPOWER); txPower = RF212_DEF_RFPOWER; - channel = call RF212DriverConfig.getDefaultChannel() & RF212_CHANNEL_MASK; + channel = RF212_DEF_CHANNEL & RF212_CHANNEL_MASK; writeRegister(RF212_PHY_CC_CCA, RF212_CCA_MODE_VALUE | channel); call SLP_TR.set(); diff --git a/tos/chips/rf2xx/rf230/RF230ActiveMessageP.nc b/tos/chips/rf2xx/rf230/RF230ActiveMessageP.nc index 58f65840..61473a4c 100644 --- a/tos/chips/rf2xx/rf230/RF230ActiveMessageP.nc +++ b/tos/chips/rf2xx/rf230/RF230ActiveMessageP.nc @@ -84,11 +84,6 @@ implementation return sizeof(rf230packet_header_t) - 1 + TOSH_DATA_LENGTH + sizeof(ieee154_footer_t); } - async command uint8_t RF230DriverConfig.getDefaultChannel() - { - return RF230_DEF_CHANNEL; - } - async command bool RF230DriverConfig.requiresRssiCca(message_t* msg) { return call IEEE154Packet.isDataFrame(msg); diff --git a/tos/chips/rf2xx/rf230/RF230DriverConfig.nc b/tos/chips/rf2xx/rf230/RF230DriverConfig.nc index 1b6b04f4..e6b05b3d 100644 --- a/tos/chips/rf2xx/rf230/RF230DriverConfig.nc +++ b/tos/chips/rf2xx/rf230/RF230DriverConfig.nc @@ -57,12 +57,6 @@ interface RF230DriverConfig */ async command uint8_t getMaxLength(); - /** - * This command is used at power up to set the default channel. - * The default CC2420 channel is 26. - */ - async command uint8_t getDefaultChannel(); - /** * Returns TRUE if before sending this message we should make sure that * the channel is clear via a very basic (and quick) RSSI check. diff --git a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc index b582d3cd..17ea8ffa 100644 --- a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc +++ b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc @@ -225,7 +225,7 @@ implementation writeRegister(RF230_PHY_TX_PWR, RF230_TX_AUTO_CRC_ON | (RF230_DEF_RFPOWER & RF230_TX_PWR_MASK)); txPower = RF230_DEF_RFPOWER & RF230_TX_PWR_MASK; - channel = call RF230DriverConfig.getDefaultChannel() & RF230_CHANNEL_MASK; + channel = RF230_DEF_CHANNEL & RF230_CHANNEL_MASK; writeRegister(RF230_PHY_CC_CCA, RF230_CCA_MODE_VALUE | channel); call SLP_TR.set(); -- 2.39.2