Skip to content
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

Transfer ownership of example driver #411

Closed
ryankurte opened this issue Jan 6, 2020 · 5 comments
Closed

Transfer ownership of example driver #411

ryankurte opened this issue Jan 6, 2020 · 5 comments

Comments

@ryankurte
Copy link
Contributor

ryankurte commented Jan 6, 2020

Hey all,

We talked in other threads about having an example driver / driver template repository to help people navigate the nuances of driver-traits etc.

I've thrown one together here, and I think it'd be good to review/expand, transfer to the WG, and to link out from our docs?

-edit-: hmm perhaps this should also be a cargo-generate template

@almindor
Copy link
Contributor

almindor commented Jan 6, 2020

Looking over the code I think it might be more beneficial to write a simple "how-to" blog with these examples instead.

Right now going through it, even tho I wrote a driver myself (only a basic one tho) there were pieces where I went "what? oh.. right" because the example chose an arbitrary interface combination.

A how-to/blog post with maybe a very primitive actual driver as an example but with good step by step explanations would IMO be much more beneficial.

@markhildreth
Copy link

I just started playing with writing a driver myself, and I found the example very useful. I'm not much of a blog reader, but I wonder if the how-to/blog that @almindor mentioned could be part of the README. I blog post could be extra just for those SEO points.

I do agree that some of the parts were confusing for a "general". For example, I had to think for a second if Error::ResetTimeout is some weird problem I've never heard of but would be useful to include in my driver, but I believe it's just something that is specific to how this driver works. Perhaps that's just on account of my learning pains to realize this.

@markhildreth
Copy link

Also, just realized this:

use std::marker::PhantomData;

Is it okay to have std in an embedded driver?

@ryankurte
Copy link
Contributor Author

Ahh good catch, this should be core::marker::PhantomData (if you need it)

@ryankurte
Copy link
Contributor Author

Closing in favour of rust-embedded/book#246

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

No branches or pull requests

3 participants