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

4.136.5 Re-entrancy<br />

The function is re-entrant.<br />

4.136.6 Code Example<br />

#include "mlib.h"<br />

tF32 f32In;<br />

tFloat fltOut;<br />

void main(void)<br />

{<br />

// input value = 0.25 = 0x2000 0000<br />

f32In = FRAC32 (0.25);<br />

}<br />

// output should be 0.25<br />

fltOut = MLIB_ConvertPU_FLTF32(f32In);<br />

// output should be 0.25<br />

fltOut = MLIB_ConvertPU (f32In, FLTF32);<br />

4.137 Function MLIB_Div_F32<br />

This function divides the first parameter by the second one.<br />

4.137.1 Declaration<br />

tFrac32 MLIB_Div_F32(register tFrac32 f32In1, register tFrac32 f32In2);<br />

4.137.2 Arguments<br />

Table 4-174. MLIB_Div_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.137.3 Return<br />

Division of two input values.<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 />

586 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!