/*********************************************
 Freescale Semiconductor 2007
 (c) COPYRIGHT Freescale Semiconductor 2007
 ALL RIGHTS RESERVED.
**********************************************/

/* C implementations of DSP functions. These functions should only be
   used sparingly since they are not optimized assembly. */

#include "dsp_library_c_functions.h"

void iir2_asm(IIR2_STRUCT *);             // 2nd order IIR filter
void iir3_asm(IIR3_STRUCT *);             // 3rd order IIR filter
void iir4_asm(IIR4_STRUCT *);             // 4th order IIR filter
void iir5_asm(IIR5_STRUCT *);             // 5th order IIR filter
void iir6_asm(IIR6_STRUCT *);             // 6th order IIR filter

/* wrapper to select filter implementation */
void iir(void *x) {
  IIR_STRUCT *y;

  y = x;
  switch(y->order) {
  case 2 : iir2_asm(x); break;
  case 3 : iir3_asm(x); break;
  case 4 : iir4_asm(x); break;
  case 5 : iir5_asm(x); break;
  case 6 : iir6_asm(x); break;
  }
}
