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.
Instead of uint8_t, we should do something like
typedef int pint_t;
, and usepin_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 plainint
in beginner examples.