cc2420.h File Reference

Description : prototypes of functions used in cc2420.c. More...

#include <cc2420reg.h>
#include <time.h>
#include <msp430.h>
#include <bite.h>

Include dependency graph for cc2420.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define BASIC_RF_LENGTH_MASK   0x7F

Functions

void cc2420_active_batmon (void)
 active battery monitor 2420
void cc2420_change_channel (UINT8)
 change transmit channel. In case selectionned channel not in chip specification, function force to use channel 11.
void cc2420_change_emission_power (int)
void cc2420_Init (void)
 First and global initialization.
void cc2420_powerdown (void)
 Turn off oscillator to put device in low power mode.
int RecepFrame (void *buffer, UINT8 *nbytes, unsigned long wait, int *strength)
int sendFrame (const void *buffer, UINT8 nbytes)
 To send a frame to the radio chip.
void wakeup_cc2420 (void)
 Wake up the device : restart Oscillator.


Detailed Description

Description : prototypes of functions used in cc2420.c.

Definition in file cc2420.h.


Define Documentation

#define BASIC_RF_LENGTH_MASK   0x7F

Definition at line 16 of file cc2420.h.

Referenced by fifo_interrupt(), and RecepFrame().


Function Documentation

void cc2420_active_batmon ( void   ) 

active battery monitor 2420

Note:
not functional, don't use.

Definition at line 168 of file cc2420.c.

References BM, CC2420_BATTMON, CC2420_BATTMON_BATTMON_EN, CC2420_BATTMON_BATTMON_OK, FASTSPI_GETREG, and FASTSPI_SETREG.

void cc2420_change_channel ( UINT8  channel  ) 

change transmit channel. In case selectionned channel not in chip specification, function force to use channel 11.

void cc2420_change_channel(UINT8 channel)

Definition at line 146 of file cc2420.c.

References CC2420_FSCTRL, and FASTSPI_SETREG.

Referenced by check_online_code_version(), init(), main(), PT_THREAD(), and serveur_reprog().

Here is the caller graph for this function:

void cc2420_change_emission_power ( int   ) 

Definition at line 133 of file cc2420.c.

References CC2420_TXCTRL, and FASTSPI_SETREG.

Referenced by controller_write(), and main().

Here is the caller graph for this function:

void cc2420_Init ( void   ) 

First and global initialization.

Definition at line 185 of file cc2420.c.

References cc2420_powerdown(), halRfWaitForCrystalOscillator(), SET_VREG_ACTIVE, and setup_cc2420().

Referenced by init().

Here is the call graph for this function:

Here is the caller graph for this function:

void cc2420_powerdown ( void   ) 

Turn off oscillator to put device in low power mode.

Definition at line 123 of file cc2420.c.

References CC2420_SXOSCOFF, and FASTSPI_STROBE.

Referenced by cc2420_Init(), controller_read(), controller_read_alarm_frame(), controller_write(), main(), PT_THREAD(), and serveur_reprog().

Here is the caller graph for this function:

int RecepFrame ( void *  buffer,
UINT8 nbytes,
unsigned long  wait,
int *  strength 
)

Definition at line 294 of file cc2420.c.

References BASIC_RF_LENGTH_MASK, CC2420_SFLUSHRX, CC2420_SRFOFF, CC2420_SRXON, clockb(), FASTSPI_READ_FIFO_BYTE, FASTSPI_READ_FIFO_NO_WAIT, FASTSPI_STROBE, FIFO, FIFOP, halRfGetRSSI(), LED_TEST1_OFF, LED_TEST1_ON, and NB_TICK_MAX.

Referenced by controller_read(), controller_read_alarm_frame(), MAC_recept(), and main().

Here is the call graph for this function:

Here is the caller graph for this function:

int sendFrame ( const void *  buffer,
UINT8  nbytes 
)

To send a frame to the radio chip.

Parameters:
[in] buffer : points to the string to send
[in] nbytes : number of bytes in the string
Returns:
0 : transmit successful, 1 : transmit unsuccessful (TX underflow). 2 : transmit unsuccessful (channel busy).

Definition at line 205 of file cc2420.c.

References BM, CC2420_RSSI_VALID, CC2420_SFLUSHRX, CC2420_SFLUSHTX, CC2420_SRFOFF, CC2420_SRXON, CC2420_STXONCCA, CC2420_TX_ACTIVE, CC2420_TX_UNDERFLOW, FASTSPI_STROBE, FASTSPI_UPD_STATUS, FASTSPI_WRITE_FIFO, LED_TEST2_OFF, and LED_TEST2_ON.

Referenced by controller_read(), controller_write(), MAC_send(), and main().

Here is the caller graph for this function:

void wakeup_cc2420 ( void   ) 

Wake up the device : restart Oscillator.

Definition at line 111 of file cc2420.c.

References CC2420_SXOSCON, FASTSPI_STROBE, and halRfWaitForCrystalOscillator().

Referenced by check_online_code_version(), controller_read(), controller_read_alarm_frame(), controller_write(), init(), main(), PT_THREAD(), and serveur_reprog().

Here is the call graph for this function:

Here is the caller graph for this function:


Generated on Wed Jun 3 12:05:40 2009 for PowWow v1.0 by  doxygen 1.5.6