OpenWSN Firmware
radio.h File Reference
#include "radiotimer.h"

Go to the source code of this file.

Macros

#define LENGTH_CRC   2
 

Enumerations

enum  radio_state_t {
  RADIOSTATE_STOPPED = 0x00, RADIOSTATE_RFOFF = 0x01, RADIOSTATE_SETTING_FREQUENCY = 0x02, RADIOSTATE_FREQUENCY_SET = 0x03,
  RADIOSTATE_LOADING_PACKET = 0x04, RADIOSTATE_PACKET_LOADED = 0x05, RADIOSTATE_ENABLING_TX = 0x06, RADIOSTATE_TX_ENABLED = 0x07,
  RADIOSTATE_TRANSMITTING = 0x08, RADIOSTATE_ENABLING_RX = 0x09, RADIOSTATE_LISTENING = 0x0a, RADIOSTATE_RECEIVING = 0x0b,
  RADIOSTATE_TXRX_DONE = 0x0c, RADIOSTATE_TURNING_OFF = 0x0d
}
 Current state of the radio. More...
 

Functions

void radio_init (void)
 
void radio_setOverflowCb (radiotimer_compare_cbt cb)
 
void radio_setCompareCb (radiotimer_compare_cbt cb)
 
void radio_setStartFrameCb (radiotimer_capture_cbt cb)
 
void radio_setEndFrameCb (radiotimer_capture_cbt cb)
 
void radio_reset (void)
 
void radio_startTimer (PORT_TIMER_WIDTH period)
 
PORT_TIMER_WIDTH radio_getTimerValue (void)
 
void radio_setTimerPeriod (PORT_TIMER_WIDTH period)
 
PORT_TIMER_WIDTH radio_getTimerPeriod (void)
 
void radio_setFrequency (uint8_t frequency)
 
void radio_rfOn (void)
 
void radio_rfOff (void)
 
void radio_loadPacket (uint8_t *packet, uint8_t len)
 
void radio_txEnable (void)
 
void radio_txNow (void)
 
void radio_rxEnable (void)
 
void radio_rxNow (void)
 
void radio_getReceivedFrame (uint8_t *bufRead, uint8_t *lenRead, uint8_t maxBufLen, int8_t *rssi, uint8_t *lqi, bool *crc)
 
kick_scheduler_t radio_isr (void)