techmannih/nema34-mounted-stepper-controller

A 48 V USB‑C PD 3.1 EPR NEMA‑34 stepper controller PCB combining STM32/TMC5160 control, external MOSFET motor bridges, protected power and regenerative braking, USB data, telemetry, diagnostics, status LEDs, and buzzer alarms.

Version
0.3.92
License
unset
Stars
1

firmware/tests/fakes/SPI.h

#pragma once
#include "Arduino.h"
constexpr unsigned MSBFIRST=1, SPI_MODE3=3;
struct SPISettings { SPISettings(unsigned,unsigned,unsigned) {} };
struct SPIClass {
  bool started=false;
  unsigned transactions=0;
  SPIClass(unsigned,unsigned,unsigned) {}
  void begin() { started=true; }
  void end() { started=false; }
  void beginTransaction(SPISettings) { ++transactions; }
  uint8_t transfer(uint8_t) { return 0xFF; }
  void endTransaction() {}
};