[PATCH] Add support for arguments in ISRs

Kilian Holzinger kilian.holzinger at stritzinger.com
Wed Dec 20 10:09:42 UTC 2017


---
 c/src/lib/libbsp/arm/atsam/libraries/libchip/source/pio_it.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git
a/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/pio_it.c
b/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/pio_it.c
index ad78a9b0c1..7416edb153 100644
--- a/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/pio_it.c
+++ b/c/src/lib/libbsp/arm/atsam/libraries/libchip/source/pio_it.c
@@ -253,6 +253,7 @@ RTEMS_SYSINIT_ITEM(PIO_SysInitializeInterrupts,
RTEMS_SYSINIT_BSP_START,
  * handler).
  * \param pPin  Pointer to a Pin instance.
  * \param handler  Interrupt handler function pointer.
+ * \param arg Pointer to interrupt handler argument
  */
 void PIO_ConfigureIt(const Pin *pPin, void (*handler)(const Pin *, void
*arg),
     void *arg)
@@ -271,6 +272,8 @@ void PIO_ConfigureIt(const Pin *pPin, void
(*handler)(const Pin *, void *arg),
 	pSource = &(_aIntSources[_dwNumSources]);
 	pSource->pPin = pPin;
 	pSource->handler = handler;
+	pSource->arg = arg;
+	
 	_dwNumSources++;

 	rtems_interrupt_enable(level);
-- 
2.13.6


More information about the devel mailing list