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

Figure 4-25. cos(x) vs. GFLIB_Cos(f32In)<br />

Note<br />

The input angle (f32In) 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_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_COS_DEFAULT_F32 symbol. The<br />

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

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

GFLIB_Cos(f32In, &pParam, F32), 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_F32 symbol. The<br />

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

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

GFLIB_Cos(f32In, &pParam), where &pParam is pointer<br />

to approximation coefficients. The &pParam parameter is<br />

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

320 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!