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()
command uint16_t getPanAddr()
command uint16_t getShortAddr()
command void setAutoAck(bool enableAutoAck, bool hwAutoAck)
command error_t sync()
Events
Commands - Details
getChannel
command uint8_t getChannel()
getPanAddr
command uint16_t getPanAddr()
getShortAddr
command uint16_t getShortAddr()
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)
- 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()
- Returns:
-
SUCCESS if the request was accepted, FAIL otherwise.
Events - Details
syncDone
event void syncDone(error_t error)