mirror of
https://github.com/esphome/esphome.git
synced 2024-11-21 22:48:10 +01:00
Make SPI compile with IDF >= 5.0 (#6383)
Co-authored-by: Clyde Stubbs <2366188+clydebarrow@users.noreply.github.com>
This commit is contained in:
parent
9b7438a56d
commit
19022ace12
1 changed files with 3 additions and 2 deletions
|
@ -1,6 +1,7 @@
|
|||
#include "spi_device.h"
|
||||
#include "esphome/core/log.h"
|
||||
#include "esphome/core/hal.h"
|
||||
#include <cinttypes>
|
||||
|
||||
namespace esphome {
|
||||
namespace spi_device {
|
||||
|
@ -18,9 +19,9 @@ void SPIDeviceComponent::dump_config() {
|
|||
LOG_PIN(" CS pin: ", this->cs_);
|
||||
ESP_LOGCONFIG(TAG, " Mode: %d", this->mode_);
|
||||
if (this->data_rate_ < 1000000) {
|
||||
ESP_LOGCONFIG(TAG, " Data rate: %dkHz", this->data_rate_ / 1000);
|
||||
ESP_LOGCONFIG(TAG, " Data rate: %" PRId32 "kHz", this->data_rate_ / 1000);
|
||||
} else {
|
||||
ESP_LOGCONFIG(TAG, " Data rate: %dMHz", this->data_rate_ / 1000000);
|
||||
ESP_LOGCONFIG(TAG, " Data rate: %" PRId32 "MHz", this->data_rate_ / 1000000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue