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/pmci/mctp/mctp_i2c_gpio_common.h>
#include <libmctp.h>
Go to the source code of this file.
Data Structures | |
struct | mctp_binding_i2c_gpio_target |
An MCTP binding for Zephyr's I2C target interface using GPIO. More... |
Macros | |
#define | MCTP_I2C_GPIO_TARGET_DT_DEFINE(_name, _node_id) |
INTERNAL_HIDDEN. |
#define MCTP_I2C_GPIO_TARGET_DT_DEFINE | ( | _name, | |
_node_id ) |
INTERNAL_HIDDEN.
Define a MCTP bus binding for I2C target with GPIO
Rather than mode switching as the MCTP standard wishes, this is a custom binding. On the target side a gpio pin is set active (could be active low or active high) when writes are pending. It's expected the controller then reads from the I2C target device at some point in the future. Reads are accepted at any time and are expected to contain full mctp packets.
In effect each device has a pair of pseudo registers for reading or writing as a packet FIFO.
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 |