For those people unfamiliar with Pins.h, presumable those people who haven’t purchased Far Inside The Arduino or Far Inside The Arduino: Nano Every Supplement, this file describes a structure over the GPIO pin interface that is much more efficient than using pinMode, digitalRead, and digitalWrite. For instance, we can execute ddr.digital_2 = 1 to change digital pin 2 to be an output pin, port.digital_2=1 to output a high level on pin 2, and pin.digital_2 gives us the value at the pin. All three of these are single machine instructions instead of subroutine calls which execute many instructions.
I added support for the ATmega32U4, as used in the Arduino Leonardo, Arduino Micro, and Pro Micro boards. I also changed the declarations of the bits to be unsigned:1 instead of int:1 which means that pin values will be 0 or 1 rather than 0 or -1. This sometimes provides more efficient code and often less confusion. There are also declarations for digital_MOSI, digital_MISO, digital_SCK, and digital_SS. I added these since these signals are on different pins on different microcontrollers.
The download is at https://almy.us/files/Pins.zip and is, of course, free to use or distribute. It supports the ATmega328P (Uno/Nano), ATmega2560 (Mega), ATmega32U4 (Leonardo/Micro/Pro Micro), and ATmega4809 (Nano Every) microcontrollers on the boards listed, and possibly other boards as well.