Commit Graph

3 Commits

Author SHA1 Message Date
Jett Rink
c0f2720890 include: remove enum build assert
Since the size of an enum can be undefined in certain compilations
environments, remove the BUILD_ASSERT that verifies that the enum is
16 bits.

Signed-off-by: Jett Rink <jettrink@google.com>
2020-10-02 11:44:39 +02:00
Maureen Helm
b985624572 doc: reference: Add ec host command api hooks
Adds missing hooks to include the ec host command api in the generated
documentation.

Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
2020-09-27 15:15:49 -05:00
Jett Rink
1972f0b7f4 ec_host_cmd: add ec host command handler framework
Add a generic host command handler framework that allows users to
declare new host command handlers with the HOST_COMMAND_HANDLER macro
at build time. The framework will handle incoming messages from the
host command peripheral device and forwards the incoming data to the
appropriate host command handler, which is looked up by id.

The framework will also send the response from the handler back to the
host command peripheral device. The device handles sending the data on
the physical bus.

This type of host command communication is typically done on an embedded
controller for a notebook or computer. The host would be the main
application processor (aka AP, CPU, SoC).

Signed-off-by: Jett Rink <jettrink@google.com>
2020-09-04 14:50:45 -04:00