Synopsis
CTL_STATUS_t ctl_bus_set_direction(CTL_PARALLEL_BUS_t *self,
                                   unsigned direction);
Description

ctl_bus_set_direction configures the entire bus for input mode or output mode. A bit set to one in direction sets the corresponding bus bit to input mode, and a bit set to zero in direction sets the corresponding bus bit to output mode.

The state of the bus outputs corresponding to direction is indeterminate after setting the bus direction.

Return Value

ctl_bus_set_direction returns a standard status code.

Thread Safety

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