AOSet BypassEn

INT8U AOSetBypassEn(INT8U n, BOOLEAN state);

AOSetBypassEn () allows you to prevent your application from changing the value of an analog output channel. This allows you to gain control of the analog output channel from elsewhere in your application code. This is a quite useful feature because it allows you to test your analog output channels one by one. In other words, you can set an analog output to any desired value even though your application software is trying to control the output. The value of the analog output channel is set by AOSetBypass (). AOSetBypassEn () and AOSetBypass () are very useful for debugging.

Arguments

11 is the desired analog output channel. Analog output channels are numbered from 0 to AIO_MAX_AO -1.

state is the state of the bypass switch. When TRUE, the bypass switch is opened (i.e., the analog output channel is bypassed). When FALSE, the bypass switch is closed (i.e., the analog output channel is not bypassed).

Return Value

AOSetBypassEn () returns 0 upon success and 1 if the analog output channel you specified is not within 0 and AIO_MAX_AO - 1.

Notes/Warnings

None

Example void main (void) {

AOSetBypassEn(0, TRUE);

Was this article helpful?

0 0

Post a comment