42 dbg_print(
"Setting digital I/O direction for channel %d on subdevice %d\n", channel, subdev->
id);
45 bit = channel % (REGISTER_WITH * 8);
47 dbg_print(
" --> calculated offset is 0x%x\n", offset);
48 dbg_print(
" --> calculated bit is %u\n", bit);
67 uint8_t val = (value != 0);
69 dbg_print(
"Setting digital output value to %u...\n", val);
76 dbg_print(
" --> calculated offset is 0x%x\n", offset);
77 dbg_print(
" --> calculated bit is %u\n", bit);
97 dbg_print(
"Reading digital input value from channel %d on subdevice %d\n", channel, subdev->
id);
104 dbg_print(
"[DEBUG] --> calculated offset is 0x%x\n", offset);
105 dbg_print(
"[DEBUG] --> calculated bit is %u\n", bit);
int flink_dio_get_value(flink_subdev *subdev, uint32_t channel, uint8_t *value)
Reads an input channel.
uint32_t nof_channels
Address space size.
Data structures for flink devices and subdevices.
int flink_dio_set_value(flink_subdev *subdev, uint32_t channel, uint8_t value)
Sets a output channel to a value.
int flink_dio_set_direction(flink_subdev *subdev, uint32_t channel, uint8_t output)
Configures a channel as input or output.
int flink_write_bit(flink_subdev *subdev, uint32_t offset, uint8_t bit, void *wdata)
Write a single bit to a flink subdevice.
int flink_read_bit(flink_subdev *subdev, uint32_t offset, uint8_t bit, void *rdata)
Read a single bit from a flink subdevice.
#define dbg_print(fmt,...)