// // firmath.h // FIR_rect_win // // Created by Jacky Jack on 04/07/2021. // #ifndef firmath_h #define firmath_h #include #include #include #include typedef struct fir_t { uint32_t num_taps; double *fir_coef; } fir_t; typedef struct firw_t { uint32_t num_taps; double *win_coef; } firw_t; void fir_init(fir_t *fir, uint32_t taps); void firw_init(firw_t *fir_win, uint32_t taps); double math_sinx(double x); void fir_sinc_lp(fir_t *fir, double fc); void fir_sinc_hp(fir_t *fir, double omega_c); void fir_sinc_bp(fir_t *fir, double omega_c1, double omega_c2); void fir_sinc_bs(fir_t *fir, double omega_c1, double omega_c2); void fir_convolute(fir_t *fir,firw_t *fir_win); void firw_rect(firw_t *firw); void firw_hamming(firw_t *firw); void firw_hanning(firw_t *firw); void firw_blackman(firw_t *firw); void fir_print_matlab(fir_t *fir); void firw_print_matlab(firw_t *firw); void fir_print_c(fir_t *fir); #endif /* firmath_h */