Rahix / avr-hal

embedded-hal abstractions for AVR microcontrollers
Apache License 2.0
1.32k stars 224 forks source link

Adding code examples to the documentation #590

Open armandas opened 1 month ago

armandas commented 1 month ago

I'm thinking to make documentation more useful and accessible by adding code examples. Would you be happy to accept this?

To start with, I would add just a basic example to the documentation of each module, like in the standard library documentation: https://doc.rust-lang.org/std/vec/index.html

Example:

image

I would also like to make one PR per crate or possibly per module. What to you think?


To do

Rahix commented 1 month ago

Yes please, the documentation is still quite lacking at the moment. I think it may also be a good idea to link to relevant example programs from the docs. I think working through this per-crate is fine, it that works for you.