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/include/power_domain.h

#pragma once
#include <stdbool.h>
#include <stdint.h>

typedef struct {
  bool ready;
  bool qualifying;
  uint32_t healthy_since;
} pd1180_board_power_t;

/* Rail is measured before the MCU OR, via the equal 10k divider on PB1. */
bool pd1180_board_power_update(pd1180_board_power_t *state, uint32_t rail_mv, uint32_t now);