User`s manual

RabbitFLEX User’s Manual www.rabbit.com 87
flexDigInGroup16
int flexDigInGroup16(Flex_IOPin *digin_pins[],
unsigned int *result);
DESCRIPTION
This function reads the state of a set of digital input channels into the result parameter. The first
parameter must be an array of pointers to Flex_IOPin structures.
Essentially, this is an array of pins.The last entry in the array must be FLEX_GROUP_END. This
indicates the end of the pins in the group. The second parameter must be a pointer to an
unsigned int. The values for each of the inputs will be placed into the variable pointed to by
this pointer. The values are placed in the following manner — the input reading from the first pin
in the pin group is placed in the first bit (lsb) of the result; the second pin is placed in the second
bit; etc.
This function is limited to reading 16 digital inputs at a time. Any unused bits in the result
field will be filled with zeroes.
PARAMETERS
digin_pins array of pointers to Flex_IOPin structures (the information structure for
each I/O pin), terminated by FLEX_GROUP_END. These are the input pins.
result the results of the digital reads, with the i’th bit in the result field correspond-
ing to the i’th I/O pin in the digin_pins array.
RETURN VALUE
0: success
<0: error (not a valid digital input, or more than 16 digital inputs?)
SEE ALSO
flexDigShadow, flexDigIn, flexDigOut, flexDigOutGroup16