Atmel Software Framework

filt_dsp16_lpfirdesign.c File Reference
#include "dsp.h"

Macros

#define DSP16_MUL_TO_DSP32(num1, num2)
 
#define DSP32_DIV_TO_DSP16(num1, num2)
 
#define Max(a, b)   (((a) > (b)) ? (a) : (b))
 

Functions

void dsp16_filt_lpfirdesign (dsp16_t *c, int fc, int fs, int order)
 16-bit fixed point version of the low-pass FIR filter design. More...
 
void dsp16_filt_lpfirdesign_windowed_sinc (dsp16_t *c, int fc_hz, int fs_hz, int order)
 Scilab algorithm: More...
 

#define DSP16_MUL_TO_DSP32 (   num1,
  num2 
)
Value:
((DSP32_QB > DSP16_QB*2)? \
((((S32) (num1)) * ((S32) (num2))) << (DSP32_QB - DSP16_QB*2)) \
:((((S32) (num1)) * ((S32) (num2))) >> (DSP16_QB*2 - DSP32_QB)))
int32_t S32
32-bit signed integer.
Definition: compiler.h:224
#define DSP32_QB
number of fractional bits
Definition: dsp_types.h:174
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:144

Referenced by dsp16_filt_lpfirdesign().

#define DSP32_DIV_TO_DSP16 (   num1,
  num2 
)
Value:
((DSP32_QB > DSP16_QB*2)? \
(((num1) >> (DSP32_QB - DSP16_QB*2)) / ((S32) (num2))) \
:(((num1) << (DSP16_QB*2 - DSP32_QB)) / ((S32) (num2))))
int32_t S32
32-bit signed integer.
Definition: compiler.h:224
#define DSP32_QB
number of fractional bits
Definition: dsp_types.h:174
#define DSP16_QB
number of fractional bits
Definition: dsp_types.h:144

Referenced by dsp16_filt_lpfirdesign().