13#ifndef ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_BACKEND_H_
14#define ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_BACKEND_H_
Public APIs for GPIO drivers.
int(* ec_host_cmd_backend_api_send)(const struct ec_host_cmd_backend *backend)
Sends data to the host.
Definition backend.h:108
struct ec_host_cmd_backend * ec_host_cmd_backend_get_spi(struct gpio_dt_spec *cs)
Get the SPI Host Command backend pointer.
struct ec_host_cmd_backend * ec_host_cmd_backend_get_espi(const struct device *dev)
Get the eSPI Host Command backend pointer.
struct ec_host_cmd_backend * ec_host_cmd_backend_get_uart(const struct device *dev)
Get the UART Host Command backend pointer.
int(* ec_host_cmd_backend_api_init)(const struct ec_host_cmd_backend *backend, struct ec_host_cmd_rx_ctx *rx_ctx, struct ec_host_cmd_tx_buf *tx)
Initialize a host command backend.
Definition backend.h:94
struct ec_host_cmd_backend * ec_host_cmd_backend_get_shi_ite(void)
Get the SHI ITE Host Command backend pointer.
struct ec_host_cmd_backend * ec_host_cmd_backend_get_shi_npcx(void)
Get the SHI NPCX Host Command backend pointer.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
Runtime device structure (in ROM) per driver instance.
Definition device.h:510
ec_host_cmd_backend_api_init init
Definition backend.h:111
ec_host_cmd_backend_api_send send
Definition backend.h:112
EC Host Command Backend.
Definition backend.h:36
void * ctx
Context for the backend.
Definition backend.h:40
const struct ec_host_cmd_backend_api * api
API provided by the backend.
Definition backend.h:38
Context for host command backend and handler to pass rx data.
Definition backend.h:46
size_t len_max
Maximum number of bytes to receive with one request packet.
Definition backend.h:57
size_t len
Number of bytes written to buf by backend.
Definition backend.h:55
uint8_t * buf
Buffer to hold received data.
Definition backend.h:53
Context for host command backend and handler to pass tx data.
Definition backend.h:63
size_t len_max
Maximum number of bytes to send with one response packet.
Definition backend.h:74
void * buf
Data to write to the host.
Definition backend.h:70
size_t len
Number of bytes to write from buf.
Definition backend.h:72
Container for GPIO pin information specified in devicetree.
Definition gpio.h:295