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

}<br />

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

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

// as default<br />

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

// output should be FRAC16(0.3025) = 0x26B8<br />

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

4.145 Function MLIB_Mac_FLT<br />

This function implements the multiply accumulate function.<br />

4.145.1 Declaration<br />

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

4.145.2 Arguments<br />

Table 4-182. MLIB_Mac_FLT arguments<br />

Type Name Direction Description<br />

register tFloat fltIn1 input Input value to be add.<br />

register tFloat fltIn2 input First value to be multiplied.<br />

register tFloat fltIn3 input Second value to be multiplied.<br />

register tFloat fltIn1 input Input value to be add<br />

register tFloat fltIn2 input First value to be multiplied<br />

register tFloat fltIn3 input Second value to be multiplied<br />

4.145.3 Return<br />

Multiplied second <strong>and</strong> third input value with adding of first input value.Multiplied second<br />

<strong>and</strong> third input value with adding of first input value<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 />

604 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!