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.

Figure 4-26. cos(x) vs. GFLIB_Cos(f16In)<br />

Note<br />

The input angle (f16In) is normalized into the range [-1, 1). The<br />

function call is slightly different from common approach in the<br />

library set. The function can be called in four different ways:<br />

• With implementation postfix (i.e. GFLIB_Cos_F16(f16In,<br />

&pParam)), where the &pParam is pointer to<br />

approximation coefficients. In case the default<br />

approximation coefficients are used, the &pParam must be<br />

replaced with GFLIB_COS_DEFAULT_F16 symbol. The<br />

&pParam parameter is m<strong>and</strong>atory.<br />

• With additional implementation parameter (i.e.<br />

GFLIB_Cos(f16In, &pParam, F16), where the &pParam is<br />

pointer to approximation coefficients. In case the default<br />

approximation coefficients are used, the &pParam must be<br />

replaced with GFLIB_COS_DEFAULT_F16 symbol. The<br />

&pParam parameter is m<strong>and</strong>atory.<br />

• With preselected default implementation (i.e.<br />

GFLIB_Cos(f16In, &pParam), where the &pParam is<br />

pointer to approximation coefficients. The &pParam<br />

parameter is optional <strong>and</strong> in case it is not used, the default<br />

GFLIB_COS_DEFAULT_F16 approximation coefficients<br />

are used.<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. 325

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

Saved successfully!

Ooh no, something went wrong!