use-pin 0.0.1

Primitive electronic pin vocabulary for RustUse
Documentation
  • Coverage
  • 60%
    27 out of 45 items documented1 out of 21 items with examples
  • Size
  • Source code size: 14.61 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.08 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 4s Average build duration of successful builds.
  • all releases: 4s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Homepage
  • RustUse/use-electronics
    1 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • CloudBranch

use-pin

Primitive electronic pin vocabulary.

use-pin describes pin numbers, pin names, roles, polarity, and references to component pins. It does not implement electrical simulation, embedded HAL traits, MCU pin configuration, or GPIO control.

Example

use use_component::ReferenceDesignator;
use use_pin::{PinName, PinNumber, PinRef, PinRole};

let component = ReferenceDesignator::new("U2")?;
let numbered = PinRef::numbered(component.clone(), PinNumber::new(1)?);
let named = PinRef::named(component, PinName::new("VCC")?);

assert_eq!(numbered.to_string(), "U2:1");
assert_eq!(named.pin().to_string(), "VCC");
assert_eq!("power".parse::<PinRole>()?, PinRole::Power);
# Ok::<(), Box<dyn std::error::Error>>(())

Scope

Use this crate for descriptive pin metadata only. Use embedded, HAL, firmware, or simulation crates for behavior.