/* 
 * File:   extern.h
 * Author: hamilton
 *
 * Created on January 27, 2014, 5:42 PM
 */

#include <dsp.h>
#include "config.h"
#include "can.h"
#include "types.h"

#ifndef EXTERN_H
#define	EXTERN_H


//These calibration contants are defined in "CalibrationConstants.c"
extern const int Pressure_cnt[2];
extern const  float Pressure_eng[2];

extern const int I_Flow_cnt[2];
extern const  float I_Flow_eng[2];


extern float  DiffPressure;
extern float FlowRate_1;
extern float FlowTotal_1;
extern float FlowRate_2;
extern float FlowTotal_2;

//The following global variables are defined in extern.c
extern volatile float time;
extern volatile float time_relative;
extern unsigned int uiTemp1;
extern int iTemp1;
extern int iTemp2;
extern int iTemp3;
extern int iTemp4;

extern float  fTemp1;
extern float  fTemp2;

extern FIRStruct ADC_Filter;

extern volatile int outSamples[FILTERSAMPLES];

extern int raw;

extern volatile int Pressure_ADC[FILTERSAMPLES];
extern volatile int I_Flow_ADC[FILTERSAMPLES];

//extern volatile int Pressure_Buf[REPORTINGSAMPLES];
//extern volatile int I_Flow_Buf[REPORTINGSAMPLES];

extern unsigned int BufferA[FILTERSAMPLES*NUMAIO] __attribute__((space(dma),aligned(64)));
extern unsigned int BufferB[FILTERSAMPLES*NUMAIO] __attribute__((space(dma),aligned(64)));

extern unsigned long paddlewheel_cnts;

#endif	/* EXTERN_H */

