Crates.io | ladybug |
lib.rs | ladybug |
version | 0.1.1 |
source | src |
created_at | 2024-05-24 11:48:18.850112 |
updated_at | 2024-07-08 14:22:20.977818 |
description | A small library for triggering a logic analyzer from program events |
homepage | |
repository | https://github.com/greatscottgadgets/cynthion |
max_upload_size | |
id | 1251003 |
size | 4,728 |
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, || {
...
});