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

4.121.2 Arguments<br />

Table 4-158. MLIB_Add_F16 arguments<br />

Type Name Direction Description<br />

register tFrac16 f16In1 input First value to be add.<br />

register tFrac16 f16In2 input Second value to be add.<br />

register tFrac16 f16In1 input First value to be add<br />

register tFrac16 f16In2 input Second value to be add<br />

4.121.3 Return<br />

Sum of two input values.Sum of two input values<br />

4.121.4 Description<br />

This inline function returns the sum of two input values. The input values as well as<br />

output value is considered as 16-bit fractional values. The output saturation is not<br />

implemented in this function, thus in case the sum of input values is outside the (-1, 1)<br />

interval, the output value will overflow without any detection.<br />

The output of the function is defined by the following simple equation:<br />

Equation MLIB_Add_Eq1<br />

This inline function returns the sum of two input values. The input values as well as<br />

output value is considered as 16-bit fractional values. The output saturation is not<br />

implemented in this function, thus in case the sum of input values is outside the (-1, 1)<br />

interval, the output value will overflow without any detection.<br />

Note<br />

Due to effectivity reason this function is implemented as inline<br />

<strong>and</strong> thus is not ANSI-C compliant.<br />

4.121.5 Re-entrancy<br />

The function is re-entrant.<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 />

556 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!