Common utilities for both Initiator and Receptor in PER Measurement mode - Performance Analyzer application.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
#include <stdio.h>
#include "tfa.h"
#include "tal.h"
#include "tal_internal.h"
#include "tal_constants.h"
#include "tal_helper.h"
#include "app_frame_format.h"
#include "app_init.h"
#include "perf_api.h"
#include "perf_api_serial_handler.h"
Macros | |
#define | DEFAULT_FRAME_LENGTH (20) |
#define | DEFAULT_NO_OF_TEST_FRAMES (100) |
#define | LED_BLINK_COUNT_FOR_IDENTIFY (20) |
Functions | |
void | app_reset (void) |
void | config_per_test_parameters (void) |
Function to set trx configure parameters. More... | |
void | configure_pkt_stream_frames (uint16_t frame_len) |
Configure the frame to be used for Packet Streaming. More... | |
void | dump_trx_register_values (uint16_t start_reg_addr, uint16_t end_reg_addr) |
Read a set of registers. More... | |
void | led_blinker_timer_handler_cb (void *parameter) |
Timer Callback function if identify command is received on air by a node in reflector configuration. More... | |
void | pkt_stream_gap_timer (void *parameter) |
Timer used in Packet Streaming Mode to add gap in between consecutive frames. More... | |
void | pktstream_test (uint16_t gap_time, uint16_t timeout, bool start_stop, uint16_t frame_len) |
This function initiates packet streaming test. More... | |
void | pulse_cw_transmission (void) |
void | read_trx_registers (uint16_t reg_addr) |
Read transceiver register. More... | |
void | recover_all_settings (void) |
Recover all user settings before Start of CW transmission. More... | |
float | reverse_float (const float float_val) |
The reverse_float is used for reversing a float variable for supporting BIG ENDIAN systems. More... | |
void | rx_on_test (bool start_stop_param) |
This function is called to initiate the RX_ON test The transceiver is put into the RX_ON mode and no requests are handled until this mode is stopped. More... | |
void | save_all_settings (void) |
Save all user settings before Start of CW transmission. More... | |
void | start_cw_transmission (uint8_t tx_mode, uint16_t tmr_val) |
void | stop_cw_transmission (void *parameter) |
void | stop_pkt_streaming (void *parameter) |
This function is called to abort the packet streaming mode inprogress. More... | |
static void | stop_pulse_cb (void *callback_parameter) |
Stop sending a CW signal on current channel page. More... | |
void | write_trx_registers (uint16_t reg_addr, uint8_t reg_val) |
write Transceiver registers More... | |
Variables | |
static uint8_t | cc_band_ct |
static uint8_t | cc_number_ct |
trx_config_params_t | curr_trx_config_params |
bool | cw_ack_sent |
uint8_t | cw_start_mode |
uint16_t | cw_tmr_val |
trx_config_params_t | default_trx_config_params |
uint8_t | last_tx_power_format_set |
bool | peer_found |
uint8_t | pkt_buffer [LARGE_BUFFER_SIZE] |
uint32_t | pkt_stream_gap_time |
bool | pulse_mode |
bool | rdy_to_tx |
bool | remote_cw_start |
bool | remote_pulse_cw_start |
bool | remote_serial_tx_failure |
bool | rx_on_mode |
frame_info_t * | stream_pkt |
#define DEFAULT_FRAME_LENGTH (20) |
Referenced by config_per_test_parameters().
#define DEFAULT_NO_OF_TEST_FRAMES (100) |
Referenced by config_per_test_parameters().
#define LED_BLINK_COUNT_FOR_IDENTIFY (20) |
Referenced by led_blinker_timer_handler_cb().
void pulse_cw_transmission | ( | void | ) |
References CC_BAND_0, cc_band_ct, cc_number_ct, CONTINUOUS_TX_MODE, cw_ack_sent, CW_MODE, FUNC_PTR, MAC_SUCCESS, node_ib_t::main_state, node_info, op_mode, PER_TEST_RECEPTOR, phyCurrentChannel, PULSE_CW_TX_TIME_IN_MICRO_SEC, remote_pulse_cw_start, save_all_settings(), stop_pulse_cb(), SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER, tal_pib_get(), tal_reset(), tal_set_frequency_regs(), tfa_continuous_tx_start(), and usr_cont_pulse_tx_confirm().
Referenced by handle_incoming_msg(), and per_mode_receptor_tx_done_cb().
void start_cw_transmission | ( | uint8_t | tx_mode, |
uint16_t | tmr_val | ||
) |
References ANT_DIV_DISABLE, ANT_DIVERSITY_DISABLE, CONTINUOUS_TX_MODE, cw_ack_sent, CW_MODE, cw_start_mode, cw_tmr_val, CW_TX_TIMER, FUNC_PTR, INVALID_ARGUMENT, MAC_SUCCESS, node_ib_t::main_state, node_info, op_mode, PER_TEST_INITIATOR, PER_TEST_RECEPTOR, PRBS_MODE, remote_cw_start, save_all_settings(), SINGLE_NODE_TESTS, START_CWT, stop_cw_transmission(), SW_TIMEOUT_RELATIVE, sw_timer_start(), tal_ant_div_config(), tal_reset(), tfa_continuous_tx_start(), and usr_cont_wave_tx_confirm().
Referenced by handle_incoming_msg(), and per_mode_receptor_tx_done_cb().
void stop_cw_transmission | ( | void * | parameter | ) |
References FUNC_PTR, LED_BLINK_RATE_IN_MICRO_SEC, led_blinker_timer_handler_cb(), MAC_SUCCESS, node_ib_t::main_state, node_info, op_mode, PER_TEST_RECEPTOR, recover_all_settings(), remote_cw_start, STOP_CWT, SW_TIMEOUT_RELATIVE, sw_timer_start(), T_APP_TIMER, tfa_continuous_tx_stop(), TX_OP_MODE, and usr_cont_wave_tx_confirm().
Referenced by handle_incoming_msg(), per_mode_receptor_task(), and start_cw_transmission().
|
static |
Stop sending a CW signal on current channel page.
callback_parameter | Pointer to callback, not used here |
References MAC_SUCCESS, op_mode, recover_all_settings(), tfa_continuous_tx_stop(), TX_OP_MODE, and usr_cont_pulse_tx_confirm().
Referenced by pulse_cw_transmission().
|
static |
Referenced by pulse_cw_transmission(), recover_all_settings(), and save_all_settings().
|
static |
Referenced by pulse_cw_transmission(), recover_all_settings(), and save_all_settings().
uint8_t last_tx_power_format_set |
Referenced by perf_set_req(), and recover_all_settings().
uint8_t pkt_buffer[LARGE_BUFFER_SIZE] |
Referenced by configure_pkt_stream_frames().