WiringProject / Wiring

Wiring Framework
http://wiring.org.co/
Other
217 stars 168 forks source link

Use opaque pin type #9

Open mbolivar opened 12 years ago

mbolivar commented 12 years ago

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.