#include <hw/i2c.h> #define DCMD_I2C_STATUS __DIOF (_DCMD_I2C, 11, i2c_status_t)
The arguments to devctl() are:
Argument | Value |
---|---|
filedes | A file descriptor that you obtained by opening the device. |
dcmd | DCMD_I2C_STATUS |
dev_data_ptr | A pointer to an i2c_status_t |
n_bytes | sizeof(i2c_status_t) |
dev_info_ptr | NULL |
The DCMD_I2C_STATUS command gets the status of the device.