From 0fb99f20571cc1dd8c6829272e07c537582ff378 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Tue, 25 Feb 2020 12:48:30 +0000 Subject: [PATCH] Fixed compilation with C++. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13383 27425a3e-05d8-49a3-a47f-9c15f0e5edd8 --- os/common/ports/ARMCMx/chcore_timer.h | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/os/common/ports/ARMCMx/chcore_timer.h b/os/common/ports/ARMCMx/chcore_timer.h index d0435b104..80a76f9f4 100644 --- a/os/common/ports/ARMCMx/chcore_timer.h +++ b/os/common/ports/ARMCMx/chcore_timer.h @@ -52,6 +52,18 @@ /* External declarations. */ /*===========================================================================*/ +#ifdef __cplusplus +extern "C" { +#endif + void stStartAlarm(systime_t time); + void stStopAlarm(void); + void stSetAlarm(systime_t time); + systime_t stGetCounter(void); + systime_t stGetAlarm(void); +#ifdef __cplusplus +} +#endif + /*===========================================================================*/ /* Module inline functions. */ /*===========================================================================*/ @@ -66,7 +78,6 @@ * @notapi */ static inline void port_timer_start_alarm(systime_t time) { - void stStartAlarm(systime_t time); stStartAlarm(time); } @@ -77,7 +88,6 @@ static inline void port_timer_start_alarm(systime_t time) { * @notapi */ static inline void port_timer_stop_alarm(void) { - void stStopAlarm(void); stStopAlarm(); } @@ -90,7 +100,6 @@ static inline void port_timer_stop_alarm(void) { * @notapi */ static inline void port_timer_set_alarm(systime_t time) { - void stSetAlarm(systime_t time); stSetAlarm(time); } @@ -103,7 +112,6 @@ static inline void port_timer_set_alarm(systime_t time) { * @notapi */ static inline systime_t port_timer_get_time(void) { - systime_t stGetCounter(void); return stGetCounter(); } @@ -116,7 +124,6 @@ static inline systime_t port_timer_get_time(void) { * @notapi */ static inline systime_t port_timer_get_alarm(void) { - systime_t stGetAlarm(void); return stGetAlarm(); }