Skip to content

docs: add module documentation for dm_sw_ring#6

Merged
JohnAmadis merged 3 commits into
masterfrom
copilot/update-documentation
Jun 3, 2026
Merged

docs: add module documentation for dm_sw_ring#6
JohnAmadis merged 3 commits into
masterfrom
copilot/update-documentation

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Jun 3, 2026

README.md was a 2-line stub and docs/ did not exist. Adds full documentation following the dmgpio reference structure.

README.md

  • Features list with flag names, quick-start snippet, build instructions, project structure tree, related projects

docs/README.md

  • Documentation index with a quick-reference code block covering all major operations

docs/dm_sw_ring.md

  • Module overview: architecture diagram, ring buffer mechanics, behavior flags table, thread-safety model

docs/api-reference.md

  • All 3 public types and all 12 public functions — signatures, parameter semantics, return values, and a write-overflow behavior table

docs/examples.md

Six annotated examples:

  1. Simple FIFO read/write
  2. Overflow with drop_old_data
  3. Blocking RTOS producer/consumer using dm_sw_ring_flags_default
  4. Non-destructive peek for length-prefixed framing
  5. discard / clear
  6. State inspection (capacity, size, available_space, is_full, is_empty)

Quick-start snippet from README:

dm_sw_ring_t ring = dm_sw_ring_create(64, dm_sw_ring_flags_default);

uint8_t tx[] = {1, 2, 3, 4};
dm_sw_ring_write(ring, tx, sizeof(tx));

uint8_t rx[4];
dm_sw_ring_read(ring, rx, sizeof(rx));

dm_sw_ring_destroy(ring);

Copilot AI linked an issue Jun 3, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Update documentation for modules docs: add module documentation for dm_sw_ring Jun 3, 2026
Copilot AI requested a review from JohnAmadis June 3, 2026 19:09
@JohnAmadis JohnAmadis marked this pull request as ready for review June 3, 2026 20:31
@JohnAmadis JohnAmadis merged commit d368227 into master Jun 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Zaktualizuj dokumentację

2 participants