Zephyr API Documentation
2.7.0-rc2
A Scalable Open Source RTOS
|
Host Command Peripherals API. More...
Data Structures | |
struct | ec_host_cmd_periph_rx_ctx |
Context for host command peripheral and framework to pass rx data. More... | |
struct | ec_host_cmd_periph_tx_buf |
Context for host command peripheral and framework to pass tx data. More... | |
struct | ec_host_cmd_periph_api |
Typedefs | |
typedef int(* | ec_host_cmd_periph_api_init) (const struct device *dev, struct ec_host_cmd_periph_rx_ctx *rx_ctx) |
typedef int(* | ec_host_cmd_periph_api_send) (const struct device *dev, const struct ec_host_cmd_periph_tx_buf *tx_buf) |
Functions | |
int | ec_host_cmd_periph_init (const struct device *dev, struct ec_host_cmd_periph_rx_ctx *rx_ctx) |
Initialize a host command device. More... | |
int | ec_host_cmd_periph_send (const struct device *dev, const struct ec_host_cmd_periph_tx_buf *tx_buf) |
Sends the specified data to the host. More... | |
Host Command Peripherals API.
typedef int(* ec_host_cmd_periph_api_init) (const struct device *dev, struct ec_host_cmd_periph_rx_ctx *rx_ctx) |
#include <include/drivers/ec_host_cmd_periph.h>
typedef int(* ec_host_cmd_periph_api_send) (const struct device *dev, const struct ec_host_cmd_periph_tx_buf *tx_buf) |
#include <include/drivers/ec_host_cmd_periph.h>
int ec_host_cmd_periph_init | ( | const struct device * | dev, |
struct ec_host_cmd_periph_rx_ctx * | rx_ctx | ||
) |
#include <include/drivers/ec_host_cmd_periph.h>
Initialize a host command device.
This routine initializes a host command device, prior to its first use. The receive context object are an output of this function and are valid for the lifetime of this device. The RX context is used by the client to receive data from the host.
dev | Pointer to the device structure for the driver instance. |
rx_ctx | [out] The receiving context object that are valid for the lifetime of the device. These objects are used to receive data from the driver when the host send data. |
0 | if successful |
int ec_host_cmd_periph_send | ( | const struct device * | dev, |
const struct ec_host_cmd_periph_tx_buf * | tx_buf | ||
) |
#include <include/drivers/ec_host_cmd_periph.h>
Sends the specified data to the host.
Sends the data specified in tx_buf to the host over the host communication bus.
dev | Pointer to the device structure for the driver instance. |
tx_buf | The data to transmit to the host. |
0 | if successful |