From 1848789ca3118279d636de10006f5cafc8338444 Mon Sep 17 00:00:00 2001 From: Asaf Fisher Date: Wed, 3 Feb 2021 21:43:14 +0200 Subject: [PATCH] rom: Make rom_funcs functions call function instead of returning it --- rp2040-hal/src/rom_data.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rp2040-hal/src/rom_data.rs b/rp2040-hal/src/rom_data.rs index e7a370b..4bfea7a 100644 --- a/rp2040-hal/src/rom_data.rs +++ b/rp2040-hal/src/rom_data.rs @@ -35,8 +35,9 @@ macro_rules! rom_funcs { ) => { $( $(#[$outer])* - pub fn $name() -> extern "C" fn( $( $aname : $aty ),* ) -> $ret { - rom_table_lookup(FUNC_TABLE, *$c) + pub fn $name($( $aname:$aty ),*) -> $ret{ + let func: extern "C" fn( $( $aty ),* ) -> $ret = rom_table_lookup(FUNC_TABLE, *$c); + func($( $aname ),*) } )* }