CTL_STATUS_t ctl_bus_write_bit(CTL_PARALLEL_BUS_t *self,
                               unsigned bit,
                               unsigned value);

ctl_bus_write_bit sets bit bit on the bus self to value.

If value is zero, the corresponding bit is cleared to zero and if value is non-zero, the corresponding bit is set to one.

Note that writing to output bits configured as inputs is highly device dependent and the effect of doing so is not specified by this interface.

Return Value

ctl_bus_write_bit returns a standard status code.

Thread Safety

ctl_bus_write_bit is thread-safe if a mutex is associated with the bus self.