Mercurial > hg > beaglert
view 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 source
/* * render.h * * Created on: May 28, 2014 * Author: Victor Zappi */ #ifndef RENDER_H_ #define RENDER_H_ // 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 #define DAC_PIN1 4 #define DAC_PIN2 2 #define DAC_PIN3 0 #define DAC_PIN4 1 #define DAC_PIN5 3 #define DAC_PIN6 5 #define DAC_PIN7 7 #define ADC_PIN0 0 #define ADC_PIN1 1 #define ADC_PIN2 2 #define ADC_PIN3 3 #define ADC_PIN4 4 #define ADC_PIN5 5 #define ADC_PIN6 6 #define ADC_PIN7 7 #define MATRIX_MAX 65535.0 extern int gNumAudioChannels; // How many audio channels are present extern int gNumMatrixChannels; // How many matrix channels are present 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, int numMatrixGpioFrames, float *audioIn, float *audioOut, float *matrixIn, float *matrixOut, uint32_t *matrixGpio); void render_medium_prio(); void render_low_prio(); void schedule_render_medium_prio(); void schedule_render_low_prio(); void cleanup_render(); #endif /* RENDER_H_ */