mirror of
https://github.com/italicsjenga/rp-hal-boards.git
synced 2025-01-23 09:46:33 +11:00
Add note about #[interrupt] mut -> &mut transform
Co-authored-by: Jan Niehusmann <github@gondor.com>
This commit is contained in:
parent
35875c8756
commit
8063882801
1 changed files with 1 additions and 0 deletions
|
@ -157,6 +157,7 @@ fn main() -> ! {
|
||||||
|
|
||||||
#[interrupt]
|
#[interrupt]
|
||||||
fn IO_IRQ_BANK0() {
|
fn IO_IRQ_BANK0() {
|
||||||
|
// The `#[interrupt]` attribute covertly converts this to `&'static mut Option<LedAndButton>`
|
||||||
static mut LED_AND_BUTTON: Option<LedAndButton> = None;
|
static mut LED_AND_BUTTON: Option<LedAndButton> = None;
|
||||||
|
|
||||||
// This is one-time lazy initialisation. We steal the variables given to us
|
// This is one-time lazy initialisation. We steal the variables given to us
|
||||||
|
|
Loading…
Add table
Reference in a new issue