view include/render.h @ 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
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/digital_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 ANALOG_MAX  65535.0

extern int gNumAudioChannels;	// How many audio channels are present
extern int gNumAnalogChannels;	// How many analog channels are present
extern int gNumDigitalChannels;
bool initialise_render(int numAnalogChannels, int numDigitalChannels, int numAudioChannels,
		  	   	   	   int numAnalogFramesPerPeriod,
					   int numAudioFramesPerPeriod,
					   float analogSampleRate, float audioSampleRate,
					   void *userData);

void render(int numAnalogFrames, int numAudioFrames, int numDigitalFrames, float *audioIn, float *audioOut,
			float *analogIn, float *analogOut, uint32_t *digital);

void render_medium_prio();
void render_low_prio();

void schedule_render_medium_prio();
void schedule_render_low_prio();


void cleanup_render();

#endif /* RENDER_H_ */