|
Zephyr Project API 4.4.99
A Scalable Open Source RTOS
|
Header file for the embedded controller (EC) host command APIs. More...
#include <stdint.h>#include <zephyr/kernel.h>#include <zephyr/mgmt/ec_host_cmd/backend.h>#include <zephyr/sys/__assert.h>#include <zephyr/sys/iterable_sections.h>Go to the source code of this file.
Data Structures | |
| struct | ec_host_cmd |
| Host command context structure. More... | |
| struct | ec_host_cmd_handler_args |
| Arguments passed into every installed host command handler. More... | |
| struct | ec_host_cmd_handler |
| Structure use for statically registering host command handlers. More... | |
| struct | ec_host_cmd_request_header |
| Header for requests from host to embedded controller. More... | |
| struct | ec_host_cmd_response_header |
| Header for responses from embedded controller to host. More... | |
Macros | |
| #define | EC_HOST_CMD_HANDLER(_id, _function, _version_mask, _request_type, _response_type) |
| Statically define and register a host command handler. | |
| #define | EC_HOST_CMD_HANDLER_REQ_ONLY(_id, _function, _version_mask, _request_type) |
| Statically define and register a request only host command handler. | |
| #define | EC_HOST_CMD_HANDLER_RESP_ONLY(_id, _function, _version_mask, _response_type) |
| Statically define and register a response only host command handler. | |
| #define | EC_HOST_CMD_HANDLER_UNBOUND(_id, _function, _version_mask) |
| Statically define and register a host command handler without sizes. | |
Typedefs | |
| typedef void(* | ec_host_cmd_user_cb_t) (const struct ec_host_cmd_rx_ctx *rx_ctx, void *user_data) |
| User callback function type for host command reception. | |
| typedef enum ec_host_cmd_status(* | ec_host_cmd_in_progress_cb_t) (void *user_data) |
| In-progress callback function type. | |
| typedef enum ec_host_cmd_status(* | ec_host_cmd_handler_cb) (struct ec_host_cmd_handler_args *args) |
| Host command handler callback function type. | |
Functions | |
| int | ec_host_cmd_init (struct ec_host_cmd_backend *backend) |
| Initialize the host command subsystem. | |
| int | ec_host_cmd_send_response (enum ec_host_cmd_status status, const struct ec_host_cmd_handler_args *args) |
| Send the host command response. | |
| void | ec_host_cmd_rx_notify (void) |
| Signal a new host command. | |
| void | ec_host_cmd_set_user_cb (ec_host_cmd_user_cb_t cb, void *user_data) |
| Install a user callback for receiving a host command. | |
| const struct ec_host_cmd * | ec_host_cmd_get_hc (void) |
| Get the main ec host command structure. | |
| FUNC_NORETURN void | ec_host_cmd_task (void) |
| The thread function for Host Command subsystem. | |
| bool | ec_host_cmd_send_in_progress_ended (void) |
| Check if a Host Command that sent EC_HOST_CMD_IN_PROGRESS status has ended. | |
| enum ec_host_cmd_status | ec_host_cmd_send_in_progress_status (void) |
| Get final result of a last Host Command that has sent EC_HOST_CMD_IN_PROGRESS status. | |
| enum ec_host_cmd_status | ec_host_cmd_send_in_progress_continue (ec_host_cmd_in_progress_cb_t cb, void *user_data) |
| Continue processing a handler in callback after returning EC_HOST_CMD_IN_PROGRESS. | |
| int | ec_host_cmd_add_suppressed (uint16_t cmd_id) |
| Add a suppressed command. | |
Header file for the embedded controller (EC) host command APIs.