From 1fbf3077acae0e40ec196398672ba5bff667967e Mon Sep 17 00:00:00 2001 From: Lokathor Date: Thu, 6 Oct 2022 17:23:20 -0600 Subject: [PATCH] irqfn fix --- CHANGELOG.md | 2 ++ src/interrupts.rs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1158f7f..0295254 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ I had at first thought that they'd assign registers and then inline, but it turns out that the inline phase happens way before the register assignment phase, so the macros were unnecessary (and clunky). + * **Break:** The `IrqFn` type is changed to pass the function an `IrqBits` + instead of a bare `u16`. * Adds a helper for using `stm` to set all controls of a DMA at once. * Adds functions to pick a screenblock location (one for each screenblock type). diff --git a/src/interrupts.rs b/src/interrupts.rs index fb3ea78..7de2f6e 100644 --- a/src/interrupts.rs +++ b/src/interrupts.rs @@ -1,7 +1,7 @@ use crate::macros::{pub_const_fn_new_zeroed, u16_bool_field}; /// A function you want called during an interrupt. -pub type IrqFn = unsafe extern "C" fn(u16); +pub type IrqFn = unsafe extern "C" fn(IrqBits); #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, PartialOrd, Ord, Hash)] #[repr(transparent)]