Zephyr Project API
3.2.0
A Scalable Open Source RTOS
|
I3C Target Device API. More...
Data Structures | |
struct | i3c_config_target |
Configuration parameters for I3C hardware to act as target device. More... | |
struct | i3c_target_config |
Structure describing a device that supports the I3C target API. More... | |
struct | i3c_target_callbacks |
struct | i3c_target_driver_api |
Functions | |
static int | i3c_target_register (const struct device *dev, struct i3c_target_config *cfg) |
Registers the provided config as target device of a controller. More... | |
static int | i3c_target_unregister (const struct device *dev, struct i3c_target_config *cfg) |
Unregisters the provided config as target device. More... | |
I3C Target Device API.
|
inlinestatic |
#include <include/zephyr/drivers/i3c/target_device.h>
Registers the provided config as target device of a controller.
Enable I3C target mode for the dev
I3C bus driver using the provided config struct (cfg
) containing the functions and parameters to send bus events. The I3C target will be registered at the address provided as i3c_target_config::address struct member. Any I3C bus events related to the target mode will be passed onto I3C target device driver via a set of callback functions provided in the 'callbacks' struct member.
Most of the existing hardware allows simultaneous support for master and target mode. This is however not guaranteed.
dev | Pointer to the device structure for an I3C controller driver configured in target mode. |
cfg | Config struct with functions and parameters used by the I3C target driver to send bus events |
0 | Is successful |
-EINVAL | If parameters are invalid |
-EIO | General input / output error. |
-ENOSYS | If target mode is not implemented |
|
inlinestatic |
#include <include/zephyr/drivers/i3c/target_device.h>
Unregisters the provided config as target device.
This routine disables I3C target mode for the dev
I3C bus driver using the provided config struct (cfg
) containing the functions and parameters to send bus events.
dev | Pointer to the device structure for an I3C controller driver configured in target mode. |
cfg | Config struct with functions and parameters used by the I3C target driver to send bus events |
0 | Is successful |
-EINVAL | If parameters are invalid |
-ENOSYS | If target mode is not implemented |