00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef FIR_WIN_H
00022 #define FIR_WIN_H
00023
00024 #include <stdint.h>
00025
00027 #define FWIN_USE_WINDOW_FUNCTION 1
00028
00030 typedef enum {
00032 FW_BANDPASS = 0,
00034 FW_BANDSTOP,
00036 FW_LOWPASS,
00038 FW_HIGHPASS,
00042 FW_AVERAGE,
00043 FW_NUMBER_OF_FILTER_TYPES
00044 } te_fir_win_filter_type;
00045
00047 typedef enum {
00048 FW_NONE = 0,
00049 FW_HAMMING,
00050 FW_HANNING,
00051 FW_BLACKMAN,
00052 FW_NUMBER_OF_WINDOW_TYPES
00053 } te_fir_win_window_type;
00054
00056 typedef struct ts_fwin *p_fwin;
00057
00067 p_fwin fwin_create(double sample_freq,
00068 double f_low,
00069 double f_high,
00070 te_fir_win_filter_type filter_type,
00071 te_fir_win_window_type window_type,
00072 uint32_t taps);
00073
00079 void fwin_change_freq(p_fwin fw,
00080 double f_low,
00081 double f_high);
00082
00086 void fwin_destroy(p_fwin *fw);
00087
00093 void fwin_apply(p_fwin fw, double *data, uint32_t size);
00094
00095 #endif