Crate tmc2209[][src]

Modules

Declaration of the TMC2209 registers and their implementations.

Structs

The read access request datagram.

The read access response datagram.

A serial reader, for reading responses via the TMC2209’s UART interface.

The write access request datagram.

Enums

For observing the current state of the reader.

Constants

The frequency of the clock that is internal to the TMC2209.

Responses are always addressed to the master with this value.

The first four bits for synchronisation, the last four are zeroed reserved bytes.

Traits

Implemented for all registers that can be read from.

Implemented for all register types.

Implemented for all registers that can be written to.

Functions

Blocks and attempts to read a register from the given UART receiver.

Blocks and attempts to read a response from the given UART receiver.

Convert the given frequency to the closest TOFF value.

Cyclic redundancy check.

Construct a new read access datagram for register R of the slave at the given address.

Use the selected sense resistor value (in ohms) and the motor’s rated current (in mA) to determine the recommended vsense and “current scale” (for IRUN) values.

Construct a read access datagram for register R of the slave at the given address and send it via UART.

Construct a write access datagram for register R of the slave at the given address and send it via UART.

Convert the given TOFF value to the associated chopper frequency.

Use the selected sense resistor value (in ohms) and the current vsense setting to convert the given “current scale” value to an RMS current in mA.

Construct a new write access datagram for register R of the slave at the given address.