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

4.21 Function GDFLIB_FilterMAInit_F16<br />

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

4.21.1 Declaration<br />

void GDFLIB_FilterMAInit_F16(GDFLIB_FILTER_MA_T_F16 *pParam);<br />

4.21.2 Arguments<br />

Table 4-21. GDFLIB_FilterMAInit_F16 arguments<br />

Type Name Direction Description<br />

GDFLIB_FILTER_MA_<br />

T_F16 *<br />

4.21.3 Return<br />

void<br />

4.21.4 Description<br />

pParam input,<br />

output<br />

Pointer to the 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 />

200 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!