[spi] Remove redundant "SPI" from log messages (#8970)

This commit is contained in:
Keith Burzinski 2025-06-03 15:39:21 -05:00 committed by GitHub
parent b63f90a6c0
commit d4cea84b1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 6 deletions

View File

@ -18,7 +18,7 @@ GPIOPin *const NullPin::NULL_PIN = new NullPin(); // NOLINT(cppcoreguidelines-a
SPIDelegate *SPIComponent::register_device(SPIClient *device, SPIMode mode, SPIBitOrder bit_order, uint32_t data_rate, SPIDelegate *SPIComponent::register_device(SPIClient *device, SPIMode mode, SPIBitOrder bit_order, uint32_t data_rate,
GPIOPin *cs_pin) { GPIOPin *cs_pin) {
if (this->devices_.count(device) != 0) { if (this->devices_.count(device) != 0) {
ESP_LOGE(TAG, "SPI device already registered"); ESP_LOGE(TAG, "Device already registered");
return this->devices_[device]; return this->devices_[device];
} }
SPIDelegate *delegate = this->spi_bus_->get_delegate(data_rate, bit_order, mode, cs_pin); // NOLINT SPIDelegate *delegate = this->spi_bus_->get_delegate(data_rate, bit_order, mode, cs_pin); // NOLINT
@ -28,7 +28,7 @@ SPIDelegate *SPIComponent::register_device(SPIClient *device, SPIMode mode, SPIB
void SPIComponent::unregister_device(SPIClient *device) { void SPIComponent::unregister_device(SPIClient *device) {
if (this->devices_.count(device) == 0) { if (this->devices_.count(device) == 0) {
esph_log_e(TAG, "SPI device not registered"); esph_log_e(TAG, "Device not registered");
return; return;
} }
delete this->devices_[device]; // NOLINT delete this->devices_[device]; // NOLINT
@ -36,14 +36,14 @@ void SPIComponent::unregister_device(SPIClient *device) {
} }
void SPIComponent::setup() { void SPIComponent::setup() {
ESP_LOGD(TAG, "Setting up SPI bus..."); ESP_LOGCONFIG(TAG, "Running setup");
if (this->sdo_pin_ == nullptr) if (this->sdo_pin_ == nullptr)
this->sdo_pin_ = NullPin::NULL_PIN; this->sdo_pin_ = NullPin::NULL_PIN;
if (this->sdi_pin_ == nullptr) if (this->sdi_pin_ == nullptr)
this->sdi_pin_ = NullPin::NULL_PIN; this->sdi_pin_ = NullPin::NULL_PIN;
if (this->clk_pin_ == nullptr) { if (this->clk_pin_ == nullptr) {
ESP_LOGE(TAG, "No clock pin for SPI"); ESP_LOGE(TAG, "No clock pin");
this->mark_failed(); this->mark_failed();
return; return;
} }

View File

@ -9,9 +9,8 @@ namespace spi_device {
static const char *const TAG = "spi_device"; static const char *const TAG = "spi_device";
void SPIDeviceComponent::setup() { void SPIDeviceComponent::setup() {
ESP_LOGD(TAG, "Setting up SPIDevice..."); ESP_LOGCONFIG(TAG, "Running setup");
this->spi_setup(); this->spi_setup();
ESP_LOGCONFIG(TAG, "SPIDevice started!");
} }
void SPIDeviceComponent::dump_config() { void SPIDeviceComponent::dump_config() {