From 8f6fbdead11b32c682f5ea237e22d31899f71daf Mon Sep 17 00:00:00 2001 From: Alex Shepherd Date: Sun, 27 Sep 2015 09:36:25 +1300 Subject: [PATCH] Added extern "C" wrapper around C call-back functions --- NmraDcc.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/NmraDcc.h b/NmraDcc.h index f9cf856..1cc80f7 100755 --- a/NmraDcc.h +++ b/NmraDcc.h @@ -155,6 +155,14 @@ class NmraDcc }; +/************************************************************************************ + Call-back functions +************************************************************************************/ + +#if defined (__cplusplus) + extern "C" { +#endif + extern void notifyDccReset(uint8_t hardReset ) __attribute__ ((weak)); extern void notifyDccIdle(void) __attribute__ ((weak)); @@ -175,4 +183,9 @@ extern void notifyCVChange( uint16_t CV, uint8_t Value) __attribute__ ((weak) extern void notifyCVResetFactoryDefault(void) __attribute__ ((weak)); extern void notifyCVAck(void) __attribute__ ((weak)); + +#if defined (__cplusplus) +} +#endif + #endif