#include <hw/i2c.h> #define DCMD_I2C_DRIVER_INFO __DIOF (_DCMD_I2C, 10, i2c_driver_info_t)
The arguments to devctl() are:
| Argument | Value |
|---|---|
| filedes | A file descriptor that you obtained by opening the device. |
| dcmd | DCMD_I2C_DRIVER_INFO |
| dev_data_ptr | A pointer to a i2c_driver_info_t |
| n_bytes | sizeof(i2c_driver_info_t) |
| dev_info_ptr | NULL |
The DCMD_I2C_DRIVER_INFO command returns information about the hardware library.
If an error occurs, the command returns: