ESPHome 2025.9.0-dev
Loading...
Searching...
No Matches
spi_device.cpp
Go to the documentation of this file.
1#include "spi_device.h"
2#include "esphome/core/log.h"
3#include "esphome/core/hal.h"
4#include <cinttypes>
5
6namespace esphome {
7namespace spi_device {
8
9static const char *const TAG = "spi_device";
10
12
14 ESP_LOGCONFIG(TAG, "SPIDevice");
15 LOG_PIN(" CS pin: ", this->cs_);
16 ESP_LOGCONFIG(TAG, " Mode: %d", this->mode_);
17 if (this->data_rate_ < 1000000) {
18 ESP_LOGCONFIG(TAG, " Data rate: %" PRId32 "kHz", this->data_rate_ / 1000);
19 } else {
20 ESP_LOGCONFIG(TAG, " Data rate: %" PRId32 "MHz", this->data_rate_ / 1000000);
21 }
22}
23
25
26} // namespace spi_device
27} // namespace esphome
uint32_t data_rate_
Definition spi.h:410
float get_setup_priority() const override
const float DATA
For components that import data from directly connected sensors like DHT.
Definition component.cpp:50
Providing packet encoding functions for exchanging data with a remote host.
Definition a01nyub.cpp:7