HF-TMC9660 Driver
Hardware Agnostic C++ Driver for the TMC9660
Loading...
Searching...
No Matches
tmc9660::TMC9660Bootloader Class Reference

Convenience wrapper around the bootloader TMCL commands. More...

#include <TMC9660Bootloader.hpp>

Collaboration diagram for tmc9660::TMC9660Bootloader:

Public Member Functions

 TMC9660Bootloader (TMC9660CommInterface &comm, uint8_t address=0) noexcept
 
bool setBank (uint8_t bank) noexcept
 Select the target register bank.
 
bool setAddress (uint32_t addr) noexcept
 Set the address within the current bank.
 
bool write8 (uint8_t v) noexcept
 Write a single byte to the previously selected address.
 
bool write16 (uint16_t v) noexcept
 Write a 16 bit word.
 
bool write32 (uint32_t v) noexcept
 Write a 32 bit word.
 
bool write32Inc (const uint32_t *values, size_t count) noexcept
 Write multiple 32 bit words starting at the current address.
 
bool otpBurn (uint8_t page) noexcept
 Permanently burn the given OTP page.
 
bool applyConfiguration (const BootloaderConfig &cfg) noexcept
 Apply all fields of a ::BootloaderConfig.
 

Private Member Functions

bool sendCommand (uint8_t op, uint16_t type, uint8_t bank, uint32_t value, uint32_t *reply=nullptr) noexcept
 

Private Attributes

TMC9660CommInterfacecomm_
 
uint8_t address_
 

Detailed Description

Convenience wrapper around the bootloader TMCL commands.

The bootloader uses a small command set for writing configuration words into an internal RAM. This class provides helpers to build these commands and write a complete ::BootloaderConfig structure.

Constructor & Destructor Documentation

◆ TMC9660Bootloader()

TMC9660Bootloader::TMC9660Bootloader ( TMC9660CommInterface comm,
uint8_t  address = 0 
)
explicitnoexcept

Member Function Documentation

◆ applyConfiguration()

bool TMC9660Bootloader::applyConfiguration ( const BootloaderConfig cfg)
noexcept

Apply all fields of a ::BootloaderConfig.

◆ otpBurn()

bool TMC9660Bootloader::otpBurn ( uint8_t  page)
noexcept

Permanently burn the given OTP page.

◆ sendCommand()

bool TMC9660Bootloader::sendCommand ( uint8_t  op,
uint16_t  type,
uint8_t  bank,
uint32_t  value,
uint32_t *  reply = nullptr 
)
privatenoexcept

◆ setAddress()

bool TMC9660Bootloader::setAddress ( uint32_t  addr)
noexcept

Set the address within the current bank.

◆ setBank()

bool TMC9660Bootloader::setBank ( uint8_t  bank)
noexcept

Select the target register bank.

◆ write16()

bool TMC9660Bootloader::write16 ( uint16_t  v)
noexcept

Write a 16 bit word.

◆ write32()

bool TMC9660Bootloader::write32 ( uint32_t  v)
noexcept

Write a 32 bit word.

◆ write32Inc()

bool TMC9660Bootloader::write32Inc ( const uint32_t *  values,
size_t  count 
)
noexcept

Write multiple 32 bit words starting at the current address.

◆ write8()

bool TMC9660Bootloader::write8 ( uint8_t  v)
noexcept

Write a single byte to the previously selected address.

Member Data Documentation

◆ address_

uint8_t tmc9660::TMC9660Bootloader::address_
private

◆ comm_

TMC9660CommInterface& tmc9660::TMC9660Bootloader::comm_
private

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