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

GFLIB_LOWERLIMIT_T_FLT flttrMyLowerLimit = GFLIB_LOWERLIMIT_DEFAULT_FLT;<br />

void main(void)<br />

{<br />

// lower limit<br />

flttrMyLowerLimit.fltLowerLimit = 0.5;<br />

}<br />

// input value = 0.75<br />

fltIn = 0.75;<br />

// output should be 0.75<br />

fltOut = GFLIB_LowerLimit_FLT (fltIn,&flttrMyLowerLimit);<br />

// output should be 0.75<br />

fltOut = GFLIB_LowerLimit (fltIn,&flttrMyLowerLimit,Define FLT);<br />

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

// Available only if single precision floating point<br />

// implementation selected as default<br />

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

// output should be 0.75<br />

fltOut = GFLIB_LowerLimit (fltIn,&flttrMyLowerLimit);<br />

4.67 Function GFLIB_Lut1D_F32<br />

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

4.67.1 Declaration<br />

tFrac32 GFLIB_Lut1D_F32(tFrac32 f32In, const GFLIB_LUT1D_T_F32 *const pParam);<br />

4.67.2 Arguments<br />

Table 4-84. GFLIB_Lut1D_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32In input The abscissa <strong>for</strong> which 1D interpolation is per<strong>for</strong>med.<br />

const<br />

GFLIB_LUT1D_T_F32<br />

*const<br />

4.67.3 Return<br />

pParam input Pointer to the parameters structure with parameters of the<br />

look-up table function.<br />

The interpolated value from the look-up table with 16-bit accuracy.<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 />

356 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!