farmbot-arduino-firmware icon indicating copy to clipboard operation
farmbot-arduino-firmware copied to clipboard

refactor(TMC2130_Basics): optimize SPI flush loops

Open Chris0xdeadbeef opened this issue 2 months ago • 0 comments

This PR combines two commits refactoring the SPI flush loops in TMC2130_Basics:

  • Replaced magic numbers with constexpr uint8_t BYTES_TO_FLUSH = 4
  • Changed loop counters from int to uint8_t
  • Replaced post-increment i++ with pre-increment ++i for consistency

No functional changes, just code clean-up and minor performance improvements.

Chris0xdeadbeef avatar Sep 26 '25 18:09 Chris0xdeadbeef