Contiki 2.5
Functions
cc2430_rf.h File Reference

    CC2430 RF driver header file
More...

#include "banked.h"
#include "contiki.h"
#include "dev/radio.h"
#include "cc2430_sfr.h"
#include "dev/dma.h"

Go to the source code of this file.

Functions

void cc2430_rf_command (uint8_t command) __banked
 Execute a single CSP command. More...
 
int8_t cc2430_rf_channel_set (uint8_t channel)
 Select RF channel. More...
 
int8_t cc2430_rf_power_set (uint8_t new_power)
 Select RF transmit power. More...
 
int8_t cc2430_rf_rx_enable (void) __banked
 Enable RF receiver. More...
 
int8_t cc2430_rf_rx_disable (void) __banked
 Disable RF receiver. More...
 
int8_t cc2430_rf_tx_enable (void)
 Enable RF transmitter. More...
 
int8_t cc2430_rf_address_decoder_mode (rf_address_mode_t mode)
 Set address decoder on/off. More...
 
int8_t cc2430_rf_analyze_rssi (void)
 Channel energy detect. More...
 
int8_t cc2430_rf_cca_check (uint8_t backoff_count, uint8_t slotted)
 Clear channel assesment check. More...
 
void cc2430_rf_send_ack (uint8_t pending)
 Send ACK. More...
 
void cc2430_rf_set_addr (unsigned pan, unsigned addr, const uint8_t *ieee_addr)
 Set MAC addresses. More...
 
void cc2430_rf_ISR (void) __interrupt(RF_VECTOR)
 RF interrupt service routine.
 
void cc2430_rf_error_ISR (void) __interrupt(RFERR_VECTOR)
 RF error interrupt service routine.
 

Detailed Description

    CC2430 RF driver header file
Author
Zach Shelby zach@.nosp@m.sens.nosp@m.inode.nosp@m..com

Definition in file cc2430_rf.h.

Function Documentation

int8_t cc2430_rf_address_decoder_mode ( rf_address_mode_t  mode)

Set address decoder on/off.

Parameters
param1=on 0=off.
Returns
pdTRUE operation successful

Definition at line 480 of file cc2430_rf.c.

int8_t cc2430_rf_analyze_rssi ( void  )

Channel energy detect.

Coordinator use this function detect best channel for PAN-network.

Returns
RSSI-energy level dBm.
0 operation failed.

Definition at line 524 of file cc2430_rf.c.

int8_t cc2430_rf_cca_check ( uint8_t  backoff_count,
uint8_t  slotted 
)

Clear channel assesment check.

Returns
pdTRUE CCA clear
pdFALSE CCA reserved

Definition at line 541 of file cc2430_rf.c.

References cc2430_rf_command(), and clock_delay().

int8_t cc2430_rf_channel_set ( uint8_t  channel)

Select RF channel.

Parameters
channelchannel number to select
Returns
channel value or negative (invalid channel number)

Definition at line 318 of file cc2430_rf.c.

References cc2430_rf_command().

void cc2430_rf_command ( uint8_t  command)

Execute a single CSP command.

Parameters
commandcommand to execute

Definition at line 274 of file cc2430_rf.c.

References clock_delay().

Referenced by cc2430_rf_cca_check(), cc2430_rf_channel_set(), cc2430_rf_error_ISR(), cc2430_rf_ISR(), cc2430_rf_rx_disable(), cc2430_rf_rx_enable(), and cc2430_rf_send_ack().

int8_t cc2430_rf_power_set ( uint8_t  new_power)

Select RF transmit power.

Parameters
new_powernew power level (in per cent)
Returns
new level or negative (value out of range)

Definition at line 362 of file cc2430_rf.c.

int8_t cc2430_rf_rx_disable ( void  )

Disable RF receiver.

Returns
pdTRUE
pdFALSE bus not free

Definition at line 417 of file cc2430_rf.c.

References cc2430_rf_command().

int8_t cc2430_rf_rx_enable ( void  )

Enable RF receiver.

Returns
pdTRUE
pdFALSE bus not free

Definition at line 390 of file cc2430_rf.c.

References cc2430_rf_command(), and SLEEP.

void cc2430_rf_send_ack ( uint8_t  pending)

Send ACK.

Parameters
pendingset up pending flag if pending > 0.

Definition at line 588 of file cc2430_rf.c.

References cc2430_rf_command().

void cc2430_rf_set_addr ( unsigned  pan,
unsigned  addr,
const uint8_t *  ieee_addr 
)

Set MAC addresses.

Parameters
panThe PAN address to set
addeThe short address to set
ieee_addrThe 64-bit IEEE address to set

Definition at line 451 of file cc2430_rf.c.

References NULL.

int8_t cc2430_rf_tx_enable ( void  )

Enable RF transmitter.

Returns
pdTRUE
pdFALSE bus not free

Definition at line 436 of file cc2430_rf.c.