Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
|
|
4.2.99 |
#include <stdint.h>
#include <zephyr/kernel.h>
#include <zephyr/device.h>
#include <zephyr/drivers/i2c.h>
#include <zephyr/drivers/gpio.h>
#include <zephyr/sys/mpsc_lockfree.h>
#include <zephyr/rtio/rtio.h>
#include <zephyr/pmci/mctp/mctp_i2c_gpio_common.h>
#include <libmctp.h>
#include <stdatomic.h>
Go to the source code of this file.
Data Structures | |
struct | mctp_binding_i2c_gpio_controller |
INTERNAL_HIDDEN. More... |
Macros | |
#define | MCTP_I2C_GPIO_CONTROLLER_DT_DEFINE(_name, _node_id) |
INTERNAL_HIDDEN. |
#define MCTP_I2C_GPIO_CONTROLLER_DT_DEFINE | ( | _name, | |
_node_id ) |
INTERNAL_HIDDEN.
Define a MCTP bus binding for I2C controller with GPIO
Rather than mode switching as the MCTP standard wishes, this is a custom binding. On the controller side each neighbor has an associated i2c address and gpio it will listen for a trigger on. When triggered the controller will read the target device. The target device will be expected to have what amounts to two registers, one containing a message length and another containing a FIFO like register producing the message bytes.
Thus the sequence for a I2C target to send a message would be...
_name | Symbolic name of the bus binding variable |
_node_id | DeviceTree Node containing the configuration of this MCTP binding |