Mercurial > hg > beaglert
diff core/RTAudioCommandLine.cpp @ 23:182ae9367104 matrix_gpio
- persistency: the last frame of each digital and analogOut buffers is used to initialize all the frames in the next buffer. This means that once a value is set, the pin will hold the value until you change it
- AnalogXyz macros have been renamed to analogXyz
- the short option -P has been removed. The long option --pru-file has to be used instead
author | Giulio Moro <giuliomoro@yahoo.it> |
---|---|
date | Tue, 05 May 2015 17:28:00 +0100 |
parents | c98863e63174 |
children | ad5cd8dd99b3 06fd2ffee605 |
line wrap: on
line diff
--- a/core/RTAudioCommandLine.cpp Sun May 03 01:10:17 2015 +0100 +++ b/core/RTAudioCommandLine.cpp Tue May 05 17:28:00 2015 +0100 @@ -10,6 +10,9 @@ #include <cstring> #include <getopt.h> #include "../include/RTAudio.h" +#ifndef OPT_PRU_FILE +#define OPT_PRU_FILE -1 +#endif // Default command-line options for RTAudio struct option gDefaultLongOptions[] = @@ -17,18 +20,17 @@ {"period", 1, NULL, 'p'}, {"verbose", 0, NULL, 'v'}, {"use-analog", 1, NULL, 'm'}, - {"use-analog-gpio", 1, NULL, 'g'}, + {"use-digital-gpio", 1, NULL, 'g'}, {"analog-channels", 1, NULL, 'C'}, - {"analog-gpio-channels", 1, NULL, 'G'}, + {"digital-gpio-channels", 1, NULL, 'G'}, {"mute-speaker", 1, NULL, 'M'}, {"dac-level", 1, NULL, 'D'}, {"adc-level", 1, NULL, 'A'}, {"hp-level", 1, NULL, 'H'}, - {"pru-file",1,NULL,'P'}, + {"pru-file",1,NULL,OPT_PRU_FILE}, {NULL, 0, NULL, 0} }; - -const char gDefaultShortOptions[] = "p:vm:M:C:D:A:H:P:g:G:"; +const char gDefaultShortOptions[] = "p:vm:M:C:D:A:H:g:G:"; // This function sets the default settings for the RTAudioSettings structure void BeagleRT_defaultSettings(RTAudioSettings *settings) @@ -165,7 +167,7 @@ case 'H': settings->headphoneLevel = atof(optarg); break; - case 'P': + case OPT_PRU_FILE: if(strlen(optarg)<MAX_PRU_FILENAME_LENGTH) strcpy(settings->pruFilename, optarg); else @@ -191,7 +193,7 @@ std::cerr << " --use-gpio-analog [-g] val: Set whether to use GPIO analog (default: yes)\n"; std::cerr << " --analog-channels [-C] val: Set the number of ADC/DAC channels (default: 8)\n"; std::cerr << " --analog-gpio-channels [-G] val: Set the number of GPIO channels (default: 16)\n"; - std::cerr << " --pru-file [-P] val: Set an optional external file to use for the PRU binary code\n"; + std::cerr << " --pru-file val: Set an optional external file to use for the PRU binary code\n"; std::cerr << " --verbose [-v]: Enable verbose logging information\n"; }