[spi] Add SPIInterface stub for clang-tidy on unsupported platforms (#12532)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Jonathan Swoboda
2025-12-17 12:18:25 -05:00
committed by GitHub
parent 42e061c9ae
commit 0e71fa97a7

View File

@@ -1,5 +1,4 @@
#pragma once
#ifndef USE_ZEPHYR
#include "esphome/core/application.h"
#include "esphome/core/component.h"
#include "esphome/core/hal.h"
@@ -24,6 +23,10 @@ using SPIInterface = SPIClassRP2040 *;
using SPIInterface = SPIClass *;
#endif
#elif defined(CLANG_TIDY)
using SPIInterface = void *; // Stub for platforms without SPI (e.g., Zephyr)
#endif // USE_ESP32 / USE_ARDUINO
/**
@@ -503,4 +506,3 @@ class SPIDevice : public SPIClient {
};
} // namespace esphome::spi
#endif // USE_ZEPHYR