Zephyr API Documentation 4.4.0-rc1
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
i2c_target_callbacks Struct Reference

Structure providing callbacks to be implemented for devices that supports the I2C target API. More...

#include <zephyr/drivers/i2c.h>

Data Fields

i2c_target_write_requested_cb_t write_requested
 Function called when a write to the device is initiated.
i2c_target_read_requested_cb_t read_requested
 Function called when a read from the device is initiated.
i2c_target_write_received_cb_t write_received
 Function called when a write to the device is continued.
i2c_target_read_processed_cb_t read_processed
 Function called when a read from the device is continued.
i2c_target_buf_write_received_cb_t buf_write_received
i2c_target_buf_read_requested_cb_t buf_read_requested
i2c_target_stop_cb_t stop
 Function called when a stop condition is observed after a start condition addressed to a particular device.
i2c_target_error_cb_t error
 Function called when an error is detected on the I2C bus while acting as a target.

Detailed Description

Structure providing callbacks to be implemented for devices that supports the I2C target API.

This structure may be shared by multiple devices that implement the same API at different addresses on the bus.

Field Documentation

◆ buf_read_requested

i2c_target_buf_read_requested_cb_t i2c_target_callbacks::buf_read_requested
Attention
Available only when the following Kconfig option is enabled: CONFIG_I2C_TARGET_BUFFER_MODE. Function called when a read from the device is initiated.

◆ buf_write_received

i2c_target_buf_write_received_cb_t i2c_target_callbacks::buf_write_received
Attention
Available only when the following Kconfig option is enabled: CONFIG_I2C_TARGET_BUFFER_MODE. Function called when a write to the device is completed.

◆ error

i2c_target_error_cb_t i2c_target_callbacks::error

Function called when an error is detected on the I2C bus while acting as a target.

◆ read_processed

i2c_target_read_processed_cb_t i2c_target_callbacks::read_processed

Function called when a read from the device is continued.

◆ read_requested

i2c_target_read_requested_cb_t i2c_target_callbacks::read_requested

Function called when a read from the device is initiated.

◆ stop

i2c_target_stop_cb_t i2c_target_callbacks::stop

Function called when a stop condition is observed after a start condition addressed to a particular device.

◆ write_received

i2c_target_write_received_cb_t i2c_target_callbacks::write_received

Function called when a write to the device is continued.

◆ write_requested

i2c_target_write_requested_cb_t i2c_target_callbacks::write_requested

Function called when a write to the device is initiated.


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