Microchip® Advanced Software Framework

app_per_mode.h File Reference

PER Measuremnt mode prototypes and defines.

-Performance Analyzer application

Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.

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 BASE_ISM_FREQUENCY_MHZ   (2306)
 
#define CC_BAND_0   (0x00)
 
#define CC_BAND_8   (0x08)
 
#define CC_BAND_9   (0x09)
 
#define CC_NUMBER_0   (0x00)
 
#define CHANNEL   (0)
 
#define CHANNEL_PAGE   (1)
 
#define DISABLE_ALL_RPC_MODES   (0xC1)
 
#define DISABLE_RX_SAFE_MODE   (0x60)
 
#define ENABLE_ALL_RPC_MODES   (0xff)
 
#define ENABLE_RX_SAFE_MODE   (0xA0)
 
#define FREQ_BAND_08   (4)
 
#define FREQ_BAND_09   (5)
 
#define LED_TOGGLE_COUNT_FOR_PER   (50)
 
#define MAX_ISM_FREQUENCY_MHZ   (2527)
 
#define MID_ISM_FREQUENCY_MHZ   (2434)
 
#define MIN_ISM_FREQUENCY_MHZ   (2322)
 
#define MIN_TX_PWR_REG_VAL   (0x0f)
 
#define PULSE_CW_TX_TIME_IN_MICRO_SEC   (50000)
 
#define TX_POWER_DBM   (2)
 
Request and response Ids which sent over the air
#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 REMOTE_TEST_CMD   (0x17)
 
#define REMOTE_TEST_REPLY_CMD   (0x18)
 
#define PKT_STREAM_PKT   (0x18)
 
#define RANGE_TEST_PKT_LENGTH   (19)
 
#define LED_BLINK_RATE_IN_MICRO_SEC   (50000)
 

Functions

void app_reset (void)
 
void configure_pkt_stream_frames (uint16_t frame_len)
 Configure the frame to be used for Packet Streaming. More...
 
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 (uint8_t energy_level)
 User call back function after ED Scan completion. More...
 
void per_mode_initiator_init (void *parameter)
 Initialize the application in PER Measurement mode as Initiator. More...
 
void per_mode_initiator_rx_cb (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 (void)
 Application task for PER Measurement mode as initiator. More...
 
void per_mode_initiator_tx_done_cb (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 (void *parameter)
 Initialize the application in PER Measurement mode as Receptor. More...
 
void per_mode_receptor_rx_cb (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 (void)
 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 (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...
 
void pkt_stream_gap_timer (void *parameter)
 Timer used in Packet Streaming Mode to add gap in between consecutive frames. More...
 
float reverse_float (const float float_val)
 The reverse_float is used for reversing a float variable for supporting BIG ENDIAN systems. More...
 
bool send_remote_reply_cmd (uint8_t *serial_buf, uint8_t len)
 This function is used to send a remote test repsonse command back to the initiator. More...
 
void stop_pkt_streaming (void *parameter)
 This function is called to abort the packet streaming mode in progress. More...
 

Variables

trx_config_params_t curr_trx_config_params
 
trx_config_params_t default_trx_config_params
 

#define BASE_ISM_FREQUENCY_MHZ   (2306)
#define CC_NUMBER_0   (0x00)
#define DISABLE_ALL_RPC_MODES   (0xC1)
#define DISABLE_RX_SAFE_MODE   (0x60)

Referenced by config_rpc_mode().

#define ENABLE_ALL_RPC_MODES   (0xff)
#define ENABLE_RX_SAFE_MODE   (0xA0)
#define LED_TOGGLE_COUNT_FOR_PER   (50)
#define MAX_ISM_FREQUENCY_MHZ   (2527)
#define MID_ISM_FREQUENCY_MHZ   (2434)
#define MIN_ISM_FREQUENCY_MHZ   (2322)
#define MIN_TX_PWR_REG_VAL   (0x0f)
#define TX_POWER_DBM   (2)