]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/iris/chips/rf230/HplRF2xxP.nc
make the FastSpiByte interface generic and implement it in Atm128Spi
[tinyos-2.x.git] / tos / platforms / iris / chips / rf230 / HplRF2xxP.nc
index a97f81c67abdcf78a7d2e0888d13dd47e5f27e31..560fbe6fa6b3bb91ed005146da8de0a905e05fe1 100644 (file)
  * Author: Miklos Maroti
  */
 
-#include "Atm128Spi.h"
-
 module HplRF2xxP
 {
        provides
        {
                interface GpioCapture as IRQ;
                interface Init as PlatformInit;
-
-               interface FastSpiByte;
        }
 
        uses
@@ -83,43 +79,4 @@ implementation
        {
                call Capture.stop();
        }
-
-       inline async command void FastSpiByte.splitWrite(uint8_t data)
-       {
-               // the SPI must have been started, so do not waste time here
-               // SET_BIT(SPCR, SPE);
-
-               SPDR = data;
-       }
-
-       inline async command uint8_t FastSpiByte.splitRead()
-       {
-           while( !( SPSR & 0x80 ) )
-                       ;
-               return SPDR;
-       }
-
-       inline async command uint8_t FastSpiByte.splitReadWrite(uint8_t data)
-       {
-               uint8_t b;
-
-           while( !( SPSR & 0x80 ) )
-                       ;
-               b = SPDR;
-               SPDR = data;
-
-               return b;
-       }
-
-       inline async command uint8_t FastSpiByte.write(uint8_t data)
-       {
-               // the SPI must have been started, so do not waste time here
-               // SET_BIT(SPCR, SPE);
-
-               SPDR = data;
-           while( !( SPSR & 0x80 ) )
-                       ;
-
-               return SPDR;
-       }
 }