Nordic Semiconductor nRF5 AirFuel SDK
version 2.2.0
|
Source file for PTU UART test interface. More...
#include <string.h>
#include <stdio.h>
#include "wpt.h"
#include "nrf_soc.h"
#include "app_util_platform.h"
#include "ptu_sm.h"
#include "ptu_test_mux.h"
#include "ptu_registry.h"
#include "ptu_sensors.h"
#include "bsp.h"
#include "wireless_debug.h"
#include "nrf_gzll.h"
#include "nrf_assert.h"
Go to the source code of this file.
Macros | |
#define | DEBUG_LINE_LENGTH 80 |
#define | EVT_STRING_LENGTH_MAX 20 |
#define | VTX_INCREMENT 1000 |
#define | ITX_INCREMENT 100 |
#define | TEMPERATURE_INCREMENT 10 |
#define | PIPE_NUMBER 0 |
#define | TX_PAYLOAD_LENGTH 32 |
#define | UPDATE_INTERVAL 200 |
Functions | |
static void | debug_print_string (const char *str) |
Function for writing a string to the debug packet. More... | |
static void | m_set_load_variation_detected (void) |
Will syntesize a load representing a load variation to the sensors module. This will be set to true for 1.5 seconds. | |
static bool | m_ptu_process_command_common (uint8_t cmd) |
Function for processing common test commands. More... | |
bool | ptu_process_command_board (uint8_t cmd) |
Function for processing board related test commands. More... | |
void | cmd_poll (void) |
Get and process uart commands. | |
void | line_print (void) |
Print a DEBUG_LINE_LENGTH character long "horizontal line" to UART. | |
static bool | debug_output_changed (void) |
Update m_debug_output variable. More... | |
void | get_pru_data (int n, uint8_t *buf) |
Read PRU debug data. More... | |
void | debug (void) |
Process debug commands. | |
Variables | |
static bool | pru_changed [PTU_MAX_CONNECTIONS] |
static char | temp_string [DEBUG_LINE_LENGTH] |
static debug_output_t | m_debug_output |
static char | m_evt_evt_string [EVT_STRING_LENGTH_MAX] = "" |
static ptu_tmux_override_t | override_values |
static bool | m_simplified_beacon_print = false |
static bool | m_debug_print = false |
static uint8_t | debug_pkt [TX_PAYLOAD_LENGTH] |
bool | gzll_initialized |
Source file for PTU UART test interface.
Definition in file ptu_wireless_debug.c.
#define DEBUG_LINE_LENGTH 80 |
Width of debug output table
Definition at line 34 of file ptu_wireless_debug.c.
#define EVT_STRING_LENGTH_MAX 20 |
Max length of event message string
Definition at line 35 of file ptu_wireless_debug.c.
#define VTX_INCREMENT 1000 |
Value by which the Vtx is incremented/decremented for each call to the simulated measurement function.
Definition at line 36 of file ptu_wireless_debug.c.
#define ITX_INCREMENT 100 |
Value by which the Itx is incremented/decremented for each call to the simulated measurement function.
Definition at line 37 of file ptu_wireless_debug.c.
#define TEMPERATURE_INCREMENT 10 |
Value by which the Temperature is incremented/decremented for each call to the simulated measurement function.
Definition at line 38 of file ptu_wireless_debug.c.
#define PIPE_NUMBER 0 |
Use pipe 0 for the wireless debug interface (WDI)
Definition at line 39 of file ptu_wireless_debug.c.
#define TX_PAYLOAD_LENGTH 32 |
Maximum PL length used by WDI
Definition at line 40 of file ptu_wireless_debug.c.
#define UPDATE_INTERVAL 200 |
ms between WDI packets
Definition at line 41 of file ptu_wireless_debug.c.
|
static |
Function for writing a string to the debug packet.
[in] | str | String to write |
Definition at line 73 of file ptu_wireless_debug.c.
|
static |
Function for processing common test commands.
[in] | cmd | Command code to process. |
true | Command code was processed by this function. |
false | Command code was not processed by this function. |
Definition at line 124 of file ptu_wireless_debug.c.
bool ptu_process_command_board | ( | uint8_t | cmd | ) |
Function for processing board related test commands.
[in] | cmd | Command code to process. |
true | Command code was processed by this function. |
false | Command code was not processed by this function. |
|
static |
Update m_debug_output variable.
Definition at line 314 of file ptu_wireless_debug.c.
void get_pru_data | ( | int | n, |
uint8_t * | buf | ||
) |
Read PRU debug data.
n | PRU index | |
[in] | buf | Pointer to debug buffer |
Definition at line 417 of file ptu_wireless_debug.c.
|
static |
Set to true if PRU params changed
Definition at line 58 of file ptu_wireless_debug.c.
|
static |
Debug string
Definition at line 59 of file ptu_wireless_debug.c.
|
static |
Debug output collection
Definition at line 60 of file ptu_wireless_debug.c.
|
static |
Event message string
Definition at line 61 of file ptu_wireless_debug.c.
|
static |
Local copy of override values
Definition at line 62 of file ptu_wireless_debug.c.
|
static |
Simplify print flag. Used to decide if beacon debug data should be short.
Definition at line 63 of file ptu_wireless_debug.c.
|
static |
Used to signal that we are sending a string over air.
Definition at line 64 of file ptu_wireless_debug.c.
|
static |
WDI packet
Definition at line 65 of file ptu_wireless_debug.c.
bool gzll_initialized |
true when gzll is initialized