adding inverted color commands

This commit is contained in:
aeroreyna
2026-01-09 10:48:27 -05:00
parent 1ce6e1adab
commit 7d3ae06e63
4 changed files with 195 additions and 9 deletions

26
AGENTS.md Normal file
View File

@@ -0,0 +1,26 @@
# Agent Guidelines for `eink_api`
These instructions apply to the entire repository.
## Code Style
- Follow existing Pico SDK patterns in `eink_api.c`; prefer straightforward, readable C without unnecessary abstractions.
- Match the project logging approach (`printf` for user feedback) and keep messages concise and informative.
- When modifying command handlers, mimic the `else if` chain style that ensures only one command executes per input.
- Avoid adding inline comments unless they clarify non-obvious logic.
## Command Handling
- Use fixed-length comparisons (`strncmp`) with explicit delimiter checks so longer commands do not trigger shorter prefixes (e.g., guard `draw_circle` vs. `draw_circle_fill`).
- Validate command arguments with `sscanf`, checking return counts before acting.
- Ensure screen-state guards (`screen_on`, `editor_mode`) remain intact around command logic.
## Display Operations
- Use the Waveshare `Paint_*` helpers already in use; do not introduce alternative drawing backends without a strong reason.
- Prefer existing constants (`BLACK`, `WHITE`, `DOT_PIXEL_1X1`, fill enums) for clarity and consistency.
## Build & Tooling
- Keep the CMake-based build flow unchanged (`cmake -S . -B build` / `cmake --build build`).
- Scripts under `scripts/` should remain POSIX shell compatible and should surface user-friendly errors tied to README guidance.
## Documentation
- Update the README table of commands whenever new commands are added or behaviors change.
- Maintain alignment between serial command descriptions and their implementation details.