8 releases (5 breaking)
0.6.0 | May 10, 2023 |
---|---|
0.5.1 | Mar 4, 2023 |
0.5.0 | Jan 26, 2023 |
0.4.2 | Jul 31, 2022 |
0.0.0 |
|
#323 in Hardware support
4,084 downloads per month
Used in 4 crates
(2 directly)
50KB
1K
SLoC
dfu-core
Sans IO core library (traits and tools) for DFU.
Features
-
no_std
compatible - 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 aDfuIo
provided in argument during runtime.type MemoryPage
andtype mem
: primitives representing the memory layout of the device (likechar
andstr
).struct MemoryLayout
: (requires featuresstd
) an allocated representation of the memory layout (likeString
) 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.
DFU Documentation
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
License
MIT OR Apache-2.0
Dependencies
~0.4–1MB
~21K SLoC