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.

Function MLIB_Mul_FLT<br />

void main(void)<br />

{<br />

// first input = 0.5<br />

f16In1 = FRAC16 (0.5);<br />

}<br />

// second input = 0.25<br />

f16In2 = FRAC16 (0.25);<br />

// output should be 0x1000 = FRAC16(0.125)<br />

f16Out = MLIB_Mul_F16(f16In1,f16In2);<br />

// output should be 0x1000 = FRAC16(0.125)<br />

f16Out = MLIB_Mul (f16In1,f16In2,Define F16);<br />

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

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

// as default<br />

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

// output should be 0x1000 = FRAC16(0.125)<br />

f16Out = MLIB_Mul (f16In1,f16In2);<br />

4.152 Function MLIB_Mul_FLT<br />

This function multiplies two input parameters.<br />

4.152.1 Declaration<br />

tFloat MLIB_Mul_FLT(register tFloat fltIn1, register tFloat fltIn2);<br />

4.152.2 Arguments<br />

Table 4-189. MLIB_Mul_FLT arguments<br />

Type Name Direction Description<br />

register tFloat fltIn1 input Oper<strong>and</strong> is a single precision floating point number.<br />

register tFloat fltIn2 input Oper<strong>and</strong> is a single precision floating point number.<br />

register tFloat fltIn1 input oper<strong>and</strong> is a single precision floating point number<br />

register tFloat fltIn2 input oper<strong>and</strong> is a single precision floating point number<br />

4.152.3 Return<br />

Floating point multiplication of the input arguments.Floating point multiplication of the<br />

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

620 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!