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.

FRAC16 (0.2), FRAC16 (0.21), FRAC16 (0.22), FRAC16<br />

(0.23), FRAC16 (0.24), FRAC16 (0.25), FRAC16 (0.26), FRAC16 (0.27), FRAC16 (0.28),<br />

FRAC16 (0.3), FRAC16 (0.31), FRAC16 (0.32), FRAC16<br />

(0.33), FRAC16 (0.34), FRAC16 (0.35), FRAC16 (0.36), FRAC16 (0.37), FRAC16 (0.38),<br />

FRAC16 (0.4), FRAC16 (0.41), FRAC16 (0.42), FRAC16<br />

(0.43), FRAC16 (0.44), FRAC16 (0.45), FRAC16 (0.46), FRAC16 (0.47), FRAC16 (0.48),<br />

FRAC16 (0.5), FRAC16 (0.51), FRAC16 (0.52), FRAC16<br />

(0.53), FRAC16 (0.54), FRAC16 (0.55), FRAC16 (0.56), FRAC16 (0.57), FRAC16 (0.58),<br />

FRAC16 (0.6), FRAC16 (0.61), FRAC16 (0.62), FRAC16<br />

(0.63), FRAC16 (0.64), FRAC16 (0.65), FRAC16 (0.66), FRAC16 (0.67), FRAC16 (0.68),<br />

FRAC16 (0.7), FRAC16 (0.71), FRAC16 (0.72), FRAC16<br />

(0.73), FRAC16 (0.74), FRAC16 (0.75), FRAC16 (0.76), FRAC16 (0.77), FRAC16 (0.78),<br />

FRAC16 (0.8), FRAC16 (0.81), FRAC16 (0.82), FRAC16<br />

(0.83), FRAC16 (0.84), FRAC16 (0.85), FRAC16 (0.86), FRAC16 (0.87), FRAC16 (0.88)};<br />

void main(void)<br />

{<br />

// setting parameters <strong>for</strong> Lut2D function<br />

tr16tMyLut2D.pf16Table = &(pf16Table2D[40]);<br />

tr16tMyLut2D.s16ShamOffset1 = 3;<br />

tr16tMyLut2D.s16ShamOffset2 = 3;<br />

// input vector<br />

f16In1 = FRAC16 (0.5);<br />

f16In2 = FRAC16 (0.5);<br />

}<br />

// output should be 0x7A03 ~ FRAC16(0.88)<br />

f16Out = GFLIB_Lut2D_F16 (f16In1),f16In2,&tr16tMyLut2D);<br />

// output should be 0x7A03 ~ FRAC16(0.88)<br />

f16Out = GFLIB_Lut2D (f16In1,f16In2,&tr16tMyLut2D,Define F16);<br />

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

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

// as default<br />

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

// output should be 0x7A03 ~ FRAC16(0.88)<br />

f16Out = GFLIB_Lut2D (f16In1,f16In2,&tr16tMyLut2D);<br />

4.72 Function GFLIB_Lut2D_FLT<br />

This function implements the two-dimensional look-up table.<br />

4.72.1 Declaration<br />

Chapter 4 API References<br />

tFloat GFLIB_Lut2D_FLT(tFloat fltIn1, tFloat fltIn2, const GFLIB_LUT2D_T_FLT *const pParam);<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 />

Freescale Semiconductor, Inc. 381

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

Saved successfully!

Ooh no, something went wrong!