Add note about #[interrupt] mut -> &mut transform

Co-authored-by: Jan Niehusmann <github@gondor.com>
This commit is contained in:
9names 2022-02-16 22:48:52 +11:00 committed by GitHub
parent 35875c8756
commit 8063882801
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -157,6 +157,7 @@ fn main() -> ! {
#[interrupt]
fn IO_IRQ_BANK0() {
// The `#[interrupt]` attribute covertly converts this to `&'static mut Option<LedAndButton>`
static mut LED_AND_BUTTON: Option<LedAndButton> = None;
// This is one-time lazy initialisation. We steal the variables given to us