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_F32 unless periodic clearing of filter<br />

buffers is required.<br />

4.19.5 Re-entrancy<br />

The function is re-entrant.<br />

4.19.6 Code Example<br />

#include "gdflib.h"<br />

GDFLIB_FILTER_MA_T_F32 f32trMyMA = GDFLIB_FILTER_MA_DEFAULT_F32;<br />

void main(void)<br />

{<br />

GDFLIB_FilterMAInit_F32 (&f32trMyMA);<br />

}<br />

GDFLIB_FilterMAInit (&f32trMyMA,Define F32);<br />

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

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

// as default<br />

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

GDFLIB_FilterMAInit (&f32trMyMA);<br />

4.20 Function GDFLIB_FilterMA_F32<br />

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

4.20.1 Declaration<br />

tFrac32 GDFLIB_FilterMA_F32(tFrac32 f32In, GDFLIB_FILTER_MA_T_F32 *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. 197

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

Saved successfully!

Ooh no, something went wrong!