From a7ec442d316fd5fa50997e7acf68faed3aa6c878 Mon Sep 17 00:00:00 2001 From: Ralph Ursprung Date: Mon, 30 Sep 2024 20:11:26 +0200 Subject: [PATCH] document that `parse` is the entry point to be used --- README.md | 3 +++ src/lib.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/README.md b/README.md index 4803bb8..2f2d186 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,9 @@ If you select neither or both you'll get a compile error. 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 the `parse` function. + ## Examples A simple example for the STM32F4 microcontrollers is [available](examples/stm32f4-event-printer/README.md). diff --git a/src/lib.rs b/src/lib.rs index a977292..6824b5e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,6 +1,8 @@ //! This implements the [Adafruit Bluefruit LE Connect controller protocol](https://learn.adafruit.com/bluefruit-le-connect/controller) //! which is e.g. used by the [Adafruit Bluefruit LE UART Friend](https://learn.adafruit.com/introducing-the-adafruit-bluefruit-le-uart-friend). //! +//! The entry point to use this crate is the [`parse`] function. +//! //! ## Optional features //! * `defmt`: you can enable the `defmt` feature to get a `defmt::Format` implementation for all structs & enums and a `defmt::debug!` call for each command being parsed. //! * `rgb`: if enabled, `From for RGB8` is implemented to support the [RGB crate](https://crates.io/crates/rgb).