#ifndef Pins_Arduino_h
#define Pins_Arduino_h
#include <avr/pgmspace.h>
#define NUM_DIGITAL_PINS 70
#define NUM_ANALOG_INPUTS 16
#define analogInputToDigitalPin(p) ((p < 16) ? (p) + 54 : -1)
#define digitalPinHasPWM(p) (((p) >= 2 && (p) <= 13) || ((p) >= 44 && (p)<= 46))
static const uint8_t SS = 53;
static const uint8_t MOSI = 51;
static const uint8_t MISO = 50;
static const uint8_t SCK = 52;
static const uint8_t SDA = 20;
static const uint8_t SCL = 21;
static const uint8_t LED_BUILTIN = 13;
static const uint8_t A0 = 54;
static const uint8_t A1 = 55;
static const uint8_t A2 = 56;
static const uint8_t A3 = 57;
static const uint8_t A4 = 58;
static const uint8_t A5 = 59;
static const uint8_t A6 = 60;
static const uint8_t A7 = 61;
static const uint8_t A8 = 62;
static const uint8_t A9 = 63;
static const uint8_t A10 = 64;
static const uint8_t A11 = 65;
static const uint8_t A12 = 66;
static const uint8_t A13 = 67;
static const uint8_t A14 = 68;
static const uint8_t A15 = 69;
#define digitalPinToPCICR(p) ( (((p) >= 10) && ((p) <= 13)) || \
(((p) >= 50) && ((p) <= 53)) || \
(((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) )
#define digitalPinToPCICRbit(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? 0 : \
( (((p) >= 62) && ((p) <= 69)) ? 2 : \
0 ) )
#define digitalPinToPCMSK(p) ( (((p) >= 10) && ((p) <= 13)) || (((p) >= 50) && ((p) <= 53)) ? (&PCMSK0) : \
( (((p) >= 62) && ((p) <= 69)) ? (&PCMSK2) : \
((uint8_t *)0) ) )
#define digitalPinToPCMSKbit(p) ( (((p) >= 10) && ((p) <= 13)) ? ((p) - 6) : \
( ((p) == 50) ? 3 : \
( ((p) == 51) ? 2 : \
( ((p) == 52) ? 1 : \
( ((p) == 53) ? 0 : \
( (((p) >= 62) && ((p) <= 69)) ? ((p) - 62) : \
0 ) ) ) ) ) )
#ifdef ARDUINO_MAIN
const uint16_t PROGMEM port_to_mode_PGM[] = {
NOT_A_PORT,
(uint16_t) &DDRA,
(uint16_t) &DDRB,
(uint16_t) &DDRC,
(uint16_t) &DDRD,
(uint16_t) &DDRE,
(uint16_t) &DDRF,
(uint16_t) &DDRG,
(uint16_t) &DDRH,
NOT_A_PORT,
(uint16_t) &DDRJ,
(uint16_t) &DDRK,
(uint16_t) &DDRL,
};
const uint16_t PROGMEM port_to_output_PGM[] = {
NOT_A_PORT,
(uint16_t) &PORTA,
(uint16_t) &PORTB,
(uint16_t) &PORTC,
(uint16_t) &PORTD,
(uint16_t) &PORTE,
(uint16_t) &PORTF,
(uint16_t) &PORTG,
(uint16_t) &PORTH,
NOT_A_PORT,
(uint16_t) &PORTJ,
(uint16_t) &PORTK,
(uint16_t) &PORTL,
};
const uint16_t PROGMEM port_to_input_PGM[] = {
NOT_A_PIN,
(uint16_t) &PINA,
(uint16_t) &PINB,
(uint16_t) &PINC,
(uint16_t) &PIND,
(uint16_t) &PINE,
(uint16_t) &PINF,
(uint16_t) &PING,
(uint16_t) &PINH,
NOT_A_PIN,
(uint16_t) &PINJ,
(uint16_t) &PINK,
(uint16_t) &PINL,
};
const uint8_t PROGMEM digital_pin_to_port_PGM[] = {
PE , PE , PE , PE , PG , PE , PH , PH , PH , PH , PB , PB , PB , PB , PJ , PJ , PH , PH , PD , PD , PD , PD , PA , PA , PA , PA , PA , PA , PA , PA , PC , PC , PC , PC , PC , PC , PC , PC , PD , PG , PG , PG , PL , PL , PL , PL , PL , PL , PL , PL , PB , PB , PB , PB , PF , PF , PF , PF , PF , PF , PF , PF , PK , PK , PK , PK , PK , PK , PK , PK , };
const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = {
_BV( 0 ) , _BV( 1 ) , _BV( 4 ) , _BV( 5 ) , _BV( 5 ) , _BV( 3 ) , _BV( 3 ) , _BV( 4 ) , _BV( 5 ) , _BV( 6 ) , _BV( 4 ) , _BV( 5 ) , _BV( 6 ) , _BV( 7 ) , _BV( 1 ) , _BV( 0 ) , _BV( 1 ) , _BV( 0 ) , _BV( 3 ) , _BV( 2 ) , _BV( 1 ) , _BV( 0 ) , _BV( 0 ) , _BV( 1 ) , _BV( 2 ) , _BV( 3 ) , _BV( 4 ) , _BV( 5 ) , _BV( 6 ) , _BV( 7 ) , _BV( 7 ) , _BV( 6 ) , _BV( 5 ) , _BV( 4 ) , _BV( 3 ) , _BV( 2 ) , _BV( 1 ) , _BV( 0 ) , _BV( 7 ) , _BV( 2 ) , _BV( 1 ) , _BV( 0 ) , _BV( 7 ) , _BV( 6 ) , _BV( 5 ) , _BV( 4 ) , _BV( 3 ) , _BV( 2 ) , _BV( 1 ) , _BV( 0 ) , _BV( 3 ) , _BV( 2 ) , _BV( 1 ) , _BV( 0 ) , _BV( 0 ) , _BV( 1 ) , _BV( 2 ) , _BV( 3 ) , _BV( 4 ) , _BV( 5 ) , _BV( 6 ) , _BV( 7 ) , _BV( 0 ) , _BV( 1 ) , _BV( 2 ) , _BV( 3 ) , _BV( 4 ) , _BV( 5 ) , _BV( 6 ) , _BV( 7 ) , };
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
NOT_ON_TIMER , NOT_ON_TIMER , TIMER3B , TIMER3C , TIMER0B , TIMER3A , TIMER4A , TIMER4B , TIMER4C , TIMER2B , TIMER2A , TIMER1A , TIMER1B , TIMER0A , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , TIMER5C , TIMER5B , TIMER5A , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , NOT_ON_TIMER , };
#endif
#endif