n

Dependencies:   mbed

Fork of LG by igor Apu

Committer:
igor_v
Date:
Sat Jan 30 13:00:39 2016 +0000
Revision:
0:8ad47e2b6f00
Child:
1:f2adcae3d304
2016_01_30;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
igor_v 0:8ad47e2b6f00 1 //#include "Global.h"
igor_v 0:8ad47e2b6f00 2 #include "dspfns.h"
igor_v 0:8ad47e2b6f00 3
igor_v 0:8ad47e2b6f00 4
igor_v 0:8ad47e2b6f00 5 typedef enum BAND_PASS_TYPE_{PLC, DUP} BAND_PASS_TYPE;
igor_v 0:8ad47e2b6f00 6
igor_v 0:8ad47e2b6f00 7 extern BAND_PASS_TYPE BandPassType;
igor_v 0:8ad47e2b6f00 8 extern unsigned int Vibro_Filter_Aperture;
igor_v 0:8ad47e2b6f00 9
igor_v 0:8ad47e2b6f00 10 #define PI 3.14159265
igor_v 0:8ad47e2b6f00 11
igor_v 0:8ad47e2b6f00 12 //e. constants for the filter in the CPLC regulator //r. ��������� ��� ������� � ������� ���
igor_v 0:8ad47e2b6f00 13 #define NUMB_OF_BIQUADS_PLC 2
igor_v 0:8ad47e2b6f00 14 #define TAPS_PLC 5*NUMB_OF_BIQUADS_PLC
igor_v 0:8ad47e2b6f00 15 #define DELAY_LEN_PLC (2*NUMB_OF_BIQUADS_PLC+2)
igor_v 0:8ad47e2b6f00 16
igor_v 0:8ad47e2b6f00 17 //e. constants for the filter in the APS regulator //r. ��������� ��� ������� � ������� ���
igor_v 0:8ad47e2b6f00 18 #define NUM_OF_BIQUADS_DUP 2
igor_v 0:8ad47e2b6f00 19 #define TAPS_DUP 5*NUM_OF_BIQUADS_DUP
igor_v 0:8ad47e2b6f00 20 #define DELAY_LEN_DUP (2*NUM_OF_BIQUADS_DUP+2)
igor_v 0:8ad47e2b6f00 21
igor_v 0:8ad47e2b6f00 22 #define X 0.98 //0.96 //0.86
igor_v 0:8ad47e2b6f00 23 #define A0_HP ((1 + X)/2) * 0x40000000
igor_v 0:8ad47e2b6f00 24 #define A1_HP (-(1 + X)/2) * 0x40000000
igor_v 0:8ad47e2b6f00 25 #define B1_HP (X * 0x80000000)/2
igor_v 0:8ad47e2b6f00 26
igor_v 0:8ad47e2b6f00 27 #define MULT_7680_12500 26667
igor_v 0:8ad47e2b6f00 28
igor_v 0:8ad47e2b6f00 29 #define Saturation(Uin, UpSat, DownSat) if (Uin > UpSat) Uin = UpSat; \
igor_v 0:8ad47e2b6f00 30 if (Uin < DownSat) Uin = DownSat;
igor_v 0:8ad47e2b6f00 31
igor_v 0:8ad47e2b6f00 32 #define Cnt_Overload(Uin, UpSat, DwnSat) if (Uin > UpSat) Uin -= INT32_MAX; if (Uin < DwnSat) Uin += INT32_MAX;
igor_v 0:8ad47e2b6f00 33
igor_v 0:8ad47e2b6f00 34 #define CPL_reset_calc(U0, Kgrad, Ti, T0) U0 + L_mult( Kgrad, (Ti - T0) )
igor_v 0:8ad47e2b6f00 35
igor_v 0:8ad47e2b6f00 36 int HFO_MovAverFilt (int );
igor_v 0:8ad47e2b6f00 37
igor_v 0:8ad47e2b6f00 38 int VibroReduce (int input);
igor_v 0:8ad47e2b6f00 39 void init_VibroReduce(void);
igor_v 0:8ad47e2b6f00 40 int PLC_PhaseDetFilt (int input);
igor_v 0:8ad47e2b6f00 41 int DUP_Filt (int input);
igor_v 0:8ad47e2b6f00 42 void init_BandPass(double CenterFreq, double BandWidth, BAND_PASS_TYPE );
igor_v 0:8ad47e2b6f00 43
igor_v 0:8ad47e2b6f00 44