|
control_read_command(control_resid_t resid, control_cmd_t cmd, |
bit 8 in the cmd field indicates read or write. But the API read/write functions do not set or clear this bit. This leads to issues that both the right API function and the bit set when accessing the API.
Side-effect, due to bit 8 being reserved, there is no indication to the user when the user attempts to access a register above 0x7F.
So, it is possible, and some implementations make use of it, performing reads with the Write bit set or visa-versa. For side-band data access or similar.
TODO: decide if the above side-band use-case is valid. If not, enforce the the bit within the read and write functions.
lib_device_control/host/src/device_access_i2c_rpi.c
Line 97 in f725e72
bit 8 in the
cmdfield indicates read or write. But the API read/write functions do not set or clear this bit. This leads to issues that both the right API function and the bit set when accessing the API.Side-effect, due to bit 8 being reserved, there is no indication to the user when the user attempts to access a register above 0x7F.
So, it is possible, and some implementations make use of it, performing reads with the Write bit set or visa-versa. For side-band data access or similar.
TODO: decide if the above side-band use-case is valid. If not, enforce the the bit within the read and write functions.