3 unstable releases
0.1.6 | Sep 19, 2024 |
---|---|
0.1.1 | Jul 8, 2024 |
0.0.0 | May 24, 2024 |
#332 in Debugging
Used in moondancer
5KB
51 lines
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, || {
...
});