| Crates.io | ladybug |
| lib.rs | ladybug |
| version | 0.1.6 |
| created_at | 2024-05-24 11:48:18.850112+00 |
| updated_at | 2024-09-19 12:59:35.885156+00 |
| 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 | 5,033 |
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, || {
...
});