20 #include "softdevice_handler.h"
24 #include "nrf_assert.h"
27 #define EVT_STRING_LENGTH_MAX 20
28 #define DEBUG_LINE_LENGTH 80
29 #define VRECT_INCREMENT 500
30 #define IRECT_INCREMENT 100
31 #define VOUT_INCREMENT 500
32 #define IOUT_INCREMENT 100
33 #define TEMPERATURE_INCREMENT 5
35 #define TX_PAYLOAD_LENGTH 32
77 size_t len = strlen(str);
110 bool b_cmd_processed =
true;
230 ble_gap_sec_params_t sec_params;
231 memset(&sec_params, 0,
sizeof(ble_gap_sec_params_t));
235 err_code = sd_ble_gap_authenticate(0, &sec_params);
236 APP_ERROR_CHECK(err_code);
281 (void)sd_softdevice_disable();
288 nrf_clock_lf_cfg_t clock_lf_cfg = NRF_CLOCK_LFCLKSRC;
289 SOFTDEVICE_HANDLER_INIT(&clock_lf_cfg, NULL);
301 #endif // DFU_SUPPORT
308 b_cmd_processed =
false;
314 return b_cmd_processed;
322 bool b_cmd_processed;
330 if (!b_cmd_processed)
343 bool changed =
false;
375 uint32_t pkt_len = 1;
380 pkt_len = strlen((
const char *)
debug_pkt) + 1;
static debug_output_t m_debug_output
#define TX_PAYLOAD_LENGTH
bool pru_process_command_board(uint8_t cmd)
Function for processing board specific test commands.
static void cmd_poll(void)
Get and process uart commands.
bool m_pru_process_command_common(uint8_t cmd)
Function for processing common test commands.
const pru_sensor_data_t * pru_sensors_data_get(void)
Get the latest data from the PRU sensors.
Definition of PRU reporting data.
pru_sm_state_t
PRU states.
#define DEBUG_LINE_LENGTH
void wpts_test_evt_handle_cb(ble_wpts_t *p_wpts, ble_wpts_evt_t *p_evt)
Override weak wpts_test_evt_handle_cb()
ble_wpts_evt_type_t evt_type
bool debug_cmd_available(void)
Check if debug command received from dongle.
static void debug_print_string(const char *str)
Function for writing a string to the debug packet.
void pru_tmux_override_values_set(pru_tmux_override_t *values)
Set override values.
static bool debug_output_changed(void)
Update m_debug_output variable.
#define TEMPERATURE_INCREMENT
static char m_evt_evt_string[EVT_STRING_LENGTH_MAX]
union ble_wpts_evt_t::@0 data
Collection of PRU HAL variables that can be overrided by test multiplexer.
static pru_control_t m_latest_control_data_received
pru_control_t pru_control
void pru_tmux_override_values_get(pru_tmux_override_t *values)
Get ovveride values.
void tmux_get_select(tmux_select_t select)
Select source for all **tmux**get() functions.
pru_sm_state_t pru_sm_execute(pru_sm_signal_type_t sig, pru_sm_state_vars_t *p_state)
Execute state machine.
void debug(void)
Process debug commands.
void tmux_set_select(tmux_select_t select)
Select whether override values shall be used when writing to **hal**set() functions.
static uint8_t debug_pkt[TX_PAYLOAD_LENGTH]
static char temp_string[DEBUG_LINE_LENGTH]
void dfu_start(void)
Starts DFU mode. The function writes a special value to retention register to tell bootloader to star...
WPT Service status structure.
static bool m_debug_print
#define EVT_STRING_LENGTH_MAX
char get_debug_cmd(void)
get debug command received from dongle
static pru_tmux_override_t override_values
static bool m_transmission_stopped