diff options
author | Aditya Gaddam <adityagaddam@gmail.com> | 2012-08-31 14:19:57 -0400 |
---|---|---|
committer | Aditya Gaddam <adityagaddam@gmail.com> | 2012-08-31 14:19:57 -0400 |
commit | 6b2700e2b1a03b7e0191f3dd9b34f8c51eea3c84 (patch) | |
tree | 5693873124e4ac1f4a9c311f859fe6bce0f64d24 /libmaple/include | |
parent | e98633a041cfc9d5ba9122951aad65dcc4e33012 (diff) | |
download | librambutan-6b2700e2b1a03b7e0191f3dd9b34f8c51eea3c84.tar.gz librambutan-6b2700e2b1a03b7e0191f3dd9b34f8c51eea3c84.zip |
"Added ability to set callbacks for interrupts that get an argument. This argument can be the instance that needs to handle the interrupt, or just a random argument you might find useful later. Suggestions from mbolivar and iperry from pull53 on libmaple were taken into account.
Signed-off-by: Aditya Gaddam <adityagaddam@gmail.com>"
Diffstat (limited to 'libmaple/include')
-rw-r--r-- | libmaple/include/libmaple/exti.h | 5 | ||||
-rw-r--r-- | libmaple/include/libmaple/libmaple_types.h | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/libmaple/include/libmaple/exti.h b/libmaple/include/libmaple/exti.h index 3800b4a..530b442 100644 --- a/libmaple/include/libmaple/exti.h +++ b/libmaple/include/libmaple/exti.h @@ -115,6 +115,11 @@ void exti_attach_interrupt(exti_num num, exti_cfg port, voidFuncPtr handler, exti_trigger_mode mode); +void exti_attach_callback(exti_num num, + exti_cfg port, + voidFuncPtr handler, + void *arg, + exti_trigger_mode mode); void exti_detach_interrupt(exti_num num); /** diff --git a/libmaple/include/libmaple/libmaple_types.h b/libmaple/include/libmaple/libmaple_types.h index 9e1fbb3..60dd2ff 100644 --- a/libmaple/include/libmaple/libmaple_types.h +++ b/libmaple/include/libmaple/libmaple_types.h @@ -48,6 +48,7 @@ typedef int int32; typedef long long int64; typedef void (*voidFuncPtr)(void); +typedef void (*voidArgumentFuncPtr)(void *); #define __io volatile #define __attr_flash __attribute__((section (".USER_FLASH"))) |