X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Firis%2Fchips%2Frf230%2FHplRF230.h;h=63ae9db6e9d070764883e7f1fc43921aa70209bb;hb=d4dbb904d4c5a34dcacf5fc657ceb6023a421159;hp=0a69cea9f1ca3e88272cbdf755e67ee812dced76;hpb=813ccd9a39dd0810febb285f17bcd72ba451f536;p=tinyos-2.x.git diff --git a/tos/platforms/iris/chips/rf230/HplRF230.h b/tos/platforms/iris/chips/rf230/HplRF230.h index 0a69cea9..63ae9db6 100644 --- a/tos/platforms/iris/chips/rf230/HplRF230.h +++ b/tos/platforms/iris/chips/rf230/HplRF230.h @@ -25,6 +25,7 @@ #define __HPLRF230_H__ #include +#include enum { @@ -47,22 +48,6 @@ enum RF230_CCA_THRES_VALUE = 0xC7, }; -/** - * This is the timer type of the RF230 alarm interface - */ -typedef TOne TRadio; - - -/** - * The number of alarm ticks per one second (921600) - */ -#define RF230_ALARM_SEC ((7372800UL / MHZ / 32) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2)) - -/** - * The number of alarm ticks per one microsecond (0.9216) - */ -#define RF230_ALARM_MICROSEC (RF230_ALARM_SEC / 1000000.0) - /* This is the default value of the TX_PWR field of the PHY_TX_PWR register. */ #ifndef RF230_DEF_RFPOWER #define RF230_DEF_RFPOWER 0 @@ -73,4 +58,10 @@ typedef TOne TRadio; #define RF230_DEF_CHANNEL 11 #endif +// TODO: Check why the default crcByte implementation is in a different endianness +inline uint16_t RF230_CRCBYTE_COMMAND(uint16_t crc, uint8_t data) +{ + return _crc_ccitt_update(crc, data); +} + #endif//__HPLRF230_H__