[spi] Add SPIInterface stub for clang-tidy on unsupported platforms (#12532)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user