|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
#include <target_device.h>
Data Fields | |
| int(* | write_requested_cb )(struct i3c_target_config *config) |
| Function called when a write to the device is initiated. | |
| int(* | write_received_cb )(struct i3c_target_config *config, uint8_t val) |
| Function called when a write to the device is continued. | |
| int(* | read_requested_cb )(struct i3c_target_config *config, uint8_t *val) |
| Function called when a read from the device is initiated. | |
| int(* | read_processed_cb )(struct i3c_target_config *config, uint8_t *val) |
| Function called when a read from the device is continued. | |
| void(* | buf_write_received_cb )(struct i3c_target_config *config, uint8_t *ptr, uint32_t len) |
| Function called when a write to the device is completed. | |
| int(* | buf_read_requested_cb )(struct i3c_target_config *config, uint8_t **ptr, uint32_t *len, uint8_t *hdr_mode) |
| Function called when a read from the device is initiated. | |
| int(* | stop_cb )(struct i3c_target_config *config) |
| Function called when a stop condition is observed after a start condition addressed to a particular device. | |
| int(* | controller_handoff_cb )(struct i3c_target_config *config) |
| Function called when an active controller handoffs controlership to this target. | |
| int(* i3c_target_callbacks::buf_read_requested_cb) (struct i3c_target_config *config, uint8_t **ptr, uint32_t *len, uint8_t *hdr_mode) |
Function called when a read from the device is initiated.
This function is invoked by the controller when the bus is ready to provide additional data by buffer for a read operation from the address associated with the device.
The value returned in **ptr and *len will be transmitted. A success return shall cause the controller to react to additional read operations. An error return shall cause the controller to ignore bus operations until a new start condition is received.
CONFIG_I3C_TARGET_BUFFER_MODE.
| config | the configuration structure associated with the device to which the operation is addressed. |
| ptr | pointer to storage for the address of data buffer to return for the read request. |
| len | pointer to storage for the length of the data to be transferred for the read request. |
| hdr_mode | HDR mode |
| void(* i3c_target_callbacks::buf_write_received_cb) (struct i3c_target_config *config, uint8_t *ptr, uint32_t len) |
Function called when a write to the device is completed.
This function is invoked by the controller when it completes reception of data from the source buffer to the destination buffer in an ongoing write operation to the device.
CONFIG_I3C_TARGET_BUFFER_MODE.
| config | Configuration structure associated with the device to which the operation is addressed. |
| ptr | pointer to the buffer that contains the data to be transferred. |
| len | the length of the data to be transferred. |
| int(* i3c_target_callbacks::controller_handoff_cb) (struct i3c_target_config *config) |
Function called when an active controller handoffs controlership to this target.
This function is invoked by the active controller when it handoffs controllership to this target. This can happen wither the target has requested it or if the active controller chooses to handoff to the controller capable target.
| config | Configuration structure associated with the device to which the operation is addressed. |
| int(* i3c_target_callbacks::read_processed_cb) (struct i3c_target_config *config, uint8_t *val) |
Function called when a read from the device is continued.
This function is invoked by the controller when the bus is ready to provide additional data for a read operation from the address associated with the device device.
The value returned in val will be transmitted. A success return shall cause the controller to react to additional read operations. An error return shall cause the controller to ignore bus operations until a new start condition is received.
| config | Configuration structure associated with the device to which the operation is addressed. |
| val | Pointer to storage for the next byte of data to return for the read request. |
| int(* i3c_target_callbacks::read_requested_cb) (struct i3c_target_config *config, uint8_t *val) |
Function called when a read from the device is initiated.
This function is invoked by the controller when the bus completes a start condition for a read operation from the address associated with a particular device.
The value returned in val will be transmitted. A success return shall cause the controller to react to additional read operations. An error return shall cause the controller to ignore bus operations until a new start condition is received.
| config | Configuration structure associated with the device to which the operation is addressed. |
| val | Pointer to storage for the first byte of data to return for the read request. |
| int(* i3c_target_callbacks::stop_cb) (struct i3c_target_config *config) |
Function called when a stop condition is observed after a start condition addressed to a particular device.
This function is invoked by the controller when the bus is ready to provide additional data for a read operation from the address associated with the device device. After the function returns the controller shall enter a state where it is ready to react to new start conditions.
| config | Configuration structure associated with the device to which the operation is addressed. |
| int(* i3c_target_callbacks::write_received_cb) (struct i3c_target_config *config, uint8_t val) |
Function called when a write to the device is continued.
This function is invoked by the controller when it completes reception of a byte of data in an ongoing write operation to the device.
A success return shall cause the controller to ACK the next byte received. An error return shall cause the controller to NACK the next byte received.
| config | Configuration structure associated with the device to which the operation is addressed. |
| val | the byte received by the controller. |
| int(* i3c_target_callbacks::write_requested_cb) (struct i3c_target_config *config) |
Function called when a write to the device is initiated.
This function is invoked by the controller when the bus completes a start condition for a write operation to the address associated with a particular device.
A success return shall cause the controller to ACK the next byte received. An error return shall cause the controller to NACK the next byte received.
| config | Configuration structure associated with the device to which the operation is addressed. |