Damellis Tiny Core: can't address pins via register name

Hello!

Just a quick question... I am trying to port a program from a tiny45 to a tiny44 using the damellis tiny core. In the tiny45 version, I was able to address the pins via their port name as in

#define LED PB2

void setup() {
  pinMode(LED, OUTPUT);
}

void loop() {
  digitalWrite(LED, HIGH);   
  delay(200);                       
  digitalWrite(LED, LOW);   
  delay(200);                 
}

This blinks the PA2 pin instead.

Is there some reason the core blocks me from using this type of naming? I know I can just use the arduino pinout as found in the tinyCore, as in

#define LED 8

but it would be easier if I could just stick to the tiny44 datasheet. Sorry if my nominclature is not quite correct, I hope my question is clear. Thanks!

You can never refer to pins in that way when using digitalWrite and the other Arduino wrappers.

All the Pxn constants are defined to n (eg, PA2 =2, PB2 = 2) by the io*.h files provided by Atmel, for the purpose of doing direct port writes, (eg PORTB|=1<<PB2).

On the tiny85, the pin mapping matches the number of those pins within the port (among other things, this reduces flash use, in addition to being more logical than any alternate mapping), so that happens to work. But that can only be the case when there’s only a single port, which is only the case on the T85 and other parts with 8 or fewer I/O pins.

On my ATTinyCore, I have PIN_xn defines that are defined to the arduino pin number of pin n on port x (eg, PIN_B2); damellis core doesn’t have that, and PIN_An defines may mean something else on other cores.