Microchip® Advanced Software Framework

at86rf212/src/phy.c File Reference
#include <stdbool.h>
#include "phy.h"
#include "sal.h"
#include "trx_access.h"
#include "delay.h"
#include "at86rf212.h"

Macros

#define PHY_CRC_SIZE   2
 

Enumerations

enum  PhyState_t {
  PHY_STATE_INITIAL,
  PHY_STATE_IDLE,
  PHY_STATE_SLEEP,
  PHY_STATE_TX_WAIT_END,
  PHY_STATE_INITIAL,
  PHY_STATE_IDLE,
  PHY_STATE_SLEEP,
  PHY_STATE_TX_WAIT_END,
  PHY_STATE_INITIAL,
  PHY_STATE_IDLE,
  PHY_STATE_SLEEP,
  PHY_STATE_TX_WAIT_END,
  PHY_STATE_INITIAL,
  PHY_STATE_IDLE,
  PHY_STATE_SLEEP,
  PHY_STATE_TX_WAIT_END
}
 

Functions

void PHY_DataReq (uint8_t *data)
 
void PHY_EncryptReq (uint8_t *text, uint8_t *key)
 
void PHY_Init (void)
 
uint16_t PHY_RandomReq (void)
 
void PHY_SetBand (uint8_t band)
 
void PHY_SetChannel (uint8_t channel)
 
void PHY_SetIEEEAddr (uint8_t *ieee_addr)
 
void PHY_SetModulation (uint8_t modulation)
 
void PHY_SetPanId (uint16_t panId)
 
void PHY_SetRxState (bool rx)
 
void PHY_SetShortAddr (uint16_t addr)
 
void PHY_Sleep (void)
 
void PHY_TaskHandler (void)
 
void PHY_Wakeup (void)
 
static uint8_t phyReadRegister (uint8_t reg)
 
static int8_t phyRssiBaseVal (void)
 
static void phySetChannel (void)
 
static void phySetRxState (void)
 
static void phyTrxSetState (uint8_t state)
 
static void phyWaitState (uint8_t state)
 
static void phyWriteRegister (uint8_t reg, uint8_t value)
 

Variables

static uint8_t phyBand
 
static uint8_t phyChannel
 
static uint8_t phyModulation
 
static uint8_t phyRxBuffer [128]
 
static bool phyRxState
 
static PhyState_t phyState = PHY_STATE_INITIAL
 

#define PHY_CRC_SIZE   2

Referenced by PHY_TaskHandler().

enum PhyState_t
Enumerator
PHY_STATE_INITIAL 
PHY_STATE_IDLE 
PHY_STATE_SLEEP 
PHY_STATE_TX_WAIT_END 
PHY_STATE_INITIAL 
PHY_STATE_IDLE 
PHY_STATE_SLEEP 
PHY_STATE_TX_WAIT_END 
PHY_STATE_INITIAL 
PHY_STATE_IDLE 
PHY_STATE_SLEEP 
PHY_STATE_TX_WAIT_END 
PHY_STATE_INITIAL 
PHY_STATE_IDLE 
PHY_STATE_SLEEP 
PHY_STATE_TX_WAIT_END 

void PHY_EncryptReq ( uint8_t *  text,
uint8_t *  key 
)
void PHY_SetBand ( uint8_t  band)

References phyBand, and phySetChannel().

void PHY_SetChannel ( uint8_t  channel)

References phyChannel, and phySetChannel().

void PHY_SetIEEEAddr ( uint8_t *  ieee_addr)

References IEEE_ADDR_0_REG, and trx_reg_write().

void PHY_SetModulation ( uint8_t  modulation)

References phyModulation, and phySetChannel().

void PHY_SetPanId ( uint16_t  panId)
void PHY_SetRxState ( bool  rx)

References phyRxState, and phySetRxState().

void PHY_SetShortAddr ( uint16_t  addr)
void PHY_Sleep ( void  )
void PHY_Wakeup ( void  )
static uint8_t phyReadRegister ( uint8_t  reg)
static
static void phyWaitState ( uint8_t  state)
static
static void phyWriteRegister ( uint8_t  reg,
uint8_t  value 
)
static

uint8_t phyBand
static
uint8_t phyChannel
static

Referenced by PHY_SetChannel(), and phySetChannel().

uint8_t phyModulation
static
uint8_t phyRxBuffer[128]
static

Referenced by PHY_TaskHandler().

bool phyRxState
static