Function kernel::debug::panic_blink_forever
source · pub fn panic_blink_forever<L: Led>(leds: &mut [&L]) -> !
Expand description
Blinks a recognizable pattern forever.
The LED will blink “sporadically” in a somewhat irregular pattern. This should look different from a traditional blinking LED which typically blinks with a consistent duty cycle. The panic blinking sequence is intentionally unusual to make it easier to tell when a panic has occurred.
If a multi-color LED is used for the panic pattern, it is advised to turn off other LEDs before calling this method.
Generally, boards should blink red during panic if possible, otherwise choose the ‘first’ or most prominent LED. Some boards may find it appropriate to blink multiple LEDs (e.g. one on the top and one on the bottom), thus this method accepts an array, however most will only need one.