8 releases (5 breaking)
|new 0.6.0||May 10, 2023|
|0.5.1||Mar 4, 2023|
|0.5.0||Jan 26, 2023|
|0.4.2||Jul 31, 2022|
#418 in Hardware support
201 downloads per month
Used in 2 crates (via dfu-libusb)
Sans IO core library (traits and tools) for DFU.
- async and sync compatible
- write a firmware into a device (DFU download)
- read a firmware from a device (DFU upload)
- minimal dependencies
- uses a state machine to ensure the implementations are correctly done
Traits & Structs
trait DfuIo: a trait that can be made into an object that provides the IO to this library logic.
struct DfuSansIo: a struct that allows the developer to do the DFU logic using a state machine (can be async or sync).
struct DfuSync: a basic sync implementation that uses a
DfuIoprovided in argument during runtime.
type mem: primitives representing the memory layout of the device (like
struct MemoryLayout: (requires features
std) an allocated representation of the memory layout (like
String) that can parse a memory layout from a string.
FunctionalDescriptor: can read the extra bytes of a USB functional descriptor to provide information for the DFU logic.
This crate has been made based on the following specifications:
- DFU 1.1 (Aug 5 2004): https://www.usb.org/sites/default/files/DFU_1.1.pdf
- STM32/DfuSe extensions: https://www.st.com/content/ccc/resource/technical/document/user_manual/cc/6d/c3/43/ea/29/4b/eb/CD00135281.pdf/files/CD00135281.pdf/jcr:content/translations/en.CD00135281.pdf
MIT OR Apache-2.0