ATmega pin mapping macros

I'd like to see some preprocessor directives that map ATmega pins to arduino pins. For example, I'd like to use digitalRead(ATMEGA8_16) instead of looking up the pin mapping diagram to figure out than pin 16 on the ATmega is arduino pin 9.

This would be convenient for those of us building our own boards, and could be useful to those porting the arduino environment to other platforms (e.g. ATMEGA644_32 for the Sanguino project).

-j

Do you have an include file with these defines in it already?

Nope, just had the idea a day or two ago, and haven't had time to make one, or figure out where such a file would live in the Arduino ecosystem.

-j