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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function GDFLIB_FilterFIR_F16<br />

}<br />

}<br />

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

// f16Out contains step response of the filter<br />

f16OutBuf[ii] = GDFLIB_FilterFIR (FRAC16 (1.0), &Param, &State);<br />

4.4 Function GDFLIB_FilterFIR_F16<br />

The function per<strong>for</strong>ms a single iteration of an FIR filter.<br />

4.4.1 Declaration<br />

tFrac16 GDFLIB_FilterFIR_F16(tFrac16 f16In, const GDFLIB_FILTERFIR_PARAM_T_F16 *const pParam,<br />

GDFLIB_FILTERFIR_STATE_T_F16 *const pState);<br />

4.4.2 Arguments<br />

Table 4-4. GDFLIB_FilterFIR_F16 arguments<br />

Type Name Direction Description<br />

tFrac16 f16In input Input value.<br />

const<br />

GDFLIB_FILTERFIR_P<br />

ARAM_T_F16 *const<br />

GDFLIB_FILTERFIR_S<br />

TATE_T_F16 *const<br />

4.4.3 Return<br />

pParam input Pointer to the parameter structure.<br />

pState input,<br />

output<br />

Pointer to the filter state structure.<br />

The value of a filtered signal after processing by an FIR filter.<br />

4.4.4 Description<br />

The function per<strong>for</strong>ms the operation of an FIR filter on a sample-by-sample basis. At<br />

each new input to the FIR filter, the function should be called, which will return a new<br />

filtered value.<br />

The FIR filter is defined by the following <strong>for</strong>mula:<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 />

158 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!