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.

tFrac32 f32Out;<br />

void main(void)<br />

{<br />

// input value = -0.25<br />

f32In = FRAC32 (-0.25);<br />

}<br />

// output should be FRAC32(0.25)<br />

f32Out = MLIB_AbsSat_F32(f32In);<br />

// output should be FRAC32(0.25)<br />

f32Out = MLIB_AbsSat (f32In, Define F32);<br />

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

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

// as default<br />

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

// output should be FRAC32(0.25)<br />

f32Out = MLIB_AbsSat (f32In);<br />

4.119 Function MLIB_AbsSat_F16<br />

This function returns absolute value of input parameter <strong>and</strong> saturate if necessary.<br />

4.119.1 Declaration<br />

tFrac16 MLIB_AbsSat_F16(register tFrac16 f16In);<br />

4.119.2 Arguments<br />

Table 4-156. MLIB_AbsSat_F16 arguments<br />

Type Name Direction Description<br />

register tFrac16 f16In input Input value.<br />

4.119.3 Return<br />

Absolute value of input parameter, saturated if necessary.<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 />

Chapter 4 API References<br />

Freescale Semiconductor, Inc. 551

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

Saved successfully!

Ooh no, something went wrong!