Closed thinkyhead closed 6 years ago
Check TPWMTHRS
and TPOWERDOWN
again.
// TPOWERDOWN
uint8_t TPOWERDOWN();
void TPOWERDOWN( uint8_t input);
. . .
// TPWMTHRS
uint32_t TPWMTHRS();
void TPWMTHRS( uint32_t input);
uint32_t TMC2130Stepper::TPOWERDOWN() { return TPOWERDOWN_sr; }
uint8_t TMC2130Stepper::TPWMTHRS() { return TPWMTHRS_sr; }
The shadow registers are still all uint32_t
also.
I don't know which is supposed to be changed to uint8_t
or I'd submit a PR.
39
with 2.4.1 there is still an issue, the types don't match.
// TPOWERDOWN
uint8_t TPOWERDOWN();
void TPOWERDOWN( uint8_t input);
// TSTEP
uint32_t TSTEP();
// TPWMTHRS
uint32_t TPWMTHRS();
void TPWMTHRS(
// W: TPOWERDOWN
uint32_t TMC2130Stepper::TPOWERDOWN() { return TPOWERDOWN_sr; }
void TMC2130Stepper::TPOWERDOWN(uint32_t input) {
TPOWERDOWN_sr = input;
TMC_WRITE_REG(TPOWERDOWN);
}
///////////////////////////////////////////////////////////////////////////////////////
// R: TSTEP
uint32_t TMC2130Stepper::TSTEP() { TMC_READ_REG_R(TSTEP); }
///////////////////////////////////////////////////////////////////////////////////////
// W: TPWMTHRS
uint8_t TMC2130Stepper::TPWMTHRS() { return TPWMTHRS_sr; }
void TMC2130Stepper::TPWMTHRS(uint8_t input) {
TPWMTHRS_sr = input;
TMC_WRITE_REG(TPWMTHRS);
}
This is what I get for doing this late at night without testing and then forgetting that PIO doesn't work with tags...
Should be fixed now in 2.4.2. I ran it with both PIO and A IDE. None of these changes were supposed to be a real release yet and no tags were made.
The shadow registers are still all uint32_t also.
That's a small change I can do but I don't think I'll be making too many micro-optimizations as we will not be using this library for much longer.