Skip to content

Commit e6d9d51

Browse files
authored
Merge pull request #11523 from hugueskamba/hk-correct-force-inline-syntax-for-iar
Correct force inline syntax for IAR compiler
2 parents 99c19b5 + e2aeb60 commit e6d9d51

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/Ticker.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,12 @@ class Ticker : public TimerEvent, private NonCopyable<Ticker> {
8383
* @param func pointer to the function to be called
8484
* @param t the time between calls in seconds
8585
*/
86-
template <typename F>
87-
MBED_FORCEINLINE void attach(F &&func, float t)
86+
#if defined(__ICCARM__)
87+
MBED_FORCEINLINE template <typename F>
88+
#else
89+
template <typename F> MBED_FORCEINLINE
90+
#endif
91+
void attach(F &&func, float t)
8892
{
8993
attach_us(std::forward<F>(func), t * 1000000.0f);
9094
}

0 commit comments

Comments
 (0)