#panic #panic-handler #pygamer

pygamer-panic-led

Set pygamer d13 led on panic

1 unstable release

0.1.0 Aug 16, 2020

#34 in #panic-handler

MIT/Apache

7KB

pygamer-panic-led

Set the panicking behavior to enable the d13 red led on the back of the pygamer. It steals the underlying d13 pin, sets it to function_a and then into_push_pull before enabling, so you COULD still use it for during normal program operation.

Usage

#![no_std]
use pygamer as hal;

use pygamer_panic_led as _;

#[hal::entry]
fn main() {
    panic!("argument is ignored");
}

lib.rs:

Set the panicking behavior to enable the d13 red led on the back of the pygamer. It steals the underlying d13 pin, sets it to function_a and then into_push_pull before enabling, so you COULD still use it for during normal program operation.

Usage

#![no_std]

use pygamer_panic_led as _;

fn main() {
    panic!("argument is ignored");
}

Breakable symbols

With the panic handler being #[inline(never)] the symbol rust_begin_unwind will be available to place a breakpoint on to halt when a panic is happening.

Dependencies

~9MB
~207K SLoC