diff --git a/attiny/avr/boards.txt b/attiny/avr/boards.txt index 6445599..e48e9e0 100644 --- a/attiny/avr/boards.txt +++ b/attiny/avr/boards.txt @@ -7,6 +7,7 @@ attiny.bootloader.unlock_bits=0xff attiny.bootloader.lock_bits=0xff attiny.build.core=arduino:arduino attiny.build.board=attiny +attiny.upload.tool=arduino:avrdude attiny.menu.cpu.attiny45=ATtiny45 attiny.menu.cpu.attiny45.upload.maximum_size=4096 diff --git a/attiny/avr/variants/tiny8/pins_arduino.h b/attiny/avr/variants/tiny8/pins_arduino.h index 7e77900..e64b887 100755 --- a/attiny/avr/variants/tiny8/pins_arduino.h +++ b/attiny/avr/variants/tiny8/pins_arduino.h @@ -39,11 +39,18 @@ // GND 4| |5 PB0 (D 0) pwm0 // +----+ +static const uint8_t A0 = 6; +static const uint8_t A1 = 7; +static const uint8_t A2 = 8; +static const uint8_t A3 = 9; + #define digitalPinToPCICR(p) ( ((p) >= 0 && (p) <= 4) ? (&GIMSK) : ((uint8_t *)0) ) #define digitalPinToPCICRbit(p) ( PCIE ) #define digitalPinToPCMSK(p) ( ((p) <= 4) ? (&PCMSK) : ((uint8_t *)0) ) #define digitalPinToPCMSKbit(p) ( (p) ) +#define analogPinToChannel(p) ( (p) < 6 ? (p) : (p) - 6 ) + #ifdef ARDUINO_MAIN // these arrays map port names (e.g. port B) to the @@ -74,6 +81,10 @@ const uint8_t PROGMEM digital_pin_to_port_PGM[] = { PB, PB, PB, // 5 + PB, // A0 + PB, + PB, + PB, // A4 }; @@ -84,7 +95,10 @@ const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { _BV(3), /* 3 port B */ _BV(4), _BV(5), - + _BV(5), + _BV(2), + _BV(4), + _BV(3), }; const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { @@ -94,6 +108,10 @@ const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { NOT_ON_TIMER, NOT_ON_TIMER, NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, }; #endif