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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function GFLIB_LowerLimit_F32<br />

4.64.2 Arguments<br />

Table 4-81. GFLIB_LowerLimit_F32 arguments<br />

Type Name Direction Description<br />

tFrac32 f32In input Input value.<br />

const<br />

GFLIB_LOWERLIMIT_<br />

T_F32 *const<br />

4.64.3 Return<br />

pParam input Pointer to the limits structure.<br />

The input value in case the input value is above the limit, or the lower limit if the input<br />

value is below the limit.<br />

4.64.4 Description<br />

The function tests whether the input value is above the lower limit. If so, the input value<br />

will be returned. Otherwise, if the input value is below the lower limit, the lower limit<br />

will be returned.<br />

The lower limit f32LowerLimit can be found in the limits structure, supplied to the<br />

function as a pointer pParam.<br />

4.64.5 Re-entrancy<br />

The function is re-entrant.<br />

4.64.6 Code Example<br />

#include "gflib.h"<br />

tFrac32 f32In;<br />

tFrac32 f32Out;<br />

GFLIB_LOWERLIMIT_T_F32 f32trMyLowerLimit = GFLIB_LOWERLIMIT_DEFAULT_F32;<br />

void main(void)<br />

{<br />

// lower limit<br />

f32trMyLowerLimit.f32LowerLimit = FRAC32 (0.5);<br />

// input value = 0.75<br />

f32In = FRAC32 (0.75);<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 />

352 Freescale Semiconductor, Inc.

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

Saved successfully!

Ooh no, something went wrong!