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-8. acos(x) vs. GFLIB_Acos(s32In)<br />

Note<br />

The output angle is normalized into the range [0,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_Acos_F32(f32In,<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_ACOS_DEFAULT_F32 symbol.<br />

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

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

GFLIB_Acos(f32In, &pParam, F32), where the &pParam<br />

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

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

replaced with GFLIB_ACOS_DEFAULT_F32 symbol.<br />

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

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

GFLIB_Acos(f32In, &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 />

<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. 211

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

Saved successfully!

Ooh no, something went wrong!