Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00143 #include "hal_nrf.h"
00144
00145
00146 #include <stdbool.h>
00147 #include <intrins.h>
00148
00149 #define RF_TEST_MAX_CHANNEL 81 //!< Upper radio channel
00150
00152 typedef enum {
00153 RF_TEST_RC_OK,
00154 RF_TEST_RC_FINISHED,
00155 RF_TEST_RC_ERR_PARAM,
00156 RF_TEST_RC_ERR_BUFFER_FULL,
00157 RF_TEST_RC_ERR_NB_RX_BYTES
00159 } rf_test_ret_t;
00160
00161
00166 void rf_test_init();
00167
00178 rf_test_ret_t rf_test_sensitivity_init(uint8_t ch, hal_nrf_output_power_t pwr, hal_nrf_datarate_t datarate, uint8_t *address);
00179
00199 void rf_test_sensitivity_set_expected_data(uint8_t data_size, uint8_t *p_expected_data);
00200
00207 rf_test_ret_t rf_test_receive_and_compute_packet();
00208
00216 uint16_t rf_test_compute_error_rate();
00217
00229 rf_test_ret_t rf_test_init_rx_sweep(uint8_t pwr, uint8_t datarate, uint8_t *rx_mode_address, uint8_t first_channel, uint8_t last_channel);
00230
00241 rf_test_ret_t rf_test_init_tx_sweep(uint8_t pwr, uint8_t datarate, uint8_t first_channel, uint8_t last_channel);
00242
00255 void rf_test_txrx_sweep();
00256
00262 void rf_test_set_modulation_payload();
00263
00273 rf_test_ret_t rf_test_start_mod_carrier(uint8_t channel, uint8_t pwr, uint8_t datarate);
00274
00280 void rf_test_const_carrier_isr(void);
00281
00291 rf_test_ret_t rf_test_start_unmod_carrier(uint8_t channel, uint8_t pwr, uint8_t datarate);
00292
00303 rf_test_ret_t rf_test_start_rx_carrier(uint8_t channel, uint8_t pwr, uint8_t datarate, uint8_t *rx_carrier_address);
00304