test: txrx_hwloop: sample rate arg added to binary

This commit is contained in:
Ryan Thompson 2023-05-22 13:59:06 -05:00
commit 5998f459c8
2 changed files with 10 additions and 0 deletions

View file

@ -111,6 +111,14 @@ int main(int argc, char *argv[]) {
strcpy(test.dev_rx_str, optarg);
break;
case 's':
p.samplerate = str2uint(optarg, 0, UINT32_MAX, &ok);
if (!ok) {
fprintf(stderr, "Invalid sample rate: %s\n", optarg);
return -1;
}
break;
case 'b':
test.burst_len = str2uint(optarg, 0, UINT32_MAX, &ok);
if (!ok) {

View file

@ -43,6 +43,7 @@ struct test_case {
static struct option const long_options[] = {
{ "txdev", required_argument, NULL, 't' },
{ "rxdev", required_argument, NULL, 'r' },
{ "samprate", required_argument, NULL, 's' },
{ "burst", required_argument, NULL, 'b' },
{ "compare", no_argument, NULL, 'c' },
{ "period", required_argument, NULL, 'p' },
@ -88,6 +89,7 @@ static void usage()
printf("Test configuration:\n");
printf(" -t, --txdev <value> TX bladeRF device string.\n");
printf(" -r, --rxdev <value> RX bladeRF device string.\n");
printf(" -s, --samprate <value> Sample Rate\n");
printf(" -b, --burst <value> Number of samples in a burst.\n");
printf(" -p, --period <value> Length between timestamps in samples\n");
printf(" -f, --fill <value> %% of burst to fill with [2000,2000]\n");