For some applications I need access to the registers that control the output/input and high/low state of pins. For example pin 10 on a adalogger is PORTB
with a mask of _BV(6)
. This information can be found in pins_arduino.h
. For some boards many variants get installed. I turned on verbose compiling and looked through the output there as well as looking through boards.txt
and platform.txt
. In that output I see an include to a directory with a pins_arduino.h
file but there is nothing in that file but a definition for BUILTIN_LED
.
When I run a function like digitalWrite(13,HIGH);
how does it know which registers to use for pin 13? Since my board has this pin, and digitalWrite(13, HIGH);
makes an LED light up ... it's working.