X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Frf2xx%2Frf230%2FRF230RadioP.nc;h=6110f2445a29c48329962d688beaf617eb619bb0;hb=826c353a778240edb6b7e134f967c1c9611b2062;hp=2a259f088d6db73cb1783a3b5fcdb2d21106109d;hpb=f1b1bacb52777dced4f53563b4a30fc31940ca7d;p=tinyos-2.x.git diff --git a/tos/chips/rf2xx/rf230/RF230RadioP.nc b/tos/chips/rf2xx/rf230/RF230RadioP.nc index 2a259f08..6110f244 100644 --- a/tos/chips/rf2xx/rf230/RF230RadioP.nc +++ b/tos/chips/rf2xx/rf230/RF230RadioP.nc @@ -248,19 +248,31 @@ implementation #ifndef LOW_POWER_LISTENING +#ifndef RF230_BACKOFF_MIN +#define RF230_BACKOFF_MIN 320 +#endif + async command uint16_t RandomCollisionConfig.getMinimumBackoff() { - return (uint16_t)(320 * RADIO_ALARM_MICROSEC); + return (uint16_t)(RF230_BACKOFF_MIN * RADIO_ALARM_MICROSEC); } +#ifndef RF230_BACKOFF_INIT +#define RF230_BACKOFF_INIT 4960 // instead of 9920 +#endif + async command uint16_t RandomCollisionConfig.getInitialBackoff(message_t* msg) { - return (uint16_t)(9920 * RADIO_ALARM_MICROSEC); + return (uint16_t)(RF230_BACKOFF_INIT * RADIO_ALARM_MICROSEC); } +#ifndef RF230_BACKOFF_CONG +#define RF230_BACKOFF_CONG 2240 +#endif + async command uint16_t RandomCollisionConfig.getCongestionBackoff(message_t* msg) { - return (uint16_t)(2240 * RADIO_ALARM_MICROSEC); + return (uint16_t)(RF230_BACKOFF_CONG * RADIO_ALARM_MICROSEC); } #endif