SunSPOT API V3.0


com.sun.spot.peripheral
Class CC2420Driver

java.lang.Object
  extended by com.sun.spot.peripheral.CC2420Driver

public class CC2420Driver
extends Object


Field Summary
static int SPI_CONFIG
           
 
Constructor Summary
CC2420Driver(ISpiMaster spi, SpiPcs ce_pin, ISpotPins spotPins)
           
 
Method Summary
 int getRegister(int first)
           
 boolean isCcaHigh()
           
 boolean isFifoHigh()
           
 boolean isFifopHigh()
           
 boolean isSfdHigh()
           
 boolean isVRegEnHigh()
           
 byte[] readRxFifo()
          Read the chip's rx fifo.
 byte receiveRAM(int ramAddress)
          Read the chip's ram.
 void sendAndReceive(int txSize, byte[] tx, int rxOffset, int rxSize, byte[] rx)
           
 int sendRAM(int ramAddress, byte data)
          Write the chip's ram.
 int sendRAM(int ramAddress, long data)
           
 int sendRAM(int ramAddress, short data)
           
 int sendReceive8PlusSendN(int first, int size, byte[] subsequent)
           
 int sendReceive8PlusVariableReceiveN(int first, byte[] subsequent)
           
 int sendStrobe(int data)
           
 int setRegister(int first, int subsequent)
           
 void setReset(boolean b)
           
 void setUp()
           
 void setVRegEn(boolean b)
           
 void tearDown()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SPI_CONFIG

public static final int SPI_CONFIG
See Also:
Constant Field Values
Constructor Detail

CC2420Driver

public CC2420Driver(ISpiMaster spi,
                    SpiPcs ce_pin,
                    ISpotPins spotPins)
Method Detail

sendAndReceive

public void sendAndReceive(int txSize,
                           byte[] tx,
                           int rxOffset,
                           int rxSize,
                           byte[] rx)

sendReceive8PlusSendN

public int sendReceive8PlusSendN(int first,
                                 int size,
                                 byte[] subsequent)

getRegister

public int getRegister(int first)

setRegister

public int setRegister(int first,
                       int subsequent)

sendStrobe

public int sendStrobe(int data)

sendReceive8PlusVariableReceiveN

public int sendReceive8PlusVariableReceiveN(int first,
                                            byte[] subsequent)

sendRAM

public int sendRAM(int ramAddress,
                   byte data)
Write the chip's ram. To support testing

Parameters:
ramAddress - -- the address at which to write
data - -- the byte to write
Returns:
result of the SPI command

sendRAM

public int sendRAM(int ramAddress,
                   short data)

sendRAM

public int sendRAM(int ramAddress,
                   long data)

receiveRAM

public byte receiveRAM(int ramAddress)
Read the chip's ram. To support testing

Parameters:
ramAddress - -- the address at which to read ram
Returns:
-- the byte of ram read

readRxFifo

public byte[] readRxFifo()
Read the chip's rx fifo. To support testing

Returns:
-- the contents of the fifo

isSfdHigh

public boolean isSfdHigh()

isFifopHigh

public boolean isFifopHigh()

isFifoHigh

public boolean isFifoHigh()

isCcaHigh

public boolean isCcaHigh()

isVRegEnHigh

public boolean isVRegEnHigh()

setVRegEn

public void setVRegEn(boolean b)

setReset

public void setReset(boolean b)

tearDown

public void tearDown()

setUp

public void setUp()

SunSPOT API V3.0


Copyright © 2006, 2007 Sun Microsystems, Inc. All Rights Reserved.