Expand description
A way of communicating fatal OS errors that doesn’t have all the baggage that Rust loads Panic with, but still allows for useful debugging.
You can denote a pin (typically an error LED or something similar that you can hook up a meter to), which will be used to signal error conditions as a series of pulses.
When the OS triggers these conditions it is fatal; it will sit in a loop flashing the given pin until the device is reset. If you need to automatically reset after an error, use the Watchdog device to arrange this.
§Setting the debug pin to use
The debug pin to use can be set dynamically at runtime using the
set_debug_pin
method:
avr_oxide::oserror::set_debug_pin(avr_oxide::hal::atmega4809::port::porte::pin(2));
Enums§
- A type used for returning and propagating errors; this implementation differs from
core::result::Result
by having anunwrap()
implementation that doesn’t require Debug and importing a thousand dependencies we can’t afford on AVR.
Traits§
Functions§
- Set the pin which will be used when an OS error occurs to transmit the error code.