Command-line arguments » History » Version 5

Giulio Moro, 2015-12-28 03:14 AM

1 1 Andrew McPherson
h1.  Command-line arguments 
2 1 Andrew McPherson
3 3 Giulio Moro
Every Bela program supports a standard set of command-line arguments, listed below. Either the long form or the short (single-character) form can be used 
4 1 Andrew McPherson
5 1 Andrew McPherson
Other arguments can be added in each project. With the exception of @-p@ and @-v@, the standard arguments all use capital letters, leaving the lowercase letters free for user-defined arguments. The @BeagleRT_usage()@ function explains the standard arguments as follows:
6 1 Andrew McPherson
7 1 Andrew McPherson
<pre>
8 2 Andrew McPherson
	--period [-p] period:            Set the hardware period (buffer) size in analog samples
9 2 Andrew McPherson
	--dac-level [-D] dBs:            Set the DAC output level (0dB max; -63.5dB min)
10 2 Andrew McPherson
	--adc-level [-A] dBs:            Set the ADC input level (0dB max; -12dB min)
11 5 Giulio Moro
	--pga-gain-left dBs:             Set the Programmable Gain Amplifier for the left audio channel (0dBmin; 59.5dB max; default: 16dB)\n";
12 5 Giulio Moro
	--pga-gain-right dBs:            Set the Programmable Gain Amplifier for the right audio channel (0dBmin; 59.5dB max; default: 16dB)\n";  
13 2 Andrew McPherson
	--hp-level [-H] dBs:             Set the headphone output level (0dB max; -63.5dB min)
14 2 Andrew McPherson
	--mute-speaker [-M] val:         Set whether to mute the speaker initially (default: no)
15 2 Andrew McPherson
	--use-analog [-N] val:           Set whether to use ADC/DAC analog (default: yes)
16 2 Andrew McPherson
	--use-digital [-G] val:          Set whether to use digital GPIO channels (default: yes)
17 2 Andrew McPherson
	--analog-channels [-C] val:      Set the number of ADC/DAC channels (default: 8)
18 2 Andrew McPherson
	--digital-channels [-B] val:     Set the number of GPIO channels (default: 16)
19 2 Andrew McPherson
	--receive-port [-R] val:         Set the receive port (default: 9998)
20 2 Andrew McPherson
	--transmit-port [-T] val:        Set the transmit port (default: 9999)
21 2 Andrew McPherson
	--server-name [-S] val:          Set the destination server name (default: '127.0.0.1')
22 2 Andrew McPherson
	--pru-file val:                  Set an optional external file to use for the PRU binary code
23 2 Andrew McPherson
	--verbose [-v]:                  Enable verbose logging information
24 1 Andrew McPherson
</pre>