TMC5160 Driver 0.1.0
API reference
Loading...
Searching...
No Matches
Classes | Namespaces | Concepts | Enumerations
tmc5160.hpp File Reference

TMC5160 driver: the one header to include. More...

#include <array>
#include <cstddef>
#include <cstdint>
#include <span>
#include "tmc5160_detail.hpp"
#include "tmc5160_registers.hpp"
#include "tmc5160_spi_interface.hpp"
#include "tmc5160_status.hpp"
#include "tmc5160_types.hpp"
#include "tmc5160_uart_interface.hpp"
#include "tmc5160_units.hpp"
#include "tmc5160_version.h"
#include "../src/tmc5160.ipp"

Go to the source code of this file.

Classes

class  tmc5160::TMC5160< Port >
 Driver for one TMC5160 on a platform port. More...
 

Namespaces

namespace  tmc5160
 The TMC5160 driver: everything it declares lives here; internals in detail.
 

Concepts

concept  tmc5160::AnyPort
 Satisfied by a port of exactly one bus kind.
 

Enumerations

enum class  tmc5160::TuningPolicy : uint8_t { tmc5160::HoldAtRunForAt1 = 0 , tmc5160::LeaveHoldAtRun = 1 }
 What SetStealthChop() does about IHOLD while the chip tunes itself (page 58, 65). More...
 

Detailed Description

TMC5160 driver: the one header to include.

tmc5160::TMC5160<Port> drives one TMC5160 or TMC5160A stepper motor controller and driver through a platform port you write: derive it from SpiInterface (SPI, optionally in a daisy chain) or from UartInterface (single-wire UART). The driver has no platform code, allocates nothing, throws nothing, takes no lock and is not thread-safe: give each object one owner, or guard it with one mutex.

The coil current is never a raw number: it follows from the declared motor, the sense resistor and the supply (Config::motor, Config::board), and every write that could hurt the motor or the power stage has a guard (docs/configuration.md lists them).