X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fplatforms%2Firis%2Fchips%2Frf230%2FHplRF230P.nc;h=761a2a96ba8c48d28173483541ebf987bcfab37e;hp=cbe6c9487d5555bb986a60f7dab130fb3aa00362;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/platforms/iris/chips/rf230/HplRF230P.nc b/tos/platforms/iris/chips/rf230/HplRF230P.nc index cbe6c948..761a2a96 100644 --- a/tos/platforms/iris/chips/rf230/HplRF230P.nc +++ b/tos/platforms/iris/chips/rf230/HplRF230P.nc @@ -21,17 +21,12 @@ * Author: Miklos Maroti */ -#include -#include "Atm128Spi.h" - module HplRF230P { provides { interface GpioCapture as IRQ; interface Init as PlatformInit; - - interface HplRF230; } uses @@ -84,49 +79,4 @@ implementation { call Capture.stop(); } - - // TODO: Check why the default crcByte implementation is in a different endianness - inline async command uint16_t HplRF230.crcByte(uint16_t crc, uint8_t data) - { - return _crc_ccitt_update(crc, data); - } - - inline async command void HplRF230.spiSplitWrite(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 HplRF230.spiSplitRead() - { - while( !( SPSR & 0x80 ) ) - ; - return SPDR; - } - - inline async command uint8_t HplRF230.spiSplitReadWrite(uint8_t data) - { - uint8_t b; - - while( !( SPSR & 0x80 ) ) - ; - b = SPDR; - SPDR = data; - - return b; - } - - inline async command uint8_t HplRF230.spiWrite(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; - } }