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

4.140.2 Arguments<br />

Table 4-177. MLIB_DivSat_F32 arguments<br />

Type Name Direction Description<br />

register tFrac32 f32In1 input Numerator of division.<br />

register tFrac32 f32In2 input Denominator of division.<br />

4.140.3 Return<br />

Division of two input values, saturated if necessary.<br />

4.140.4 Description<br />

This inline function returns the division of two input values. The first input value is<br />

numerator <strong>and</strong> the second input value is denominator. The input values as well as output<br />

value is considered as 32-bit fractional data type. The output saturation is implemented in<br />

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

value is limited to the boundary value.<br />

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

Equation MLIB_DivSat_Eq1<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.140.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 />

592 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!