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_FilterMAInit_FLT<br />

4.23 Function GDFLIB_FilterMAInit_FLT<br />

This function clears the internal filter accumulator.<br />

4.23.1 Declaration<br />

void GDFLIB_FilterMAInit_FLT(GDFLIB_FILTER_MA_T_FLT *pParam);<br />

4.23.2 Arguments<br />

Table 4-23. GDFLIB_FilterMAInit_FLT arguments<br />

Type Name Direction Description<br />

GDFLIB_FILTER_MA_<br />

T_FLT *<br />

4.23.3 Return<br />

void<br />

4.23.4 Description<br />

pParam input,<br />

output<br />

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

parameters.<br />

This function clears the internal accumulator of a moving average filter. It shall be called<br />

after filter parameter initialization <strong>and</strong> whenever the filter initialization is required.<br />

The size of the filter window (number of filtered points) shall be defined prior to this<br />

function call. The number of the filtered points is defined by assigning a value to the<br />

u16NSamples variable stored within the filter structure. This number represents the<br />

number of filtered points, as a power of 2, as follows:<br />

Equation GDFLIB_FilterMA_Eq1<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 />

204 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!