driver_info function

The driver_info function returns information about the driver. The prototype for this function is:

int driver_info(
      void *hdl,
      i2c_driver_info_t *info );

The arguments are:

hdl
The handle returned by the init function.
info
A pointer to a i2c_driver_info_t structure where the function should store the information:
typedef struct {
    uint32_t    speed_mode;
    uint32_t    addr_mode;
    uint32_t    reserved[2];
} i2c_driver_info_t;
  

For the speed_mode member, OR together the appropriate values from the following list to indicate the supported speeds:

I2C_SPEED_STANDARD
Up to 100 Kbit/s.
I2C_SPEED_FAST
Up to 400 Kbit/s.
I2C_SPEED_HIGH
Up to 3.4 Mbit/s.

Set the addr_mode to one of the following to indicate the supported address format:

The function must return:

0
Success.
-1
Failure.