From d3cf654b50dad097a958a30f050e5e69894e105b Mon Sep 17 00:00:00 2001 From: lewisxhe Date: Wed, 24 Jul 2024 14:56:13 +0800 Subject: [PATCH] Fix esp-idf ci --- src/bosch/common/bosch_interfaces.cpp | 4 ++++ src/bosch/common/bosch_interfaces.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/bosch/common/bosch_interfaces.cpp b/src/bosch/common/bosch_interfaces.cpp index a4ae361..f0a12cd 100644 --- a/src/bosch/common/bosch_interfaces.cpp +++ b/src/bosch/common/bosch_interfaces.cpp @@ -29,6 +29,8 @@ */ #include "bosch_interfaces.h" +#if defined(ARDUINO) + #if defined(ARDUINO_ARCH_RP2040) SPISettings SensorInterfaces::__spiSetting = SPISettings(); #else @@ -155,3 +157,5 @@ void SensorInterfaces::bhy2_delay_us(uint32_t us, void *private_data) (void)private_data; delayMicroseconds(us); } + +#endif /*Arduino */ \ No newline at end of file diff --git a/src/bosch/common/bosch_interfaces.h b/src/bosch/common/bosch_interfaces.h index 2987496..cf69ae2 100644 --- a/src/bosch/common/bosch_interfaces.h +++ b/src/bosch/common/bosch_interfaces.h @@ -31,6 +31,7 @@ #include "SensorLib.h" +#if defined(ARDUINO) class SensorInterfaces { public: @@ -46,7 +47,7 @@ class SensorInterfaces static SPISettings __spiSetting; }; - +#endif