HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
TMC9660::Globals Struct Reference

Convenience helpers for reading and writing global parameters. More...

#include <TMC9660.hpp>

Collaboration diagram for TMC9660::Globals:

Public Member Functions

bool writeBank0 (tmc9660::tmcl::GlobalParamBank0 param, uint32_t value) noexcept
 Write a value to bank 0 (system settings).
 
bool readBank0 (tmc9660::tmcl::GlobalParamBank0 param, uint32_t &value) noexcept
 Read a value from bank 0 (system settings).
 
bool writeBank2 (tmc9660::tmcl::GlobalParamBank2 param, int32_t value) noexcept
 Write a signed user variable in bank 2.
 
bool readBank2 (tmc9660::tmcl::GlobalParamBank2 param, int32_t &value) noexcept
 Read a signed user variable from bank 2.
 
bool writeBank3 (tmc9660::tmcl::GlobalParamBank3 param, uint32_t value) noexcept
 Write a value to bank 3 (interrupt configuration).
 
bool readBank3 (tmc9660::tmcl::GlobalParamBank3 param, uint32_t &value) noexcept
 Read a value from bank 3 (interrupt configuration).
 
bool setSerialAddress (uint8_t address) noexcept
 Set module serial address (bank0:SERIAL_ADDRESS).
 
bool getSerialAddress (uint8_t &address) noexcept
 Get module serial address (bank0:SERIAL_ADDRESS).
 
bool setHostAddress (uint8_t address) noexcept
 Set host serial address (bank0:SERIAL_HOST_ADDRESS).
 
bool getHostAddress (uint8_t &address) noexcept
 Get host serial address (bank0:SERIAL_HOST_ADDRESS).
 
bool configureHeartbeat (tmc9660::tmcl::HeartbeatMonitoringConfig iface, uint32_t timeout_ms) noexcept
 Configure heartbeat monitoring interface and timeout.
 
bool getHeartbeat (tmc9660::tmcl::HeartbeatMonitoringConfig &iface, uint32_t &timeout_ms) noexcept
 Read heartbeat monitoring configuration.
 
bool setIODirectionMask (uint32_t mask) noexcept
 Set GPIO direction mask (bank0:IO_DIRECTION_MASK).
 
bool getIODirectionMask (uint32_t &mask) noexcept
 Get GPIO direction mask (bank0:IO_DIRECTION_MASK).
 
bool setPullEnableMask (uint32_t mask) noexcept
 Set pull-up/down enable mask (bank0:IO_INPUT_PULLUP_PULLDOWN_ENABLE_MASK).
 
bool getPullEnableMask (uint32_t &mask) noexcept
 Get pull-up/down enable mask.
 
bool setPullDirectionMask (uint32_t mask) noexcept
 Set pull direction mask (bank0:IO_INPUT_PULLUP_PULLDOWN_DIRECTION_MASK).
 
bool getPullDirectionMask (uint32_t &mask) noexcept
 Get pull direction mask.
 
bool setAutoStart (bool enable) noexcept
 Enable or disable auto-start of stored program (bank0:AUTO_START_ENABLE).
 
bool getAutoStart (bool &enable) noexcept
 Read auto-start enable flag.
 
bool setClearUserVariables (bool clear) noexcept
 Configure clearing of user variables on startup (bank0:CLEAR_USER_VARIABLES).
 
bool getClearUserVariables (bool &clear) noexcept
 Get clear-user-variable flag.
 
bool setUserVariable (uint8_t index, int32_t value) noexcept
 Set user variable by index (bank2).
 
bool getUserVariable (uint8_t index, int32_t &value) noexcept
 Read user variable by index (bank2).
 
bool setTimerPeriod (uint8_t timer, uint32_t period_ms) noexcept
 Set interrupt timer period (bank3).
 
bool getTimerPeriod (uint8_t timer, uint32_t &period_ms) noexcept
 Get interrupt timer period (bank3).
 
bool setInputTrigger (uint8_t index, tmc9660::tmcl::TriggerTransition transition) noexcept
 Set trigger transition for digital input n (bank3 INPUT_n_TRIGGER_TRANSITION).
 
bool getInputTrigger (uint8_t index, tmc9660::tmcl::TriggerTransition &transition) noexcept
 Get trigger transition for digital input n.
 

Private Member Functions

 Globals (TMC9660 &parent) noexcept
 

Private Attributes

TMC9660driver
 

Friends

class TMC9660
 

Detailed Description

Convenience helpers for reading and writing global parameters.

The TMC9660 groups non-motion parameters into banks. This subsystem provides simple wrappers to access them using the enum classes defined in tmc9660_param_mode_tmcl.hpp.

Constructor & Destructor Documentation

◆ Globals()

TMC9660::Globals::Globals ( TMC9660 parent)
inlineexplicitprivatenoexcept

Member Function Documentation

◆ configureHeartbeat()

bool TMC9660::Globals::configureHeartbeat ( tmc9660::tmcl::HeartbeatMonitoringConfig  iface,
uint32_t  timeout_ms 
)
noexcept

Configure heartbeat monitoring interface and timeout.

◆ getAutoStart()

bool TMC9660::Globals::getAutoStart ( bool &  enable)
noexcept

Read auto-start enable flag.

◆ getClearUserVariables()

bool TMC9660::Globals::getClearUserVariables ( bool &  clear)
noexcept

