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
| 43 | // This is executed in the object context so it has access to class |
| 44 | // data such as the CS pin that switchCSpin() uses |
| 45 | void 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() |
| 55 | uint32_t TMC2130Stepper::read(uint8_t reg) { |
no test coverage detected