mirror of
https://github.com/damellis/attiny
synced 2025-08-22 17:47:08 +00:00
Merge pull request #35 from cmaglie/lib-1.5-cores
Fix core for IDE >=1.5.3
This commit is contained in:
commit
d76291d429
@ -7,6 +7,7 @@ attiny.bootloader.unlock_bits=0xff
|
|||||||
attiny.bootloader.lock_bits=0xff
|
attiny.bootloader.lock_bits=0xff
|
||||||
attiny.build.core=arduino:arduino
|
attiny.build.core=arduino:arduino
|
||||||
attiny.build.board=attiny
|
attiny.build.board=attiny
|
||||||
|
attiny.upload.tool=arduino:avrdude
|
||||||
|
|
||||||
attiny.menu.cpu.attiny45=ATtiny45
|
attiny.menu.cpu.attiny45=ATtiny45
|
||||||
attiny.menu.cpu.attiny45.upload.maximum_size=4096
|
attiny.menu.cpu.attiny45.upload.maximum_size=4096
|
||||||
|
@ -39,11 +39,18 @@
|
|||||||
// GND 4| |5 PB0 (D 0) pwm0
|
// 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 digitalPinToPCICR(p) ( ((p) >= 0 && (p) <= 4) ? (&GIMSK) : ((uint8_t *)0) )
|
||||||
#define digitalPinToPCICRbit(p) ( PCIE )
|
#define digitalPinToPCICRbit(p) ( PCIE )
|
||||||
#define digitalPinToPCMSK(p) ( ((p) <= 4) ? (&PCMSK) : ((uint8_t *)0) )
|
#define digitalPinToPCMSK(p) ( ((p) <= 4) ? (&PCMSK) : ((uint8_t *)0) )
|
||||||
#define digitalPinToPCMSKbit(p) ( (p) )
|
#define digitalPinToPCMSKbit(p) ( (p) )
|
||||||
|
|
||||||
|
#define analogPinToChannel(p) ( (p) < 6 ? (p) : (p) - 6 )
|
||||||
|
|
||||||
#ifdef ARDUINO_MAIN
|
#ifdef ARDUINO_MAIN
|
||||||
|
|
||||||
// these arrays map port names (e.g. port B) to the
|
// 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,
|
PB,
|
||||||
PB, // 5
|
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(3), /* 3 port B */
|
||||||
_BV(4),
|
_BV(4),
|
||||||
_BV(5),
|
_BV(5),
|
||||||
|
_BV(5),
|
||||||
|
_BV(2),
|
||||||
|
_BV(4),
|
||||||
|
_BV(3),
|
||||||
};
|
};
|
||||||
|
|
||||||
const uint8_t PROGMEM digital_pin_to_timer_PGM[] = {
|
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,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
|
NOT_ON_TIMER,
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user