03.08.2013 Views

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

Embedded Software and Motor Control Libraries for PXR40xx

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Function GDFLIB_FilterIIR1_F32<br />

4.7.5 Re-entrancy<br />

The function is re-entrant.<br />

4.7.6 Code Example<br />

#include "gdflib.h"<br />

GDFLIB_FILTER_IIR1_T_F32 f32trMyIIR1 = GDFLIB_FILTER_IIR1_DEFAULT_F32;<br />

void main(void)<br />

{<br />

// function returns no value<br />

GDFLIB_FilterIIR1Init_F32 (&f32trMyIIR1);<br />

}<br />

// function returns no value<br />

GDFLIB_FilterIIR1Init (&f32trMyIIR1, Define F32);<br />

// ##############################################################<br />

// Available only if 32-bit fractional implementation selected<br />

// as default<br />

// ##############################################################<br />

// function returns no value<br />

GDFLIB_FilterIIR1Init (&f32trMyIIR1);<br />

4.8 Function GDFLIB_FilterIIR1_F32<br />

This function implements a Direct Form I first order IIR filter.<br />

4.8.1 Declaration<br />

tFrac32 GDFLIB_FilterIIR1_F32(tFrac32 f32In, GDFLIB_FILTER_IIR1_T_F32 *const pParam);<br />

4.8.2 Arguments<br />

Table 4-8. GDFLIB_FilterIIR1_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32In input Value of input signal to be filtered in step (k). The value is a<br />

32-bit number in the 1.31 fractional <strong>for</strong>mat.<br />

GDFLIB_FILTER_IIR1_<br />

T_F32 *const<br />

pParam input,<br />

output<br />

Pointer to the filter structure with a filter buffer <strong>and</strong> filter<br />

parameters.<br />

<strong>Embedded</strong> <strong>Software</strong> <strong>and</strong> <strong>Motor</strong> <strong>Control</strong> <strong>Libraries</strong> <strong>for</strong> <strong>PXR40xx</strong>, Rev. 1.0<br />

168 Freescale Semiconductor, Inc.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!