Main Page | Modules | Data Structures | File List | Data Fields | Globals | Examples

TR1001 radio tranciever device driver
[The Scatterweb/ESB board]


Files

file  tr1001.c
 Device driver and packet framing for the RFM-TR1001 radio module.


Functions

void tr1001_off (void)
 Turn TR1001 radio transceiver off.

void tr1001_on (void)
 Turn TR1001 radio transceiver on.

void tr1001_set_txpower (unsigned char p)
 Set the transmission power of the tranciever.

void tr1001_init (void)
 Initialize the radio tranciever.

u8_t tr1001_send (u8_t *packet, u16_t len)
 Send a packet from the uip_buf buffer.

unsigned short tr1001_poll (void)
 Check if an incoming packet has been received.

void tr1001_set_speed (unsigned char speed)
 Set the speed of the TR1001 radio device.

unsigned short tr1001_sstrength (void)
 Calculate the signal strength of a received packet.


Function Documentation

void tr1001_init void   ) 
 

Initialize the radio tranciever.

Turns on reception of bytes and installs the receive interrupt handler.

unsigned short tr1001_poll void   ) 
 

Check if an incoming packet has been received.

This function checks the receive buffer to see if an entire packet has been received. The actual reception is handled by an interrupt handler.

Returns:
The length of the received packet, or 0 if no packet has been received.

u8_t tr1001_send u8_t *  packet,
u16_t  len
 

Send a packet from the uip_buf buffer.

This function causes a packet to be sent out after a small random delay, but without doing any MAC layer collision detection or back-offs. The packet is sent with a 4 byte header that contains a a "type" identifier, an 8-bit packet ID field and the length of the packet in network byte order.

This function should normally not be called from user programs. Rather, the uIP TCP/IP stack should be used.

void tr1001_set_speed unsigned char  speed  ) 
 

Set the speed of the TR1001 radio device.

This function sets the speed of the TR1001 radio tranciever. Both the sender and the receiver must have the same speed for communication to work.

Parameters:
speed The speed of the TR1001 radio: TR1001_19200, TR1001_38400, TR1001_57600 or TR1001_115200.

void tr1001_set_txpower unsigned char  p  ) 
 

Set the transmission power of the tranciever.

The sensor board is equipped with a DS1804 100 position trimmer potentiometer which is used to set the transmission input current to the radio tranciever chip, thus setting the transmission power of the radio tranciever.

This function sets the trimmer potentiometer to a value between 1 and 100.

Parameters:
p The power of the tranciever, between 1 (lowest) and 100 (highest).

unsigned short tr1001_sstrength void   ) 
 

Calculate the signal strength of a received packet.

This function calculates the recevied signal strength of the last received packet. This function typically is called when a packet has been received.


Generated on Wed Jul 6 01:19:06 2005 for Contiki/ESB by doxygen 1.3.6