ladybug

Crates.ioladybug
lib.rsladybug
version0.1.1
sourcesrc
created_at2024-05-24 11:48:18.850112
updated_at2024-07-08 14:22:20.977818
descriptionA small library for triggering a logic analyzer from program events
homepage
repositoryhttps://github.com/greatscottgadgets/cynthion
max_upload_size
id1251003
size4,728
Mike Walters (miek)

documentation

https://docs.rs/ladybug

README

ladybug

A small library for triggering a logic analyzer from program events.

Define a LogicAnalyzer implementation:

use ladybug::{Channel, LogicAnalyzer};

pub struct LadybugImpl {
    ...
}

impl LogicAnalyzer for LadybugImpl {
    fn high(&self, channel: Channel, bit_number: u8) {
       ...
    }

    fn low(&self, channel: Channel, bit_number: u8) {
       ...
    }
}

Log events with ladybug::trace():


    static LA: LadybugImpl = LadybugImpl::new(...);
    ladybug::set_analyzer(&la);

    ladybug::trace(Channel::B, 0, || {
        ...
    });

Commit count: 459

cargo fmt