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.

Note<br />

This function shall not be called together with<br />

GDFLIB_FilterMA_FLT unless periodic clearing of filter<br />

buffers is required.<br />

4.23.5 Re-entrancy<br />

The function is re-entrant.<br />

4.23.6 Code Example<br />

#include "gdflib.h"<br />

GDFLIB_FILTER_MA_T_FLT flttrMyMA = GDFLIB_FILTER_MA_DEFAULT_FLT;<br />

void main(void)<br />

{<br />

GDFLIB_FilterMAInit_FLT (&flttrMyMA);<br />

}<br />

GDFLIB_FilterMAInit (&flttrMyMA,Define FLT);<br />

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

// Available only if single precision floating point<br />

// implementation selected as default<br />

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

GDFLIB_FilterMAInit (&flttrMyMA);<br />

4.24 Function GDFLIB_FilterMA_FLT<br />

This function implements a moving average recursive filter.<br />

4.24.1 Declaration<br />

tFloat GDFLIB_FilterMA_FLT(tFloat fltIn, GDFLIB_FILTER_MA_T_FLT *pParam);<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 />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 205

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

Saved successfully!

Ooh no, something went wrong!