Interface: moteiv.tos.lib.CC2420Radio.CC2420Control
interface CC2420Control
CC2420 Radio Control interface.
Interface for CC2420 specific controls and signals
- Author:
-
Joe Polastre, Moteiv Corporation <info@moteiv.com>
Commands
command result_t disableAddrDecode(uint8_t rh)
command result_t disableAutoAck(uint8_t rh)
command result_t enableAddrDecode(uint8_t rh)
command result_t enableAutoAck(uint8_t rh)
command uint16_t GetFrequency()
command uint8_t GetPreset()
command uint8_t GetRFPower()
command result_t OscillatorOff(uint8_t rh)
command result_t OscillatorOn(uint8_t rh)
command result_t RxMode(uint8_t rh)
command result_t SetRFPower(uint8_t rh, uint8_t power)
command result_t setShortAddress(uint8_t rh, uint16_t addr)
command result_t TuneManual(uint8_t rh, uint16_t freq)
command result_t TunePreset(uint8_t rh, uint8_t channel)
command result_t TxMode(uint8_t rh)
command result_t TxModeOnCCA(uint8_t rh)
command result_t VREFOff()
command result_t VREFOn()
Commands - Details
disableAddrDecode
command result_t disableAddrDecode(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the mode of the CC2420 was successfully changed
disableAutoAck
command result_t disableAutoAck(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the mode of the CC2420 was successfully changed
enableAddrDecode
command result_t enableAddrDecode(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the mode of the CC2420 was successfully changed
enableAutoAck
command result_t enableAutoAck(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the mode of the CC2420 was successfully changed
GetFrequency
command uint16_t GetFrequency()
- Returns:
-
The current CC2420 frequency in MHz
GetPreset
command uint8_t GetPreset()
- Returns:
-
The current CC2420 channel (k=11..26)
GetRFPower
command uint8_t GetRFPower()
- Returns:
-
The power index value.
OscillatorOff
command result_t OscillatorOff(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS when the oscillator has started up
OscillatorOn
command result_t OscillatorOn(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the request for the crystal to start has been accepted
RxMode
command result_t RxMode(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the radio was successfully switched to RX mode.
SetRFPower
command result_t SetRFPower(uint8_t rh, uint8_t power)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
-
power
- A power index between 1 and 31
- Returns:
-
SUCCESS if the radio power was adequately set.
setShortAddress
command result_t setShortAddress(uint8_t rh, uint16_t addr)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
-
addr
- 16-bit address
- Returns:
-
SUCCESS if the request to set the address is being processed
TuneManual
command result_t TuneManual(uint8_t rh, uint16_t freq)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
-
freq
- The desired channel frequency, in MHz.
- Returns:
-
Status of the tune operation
TunePreset
command result_t TunePreset(uint8_t rh, uint8_t channel)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
-
freq
- requested 802.15.4 channel
- Returns:
-
Status of the tune operation
TxMode
command result_t TxMode(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the radio was successfully switched to TX mode.
TxModeOnCCA
command result_t TxModeOnCCA(uint8_t rh)
- Parameters:
-
rh
- either RESOURCE_NONE for automatic resource scheduling or a
resource handle acquired by CC2420ResourceC
- Returns:
-
SUCCESS if the transmit request has been accepted
VREFOff
command result_t VREFOff()
- Returns:
-
SUCCESS if the VREF has been turned on
VREFOn
command result_t VREFOn()
- Returns:
-
SUCCESS if the VREF has been turned on