Repository navigation
esp32: LNK-028 shared clock_ticker engine (LNK-027 adapts it) - #47
Merged
Merged
Conversation
… adapts it
Extract the configurable-PPQN tick scheduler both the USB-MIDI clock (LNK-027,
24 PPQN) and the future analog Eurorack sync (LNK-028, selectable PPQN) want, so
there's one tick engine, not two:
- clock_ticker.{h,c} (pure, host-tested): clock_ticker_ticks_due(state, beats,
ppqn, max_burst) — phase-locked pulses at N PPQN, re-primes on a big jump
(re-origin/stall) instead of flooding — plus a BarReset tracker that fires once
per bar boundary for the analog reset pulse. 11 host tests.
- midi_clock_out.{h,c} becomes a thin 24-PPQN adapter over clock_ticker;
behavior-preserving, its 8 existing tests unchanged and green.
Satisfies LNK-028 AC #1 (shared scheduler). The hardware-coupled parts (GPIO/RMT
emission, level-shift + jacks, config UI, on-scope verification) stay gated on the
board decision. Firmware compiles 86% flash; AGENTS.md updated.
Claude-Session: https://claude.ai/code/session_01WSeSToFVSvAFBDvHewrMHo
…DIN deferred) Triage input from the owner: Moog DFAM (step-advance clock, no reset, pulse accuracy critical) and Arturia BeatStep Pro (configurable clock-in hub, 1/2/24 PPQN, redistributes to the rest → one clock jack may suffice). Vintage Roland / DIN-sync is an attractive reach feature but owner owns none → deferred follow-on (BSP takes 24 PPQN on 3.5 mm anyway). Priorities: MVP = one accurate configurable-PPQN 3.5 mm pulse @ ~5 V; reset secondary; DIN deferred. Points Q6 toward 1-2 jacks, Q5 toward deferral. Claude-Session: https://claude.ai/code/session_01WSeSToFVSvAFBDvHewrMHo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First slice of LNK-028 — the decision-independent, host-tested core. The hardware output (GPIO/RMT, level-shift, jacks, config UI, scope verification) stays gated on the board decision (open Q6).
BarResettracker for the analog reset pulse. 11 host tests.Satisfies LNK-028 AC #1.
build_opt.hexcluded.https://claude.ai/code/session_01WSeSToFVSvAFBDvHewrMHo