Microchip® Advanced Software Framework

2/inc/app_per_mode.h File Reference

Data Structures

struct  ed_scan_result_t
 ED scan result structure to hold the channel and its ED value. More...
 
struct  trx_config_params_t
 Structure to hold all configurable parameter values. More...
 

Macros

#define CHANNEL   (0)
 
#define CHANNEL_PAGE   (1)
 
#define LED_TOGGLE_COUNT_FOR_PER   (50)
 
#define MAX_ED_REG_VAL   (0X53)
 
#define MAX_ED_VAL   4
 
#define MAX_TX_PWR_REG_VAL   (0x1f)
 
#define MIN_ED_REG_VAL   (0X00)
 
#define MIN_ED_VAL   -127
 
#define TX_POWER_DBM   (2)
 
Packet Error rate Measurement Generic Macros
#define SET_PARAM   (0x01)
 
#define RESULT_REQ   (0x02)
 
#define RESULT_RSP   (0x03)
 
#define IDENTIFY_NODE   (0x07)
 
#define PER_TEST_PKT   (0x0B)
 
#define PEER_INFO_REQ   (0x0C)
 
#define PEER_INFO_RSP   (0x0D)
 
#define DISCONNECT_NODE   (0x0E)
 
#define SET_DEFAULT_REQ   (0x0F)
 
#define PER_TEST_START_PKT   (0x10)
 
#define RANGE_TEST_START_PKT   (0x11)
 
#define RANGE_TEST_PKT   (0x12)
 
#define RANGE_TEST_RSP   (0x13)
 
#define RANGE_TEST_STOP_PKT   (0x14)
 
#define RANGE_TEST_MARKER_CMD   (0x15)
 
#define RANGE_TEST_MARKER_RSP   (0x16)
 
#define SET_SUN_PAGE   (0X17)
 
#define RANGE_TEST_PAYLOAD_LENGTH   (0X08)
 
#define LED_BLINK_RATE_IN_MICRO_SEC   (50000)
 

Functions

void app_reset (trx_id_t trx)
 
void marker_rsp_timer_handler_cb (void *parameter)
 Timer Callback function if marker command is received on air This is used to blink the LED and thus identify that the marker frame is received. More...
 
void marker_tx_timer_handler_cb (void *parameter)
 Timer Callback function if marker response command is transmitted on air This is used to blink the LED and thus identify that the transmission is done. More...
 
void per_mode_initiator_ed_end_cb (trx_id_t trx, uint8_t energy_level)
 User call back function after ED Scan completion. More...
 
void per_mode_initiator_init (trx_id_t trx, void *parameter)
 Initialize the application in PER Measurement mode as Initiator. More...
 
void per_mode_initiator_rx_cb (trx_id_t trx, frame_info_t *frame)
 Callback that is called if data has been received by trx in the PER_FOUND_PER_INITIATOR state. More...
 
void per_mode_initiator_task (trx_id_t trx)
 Application task for PER Measurement mode as initiator. More...
 
void per_mode_initiator_tx_done_cb (trx_id_t trx, retval_t status, frame_info_t *frame)
 Callback that is called once tx is done in the PER_FOUND_PER_INITIATOR state . More...
 
void per_mode_receptor_init (trx_id_t trx, void *parameter)
 Initialize the application in PER Measurement mode as Receptor. More...
 
void per_mode_receptor_rx_cb (trx_id_t trx, frame_info_t *frame)
 Callback that is called if data has been received by trx in the PER_TEST_RECEPTOR state This call back is used when the node is operating as PER Measurement mode Receptor. More...
 
void per_mode_receptor_task (trx_id_t trx)
 The application task when the node is in PER_TEST_RECEPTOR state i.e.PER Measurement mode as Receptor. More...
 
void per_mode_receptor_tx_done_cb (trx_id_t trx, retval_t status, frame_info_t *frame)
 Callback that is called once tx is done in PER_TEST_RECEPTOR state This call back is used when the node is operating as PER Measurement mode Receptor. More...
 
uint8_t scale_ed_to_reg_val (int8_t ed_val)
 
int8_t scale_reg_value_to_ed (uint8_t reg_val)
 

Variables

trx_config_params_t curr_trx_config_params [NUM_TRX]
 

#define CHANNEL   (0)
#define CHANNEL_PAGE   (1)
#define LED_TOGGLE_COUNT_FOR_PER   (50)
#define MAX_ED_REG_VAL   (0X53)
#define MAX_ED_VAL   4
#define MAX_TX_PWR_REG_VAL   (0x1f)

Referenced by set_tx_power().

#define MIN_ED_REG_VAL   (0X00)
#define MIN_ED_VAL   -127
#define TX_POWER_DBM   (2)