mirror of
https://github.com/esphome/esphome.git
synced 2025-09-27 15:42:22 +01:00
Run clang-tidy against Arduino 3 (#2146)
* Add macros header with more usable Arduino version defines * Change Arduino version checking to use our version defines * Add missing ESP8266 check * Rename Arduino version macro to ARDUINO_VERSION_CODE * Upgrade clang-tidy to use Arduino 3 * Fix clang-tidy warnings * Upgrade NeoPixelBus to upstream 2.6.7 * Use Arduino-version-appropriate API to set redirect flags * Remove now unnecessary CLANG_TIDY ifdefs * Add preprocessor hackery to avoid including pgmspace.h * Bump base image to 4.1.1 and update lint * Fix nfctag * Fix make_unique ambiguous * Fix ignore name * Fix ambiguous v2 * Remove unused begin * Cast time_t to prevent issues on platforms where time_t is 32bit Co-authored-by: Otto winter <otto@otto-winter.com>
This commit is contained in:
@@ -95,12 +95,12 @@ void SPIComponent::debug_rx(uint8_t value) {
|
||||
void SPIComponent::debug_enable(uint8_t pin) { ESP_LOGVV(TAG, "Enabling SPI Chip on pin %u...", pin); }
|
||||
|
||||
void SPIComponent::cycle_clock_(bool value) {
|
||||
uint32_t start = ESP.getCycleCount();
|
||||
while (start - ESP.getCycleCount() < this->wait_cycle_)
|
||||
uint32_t start = ESP.getCycleCount(); // NOLINT(readability-static-accessed-through-instance)
|
||||
while (start - ESP.getCycleCount() < this->wait_cycle_) // NOLINT(readability-static-accessed-through-instance)
|
||||
;
|
||||
this->clk_->digital_write(value);
|
||||
start += this->wait_cycle_;
|
||||
while (start - ESP.getCycleCount() < this->wait_cycle_)
|
||||
while (start - ESP.getCycleCount() < this->wait_cycle_) // NOLINT(readability-static-accessed-through-instance)
|
||||
;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user