TMCStepper
Library supporting Trinamic Stepper Drivers for Arduino platforms
Loading...
Searching...
No Matches
TMCStepper Class Referenceabstract

#include <TMCStepperBase.h>

Inheritance diagram for TMCStepper:

Classes

struct  TSTEP_t
struct  MSCNT_t

Public Member Functions

uint16_t cs2rms (uint8_t CS)
void rms_current (uint16_t mA)
void rms_current (uint16_t mA, float mult)
uint16_t rms_current ()
void hold_multiplier (float val)
float hold_multiplier ()
uint8_t test_connection ()
void microsteps (uint16_t ms)
uint16_t microsteps ()
void blank_time (uint8_t value)
uint8_t blank_time ()
void hysteresis_end (int8_t value)
int8_t hysteresis_end ()
void hysteresis_start (uint8_t value)
uint8_t hysteresis_start ()
void GSTAT (uint8_t input)
uint8_t GSTAT ()
bool reset ()
bool drv_err ()
bool uv_cp ()
void IHOLD_IRUN (uint32_t input)
uint32_t IHOLD_IRUN ()
void ihold (uint8_t B)
void irun (uint8_t B)
void iholddelay (uint8_t B)
uint8_t ihold ()
uint8_t irun ()
uint8_t iholddelay ()
uint8_t TPOWERDOWN ()
void TPOWERDOWN (uint8_t input)
uint32_t TSTEP ()
uint32_t TPWMTHRS ()
void TPWMTHRS (uint32_t input)
uint16_t MSCNT ()

Protected Member Functions

 TMCStepper (float RS)
virtual ~TMCStepper ()=default
 INIT_REGISTER (IHOLD_IRUN)
 INIT_REGISTER (TPOWERDOWN)
 INIT_REGISTER (TPWMTHRS)
virtual void write (uint8_t, uint32_t)=0
virtual uint32_t read (uint8_t)=0
virtual void vsense (bool)=0
virtual bool vsense (void)=0
virtual uint32_t DRV_STATUS ()=0
virtual void hend (uint8_t)=0
virtual uint8_t hend ()=0
virtual void hstrt (uint8_t)=0
virtual uint8_t hstrt ()=0
virtual void mres (uint8_t)=0
virtual uint8_t mres ()=0
virtual void tbl (uint8_t)=0
virtual uint8_t tbl ()=0

Protected Attributes

const float Rsense
float holdMultiplier = 0.5

Static Protected Attributes

static constexpr uint8_t TMC_READ = 0x00
static constexpr uint8_t TMC_WRITE = 0x80

Detailed Description

TMCStepper library by @teemuatlut

TMCStepperBase.h Individual header for class TMCStepper

Definition at line 9 of file TMCStepperBase.h.

Constructor & Destructor Documentation

◆ TMCStepper()

TMCStepper::TMCStepper ( float RS)
inlineprotected

Definition at line 61 of file TMCStepperBase.h.

Here is the caller graph for this function:

◆ ~TMCStepper()

virtual TMCStepper::~TMCStepper ( )
protectedvirtualdefault

Member Function Documentation

◆ blank_time() [1/2]

uint8_t TMCStepper::blank_time ( )

Definition at line 129 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ blank_time() [2/2]

void TMCStepper::blank_time ( uint8_t value)

Definition at line 120 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ cs2rms()

uint16_t TMCStepper::cs2rms ( uint8_t CS)

TMCStepper library by @teemuatlut TMCStepper.cpp - TMCStepper Class Implementing methods for most TMCStepper Inherited by TMC2130, TMC2160, TMC5130, TMC5160, TMC5161, TMC2208, TMC2209, TMC2224

cs2rms rms_current test_connection hysteresis_end, hysteresis_start microsteps blank_time GSTAT reset drv_err uv_cp TPOWERDOWN, TSTEP, TPWMTHRS MSCNT cur_a, cur_b

Definition at line 45 of file TMCStepper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drv_err()

bool TMCStepper::drv_err ( )

Definition at line 144 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ DRV_STATUS()

virtual uint32_t TMCStepper::DRV_STATUS ( )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ GSTAT() [1/2]

uint8_t TMCStepper::GSTAT ( )

Definition at line 141 of file TMCStepper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GSTAT() [2/2]

void TMCStepper::GSTAT ( uint8_t input)

Definition at line 142 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ hend() [1/2]

virtual uint8_t TMCStepper::hend ( )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ hend() [2/2]

virtual void TMCStepper::hend ( uint8_t )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

◆ hold_multiplier() [1/2]

float TMCStepper::hold_multiplier ( )
inline

Definition at line 16 of file TMCStepperBase.h.

◆ hold_multiplier() [2/2]

void TMCStepper::hold_multiplier ( float val)
inline

Definition at line 15 of file TMCStepperBase.h.

◆ hstrt() [1/2]

virtual uint8_t TMCStepper::hstrt ( )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ hstrt() [2/2]

virtual void TMCStepper::hstrt ( uint8_t )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

◆ hysteresis_end() [1/2]

int8_t TMCStepper::hysteresis_end ( )

