/Zephyr-Core-3.7.0/subsys/mgmt/ec_host_cmd/backends/ |
D | ec_host_cmd_backend_uart.c | 72 struct ec_host_cmd_rx_ctx *rx_ctx; member 144 res = uart_rx_enable(hc_uart->uart_dev, hc_uart->rx_ctx->buf, hc_uart->rx_buf_size, 0); in rx_timeout() 157 hc_uart->rx_ctx->len = 0; in uart_callback() 173 new_len = hc_uart->rx_ctx->len + evt->data.rx.len; in uart_callback() 181 hc_uart->rx_ctx->len = new_len; in uart_callback() 183 if (hc_uart->rx_ctx->len >= sizeof(struct ec_host_cmd_request_header)) { in uart_callback() 186 (struct ec_host_cmd_request_header *)hc_uart->rx_ctx->buf); in uart_callback() 191 } else if (hc_uart->rx_ctx->len == expected_len) { in uart_callback() 209 } else if (hc_uart->rx_ctx->len > expected_len) { in uart_callback() 234 struct ec_host_cmd_rx_ctx *rx_ctx, struct ec_host_cmd_tx_buf *tx) in ec_host_cmd_uart_init() argument [all …]
|
D | ec_host_cmd_backend_simulator.c | 19 struct ec_host_cmd_rx_ctx *rx_ctx; member 33 struct ec_host_cmd_rx_ctx *rx_ctx, in ec_host_cmd_sim_init() argument 38 hc_sim->rx_ctx = rx_ctx; in ec_host_cmd_sim_init() 71 memcpy(hc_sim->rx_ctx->buf, buffer, len); in ec_host_cmd_backend_sim_data_received() 72 hc_sim->rx_ctx->len = len; in ec_host_cmd_backend_sim_data_received()
|
D | ec_host_cmd_backend_espi.c | 36 struct ec_host_cmd_rx_ctx *rx_ctx; member 83 memcpy(hc_espi->rx_ctx->buf, (void *)rx_header, RX_HEADER_SIZE); in espi_handler() 84 hc_espi->rx_ctx->len = RX_HEADER_SIZE; in espi_handler() 86 memcpy(hc_espi->rx_ctx->buf, (void *)rx_header, rx_valid_data_size); in espi_handler() 87 hc_espi->rx_ctx->len = rx_valid_data_size; in espi_handler() 96 struct ec_host_cmd_rx_ctx *rx_ctx, struct ec_host_cmd_tx_buf *tx) in ec_host_cmd_espi_init() argument 106 hc_espi->rx_ctx = rx_ctx; in ec_host_cmd_espi_init() 118 hc_espi->rx_ctx->len_max = in ec_host_cmd_espi_init()
|
D | ec_host_cmd_backend_shi_ite.c | 68 struct ec_host_cmd_rx_ctx *rx_ctx; member 256 data->rx_ctx->len = shi_ite_host_request_expected_size(r); in shi_ite_parse_header() 258 if (data->rx_ctx->len == 0 || data->rx_ctx->len > sizeof(data->in_msg)) { in shi_ite_parse_header() 259 shi_ite_bad_received_data(dev, data->rx_ctx->len); in shi_ite_parse_header() 264 shi_ite_host_request_data(data->rx_ctx->buf + sizeof(*r), in shi_ite_parse_header() 265 data->rx_ctx->len - sizeof(*r)); in shi_ite_parse_header() 444 struct ec_host_cmd_rx_ctx *rx_ctx, struct ec_host_cmd_tx_buf *tx) in shi_ite_backend_init() argument 455 data->rx_ctx = rx_ctx; in shi_ite_backend_init() 458 rx_ctx->buf = data->in_msg; in shi_ite_backend_init() 459 rx_ctx->len_max = CONFIG_EC_HOST_CMD_BACKEND_SHI_MAX_REQUEST; in shi_ite_backend_init()
|
D | ec_host_cmd_backend_shi_npcx.c | 123 struct ec_host_cmd_rx_ctx *rx_ctx; member 256 for (uint32_t i = 0; i < szbytes; i++, data->rx_ctx->len++) { in shi_npcx_read_inbuf_wait() 337 LOG_HEXDUMP_DBG(data->in_msg, data->rx_ctx->len, "in_msg="); in shi_npcx_bad_received_data() 398 uint32_t cnt_inbuf_int = data->rx_ctx->len / SHI_IBUF_HALF_SIZE; in shi_npcx_handle_host_package() 405 uint32_t remain_bytes = data->sz_request - data->rx_ctx->len; in shi_npcx_handle_host_package() 523 data->rx_ctx->len++; in shi_npcx_read_half_inbuf() 524 } while (data->rx_ctx->len % SHI_IBUF_HALF_SIZE && data->rx_ctx->len != data->sz_request); in shi_npcx_read_half_inbuf() 765 if (data->rx_ctx) { in shi_npcx_reset_prepare() 766 data->rx_ctx->len = 0; in shi_npcx_reset_prepare() 962 struct ec_host_cmd_rx_ctx *rx_ctx, struct ec_host_cmd_tx_buf *tx) in shi_npcx_backend_init() argument [all …]
|
D | ec_host_cmd_backend_spi_stm32.c | 159 struct ec_host_cmd_rx_ctx *rx_ctx; member 467 (uint32_t)hc_spi->rx_ctx->buf, CONFIG_EC_HOST_CMD_HANDLER_RX_BUFFER_SIZE); in reload_dma_rx() 495 blk_cfg->dest_address = (uint32_t)hc_spi->rx_ctx->buf; in spi_config_dma_rx() 665 exp_size = expected_size((struct ec_host_cmd_request_header *)hc_spi->rx_ctx->buf); in gpio_cb_nss() 673 hc_spi->rx_ctx->len = exp_size; in gpio_cb_nss() 687 struct ec_host_cmd_rx_ctx *rx_ctx, struct ec_host_cmd_tx_buf *tx) in ec_host_cmd_spi_init() argument 697 if (!rx_ctx->buf || !tx->buf || !hc_spi->cs.port) { in ec_host_cmd_spi_init() 705 hc_spi->rx_ctx = rx_ctx; in ec_host_cmd_spi_init() 706 hc_spi->rx_ctx->len = 0; in ec_host_cmd_spi_init() 716 if (hc_spi->rx_ctx->len_max > SPI_MAX_REQ_SIZE) { in ec_host_cmd_spi_init() [all …]
|
/Zephyr-Core-3.7.0/subsys/mgmt/ec_host_cmd/ |
D | ec_host_cmd_handler.c | 47 .rx_ctx = { 303 (const struct ec_host_cmd_request_header *const)hc->rx_ctx.buf; in ec_host_cmd_send_response() 328 struct ec_host_cmd_rx_ctx *rx = &hc->rx_ctx; in ec_host_cmd_rx_notify() 388 struct ec_host_cmd_rx_ctx *rx = &hc->rx_ctx; in ec_host_cmd_thread() 480 handler_rx_buf = hc->rx_ctx.buf; in ec_host_cmd_init() 484 ret = backend->api->init(backend, &hc->rx_ctx, &hc->tx); in ec_host_cmd_init() 487 backend_rx_buf = hc->rx_ctx.buf; in ec_host_cmd_init()
|
/Zephyr-Core-3.7.0/include/zephyr/mgmt/ec_host_cmd/ |
D | ec_host_cmd.h | 90 typedef void (*ec_host_cmd_user_cb_t)(const struct ec_host_cmd_rx_ctx *rx_ctx, void *user_data); 94 struct ec_host_cmd_rx_ctx rx_ctx; member
|
D | backend.h | 91 struct ec_host_cmd_rx_ctx *rx_ctx,
|