Interface: tos.chips.cc2420.interfaces.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.3 $ $Date: 2008/06/16 15:33:32 $

Commands
command uint8_t getChannel() Change the channel of the radio, between 11 and 26
command uint16_t getPanAddr() Change the PAN address of the radio.
command uint16_t getShortAddr() Change the short address of the radio.
command bool isAddressRecognitionEnabled()
command bool isAutoAckEnabled()
command bool isHwAddressRecognitionDefault()
command bool isHwAutoAckDefault()
command void setAddressRecognition(bool enableAddressRecognition, bool useHwAddressRecognition)
command void setAutoAck(bool enableAutoAck, bool hwAutoAck) Sync must be called for acknowledgement changes to take effect
command void setChannel(uint8_t channel)
command void setPanAddr(uint16_t address)
command void setShortAddr(uint16_t address)
command error_t sync() Sync configuration changes with the radio hardware.

Events
event void syncDone(error_t error)

Commands - Details

getChannel

command uint8_t getChannel()

Change the channel of the radio, between 11 and 26

getPanAddr

command uint16_t getPanAddr()

Change the PAN address of the radio.

getShortAddr

command uint16_t getShortAddr()

Change the short address of the radio.

isAddressRecognitionEnabled

command bool isAddressRecognitionEnabled()

Returns:
TRUE if address recognition is enabled

isAutoAckEnabled

command bool isAutoAckEnabled()

Returns:
TRUE if auto acks are enabled

isHwAddressRecognitionDefault

command bool isHwAddressRecognitionDefault()

Returns:
TRUE if address recognition is performed first in hardware.

isHwAutoAckDefault

command bool isHwAutoAckDefault()

Returns:
TRUE if hardware auto acks are the default, FALSE if software acks are the default

setAddressRecognition

command void setAddressRecognition(bool enableAddressRecognition, bool useHwAddressRecognition)

Parameters:
enableAddressRecognition - TRUE to turn address recognition on
useHwAddressRecognition - TRUE to perform address recognition first in hardware. This doesn't affect software address recognition. The driver must sync with the chip after changing this value.

setAutoAck

command void setAutoAck(bool enableAutoAck, bool hwAutoAck)

Sync must be called for acknowledgement changes to take effect

Parameters:
enableAutoAck - TRUE to enable auto acknowledgements
hwAutoAck - TRUE to default to hardware auto acks, FALSE to default to software auto acknowledgements

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()

Sync configuration changes with the radio hardware. This only applies to set commands below.

Returns:
SUCCESS if the request was accepted, FAIL otherwise.

Events - Details

syncDone

event void syncDone(error_t error)