Get clear-user-variable flag.

◆ getHeartbeat()

bool TMC9660::Globals::getHeartbeat ( tmc9660::tmcl::HeartbeatMonitoringConfig iface,
uint32_t &  timeout_ms 
)
noexcept

Read heartbeat monitoring configuration.

◆ getHostAddress()

bool TMC9660::Globals::getHostAddress ( uint8_t &  address)
noexcept

Get host serial address (bank0:SERIAL_HOST_ADDRESS).

◆ getInputTrigger()

bool TMC9660::Globals::getInputTrigger ( uint8_t  index,
tmc9660::tmcl::TriggerTransition transition 
)
noexcept

Get trigger transition for digital input n.

◆ getIODirectionMask()

bool TMC9660::Globals::getIODirectionMask ( uint32_t &  mask)
noexcept

Get GPIO direction mask (bank0:IO_DIRECTION_MASK).

◆ getPullDirectionMask()

bool TMC9660::Globals::getPullDirectionMask ( uint32_t &  mask)
noexcept

Get pull direction mask.

◆ getPullEnableMask()

bool TMC9660::Globals::getPullEnableMask ( uint32_t &  mask)
noexcept

Get pull-up/down enable mask.

◆ getSerialAddress()

bool TMC9660::Globals::getSerialAddress ( uint8_t &  address)
noexcept

Get module serial address (bank0:SERIAL_ADDRESS).

◆ getTimerPeriod()

bool TMC9660::Globals::getTimerPeriod ( uint8_t  timer,
uint32_t &  period_ms 
)
noexcept

Get interrupt timer period (bank3).

◆ getUserVariable()

bool TMC9660::Globals::getUserVariable ( uint8_t  index,
int32_t &  value 
)
noexcept

Read user variable by index (bank2).

◆ readBank0()

bool TMC9660::Globals::readBank0 ( tmc9660::tmcl::GlobalParamBank0  param,
uint32_t &  value 
)
noexcept

Read a value from bank 0 (system settings).

◆ readBank2()

bool TMC9660::Globals::readBank2 ( tmc9660::tmcl::GlobalParamBank2  param,
int32_t &  value 
)
noexcept

Read a signed user variable from bank 2.

◆ readBank3()

bool TMC9660::Globals::readBank3 ( tmc9660::tmcl::GlobalParamBank3  param,
uint32_t &  value 
)
noexcept

Read a value from bank 3 (interrupt configuration).

◆ setAutoStart()

bool TMC9660::Globals::setAutoStart ( bool  enable)
noexcept

Enable or disable auto-start of stored program (bank0:AUTO_START_ENABLE).

◆ setClearUserVariables()

bool TMC9660::Globals::setClearUserVariables ( bool  clear)
noexcept

Configure clearing of user variables on startup (bank0:CLEAR_USER_VARIABLES).

◆ setHostAddress()

bool TMC9660::Globals::setHostAddress ( uint8_t  address)
noexcept

Set host serial address (bank0:SERIAL_HOST_ADDRESS).

◆ setInputTrigger()

bool TMC9660::Globals::setInputTrigger ( uint8_t  index,
tmc9660::tmcl::TriggerTransition  transition 
)
noexcept

Set trigger transition for digital input n (bank3 INPUT_n_TRIGGER_TRANSITION).

◆ setIODirectionMask()

bool TMC9660::Globals::setIODirectionMask ( uint32_t  mask)
noexcept

Set GPIO direction mask (bank0:IO_DIRECTION_MASK).

◆ setPullDirectionMask()

bool TMC9660::Globals::setPullDirectionMask ( uint32_t  mask)
noexcept

Set pull direction mask (bank0:IO_INPUT_PULLUP_PULLDOWN_DIRECTION_MASK).

◆ setPullEnableMask()

bool TMC9660::Globals::setPullEnableMask ( uint32_t  mask)
noexcept

Set pull-up/down enable mask (bank0:IO_INPUT_PULLUP_PULLDOWN_ENABLE_MASK).

◆ setSerialAddress()

bool TMC9660::Globals::setSerialAddress ( uint8_t  address)
noexcept

Set module serial address (bank0:SERIAL_ADDRESS).

◆ setTimerPeriod()

bool TMC9660::Globals::setTimerPeriod ( uint8_t  timer,
uint32_t  period_ms 
)
noexcept

Set interrupt timer period (bank3).

◆ setUserVariable()

bool TMC9660::Globals::setUserVariable ( uint8_t  index,
int32_t  value 
)
noexcept

Set user variable by index (bank2).

◆ writeBank0()

bool TMC9660::Globals::writeBank0 ( tmc9660::tmcl::GlobalParamBank0  param,
uint32_t  value 
)
noexcept

Write a value to bank 0 (system settings).

◆ writeBank2()

bool TMC9660::Globals::writeBank2 ( tmc9660::tmcl::GlobalParamBank2  param,
int32_t  value 
)
noexcept

Write a signed user variable in bank 2.

◆ writeBank3()

bool TMC9660::Globals::writeBank3 ( tmc9660::tmcl::GlobalParamBank3  param,
uint32_t  value 
)
noexcept

Write a value to bank 3 (interrupt configuration).

Friends And Related Symbol Documentation

◆ TMC9660

friend class TMC9660
friend

Member Data Documentation

◆ driver

TMC9660& TMC9660::Globals::driver
private

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