Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
i2c_driver_api Struct Reference

Driver Operations I2C driver operations More...

#include <zephyr/drivers/i2c.h>

Data Fields

i2c_api_configure_t configure
  REQ Configure operation of a host controller.
i2c_api_get_config_t get_config
  OPT Get configuration of a host controller.
i2c_api_full_io_t transfer
  REQ Perform data transfer to another I2C device in controller mode.
i2c_api_target_register_t target_register
  OPT Registers the provided config as Target device of a controller.
i2c_api_target_unregister_t target_unregister
  OPT Unregisters the provided config as Target device.
i2c_api_transfer_cb_t transfer_cb
  OPT Perform data transfer to another I2C device in controller mode.
i2c_api_iodev_submit iodev_submit
  OPT Submit request(s) to an I2C device with RTIO.
i2c_api_recover_bus_t recover_bus
  OPT Recover the I2C bus.

Detailed Description

Driver Operations I2C driver operations

This is the driver API structure any I2C driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.

Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ configure

i2c_api_configure_t i2c_driver_api::configure

REQ Configure operation of a host controller.

◆ get_config

i2c_api_get_config_t i2c_driver_api::get_config

OPT Get configuration of a host controller.

◆ iodev_submit

i2c_api_iodev_submit i2c_driver_api::iodev_submit

OPT Submit request(s) to an I2C device with RTIO.

Attention
Available only when the following Kconfig option is enabled: CONFIG_I2C_RTIO.

◆ recover_bus

i2c_api_recover_bus_t i2c_driver_api::recover_bus

OPT Recover the I2C bus.

◆ target_register

i2c_api_target_register_t i2c_driver_api::target_register

OPT Registers the provided config as Target device of a controller.

◆ target_unregister

i2c_api_target_unregister_t i2c_driver_api::target_unregister

OPT Unregisters the provided config as Target device.

◆ transfer

i2c_api_full_io_t i2c_driver_api::transfer

REQ Perform data transfer to another I2C device in controller mode.

◆ transfer_cb

i2c_api_transfer_cb_t i2c_driver_api::transfer_cb

OPT Perform data transfer to another I2C device in controller mode.

Attention
Available only when the following Kconfig option is enabled: CONFIG_I2C_CALLBACK.

The documentation for this struct was generated from the following file: