Contiki 2.6

cc2430_rf.c File Reference

CC2430 RF driver. More...

#include <stdio.h>
#include "contiki.h"
#include "dev/radio.h"
#include "dev/cc2430_rf.h"
#include "cc2430_sfr.h"
#include "sys/clock.h"
#include "sys/rtimer.h"
#include "net/packetbuf.h"
#include "net/rime/rimestats.h"
#include "net/netstack.h"

Go to the source code of this file.

Functions

void cc2430_rf_command (uint8_t command)
 Execute a single CSP command.
int8_t cc2430_rf_channel_set (uint8_t channel)
 Select RF channel.
uint8_t cc2430_rf_power_set (uint8_t new_power)
 Select RF transmit power.
void cc2430_rf_set_addr (unsigned pan, unsigned addr, const uint8_t *ieee_addr)
 Set MAC addresses.
void cc2430_rf_send_ack (uint8_t pending)
 Send ACK.

Detailed Description

CC2430 RF driver.

Author:
Zach Shelby <zach@sensinode.com> (Original) George Oikonomou - <oikonomou@users.sourceforge.net> (port to the netstack API, hexdump output, RX FIFO overflow fixes code cleanup, ...)

bankable code for cc2430 rf driver. this code can be placed in any bank.

Definition in file cc2430_rf.c.


Function Documentation

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 180 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 122 of file cc2430_rf.c.

References clock_delay_usec().

Referenced by cc2430_rf_channel_set(), cc2430_rf_send_ack(), and random_init().

uint8_t cc2430_rf_power_set ( uint8_t  new_power)

Select RF transmit power.

Parameters:
new_powernew power level
Returns:
new level

Definition at line 219 of file cc2430_rf.c.

void cc2430_rf_send_ack ( uint8_t  pending)

Send ACK.

Parameters:
pendingset up pending flag if pending > 0.

Definition at line 299 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
addrThe short address to set
ieee_addrThe 64-bit IEEE address to set

Definition at line 252 of file cc2430_rf.c.

References NULL.