-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Sonata IO getting started guide #60
Conversation
Couple of things still to do here:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks reasonable to me. I would like Alex's review before merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall in terms of content but needs some fixes first.
Thanks for the reviews @AlexJones0 and @marnovandermaas I believe I have addressed all the comments. The latest version also includes small new sections on the SPI CS lines and usage of `MMIO_CAPABILITY' to get access to a driver instance. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All looks good to me, thanks for the work on this @GregAC. Just 1 minor comment that was not quite fully addressed and this should be good to go!
doc/guide/sonata-io.md
Outdated
pinmux->output_pin_select(SonataPinmux::OutputPin::pmod0_1, 2); | ||
pinmux->block_input_select(SonataPinmux::BlockInput::spi_1_cipo, 3); | ||
pinmux->output_pin_select(SonataPinmux::OutputPin::pmod0_2, 2); | ||
pinmux->output_pin_select(SonataPinmux::OutputPin::pmod0_4, 2); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pinmux->output_pin_select(SonataPinmux::OutputPin::pmod0_1, 2); | |
pinmux->block_input_select(SonataPinmux::BlockInput::spi_1_cipo, 3); | |
pinmux->output_pin_select(SonataPinmux::OutputPin::pmod0_2, 2); | |
pinmux->output_pin_select(SonataPinmux::OutputPin::pmod0_4, 2); | |
pinmux.output_pin_select(SonataPinmux::OutputPin::pmod0_1, 2); | |
pinmux.block_input_select(SonataPinmux::BlockInput::spi_1_cipo, 3); | |
pinmux.output_pin_select(SonataPinmux::OutputPin::pmod0_2, 2); | |
pinmux.output_pin_select(SonataPinmux::OutputPin::pmod0_4, 2); |
Still not quite correct - pinmux
is now a SonataPinmux
object and not a pointer, so ->
usage should be replaced with .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah whoops.
Maybe I should do something radical like actually compile my code snippet and check it works...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have demonstrated this working in a test program. May add that as an example (demonstrates using the pmod SPI) but that's a job for Monday!
Certainly room for improvement here but I'm keen to have something available with or very shortly after (i.e. today) the v1.0 release so people have a chance of working out how to use the IO.
There's a bunch of links to CHERIoT RTOS and Sonata System here. I think these should be linked to a specific commit/tag so they definitely correspond to v1.0. I haven't done that yet as things were still changing whilst I was writing this.