Add API reference manual in docs/API.md (fixes #82)#143
Open
laurb9 wants to merge 1 commit into
Open
Conversation
Documents the full public API from the headers in src/: construction and pin arguments for all driver classes, begin/setRPM/setMicrostep/setSpeedProfile, blocking (move/rotate) vs non-blocking (startMove/nextAction/startBrake/stop) flows with usage examples, state query methods, enable/disable semantics (nSLEEP vs nENABLE polarity), units (microsteps, degrees, RPM, full steps/s^2 — including the AVR int-overflow pitfall in step expressions), the CONSTANT_SPEED vs LINEAR_SPEED profiles, DRV8880 torque control, and the MultiDriver/SyncDriver group APIs. Linked from README; AGENTS.md repository structure updated. Agent: claude-fable-5 (Claude Code 2.1.153); max context and thinking level not exposed to the agent Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Summary
Adds
docs/API.md, a reference manual for the library's public API, addressing the long-standing documentation request in #82. Written directly from the headers insrc/(not from memory), covering:intoverflow pitfall in step-count expressionsBasicStepperDriver,A4988,DRV8825,DRV8834,DRV8880,TMC2100begin/setRPM/setMicrostep/setSpeedProfilewithCONSTANT_SPEEDvsLINEAR_SPEEDsemantics (trapezoidal/triangular profiles, precalculated ramps)move/rotate) and non-blocking (startMove/startRotate/nextAction/startBrake/stop) flows with usage examples, including how to usenextAction()'s return value as a time budgetgetCurrentState,getStepsRemaining,getTimeForMove— with the note that the latter sets up move parameters in LINEAR_SPEED mode)enable/disable/setEnableActiveStateand the ~SLEEP (active HIGH) vs ~ENABLE (active LOW) polarity conventionDRV8880::setCurrent()torque controlMultiDrivervsSyncDrivergroup APIs with a two-axis exampleAlso links the manual from README (new Documentation section) and adds
docs/to the AGENTS.md repository-structure diagram.Docs-only change, no code affected. Based on the current master API; if #140 (setMinStepPulse) and #141 (TB6600) merge, I can follow up with the corresponding additions.
Fixes #82.
Agent: claude-fable-5 (Claude Code 2.1.153); max context and thinking level not exposed to the agent
🤖 Generated with Claude Code