Microchip® Advanced Software Framework

at86rf231/src/phy.c File Reference
#include <stdbool.h>
#include "phy.h"
#include "sal.h"
#include "trx_access.h"
#include "delay.h"
#include "at86rf231.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)
 
int8_t PHY_EdReq (void)
 
void PHY_EncryptReq (uint8_t *text, uint8_t *key)
 
void PHY_Init (void)
 
uint16_t PHY_RandomReq (void)
 
void PHY_SetChannel (uint8_t channel)
 
void PHY_SetIEEEAddr (uint8_t *ieee_addr)
 
void PHY_SetPanId (uint16_t panId)
 
void PHY_SetRxState (bool rx)
 
void PHY_SetShortAddr (uint16_t addr)
 
void PHY_SetTxPower (uint8_t txPower)
 
void PHY_Sleep (void)
 
void PHY_TaskHandler (void)
 
void PHY_Wakeup (void)
 
static uint8_t phyReadRegister (uint8_t reg)
 
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 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_DataReq ( uint8_t *  data)

Referenced by nwkTxTaskHandler().

int8_t PHY_EdReq ( void  )

Referenced by APP_TaskHandler().

void PHY_EncryptReq ( uint8_t *  text,
uint8_t *  key 
)
void PHY_Init ( void  )

Referenced by SYS_Init().

uint16_t PHY_RandomReq ( void  )

Referenced by appInit().

void PHY_SetChannel ( uint8_t  channel)

Referenced by APP_TaskHandler(), and appInit().

void PHY_SetIEEEAddr ( uint8_t *  ieee_addr)
void PHY_SetPanId ( uint16_t  panId)

Referenced by NWK_SetPanId().

void PHY_SetRxState ( bool  rx)

Referenced by appInit().

void PHY_SetShortAddr ( uint16_t  addr)

Referenced by NWK_SetAddr().

void PHY_SetTxPower ( uint8_t  txPower)
void PHY_Sleep ( void  )

Referenced by NWK_SleepReq().

void PHY_TaskHandler ( void  )

Referenced by SYS_TaskHandler().

void PHY_Wakeup ( void  )

Referenced by NWK_WakeupReq().

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 phyRxBuffer[128]
static

Referenced by PHY_TaskHandler().

bool phyRxState
static