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. | |
|
|
Initialize the radio tranciever. Turns on reception of bytes and installs the receive interrupt handler. |
|
|
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.
|
|
||||||||||||
|
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. |
|
|
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.
|
|
|
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.
|
|
|
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. |
1.3.6