From 53eff3f32a475eec27131c5682732346c4e0d629 Mon Sep 17 00:00:00 2001 From: Ken Van Hoeylandt Date: Sun, 1 Feb 2026 22:11:55 +0100 Subject: [PATCH] Fix static_assert --- TactilityKernel/Include/tactility/time.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/TactilityKernel/Include/tactility/time.h b/TactilityKernel/Include/tactility/time.h index a07f4d70..af5ff11c 100644 --- a/TactilityKernel/Include/tactility/time.h +++ b/TactilityKernel/Include/tactility/time.h @@ -5,6 +5,9 @@ */ #pragma once +#ifndef __cplusplus +#include +#endif #include #include "defines.h" @@ -22,7 +25,11 @@ extern "C" { #endif // Projects that include this header must align with Tactility's frequency (e.g. apps) +#ifdef __cplusplus static_assert(configTICK_RATE_HZ == 1000); +#else +static_assert(configTICK_RATE_HZ == 1000, "configTICK_RATE_HZ must be 1000"); +#endif static inline uint32_t get_tick_frequency() { return configTICK_RATE_HZ;