Sun Microsystems S16A s16asetdiodatareg, s16asetdiodirectionreg, Description, Syntax, Arguments

Models: S16A

1 46
Download 46 pages 17.09 Kb
Page 22
Image 22

Input and Output

S16A User’s Guide

s16a_set_dio_data_reg

Description

Write a specified value to the DIO Data register. Only the low 12 bits are significant; of these, bits that are configured as inputs are ignored when written.

Syntax

int s16a_set_dio_data_reg(S16aDev *s16a_p, int value);

Arguments

 

s16a_p

S16A device handle returned from s16a_open

value

Value to write to the DIO Data register.

Return

Returns 0 on success or –1 on failure. Fails if s16a_p does not refer to an output channel. Sets errno on failure.

s16a_set_dio_direction_reg

Description

Write a specified value to the DIO Direction register. The low 12 bits configure the corresponding DIO pins. If a bit is set, the DIO pin of the same number is configured as an output signal.

Syntax

int s16a_set_dio_direction_reg(S16aDev *s16a_p, int value);

Arguments

 

s16a_p

S16A device handle returned from s16a_open

value

Value to write to the DIO Direction register.

Return

Returns 0 on success or –1 on failure. Fails if s16a_p does not refer to an output channel. Sets errno on failure.

18

EDT, Inc. October, 1996

Page 22
Image 22
Sun Microsystems S16A s16asetdiodatareg, s16asetdiodirectionreg, Description, Syntax, Arguments, s16ap, value, Return