Mercurial > hg > beaglert
diff include/render.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 | 6adb088196a7 |
children | c98863e63174 |
line wrap: on
line diff
--- a/include/render.h Sat Feb 07 16:41:56 2015 +0000 +++ b/include/render.h Mon Apr 27 13:01:57 2015 +0100 @@ -10,7 +10,8 @@ // uint types #include <stdint.h> - +#include "../include/Utilities.h" +#include "../include/matrix_gpio_mapping.h" // Mappings from pin numbers on PCB to actual DAC channels // This gives the DAC and ADC connectors the same effective pinout #define DAC_PIN0 6 @@ -35,15 +36,15 @@ extern int gNumAudioChannels; // How many audio channels are present extern int gNumMatrixChannels; // How many matrix channels are present - -bool initialise_render(int numMatrixChannels, int numAudioChannels, +extern int gNumMatrixGpioChannels; +bool initialise_render(int numMatrixChannels, int numMatrixGpioChannels, int numAudioChannels, int numMatrixFramesPerPeriod, int numAudioFramesPerPeriod, float matrixSampleRate, float audioSampleRate, void *userData); -void render(int numMatrixFrames, int numAudioFrames, float *audioIn, float *audioOut, - uint16_t *matrixIn, uint16_t *matrixOut); +void render(int numMatrixFrames, int numAudioFrames, int numMatrixGpioFrames, float *audioIn, float *audioOut, + float *matrixIn, float *matrixOut, uint32_t *matrixGpio); void render_medium_prio(); void render_low_prio();