Definition at line 85 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ hysteresis_end() [2/2]

void TMCStepper::hysteresis_end ( int8_t value)

Definition at line 84 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ hysteresis_start() [1/2]

uint8_t TMCStepper::hysteresis_start ( )

Definition at line 88 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ hysteresis_start() [2/2]

void TMCStepper::hysteresis_start ( uint8_t value)

Definition at line 87 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ ihold() [1/2]

uint8_t TMCStepper::ihold ( )

Definition at line 26 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ihold() [2/2]

void TMCStepper::ihold ( uint8_t B)

Definition at line 22 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IHOLD_IRUN() [1/2]

uint32_t TMCStepper::IHOLD_IRUN ( )

Definition at line 16 of file IHOLD_IRUN.cpp.

Here is the caller graph for this function:

◆ IHOLD_IRUN() [2/2]

void TMCStepper::IHOLD_IRUN ( uint32_t input)

Definition at line 17 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ iholddelay() [1/2]

uint8_t TMCStepper::iholddelay ( )

Definition at line 28 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:

◆ iholddelay() [2/2]

void TMCStepper::iholddelay ( uint8_t B)

Definition at line 24 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ INIT_REGISTER() [1/3]

TMCStepper::INIT_REGISTER ( IHOLD_IRUN )
protected
Here is the call graph for this function:

◆ INIT_REGISTER() [2/3]

TMCStepper::INIT_REGISTER ( TPOWERDOWN )
protected
Here is the call graph for this function:

◆ INIT_REGISTER() [3/3]

TMCStepper::INIT_REGISTER ( TPWMTHRS )
protected
Here is the call graph for this function:

◆ irun() [1/2]

uint8_t TMCStepper::irun ( )

Definition at line 27 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ irun() [2/2]

void TMCStepper::irun ( uint8_t B)

Definition at line 23 of file IHOLD_IRUN.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ microsteps() [1/2]

uint16_t TMCStepper::microsteps ( )

Definition at line 105 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ microsteps() [2/2]

void TMCStepper::microsteps ( uint16_t ms)

Definition at line 90 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ mres() [1/2]

virtual uint8_t TMCStepper::mres ( )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ mres() [2/2]

virtual void TMCStepper::mres ( uint8_t )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

◆ MSCNT()

uint16_t TMCStepper::MSCNT ( )

Definition at line 166 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ read()

virtual uint32_t TMCStepper::read ( uint8_t )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ reset()

bool TMCStepper::reset ( )

Definition at line 143 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ rms_current() [1/3]

uint16_t TMCStepper::rms_current ( )

Definition at line 71 of file TMCStepper.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ rms_current() [2/3]

void TMCStepper::rms_current ( uint16_t mA)

Definition at line 49 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ rms_current() [3/3]

void TMCStepper::rms_current ( uint16_t mA,
float mult )

Definition at line 66 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ tbl() [1/2]

virtual uint8_t TMCStepper::tbl ( )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ tbl() [2/2]

virtual void TMCStepper::tbl ( uint8_t )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

◆ test_connection()

uint8_t TMCStepper::test_connection ( )

Definition at line 75 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ TPOWERDOWN() [1/2]

uint8_t TMCStepper::TPOWERDOWN ( )

Definition at line 148 of file TMCStepper.cpp.

Here is the caller graph for this function:

◆ TPOWERDOWN() [2/2]

void TMCStepper::TPOWERDOWN ( uint8_t input)

Definition at line 149 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ TPWMTHRS() [1/2]

uint32_t TMCStepper::TPWMTHRS ( )

Definition at line 158 of file TMCStepper.cpp.

Here is the caller graph for this function:

◆ TPWMTHRS() [2/2]

void TMCStepper::TPWMTHRS ( uint32_t input)

Definition at line 159 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ TSTEP()

uint32_t TMCStepper::TSTEP ( )

Definition at line 155 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ uv_cp()

bool TMCStepper::uv_cp ( )

Definition at line 145 of file TMCStepper.cpp.

Here is the call graph for this function:

◆ vsense() [1/2]

virtual void TMCStepper::vsense ( bool )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

◆ vsense() [2/2]

virtual bool TMCStepper::vsense ( void )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

◆ write()

virtual void TMCStepper::write ( uint8_t ,
uint32_t  )
protectedpure virtual

Implemented in TMC2130Stepper, and TMC2208Stepper.

Here is the caller graph for this function:

Member Data Documentation

◆ holdMultiplier

float TMCStepper::holdMultiplier = 0.5
protected

Definition at line 88 of file TMCStepperBase.h.

◆ Rsense

const float TMCStepper::Rsense
protected

Definition at line 87 of file TMCStepperBase.h.

◆ TMC_READ

uint8_t TMCStepper::TMC_READ = 0x00
staticconstexprprotected

Definition at line 68 of file TMCStepperBase.h.

◆ TMC_WRITE

uint8_t TMCStepper::TMC_WRITE = 0x80
staticprotected

Definition at line 68 of file TMCStepperBase.h.


The documentation for this class was generated from the following files: