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.

void main(void)<br />

{<br />

// upper limit<br />

flttrMyUpperLimit.fltUpperLimit = 0.5;<br />

// input value = 0.75<br />

fltIn = 0.75;<br />

}<br />

// output should be 0.5<br />

fltOut = GFLIB_UpperLimit_FLT (fltIn,&flttrMyUpperLimit);<br />

// output should be 0.5<br />

fltOut = GFLIB_UpperLimit (fltIn,&flttrMyUpperLimit,Define FLT);<br />

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

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

// implementation selected as default<br />

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

// output should be 0.5<br />

fltOut = GFLIB_UpperLimit (fltIn,&flttrMyUpperLimit);<br />

4.91 Function GFLIB_VectorLimit_F32<br />

This function limits the magnitude of the input vector.<br />

4.91.1 Declaration<br />

tBool GFLIB_VectorLimit_F32(SWLIBS_2Syst_F32 *const pOut, const SWLIBS_2Syst_F32 *const pIn,<br />

const GFLIB_VECTORLIMIT_T_F32 *const pParam);<br />

4.91.2 Arguments<br />

Table 4-116. GFLIB_VectorLimit_F32 arguments<br />

Type Name Direction Description<br />

const<br />

SWLIBS_2Syst_F32<br />

*const<br />

SWLIBS_2Syst_F32<br />

*const<br />

const<br />

GFLIB_VECTORLIMIT<br />

_T_F32 *const<br />

pIn input Pointer to the structure of the input vector.<br />

pOut output Pointer to the structure of the limited output vector.<br />

pParam input Pointer to the parameters structure.<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. 439

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

Saved successfully!

Ooh no, something went wrong!