Become a leader in the IoT community!
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
Join our community of embedded and IoT practitioners to contribute experience, learn new skills and collaborate with other developers with complementary skillsets.
@Middleware & OS
How can I use the I2C bus(DAC) in kernel space, I have verified that the I2C adapter and address in kernel space, I expected to get a `Successfully acquired i2c client` message in my log but still getting the error `Failed to acquire I2C client`
Here’s my code
struct i2c_client *client;
struct i2c_adapter *adapter = i2c_get_adapter(1);
struct i2c_board_info info;
strlcpy(info.type, "i2c-dac", I2C_NAME_SIZE);
strlcpy(info.name, "My DAC", I2C_NAME_SIZE);
client = i2c_new_device(adapter, &info);
i2c_put_adapter(adapter);
CONTRIBUTE TO THIS THREAD