1 unstable release
0.1.0 | Jul 23, 2024 |
---|
#2082 in Embedded development
Used in 4 crates
68KB
1.5K
SLoC
Wasefire platform protocol.
This crate defines a high-level protocol between a host and a device. The host initiates
requests and the device responds. Requests and responses use the same [Api
] but with a
different type parameter: Api<Request>
and Api<Response>
respectively. However, while the
host sends an Api<Request>
, the device responds with an ApiResult<T>
where T
is the
service of the request.
This high-level protocol is eventually wrapped in a lower-level protocol for a given transport, for example USB. The host should provide enough time for the device to respond, but should eventually move on in case no response will ever come, for example when the device is reset before sending the response. Reciprocally, the device should accept a new request from the host and cancel the request it was processing if any. Protocol API parametric over the message direction.
Variants gated by the full
feature are deprecated. They won't be used by new devices.
However, to support older devices, the host must be able to use them.
Dependencies
~285–740KB
~17K SLoC