ESPHome 2026.11.0-dev
Loading...
Searching...
No Matches
tmc2209.cpp
Go to the documentation of this file.
1#include "tmc2209.h"
2#include "esphome/core/log.h"
3
4namespace esphome::tmc2209 {
5
6ESPHOME_LOG_TAG(TAG, "tmc2209");
7
9 ESP_LOGCONFIG(TAG, "TMC2209:");
11}
12
14 switch (reg) {
15 case REG_TCOOLTHRS:
16 return &this->tcoolthrs_;
17 case REG_SGTHRS:
18 return &this->sgthrs_;
19 case REG_COOLCONF:
20 return &this->coolconf_;
21 default:
23 }
24}
25
28 this->write_register(REG_TCOOLTHRS, this->tcoolthrs_);
29 this->write_register(REG_SGTHRS, this->sgthrs_);
30 this->write_register(REG_COOLCONF, this->coolconf_);
31}
32
33} // namespace esphome::tmc2209
uint32_t * shadow_register(uint8_t reg) override
Definition tmc2209.cpp:13
void restore_registers() override
Definition tmc2209.cpp:26
bool write_register(uint8_t reg, uint32_t value)
Definition tmc22xx.cpp:441
virtual uint32_t * shadow_register(uint8_t reg)
Return the cached value of a write-only register, or nullptr when the register is readable.
Definition tmc22xx.cpp:426
virtual void restore_registers()
Write the cached write-only registers and the last written configuration registers to the driver,...
Definition tmc22xx.cpp:146
ESPHOME_LOG_TAG(TAG, "tmc2209.sensor")
static void uint32_t