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.

Equation GFLIB_Hyst_Eq1<br />

A graphical description of GFLIB_Hyst functionality is shown in Figure 4-30.<br />

Figure 4-30. Hysteresis function<br />

CAUTION<br />

For correct functionality, the threshold fltHystOn value must be<br />

greater than the fltHystOff value.<br />

Note<br />

All parameters <strong>and</strong> states used by the function can be reset<br />

during declaration using the GFLIB_HYST_DEFAULT_FLT<br />

macro.<br />

4.57.5 Re-entrancy<br />

The function is re-entrant.<br />

4.57.6 Code Example<br />

#include "gflib.h"<br />

tFloat fltIn;<br />

tFloat fltOut;<br />

GFLIB_HYST_T_FLT flttrMyHyst = GFLIB_HYST_DEFAULT_FLT;<br />

void main(void)<br />

{<br />

// Setting parameters <strong>for</strong> hysteresis<br />

flttrMyHyst.fltHystOn = (tFloat)(0.1289);<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. 337

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

Saved successfully!

Ooh no, something went wrong!