1. CC2420 Interfaces On Micaz
1.1 Interface: tos.chips.cc2420.CC2420Config
interface CC2420Config
An HAL abstraction of the ChipCon CC2420 radio. This abstraction deals specifically with radio configurations. All get() and set() commands are single-phase. After setting some values, a call to sync() is required for the changes to propagate to the cc2420 hardware chip. This interface allows setting multiple parameters before calling sync().
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.6 $ $Date: 2006/06/20 18:56:04 $
Commands
command uint8_t getChannel()
command uint16_t getPanAddr()
command uint16_t getShortAddr()
command void setChannel(uint8_t channel)
command void setPanAddr(uint16_t address)
command void setShortAddr(uint16_t address)
command error_t sync()
Events
event void syncDone(error_t error)
Commands – Details
getChannel
command uint8_t getChannel()
getPanAddr
command uint16_t getPanAddr()
getShortAddr
command uint16_t getShortAddr()
setChannel
command void setChannel(uint8_t channel)
setPanAddr
command void setPanAddr(uint16_t address)
setShortAddr
command void setShortAddr(uint16_t address)
sync
command error_t sync()
- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
Events – Details
syncDone
event void syncDone(error_t error)
1.2 Interface: tos.chips.cc2420.CC2420Fifo
interface CC2420Fifo
HAL abstraction for accessing the FIFO registers of a ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.7 $ $Date: 2006/06/20 18:56:04 $
Commands
command cc2420_status_t beginRead(uint8_t *data, uint8_t length)
command error_t continueRead(uint8_t *data, uint8_t length)
command cc2420_status_t write(uint8_t *data, uint8_t length)
Events
event void readDone(uint8_t *data, uint8_t length, error_t error)
event void writeDone(uint8_t *data, uint8_t length, error_t error)
Commands – Details
beginRead
command cc2420_status_t beginRead(uint8_t *data, uint8_t length)
- Parameters:
data
– a pointer to the receive buffer.length
– number of bytes to read.- Returns:
- status byte returned when sending the last address byte of the SPI transaction.
continueRead
command error_t continueRead(uint8_t *data, uint8_t length)
- Parameters:
data
– a pointer to the receive buffer.length
– number of bytes to read.- Returns:
- SUCCESS always.
write
command cc2420_status_t write(uint8_t *data, uint8_t length)
- Parameters:
data
– a pointer to the send buffer.length
– number of bytes to write.- Returns:
- status byte returned when sending the last address byte of the SPI transaction.
Events – Details
readDone
event void readDone(uint8_t *data, uint8_t length, error_t error)
- Parameters:
data
– a pointer to the receive buffer.length
– number of bytes read.error
– notification of how the operation went
writeDone
event void writeDone(uint8_t *data, uint8_t length, error_t error)
- Parameters:
data
– a pointer to the send buffer.length
– number of bytes written.error
– notification of how the operation went
1.3 Interface: tos.chips.cc2420.CC2420Packet
interface CC2420Packet
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.2 $ $Date: 2006/06/20 18:56:04 $
Commands
command uint8_t getLqi(message_t *p_msg)
command uint8_t getPower(message_t *p_msg)
command int8_t getRssi(message_t *p_msg)
command void setPower(message_t *p_msg, uint8_t power)
Commands – Details
getLqi
command uint8_t getLqi(message_t *p_msg)
getPower
command uint8_t getPower(message_t *p_msg)
- Parameters:
the
– message
getRssi
command int8_t getRssi(message_t *p_msg)
setPower
command void setPower(message_t *p_msg, uint8_t power)
- Parameters:
p_msg
– the message.power
– transmission power.
1.4 Interface: tos.chips.cc2420.CC2420Ram
interface CC2420Ram
HAL abstraction for accessing theRAM of a ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.8 $ $Date: 2006/06/20 18:56:04 $
Commands
command cc2420_status_t read(uint8_t offset, uint8_t *data, uint8_t length)
command cc2420_status_t write(uint8_t offset, uint8_t *data, uint8_t length)
Commands – Details
read
command cc2420_status_t read(uint8_t offset, uint8_t *data, uint8_t length)
- Parameters:
offset
– within the field.data
– a pointer to the receive buffer.length
– number of bytes to read.- Returns:
- status byte returned when sending the last byte of the SPI transaction.
write
command cc2420_status_t write(uint8_t offset, uint8_t *data, uint8_t length)
- Parameters:
offset
– within the field.data
– a pointer to the send buffer.length
– number of bytes to write.- Returns:
- status byte returned when sending the last address byte of the SPI transaction. .
1.5 Interface: tos.chips.cc2420.CC2420Receive
interface CC2420Receive
Low-level abstraction of the receive path implementation for the ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.5 $ $Date: 2006/06/20 18:56:04 $
Commands
command void sfd(uint16_t time)
command void sfd_dropped()
Events
event void receive(uint8_t type, message_t *message)
Commands – Details
sfd
command void sfd(uint16_t time)
- Parameters:
time
– at which the capture happened.
sfd_dropped
command void sfd_dropped()
Events – Details
receive
event void receive(uint8_t type, message_t *message)
- Parameters:
type
– of the message received.message
– pointer to message received.
1.6 Interface: tos.chips.cc2420.CC2420Register
interface CC2420Register
Interface representing one of the Read/Write registers on the CC2420 radio. The return values (when appropriate) refer to the status byte returned on the CC2420 SO pin. A full list of RW registers can be found on page 61 of the CC2420 datasheet (rev 1.2). Page 25 of the same document describes the protocol for interacting with these registers over the CC2420 SPI bus.
- Author:
- Philip Levis
- Version:
- $Revision: 1.1.2.4 $ $Date: 2006/06/20 18:56:04 $
Commands
command cc2420_status_t read(uint16_t *data)
command cc2420_status_t write(uint16_t data)
Commands – Details
read
command cc2420_status_t read(uint16_t *data)
- Parameters:
data
– pointer to place the register value.- Returns:
- status byte from the read.
write
command cc2420_status_t write(uint16_t data)
- Parameters:
data
– value to write to register.- Returns:
- status byte from the write.
1.7 Interface: tos.chips.cc2420.CC2420Strobe
interface CC2420Strobe
Interface representing one of the CC2420 command strobe registers. Writing to one of these registers enacts a command on the CC2420, such as power-up, transmission, or clear a FIFO.
- Author:
- Philip Levis
- Version:
- $Revision: 1.1.2.3 $ $Date: 2006/06/20 18:56:05 $
Commands
command cc2420_status_t strobe()
Commands – Details
strobe
command cc2420_status_t strobe()
- Returns:
- Status byte from the CC2420.
1.8 Interface: tos.chips.cc2420.CC2420Transmit
interface CC2420Transmit
Low-level abstraction for the transmit path implementaiton of the ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.6 $ $Date: 2006/06/20 18:56:05 $
Commands
command error_t cancel()
command error_t modify(uint8_t offset, uint8_t *buf, uint8_t len)
command error_t resend()
command error_t resendCCA()
command error_t send(message_t *p_msg)
command error_t sendCCA(message_t *p_msg)
Events
event void sendDone(message_t *p_msg, error_t error)
Commands – Details
cancel
command error_t cancel()
- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
modify
command error_t modify(uint8_t offset, uint8_t *buf, uint8_t len)
- Parameters:
offset
– in the message to start modifying.buf
– to data to writelen
– of bytes to write- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
resend
command error_t resend()
- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
resendCCA
command error_t resendCCA()
- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
send
command error_t send(message_t *p_msg)
- Parameters:
p_msg
– message to send.- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
sendCCA
command error_t sendCCA(message_t *p_msg)
- Parameters:
p_msg
– message to send.- Returns:
- SUCCESS if the request was accepted, FAIL otherwise.
Events – Details
sendDone
event void sendDone(message_t *p_msg, error_t error)
- Parameters:
p_msg
– message to send.error
– notifaction of how the operation went.
2. CC2420 Architecture On Micaz
2.1 Component: tos.chips.cc2420.CC2420ActiveMessageC
configuration CC2420ActiveMessageC
The Active Message layer for the CC2420 radio. This configuration just layers the AM dispatch (CC2420ActiveMessageM) on top of the underlying CC2420 radio packet (CC2420CsmaRadioC), which is inherently an AM packet (acknowledgements based on AM destination addr and group). Note that snooping may not work, due to CC2420 early packet rejection if acknowledgements are enabled.
- Author:
- Philip Levis
- Version:
- $Revision: 1.1.2.11 $ $Date: 2006/06/20 18:56:04 $
Provides
interface AMPacket
interface AMSend[am_id_t]
interface CC2420Packet
interface Packet
interface PacketAcknowledgements
interface Receive[am_id_t]
interface Receive as Snoop[am_id_t]
interface SplitControl
Wiring
2.2 Component: tos.chips.cc2420.CC2420ReceiveC
configuration CC2420ReceiveC
Implementation of the receive path for the ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.5 $ $Date: 2006/06/20 18:56:04 $
Provides
interface AsyncStdControl
interface CC2420Receive
interface Init
interface Receive
Wiring
2.3 Component: tos.chips.cc2420.CC2420CsmaC
configuration CC2420CsmaC
Basic implementation of a CSMA MAC for the ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.11 $ $Date: 2006/06/20 18:56:04 $
Provides
interface Receive
interface Send
interface SplitControl
Uses
interface AMPacket
Wiring
2.4 Component: tos.chips.cc2420.CC2420ControlC
configuration CC2420ControlC
Implementation for configuring a ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.8 $ $Date: 2006/06/20 18:56:04 $
Provides
interface CC2420Config
interface CC2420Power
interface Init
interface Resource
Uses
interface AMPacket
Wiring
2.5 Component: tos.chips.cc2420.CC2420CsmaC
configuration CC2420CsmaC
Basic implementation of a CSMA MAC for the ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.11 $ $Date: 2006/06/20 18:56:04 $
Provides
interface Receive
interface Send
interface SplitControl
Uses
interface AMPacket
Wiring
2.6 Component: tos.chips.cc2420.CC2420TransmitC
configuration CC2420TransmitC
Implementation of the transmit path for the ChipCon CC2420 radio.
- Author:
- Jonathan Hui <jhui@archrock.com>
- Version:
- $Revision: 1.1.2.8 $ $Date: 2006/06/20 18:56:05 $
Provides
interface AsyncStdControl
interface CC2420Transmit
interface CsmaBackoff
interface Init
interface RadioTimeStamping
Wiring
M&W said:
你好,在网上随便看,发现你的space。我也在申请epec,是网申,要求我七天之内online提交完所有材料,否则reject。我知道epec应该在打算来新加坡时才申请,但是我计划八月才来新加坡,所以这个口气让我很紧张。我想请问一下你拿到epec之后,有被要求在xxx期限之内必须到新加坡,否则无效的说法么?>_<
LikeLike