#include #include #include enum { PB = 2, PC = 3, PD = 4, PE = 5, PF = 6, PG = 7, }; extern "C" { const uint16_t PROGMEM port_to_mode_PGM[] __attribute__((used)) = { NOT_A_PORT, NOT_A_PORT, (uint16_t)&DDRB, NOT_A_PORT, (uint16_t)&DDRD, (uint16_t)&DDRE, (uint16_t)&DDRF, (uint16_t)&DDRG, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, }; const uint16_t PROGMEM port_to_output_PGM[] __attribute__((used)) = { NOT_A_PORT, NOT_A_PORT, (uint16_t)&PORTB, NOT_A_PORT, (uint16_t)&PORTD, (uint16_t)&PORTE, (uint16_t)&PORTF, (uint16_t)&PORTG, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, NOT_A_PORT, }; const uint16_t PROGMEM port_to_input_PGM[] __attribute__((used)) = { NOT_A_PIN, NOT_A_PIN, NOT_A_PIN, (uint16_t)&PINC, (uint16_t)&PIND, (uint16_t)&PINE, (uint16_t)&PINF, (uint16_t)&PING, NOT_A_PIN, NOT_A_PIN, NOT_A_PIN, NOT_A_PIN, NOT_A_PIN, }; const uint8_t PROGMEM digital_pin_to_port_PGM[] __attribute__((used)) = { PE, PE, PE, PE, PE, PE, PE, PE, PB, PB, PB, PB, PB, PB, PD, PD, PG, PG, PG, PG, PD, PD, PD, PD, PD, PD, PF, PF, PF, PF, PF, PF, PF, PF, PB, PB, }; const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] __attribute__((used)) = { _BV(0), _BV(1), _BV(2), _BV(3), _BV(4), _BV(5), _BV(6), _BV(7), _BV(5), _BV(4), _BV(0), _BV(2), _BV(3), _BV(1), _BV(1), _BV(0), _BV(0), _BV(1), _BV(2), _BV(5), _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), _BV(6), _BV(7), }; const uint8_t PROGMEM digital_pin_to_timer_PGM[] __attribute__((used)) = { NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, TIMER3A, TIMER3B, TIMER3C, NOT_ON_TIMER, NOT_ON_TIMER, TIMER1A, TIMER2A, 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, TIMER0B, 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, TIMER1B, TIMER1C, }; }