Fix static_assert

This commit is contained in:
Ken Van Hoeylandt 2026-02-01 22:11:55 +01:00
parent 2b4398856e
commit 53eff3f32a

View File

@ -5,6 +5,9 @@
*/ */
#pragma once #pragma once
#ifndef __cplusplus
#include <assert.h>
#endif
#include <stdint.h> #include <stdint.h>
#include "defines.h" #include "defines.h"
@ -22,7 +25,11 @@ extern "C" {
#endif #endif
// Projects that include this header must align with Tactility's frequency (e.g. apps) // Projects that include this header must align with Tactility's frequency (e.g. apps)
#ifdef __cplusplus
static_assert(configTICK_RATE_HZ == 1000); 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() { static inline uint32_t get_tick_frequency() {
return configTICK_RATE_HZ; return configTICK_RATE_HZ;