|
HF-TMC51x0 Driver (TMC5130 & TMC5160) 0.1.0-dev
Hardware Agnostic C++ Driver for the TMC51x0 (TMC5130 & TMC5160)
|
Fluent configuration builder for TMC51x0 driver. More...
Go to the source code of this file.
Classes | |
| class | tmc51x0::ConfigBuilder |
| Fluent configuration builder for DriverConfig. More... | |
Namespaces | |
| namespace | tmc51x0 |
Fluent configuration builder for TMC51x0 driver.
Provides a fluent interface for building DriverConfig with:
Functions follow a clear unit naming convention for safety and readability:
WithMotorMa() - rated current in milliampsWithRunCurrentMa() - run current in milliampsWithHoldCurrentMa() - hold current in milliampsWithSupplyVoltageMv() - supply voltage in millivoltsWithSenseResistorMohm() - sense resistor in milliohmsWithWindingResistanceMohm() - winding resistance in milliohmsWithWindingInductanceMh() - winding inductance in millihenriesWithMotorPowerDownDelayMs() - always millisecondsWithRampPowerDownDelayMs() - always millisecondsWithZeroWaitTimeMs() - always millisecondsWithBbmTimeNs() - always nanosecondsWithS2vsVoltageMv() - always millivoltsWithS2gVoltageMv() - always millivoltsWithMosfetMillerChargeNc() - always nanocoulombsWithShortDetectionDelayUsX10() - always 0.1µs unitsWithExternalClockHz() - clock frequency in HzWithMaxSpeed(VelocityValue) - can be Steps, RPM, RevPerSec, etc.WithAcceleration(AccelerationValue) - can be Steps, RevPerSec, etc.WithStealthChopThreshold(VelocityValue) - can be Steps, RPM, etc.This convention ensures type safety and prevents unit conversion errors.
The builder follows the same pattern as ESP32 test config: