123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200 |
-
-
- #include <avr/io.h>
- #include "wiring_private.h"
- #include "pins_arduino.h"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- #define PA 1
- #define PB 2
- #define PC 3
- #define PD 4
-
-
-
-
- const uint8_t PROGMEM port_to_mode_PGM[] =
- {
- NOT_A_PORT,
- (uint8_t) &DDRA,
- (uint8_t) &DDRB,
- (uint8_t) &DDRC,
- (uint8_t) &DDRD,
- };
-
- const uint8_t PROGMEM port_to_output_PGM[] =
- {
- NOT_A_PORT,
- (uint8_t) &PORTA,
- (uint8_t) &PORTB,
- (uint8_t) &PORTC,
- (uint8_t) &PORTD,
- };
-
- const uint8_t PROGMEM port_to_input_PGM[] =
- {
- NOT_A_PORT,
- (uint8_t) &PINA,
- (uint8_t) &PINB,
- (uint8_t) &PINC,
- (uint8_t) &PIND,
- };
-
- const uint8_t PROGMEM digital_pin_to_port_PGM[] =
- {
- PB,
- PB,
- PB,
- PB,
- PB,
- PB,
- PB,
- PB,
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PD,
- PC,
- PC,
- PC,
- PC,
- PC,
- PC,
- PC,
- PC,
- PA,
- PA,
- PA,
- PA,
- PA,
- PA,
- PA,
- PA
- };
-
- const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] =
- {
- _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),
- _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)
- };
-
- const uint8_t PROGMEM digital_pin_to_timer_PGM[] =
- {
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- TIMER0A,
- TIMER0B,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- TIMER1B,
- TIMER1A,
- TIMER2B,
- 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,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER,
- NOT_ON_TIMER
- };
|