#dfu #sans-io #no-std

no-std dfu-core

Sans IO core library (traits and tools) for DFU

9 releases (breaking)

0.7.0 Nov 9, 2024
0.6.0 May 10, 2023
0.5.1 Mar 4, 2023
0.4.2 Jul 31, 2022
0.0.0 May 31, 2021

#99 in Hardware support

Download history 911/week @ 2024-09-15 1070/week @ 2024-09-22 1154/week @ 2024-09-29 1837/week @ 2024-10-06 1298/week @ 2024-10-13 1639/week @ 2024-10-20 1389/week @ 2024-10-27 1592/week @ 2024-11-03 825/week @ 2024-11-10 819/week @ 2024-11-17 697/week @ 2024-11-24 1445/week @ 2024-12-01 1750/week @ 2024-12-08 1988/week @ 2024-12-15 1012/week @ 2024-12-22 838/week @ 2024-12-29

5,760 downloads per month
Used in 6 crates (3 directly)

MIT/Apache

60KB
1.5K SLoC

Rust Latest Version License Docs.rs LOC Dependency Status

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 a DfuIo provided in argument during runtime.
  • type MemoryPage and type mem: primitives representing the memory layout of the device (like char and str).
  • 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.

DFU Documentation

This crate has been made based on the following specifications:

License

MIT OR Apache-2.0

Dependencies

~0.4–1MB
~23K SLoC