avr-port 0.2.0

no_std GPIO port abstraction for AVR (ATmega328P): Port B, C, D with DDR/PORT/PIN register access
Documentation
  • Coverage
  • 34.62%
    9 out of 26 items documented1 out of 15 items with examples
  • Size
  • Source code size: 6.15 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 11s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • dev-jeb/avr-and-things
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • dev-jeb

no_std GPIO port abstraction for AVR (ATmega328P).

Use Port B, C, and D via DDR/PORT/PIN registers:

  • PORTx: data register (read/write)
  • DDRx: data direction register (read/write)
  • PINx: input pins (read only)

Example

use avr_port::{portb, Pin};

let mut port_b = portb::init();
port_b.set_pin_mode(Pin::P5, true);
port_b.set_pin_state(Pin::P5, true);
let _level = port_b.read_pin(Pin::P5);