eth32_input_bit

int eth32_input_bit(eth32 handle, int port, int bit, int *value);

Summary

This function retrieves the value of a single bit within a port. It is provided simply for convenience, since it internally calls the eth32_input_byte function to determine the value of the specified bit.

Parameters

  • handle - The value returned by the eth32_open function.

  • port - Specifies the port number (0-5) to read.

  • bit - Specifies the bit number (0-7) of the port to read.

  • value - Pointer to a variable which will receive the current value (0 or 1) of the specified bit.

Return Value

This function returns zero on success and a negative error code on failure. Please see the Error Codes section for possible error codes.

See Also

eth32_input_byte, eth32_output_bit, eth32_set_direction_bit