X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Firis%2Fchips%2Frf230%2FRadioConfig.h;h=e73d3543abb3a3479a4ff4654abd25edf3104072;hb=4d45ea217f4679225c45fdf1196afd0c8f8d27c7;hp=6f598905da0414c0ea205dee6a49e349af96e44a;hpb=e23ff34c85f9249d2daa9372a8291f94db8a323b;p=tinyos-2.x.git diff --git a/tos/platforms/iris/chips/rf230/RadioConfig.h b/tos/platforms/iris/chips/rf230/RadioConfig.h index 6f598905..e73d3543 100644 --- a/tos/platforms/iris/chips/rf230/RadioConfig.h +++ b/tos/platforms/iris/chips/rf230/RadioConfig.h @@ -25,7 +25,7 @@ #define __RADIOCONFIG_H__ #include -#include +#include #include enum @@ -59,6 +59,11 @@ enum #define RF230_DEF_CHANNEL 11 #endif +/* The number of microseconds a sending IRIS mote will wait for an acknowledgement */ +#ifndef SOFTWAREACK_TIMEOUT +#define SOFTWAREACK_TIMEOUT 800 +#endif + /* * This is the command used to calculate the CRC for the RF230 chip. * TODO: Check why the default crcByte implementation is in a different endianness @@ -76,12 +81,21 @@ typedef TOne TRadio; /** * The number of radio alarm ticks per one microsecond (0.9216). * We use integers and no parentheses just to make deputy happy. + * Ok, further hacks were required for deputy, I removed 00 from the + * beginning and end to ba able to handle longer wait periods. */ -#define RADIO_ALARM_MICROSEC (7372800UL / MHZ / 32) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2) / 1000000UL +#define RADIO_ALARM_MICROSEC (73728UL / MHZ / 32) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2) / 10000UL /** * The base two logarithm of the number of radio alarm ticks per one millisecond */ #define RADIO_ALARM_MILLI_EXP (5 + MICA_DIVIDE_ONE_FOR_32KHZ_LOG2) +/** + * Make PACKET_LINK automaticaly enabled for Ieee154MessageC + */ +#if !defined(TFRAMES_ENABLED) && !defined(PACKET_LINK) +#define PACKET_LINK +#endif + #endif//__RADIOCONFIG_H__