Microchip® Advanced Software Framework

rf212b.h File Reference
#include <stdlib.h>
#include <stdint.h>
#include <stdio.h>
#include "radio.h"

Functions

void goto_sleep (void)
 
int rf212_get_txp (void)
 Get transmission power. More...
 
int rf212_interrupt_poll (void)
 RF212 radio process poll function, to be called from the interrupt handler to poll the radio process. More...
 
int rf212_set_txp (uint8_t txp)
 Set transmission power. More...
 
uint8_t rf212_status (void)
 
int rf_get_channel (void)
 Get radio channel. More...
 
int rf_set_channel (uint8_t ch)
 Set radio channel. More...
 
void SetIEEEAddr (uint8_t *ieee_addr)
 
void SetPanId (uint16_t panId)
 
void SetShortAddr (uint16_t addr)
 
void wake_from_sleep (void)
 

void goto_sleep ( void  )
int rf212_get_txp ( void  )

Get transmission power.

Returns
The transmission power

References PHY_TX_PWR_TXP, PRINTF, RF212_REG_PHY_TX_PWR_CONF, and trx_reg_read().

int rf212_interrupt_poll ( void  )

RF212 radio process poll function, to be called from the interrupt handler to poll the radio process.

Return values
0success

References flag_transmit, IRQ_BAT_LOW, IRQ_CCA_ED_DONE, IRQ_PLL_LOCK, IRQ_PLL_UNLOCK, IRQ_RX_ADDRESS_MATCH, IRQ_TRX_DONE, IRQ_TRXBUF_ACCESS_VIOLATION, pending_frame, PRINTF, process_poll(), RF212_COMMAND, RF212_REG_IRQ_STATUS, RF212_REG_TRX_STATE, trx_reg_read(), TRX_STATE_TRAC_STATUS, and TRXCMD_RX_AACK_ON.

Referenced by PROCESS_THREAD(), and rf212_init().

int rf212_set_txp ( uint8_t  txp)

Set transmission power.

Parameters
txpThe transmission power
Return values
-1Fail: transmission power out of bounds
0Success

References PRINTF, RF212_REG_PHY_TX_PWR_CONF, trx_reg_write(), and TXP_M17.

int rf_get_channel ( void  )

Get radio channel.

Returns
The radio channel
int rf_set_channel ( uint8_t  ch)

Set radio channel.

Parameters
chThe radio channel
Return values
-1Fail: channel number out of bounds
0Success
void SetIEEEAddr ( uint8_t *  ieee_addr)
void SetPanId ( uint16_t  panId)
void SetShortAddr ( uint16_t  addr)
void wake_from_sleep ( void  )