MCPcopy Create free account
hub / github.com/bdring/FluidNC / write

Method write

FluidNC/esp32/tmc_spi.cpp:45–52  ·  view source on GitHub ↗

Replace the library's weak definition of TMC2130Stepper::write() This is executed in the object context so it has access to class data such as the CS pin that switchCSpin() uses

Source from the content-addressed store, hash-verified

43// This is executed in the object context so it has access to class
44// data such as the CS pin that switchCSpin() uses
45void TMC2130Stepper::write(uint8_t reg, uint32_t data) {
46 log_verbose("TMC reg " << to_hex(reg) << " write " << to_hex(data));
47 tmc_spi_bus_setup();
48
49 switchCSpin(0);
50 tmc_spi_rw_reg(reg | 0x80, data, link_index);
51 switchCSpin(1);
52}
53
54// Replace the library's weak definition of TMC2130Stepper::read()
55uint32_t TMC2130Stepper::read(uint8_t reg) {

Callers 1

i2c_writeFunction · 0.45

Calls 3

to_hexFunction · 0.85
tmc_spi_bus_setupFunction · 0.85
tmc_spi_rw_regFunction · 0.85

Tested by

no test coverage detected