Module capsules_extra::panic_button
source · Expand description
Debug capsule to cause a button press to trigger a kernel panic.
This can be useful especially when developing or debugging console capsules.
§Usage
The recommended way is to use the PanicButtonComponent
.
Alternatively, a low-level way of using the capsule is as follows.
ⓘ
let panic_button = static_init!(
PanicButton,
PanicButton::new(
&sam4l::gpio::PA[16],
kernel::hil::gpio::ActivationMode::ActiveLow,
kernel::hil::gpio::FloatingState::PullUp
)
);
sam4l::gpio::PA[16].set_client(panic_button);