#dfu #sans-io #nostd

dfu-core

Sans IO core library (traits and tools) for DFU

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
0.0.0 May 31, 2021

#418 in Hardware support

Download history 98/week @ 2023-01-25 63/week @ 2023-02-01 68/week @ 2023-02-08 112/week @ 2023-02-15 72/week @ 2023-02-22 169/week @ 2023-03-01 106/week @ 2023-03-08 32/week @ 2023-03-15 64/week @ 2023-03-22 61/week @ 2023-03-29 34/week @ 2023-04-05 48/week @ 2023-04-12 32/week @ 2023-04-19 53/week @ 2023-04-26 35/week @ 2023-05-03 79/week @ 2023-05-10

201 downloads per month
Used in 2 crates (via dfu-libusb)

MIT/Apache

49KB
1K 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.7–1.2MB
~26K SLoC