From: mmaroti Date: Thu, 26 Mar 2009 13:49:25 +0000 (+0000) Subject: support slow SPI interfaces X-Git-Tag: rc_6_tinyos_2_1_1~445 X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=commitdiff_plain;h=68ae4ee37ca8cde821a2a92e2d1281bebe6efcdd support slow SPI interfaces --- diff --git a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc index 725796c5..b582d3cd 100644 --- a/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc +++ b/tos/chips/rf2xx/rf230/RF230DriverLayerP.nc @@ -433,12 +433,14 @@ implementation return EBUSY; } +#ifndef RF230_SLOW_SPI atomic { call SLP_TR.set(); time = call RadioAlarm.getNow() + TX_SFD_DELAY; } call SLP_TR.clr(); +#endif ASSERT( ! radioIrq ); @@ -466,6 +468,15 @@ implementation } while( --header != 0 ); +#ifdef RF230_SLOW_SPI + atomic + { + call SLP_TR.set(); + time = call RadioAlarm.getNow() + TX_SFD_DELAY; + } + call SLP_TR.clr(); +#endif + time32 += (int16_t)(time) - (int16_t)(time32); if( timesync != 0 )