Difference between revisions of "CC2420 Cross-Platform Portability"

From TinyOS Wiki
Jump to: navigation, search
(New page: To port the CC2420 radio to another platform, the following interfaces need to be implemented::: // GPIO Pins interface GeneralIO as CCA; interface GeneralIO as CSN; interface Gen...)
 
Line 1: Line 1:
 
To port the CC2420 radio to another platform, the following interfaces
 
To port the CC2420 radio to another platform, the following interfaces
need to be implemented:::
+
need to be implemented:
  
 
   // GPIO Pins
 
   // GPIO Pins

Revision as of 12:44, 7 July 2008

To port the CC2420 radio to another platform, the following interfaces need to be implemented:

 // GPIO Pins
 interface GeneralIO as CCA;
 interface GeneralIO as CSN;
 interface GeneralIO as FIFO;
 interface GeneralIO as FIFOP;
 interface GeneralIO as RSTN;
 interface GeneralIO as SFD;
 interface GeneralIO as VREN;
   
 // SPI Bus
 interface Resource;
 interface SpiByte;
 interface SpiPacket;
 
 // Interrupts
 interface GpioCapture as CaptureSFD;
 interface GpioInterrupt as InterruptCCA;
 interface GpioInterrupt as InterruptFIFOP;

The GpioCapture interface is tied through the Timer to provide a relative time at which the interrupt occurred. This is useful for timestamping received packets for node synchronization.

If the CC2420 is not connected to the proper interrupt lines, interrupts can be emulated through the use of a spinning task that polls the GPIO pin. The MICAz implementation, for example, does this for the CCA interrupt.

See Also