TMCStepper
TMCStepper Class Referenceabstract

#include <TMCStepper.h>

+ Inheritance diagram for TMCStepper:

Classes

struct  MSCNT_t
 
struct  TSTEP_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 ()
 
uint32_t MSCURACT ()
 
int16_t cur_a ()
 
int16_t cur_b ()
 

Protected Member Functions

 TMCStepper (float RS)
 
 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

Definition at line 51 of file TMCStepper.h.

Constructor & Destructor Documentation

◆ TMCStepper()

TMCStepper::TMCStepper ( float  RS)
inlineprotected

Definition at line 108 of file TMCStepper.h.

Member Function Documentation

◆ blank_time() [1/2]

uint8_t TMCStepper::blank_time ( )

Definition at line 104 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 95 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ cs2rms()

uint16_t TMCStepper::cs2rms ( uint8_t  CS)

Definition at line 20 of file TMCStepper.cpp.

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

◆ cur_a()

int16_t TMCStepper::cur_a ( )

Definition at line 144 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ cur_b()

int16_t TMCStepper::cur_b ( )

Definition at line 151 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ drv_err()

bool TMCStepper::drv_err ( )

Definition at line 119 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ DRV_STATUS()

virtual uint32_t TMCStepper::DRV_STATUS ( )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ GSTAT() [1/2]

uint8_t TMCStepper::GSTAT ( )

Definition at line 116 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 117 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ hend() [1/2]

virtual uint8_t TMCStepper::hend ( )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ hend() [2/2]

virtual void TMCStepper::hend ( uint8_t  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

◆ hold_multiplier() [1/2]

float TMCStepper::hold_multiplier ( )
inline

Definition at line 58 of file TMCStepper.h.

◆ hold_multiplier() [2/2]

void TMCStepper::hold_multiplier ( float  val)
inline

Definition at line 57 of file TMCStepper.h.

◆ hstrt() [1/2]

virtual uint8_t TMCStepper::hstrt ( )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ hstrt() [2/2]

virtual void TMCStepper::hstrt ( uint8_t  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

◆ hysteresis_end() [1/2]

int8_t TMCStepper::hysteresis_end ( )

Definition at line 60 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 59 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ hysteresis_start() [1/2]

uint8_t TMCStepper::hysteresis_start ( )

Definition at line 63 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 62 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ ihold() [1/2]

uint8_t TMCStepper::ihold ( )

Definition at line 18 of file IHOLD_IRUN.cpp.

+ Here is the caller graph for this function:

◆ ihold() [2/2]

void TMCStepper::ihold ( uint8_t  B)

Definition at line 14 of file IHOLD_IRUN.cpp.

+ Here is the call graph for this function:

◆ IHOLD_IRUN() [1/2]

uint32_t TMCStepper::IHOLD_IRUN ( )

Definition at line 8 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 9 of file IHOLD_IRUN.cpp.

+ Here is the call graph for this function:

◆ iholddelay() [1/2]

uint8_t TMCStepper::iholddelay ( )

Definition at line 20 of file IHOLD_IRUN.cpp.

+ Here is the caller graph for this function:

◆ iholddelay() [2/2]

void TMCStepper::iholddelay ( uint8_t  B)

Definition at line 16 of file IHOLD_IRUN.cpp.

+ Here is the call graph for this function:

◆ INIT_REGISTER() [1/3]

TMCStepper::INIT_REGISTER ( IHOLD_IRUN  )
inlineprotected

Definition at line 109 of file TMCStepper.h.

◆ INIT_REGISTER() [2/3]

TMCStepper::INIT_REGISTER ( TPOWERDOWN  )
inlineprotected

Definition at line 110 of file TMCStepper.h.

◆ INIT_REGISTER() [3/3]

TMCStepper::INIT_REGISTER ( TPWMTHRS  )
inlineprotected

Definition at line 111 of file TMCStepper.h.

◆ irun() [1/2]

uint8_t TMCStepper::irun ( )

Definition at line 19 of file IHOLD_IRUN.cpp.

+ Here is the caller graph for this function:

◆ irun() [2/2]

void TMCStepper::irun ( uint8_t  B)

Definition at line 15 of file IHOLD_IRUN.cpp.

+ Here is the call graph for this function:

◆ microsteps() [1/2]

uint16_t TMCStepper::microsteps ( )

Definition at line 80 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ microsteps() [2/2]

void TMCStepper::microsteps ( uint16_t  ms)

Definition at line 65 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ mres() [1/2]

virtual uint8_t TMCStepper::mres ( )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ mres() [2/2]

virtual void TMCStepper::mres ( uint8_t  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

◆ MSCNT()

uint16_t TMCStepper::MSCNT ( )

Definition at line 139 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ MSCURACT()

uint32_t TMCStepper::MSCURACT ( )

Definition at line 143 of file TMCStepper.cpp.

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

◆ read()

virtual uint32_t TMCStepper::read ( uint8_t  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ reset()

bool TMCStepper::reset ( )

Definition at line 118 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ rms_current() [1/3]

uint16_t TMCStepper::rms_current ( )

Definition at line 46 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 24 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 41 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ tbl() [1/2]

virtual uint8_t TMCStepper::tbl ( )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ tbl() [2/2]

virtual void TMCStepper::tbl ( uint8_t  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

◆ test_connection()

uint8_t TMCStepper::test_connection ( )

Definition at line 50 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ TPOWERDOWN() [1/2]

uint8_t TMCStepper::TPOWERDOWN ( )

Definition at line 123 of file TMCStepper.cpp.

+ Here is the caller graph for this function:

◆ TPOWERDOWN() [2/2]

void TMCStepper::TPOWERDOWN ( uint8_t  input)

Definition at line 124 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ TPWMTHRS() [1/2]

uint32_t TMCStepper::TPWMTHRS ( )

Definition at line 133 of file TMCStepper.cpp.

+ Here is the caller graph for this function:

◆ TPWMTHRS() [2/2]

void TMCStepper::TPWMTHRS ( uint32_t  input)

Definition at line 134 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ TSTEP()

uint32_t TMCStepper::TSTEP ( )

Definition at line 130 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ uv_cp()

bool TMCStepper::uv_cp ( )

Definition at line 120 of file TMCStepper.cpp.

+ Here is the call graph for this function:

◆ vsense() [1/2]

virtual void TMCStepper::vsense ( bool  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

◆ vsense() [2/2]

virtual bool TMCStepper::vsense ( void  )
protectedpure virtual

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

◆ write()

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

Implemented in TMC2208Stepper, and TMC2130Stepper.

+ Here is the caller graph for this function:

Member Data Documentation

◆ holdMultiplier

float TMCStepper::holdMultiplier = 0.5
protected

Definition at line 134 of file TMCStepper.h.

◆ Rsense

const float TMCStepper::Rsense
protected

Definition at line 133 of file TMCStepper.h.

◆ TMC_READ

constexpr uint8_t TMCStepper::TMC_READ = 0x00
staticconstexprprotected

Definition at line 113 of file TMCStepper.h.

◆ TMC_WRITE

constexpr uint8_t TMCStepper::TMC_WRITE = 0x80
staticprotected

Definition at line 114 of file TMCStepper.h.


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