int eth32_output_bit(eth32 handle, int port, int bit, int value);
This function alters a single bit of the output value of any I/O port without affecting the value of any other bits. See the eth32_output_byte function for further description of the output value.
handle - The value returned by the eth32_open function.
port - The port number (0-5).
bit - The bit number (0-7).
value - Any nonzero number sets the bit to 1 and zero clears the bit to 0.
This function returns zero on success and a negative error code on failure. Please see the Error Codes section for possible error codes.
This function alters the specified bit's value in a single operation directly on the ETH32 device. In other words, it does NOT read the current value over the network, modify it and then write it back. By doing it in a single operation, this avoids the potential of inadvertently overwriting changes made to other bits by other connections.
Port 3 shares its pins with the analog channels. When the ADC is enabled, all pins of port 3 are forced into input mode and the output value is set to zero. Port 3's output value cannot be modified while the ADC is enabled.