fir_win.h File Reference

#include <stdint.h>

Include dependency graph for fir_win.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define FWIN_USE_WINDOW_FUNCTION   1

Typedefs

typedef struct ts_fwinp_fwin

Enumerations

enum  te_fir_win_filter_type {
  FW_BANDPASS = 0, FW_BANDSTOP, FW_LOWPASS, FW_HIGHPASS,
  FW_AVERAGE, FW_NUMBER_OF_FILTER_TYPES
}
enum  te_fir_win_window_type {
  FW_NONE = 0, FW_HAMMING, FW_HANNING, FW_BLACKMAN,
  FW_NUMBER_OF_WINDOW_TYPES
}

Functions

p_fwin fwin_create (double sample_freq, double f_low, double f_high, te_fir_win_filter_type filter_type, te_fir_win_window_type window_type, uint32_t taps)
void fwin_change_freq (p_fwin fw, double f_low, double f_high)
void fwin_destroy (p_fwin *fw)
void fwin_apply (p_fwin fw, double *data, uint32_t size)


Define Documentation

#define FWIN_USE_WINDOW_FUNCTION   1

Enables (1) or disables (0) Window function support.

Definition at line 27 of file fir_win.h.


Typedef Documentation

typedef struct ts_fwin* p_fwin

Pointer to Fir Window filter.

Definition at line 56 of file fir_win.h.


Enumeration Type Documentation

FIR filter types.

Enumerator:
FW_BANDPASS  Bandpass filter
FW_BANDSTOP  Bandstop filter
Todo:
Implement bandstop.
FW_LOWPASS  Lowpass filter
Todo:
Implement lowpass.
FW_HIGHPASS  Highpass filter
Todo:
Implement highpass.
FW_AVERAGE  Average filter Sample frequency, low and high cutoff frequency, and window type do not apply.
FW_NUMBER_OF_FILTER_TYPES 

Definition at line 30 of file fir_win.h.

Fir Filter coefficient window.

Enumerator:
FW_NONE 
FW_HAMMING 
FW_HANNING 
FW_BLACKMAN 
FW_NUMBER_OF_WINDOW_TYPES 

Definition at line 47 of file fir_win.h.


Function Documentation

void fwin_apply ( p_fwin  fw,
double *  data,
uint32_t  size 
)

Apply the FIR filter to sampled data.

Parameters:
fw Pointer to the FIR filter object.
data Pointer to the data to be filtered.
size Number of data points in data.

Definition at line 190 of file fir_win.c.

References ts_fwin::h, ts_fwin::taps, ts_fwin::z, and ts_fwin::z_state.

Referenced by morse_code().

void fwin_change_freq ( p_fwin  fw,
double  f_low,
double  f_high 
)

Changes the frequency response of an existing FIR filter.

Parameters:
fw Pointer to existing FIR filter object.
f_low New low frequency cut-off in Hertz.
f_high New high frequency cut-off in Hertz.

Definition at line 174 of file fir_win.c.

References ts_fwin::f_high, ts_fwin::f_low, ts_fwin::filter_type, FW_FILTER_FUNCTIONS, and fwin_reapply_window().

Referenced by morse_recompute_filter().

Here is the call graph for this function:

p_fwin fwin_create ( double  sample_freq,
double  f_low,
double  f_high,
te_fir_win_filter_type  filter_type,
te_fir_win_window_type  window_type,
uint32_t  taps 
)

Creates a FIR filter via the window method.

Parameters:
sample_freq Sample frequency in Hertz.
f_low Low frequency cut-off in Hertz.
f_high High frequency cut-off in Hertz.
filter_type Filter type, band-pass, high-pass, low-pass, etc...
window_type Window applied to the FIR filter coefficients.
taps Number of FIR filter taps (N).
Returns:
Pointer to the FIR filter object.

Definition at line 133 of file fir_win.c.

References DOUBLE_Z_FIR, ts_fwin::f_high, ts_fwin::f_low, ts_fwin::filter_type, FW_FILTER_FUNCTIONS, FW_NUMBER_OF_FILTER_TYPES, fwin_apply_window(), ts_fwin::h, ts_fwin::h_window, ts_fwin::sample_freq, ts_fwin::taps, ts_fwin::window_type, ts_fwin::z, and ts_fwin::z_state.

Referenced by morse_start_threads().

Here is the call graph for this function:

void fwin_destroy ( p_fwin fw  ) 

Destroys, and frees all memory from a window FIR filter object.

Parameters:
fw Pointer to the FIR filter object to be freed.

Definition at line 220 of file fir_win.c.

Referenced by free_all().


Generated on Mon Jun 22 21:39:06 2009 for morse2txt by  doxygen 1.5.6