From f4f8d5a070672e217940ea28c19421589a4304eb Mon Sep 17 00:00:00 2001 From: Thomas Cherryhomes Date: Mon, 29 Apr 2024 12:23:18 -0500 Subject: [PATCH] [drivewire][cpm] do not build at all if not ESP32. --- lib/device/drivewire/cpm.cpp | 4 +++- lib/device/drivewire/cpm.h | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/device/drivewire/cpm.cpp b/lib/device/drivewire/cpm.cpp index ff8063df1..3bfd3e309 100755 --- a/lib/device/drivewire/cpm.cpp +++ b/lib/device/drivewire/cpm.cpp @@ -1,5 +1,7 @@ #ifdef BUILD_COCO +#ifdef ESP_PLATFORM + #define CCP_INTERNAL #include "cpm.h" @@ -170,8 +172,8 @@ void drivewireCPM::process() } } -#ifdef ESP_PLATFORM drivewireCPM theCPM; + #endif /* ESP_PLATFORM */ #endif /* BUILD_COCO */ \ No newline at end of file diff --git a/lib/device/drivewire/cpm.h b/lib/device/drivewire/cpm.h index 90e2147b9..ceb6333c3 100755 --- a/lib/device/drivewire/cpm.h +++ b/lib/device/drivewire/cpm.h @@ -2,6 +2,8 @@ #ifndef DRIVEWIRECPM_H #define DRIVEWIRECPM_H +#ifdef ESP_PLATFORM + #include "bus.h" @@ -33,7 +35,6 @@ class drivewireCPM : public virtualDevice virtual void status(); }; -#ifdef ESP_PLATFORM extern drivewireCPM theCPM; #endif /* ESP_PLATFORM */