by John Lauer
Two-board Molecule interferometer with onboard RP2040, USB-C data, 15 V USB-C PD power and a JST stage interface.
main
John Lauer
Software 1.3.1: test-stage firmware (J4 TMC2209, HOME, limits, self-test), Stage tab and Calibrate in smi-dash (simulat…
c0c5c9b
// SPDX-License-Identifier: MIT
// Lets the dashboard's simulator run the firmware's own stage core
// (firmware/src/smi_stage.c) against a simulated TMC2209 and mechanism.
#include "smi_stage.h"
size_t smi_stage_shim_size(void) { return sizeof(smi_stage_t); }
void smi_stage_shim_init(smi_stage_t *s, void *ctx, void (*put)(void *, uint8_t, bool), bool (*home)(void *),
void (*wait)(void *, uint32_t), bool (*uart)(void *, const uint8_t *, size_t, uint8_t *, size_t)) {
smi_stage_hal_t h = { .ctx = ctx, .put = put, .home_in = home, .wait_us = wait, .uart = uart };
smi_stage_init(s, &h);
}