diff include/RTAudio.h @ 16:670be80463a3 matrix_gpio

- analog matrixIn/matrixOut are now mapped as floats from 0 to 1 - use of an external PRU code can be enabled with -P <filename> - 16 channels of programmable GPIO can be accessed straight from render() either writing directly to the matrixGpio[] array or using digitalWrite(), digitalRead(), setDigitalDirection() macros from Utilities.h .
author Giulio Moro <giuliomoro@yahoo.it>
date Mon, 27 Apr 2015 13:01:57 +0100
parents a6beeba3a648
children c98863e63174
line wrap: on
line diff
--- a/include/RTAudio.h	Sat Feb 07 16:41:56 2015 +0000
+++ b/include/RTAudio.h	Mon Apr 27 13:01:57 2015 +0100
@@ -29,6 +29,7 @@
 #define DEFAULT_DAC_LEVEL	0.0
 #define DEFAULT_ADC_LEVEL	-6.0
 #define DEFAULT_HP_LEVEL	-6.0
+#define MAX_PRU_FILENAME_LENGTH 256
 
 enum {
 	kAmplifierMutePin = 61	// P8-26 controls amplifier mute
@@ -44,9 +45,11 @@
 	float adcLevel;			// Level for the audio ADC input
 	float headphoneLevel;	// Level for the headphone output
 	int useMatrix;			// Whether to use the matrix
+	int useMatrixGpio;		// Whether to use the 16 programmable GPIOs
 	int numMatrixChannels;	// How many channels for the ADC and DAC
+	int numMatrixGpioChannels;	// How many channels for the GPIOs
 	int verbose;			// Whether to use verbose logging
-
+	char pruFilename[MAX_PRU_FILENAME_LENGTH]; //the external .bin file to load. If empty will use PRU code from pru_rtaudio_bin.h
 	// These items are hardware-dependent and should only be changed
 	// to run on different hardware
 	int codecI2CAddress;	// Where the codec can be found on the I2C bus