7#ifndef ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_H_
8#define ZEPHYR_INCLUDE_MGMT_EC_HOST_CMD_H_
80#define EC_HOST_CMD_HANDLER(_function, _id, _version_mask, _request_type, \
82 const STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
84 .handler = _function, \
85 .version_mask = _version_mask, \
86 .min_rqt_size = sizeof(_request_type), \
87 .min_rsp_size = sizeof(_response_type), \
102#define EC_HOST_CMD_HANDLER_UNBOUND(_function, _id, _version_mask) \
103 const STRUCT_SECTION_ITERABLE(ec_host_cmd_handler, __cmd##_id) = { \
105 .handler = _function, \
106 .version_mask = _version_mask, \
enum ec_host_cmd_status(* ec_host_cmd_handler_cb)(struct ec_host_cmd_handler_args *args)
Definition: ec_host_cmd.h:40
ec_host_cmd_status
Definition: ec_host_cmd.h:164
@ EC_HOST_CMD_BUSY
Definition: ec_host_cmd.h:198
@ EC_HOST_CMD_REQUEST_TRUNCATED
Definition: ec_host_cmd.h:192
@ EC_HOST_CMD_ERROR
Definition: ec_host_cmd.h:170
@ EC_HOST_CMD_INVALID_HEADER
Definition: ec_host_cmd.h:190
@ EC_HOST_CMD_IN_PROGRESS
Definition: ec_host_cmd.h:182
@ EC_HOST_CMD_SUCCESS
Definition: ec_host_cmd.h:166
@ EC_HOST_CMD_INVALID_VERSION
Definition: ec_host_cmd.h:178
@ EC_HOST_CMD_INVALID_CHECKSUM
Definition: ec_host_cmd.h:180
@ EC_HOST_CMD_UNAVAILABLE
Definition: ec_host_cmd.h:184
@ EC_HOST_CMD_MAX
Definition: ec_host_cmd.h:200
@ EC_HOST_CMD_INVALID_COMMAND
Definition: ec_host_cmd.h:168
@ EC_HOST_CMD_ACCESS_DENIED
Definition: ec_host_cmd.h:174
@ EC_HOST_CMD_TIMEOUT
Definition: ec_host_cmd.h:186
@ EC_HOST_CMD_BUS_ERROR
Definition: ec_host_cmd.h:196
@ EC_HOST_CMD_INVALID_PARAM
Definition: ec_host_cmd.h:172
@ EC_HOST_CMD_OVERFLOW
Definition: ec_host_cmd.h:188
@ EC_HOST_CMD_RESPONSE_TOO_BIG
Definition: ec_host_cmd.h:194
@ EC_HOST_CMD_INVALID_RESPONSE
Definition: ec_host_cmd.h:176
__UINT8_TYPE__ uint8_t
Definition: stdint.h:58
#define UINT16_MAX
Definition: stdint.h:28
__UINT16_TYPE__ uint16_t
Definition: stdint.h:59
Arguments passed into every installed host command handler.
Definition: ec_host_cmd.h:22
uint16_t output_buf_size
Definition: ec_host_cmd.h:33
const uint8_t version
Definition: ec_host_cmd.h:37
const void *const input_buf
Definition: ec_host_cmd.h:24
void *const output_buf
Definition: ec_host_cmd.h:28
const uint16_t input_buf_size
Definition: ec_host_cmd.h:26
Structure use for statically registering host command handlers.
Definition: ec_host_cmd.h:45
uint16_t version_mask
Definition: ec_host_cmd.h:54
uint16_t min_rsp_size
Definition: ec_host_cmd.h:62
ec_host_cmd_handler_cb handler
Definition: ec_host_cmd.h:47
uint16_t id
Definition: ec_host_cmd.h:49
uint16_t min_rqt_size
Definition: ec_host_cmd.h:58