Avr2070 – Atmel AVR2070 User Manual

Page 51

Advertising
background image

AVR2070

51

8240B-AVR-06/09

For more detailed examples of association and sending sensor data, see MAC
function calls and Sensor application function calls.

There are a few other useful functions that the MAC offers. These functions are useful
for making a non-networking application, such as a remote control unit.

• macIsChild() reports on whether a given node is a child of this node.
• macSetOperatingChannel() can be used to manually set the radio channel.
• radioGetPartnum() will query the Atmel transceiver and return the part

number.

• radioGetSavedRssiValue() returns the last measured received signal

strength indication (RSSI) value for a received packet.

• radioGetSavedLqiValue() returns the last measured link quality indication

(LQI) value for a received packet.

• radioGetOperatingChannel()
• radioGetTxPowerLevel() and radioSetTxPowerLevel() set and read the

output RF power levels

• radioBatmonGetVoltageThreshold(), radioBatmonGetVoltageRange(),

radioBatmonConfigure(), and radioBatmonGetStatus() are used to work
with the RF2xx on-board battery monitor function.

• radioGetClockSpeed() and radioSetClockSpeed() allow the use of the

RF2xx CLKM signal, which can be used to clock the CPU or provide an
accurate timebase to calibrate any other oscillator.

• radioEnterSleepMode() puts the transceiver to sleep and

radioLeaveSleepMode() wakes up the transceiver.

• radioSendData() sends a "raw" packet over the radio. This is a lower-level

function that RUM uses to send data to another node.

• radioRandom() returns up to 8 bits of random data, created from the random

radio noise on the RF2xx radio. The RF230 does not have a random number
generator, so the radioRandom function only returns a random number from
the rand() system function.

• nodeSleep() Puts the entire node to sleep for a specified time.

Other MAC parameters reside in the macConfig structure. While this structure is not
meant to be used by the application directly, several useful parameters are available
for reference:

• longAddr - The long (MAC) address of this node
• associated - True if this node has been associated to a network
• panId - The PAN ID of this node
• shortAddress - the short address of this node
• parentShortAddress - the short address of this node's parent
• currentChannel - the current radio channel selected

The timer module can be used by an application to execute functions after a non-
blocking delay.

The Serial Port module provides a serial port for the AVR targets.

Advertising