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

Use opaque pin type #9

Open
mbolivar opened this issue Jan 9, 2012 · 0 comments
Open

Use opaque pin type #9

mbolivar opened this issue Jan 9, 2012 · 0 comments

Comments

@mbolivar
Copy link
Contributor

mbolivar commented Jan 9, 2012

Instead of uint8_t, we should do something like typedef int pint_t;, and use pin_t in all functions taking pin numbers as argument.

The opaque type lets us use wider types on platforms where this matters without wasting space on e.g. AVR. It also lets us #define NOT_A_PIN ((pin_t)-1). We can always continue to use plain int in beginner examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant