beautypg.com

Digilent WaveForms User Manual

Page 76

background image

WaveForms™ SDK Reference Manual

Copyright Digilent, Inc. All rights reserved.

Other product and company names mentioned may be trademarks of their respective owners.

Page 76 of 85


FDwfDigitalOutTypeInfo
(HDWF hdwf,

int

idxChannel,

int

*pfsDwfDigitalOutType)

Parameters:
- hdwf – Interface handle.

- idxChannel – Channel index.

- pfsDwfDigitalOutType – Pointer to variable to receive the supported output types.

The function above returns the supported types of the channel. They are returned (by reference) as a bit field. This
bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the DwfDigitalOutType constants
in dwf.h:

DwfDigitalOutTypePulse: Frequency = internal frequency/divider/(low + high counter).

DwfDigitalOutTypeCustom: Sample rate = internal frequency / divider.

DwfDigitalOutTypeRandom: Random update rate = internal frequency/divider/counter alternating
between low and high values.



FDwfDigitalOutTypeSet
(HDWF hdwf,

int

idxChannel, DwfDigitalOutType v)

Parameters:

- hdwf – Interface handle.

- idxChannel – Channel index.

- v – Output mode.

The function above sets the output type of the specified channel.


FDwfDigitalOutTypeGet
(HDWF hdwf,

int

idxChannel, DwfDigitalOutType *pv)

Parameters:

- hdwf – Interface handle.

- idxChannel – Channel index.

- pfEnable – Pointer to variable to receive enabled state.

The function above is used to verify the type of a specific channel.


FDwfDigitalOutIdleInfo
(HDWF hdwf,

int

idxChannel,

int

*pfsDwfDigitalOutIdle)

Parameters:
- hdwf – Interface handle.

- idxChannel – Channel index.

- pfsDwfDigitalOutIdle – Pointer to variable to receive the supported idle output types.

The function above returns the supported idle output types of the channel. They are returned (by reference) as a
bit field. This bit field can be parsed using the IsBitSet Macro. Individual bits are defined using the
DwfDigitalOutIdle constants in dwf.h. Output while not running:

DwfDigitalOutIdleInit: Output initial value.

DwfDigitalOutIdleLow: Low level.

DwfDigitalOutIdleHigh: High level.

DwfDigitalOutIdleZet: Three state.