Skip to content

Commit 1fdd8b0

Browse files
prsi98rlubos
authored andcommitted
samples: wifi: radio_test: Update RX Capture display
[SHEL-3805]: Update RX Capture output display to copy friendly format. Signed-off-by: Prasun Sinha <[email protected]>
1 parent 8c2f665 commit 1fdd8b0

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

samples/wifi/radio_test/multi_domain/inc/nrf_wifi_radio_test_shell.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@
1818
#include <radio_test/fmac_structs.h>
1919
#include <zephyr/drivers/wifi/nrf_wifi/bus/rpu_hw_if.h>
2020

21+
/* RX capture display constants */
22+
#define SAMPLES_PER_LINE 16
23+
#define BYTES_PER_SAMPLE 3
24+
#define BYTES_PER_LINE 48
25+
2126
struct nrf_wifi_ctx_zep_rt {
2227
struct nrf_wifi_fmac_priv *fmac_priv;
2328
struct rpu_conf_params conf_params;

samples/wifi/radio_test/multi_domain/src/nrf_wifi_radio_test_shell.c

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1558,13 +1558,20 @@ static int nrf_wifi_radio_test_rx_cap(const struct shell *shell,
15581558
SHELL_INFO,
15591559
"\n************* RX capture data ***********\n");
15601560

1561-
for (i = 0; i < (ctx->conf_params.capture_length); i++) {
1561+
for (i = 0; i < (ctx->conf_params.capture_length/SAMPLES_PER_LINE); i++) {
1562+
for (int j = 0; j < SAMPLES_PER_LINE; j++) {
1563+
shell_fprintf(shell,
1564+
SHELL_INFO,
1565+
"%02X%02X%02X ",
1566+
rx_cap_buf[i*BYTES_PER_LINE + 2 + j*BYTES_PER_SAMPLE],
1567+
rx_cap_buf[i*BYTES_PER_LINE + 1 + j*BYTES_PER_SAMPLE],
1568+
rx_cap_buf[i*BYTES_PER_LINE + 0 +
1569+
j*BYTES_PER_SAMPLE]);
1570+
}
1571+
15621572
shell_fprintf(shell,
15631573
SHELL_INFO,
1564-
"%02X%02X%02X\n",
1565-
rx_cap_buf[i*3 + 2],
1566-
rx_cap_buf[i*3 + 1],
1567-
rx_cap_buf[i*3 + 0]);
1574+
"\n");
15681575
}
15691576
} else if (capture_status == 1) {
15701577
shell_fprintf(shell,

0 commit comments

Comments
 (0)