4 releases (1 stable)
1.0.0 | Oct 13, 2024 |
---|---|
0.2.0 | Nov 14, 2023 |
0.1.1 | Jan 7, 2023 |
0.1.0 | Dec 18, 2022 |
#721 in Embedded development
76 downloads per month
43KB
876 lines
Adafruit Bluefruit LE Connect Controller Protocol Parser
This implements the Adafruit Bluefruit LE Connect controller protocol which is e.g. used by the Adafruit Bluefruit LE UART Friend.
Note that this work is not affiliated with Adafruit.
Optional Features
defmt
: you can enable thedefmt
feature to get adefmt::Format
implementation for all structs & enums and adefmt::debug!
call for each command being parsed.rgb
: if enabled,From<ColorEvent> for RGB8
is implemented to support the RGB crate.serde
: if enabled, all events implement the serde#[derive(Serialize, Deserialize)]
.- All events can be selected as individual features. By default, they are all selected,
but you can opt to only select the event(s) you are interested in which will result in a small binary size.
If other events are received, a
ProtocolParseError::DisabledControllerDataPackageType
will be returned.
Usage
The entry point to use this crate is Parser
which implements Iterator
to access the events in the input.
Note that this is a sans I/O crate, i.e. you have to talk to the Adafruit device, the parser just expects a byte sequence.
Examples
A simple example for the STM32F4 microcontrollers is available.
Changelog
For the changelog please see the dedicated CHANGELOG.md.
Minimum Supported Rust Version (MSRV)
This crate is guaranteed to compile on stable Rust 1.81 and up. It might compile with older versions but that may change in any new patch release.
Dependencies
~250KB