Why does the following code not work in Arduino?
#include<avr/io.h>
void setup()
{
DDRA = 0xFF;
}
void loop()
{
PORTA = 0xAA;
_delay_ms(1000);
PORTA = 0x55;
_delay_ms(1000);
}
I get the following error. "DDRA was not declared in this scope."
As I know, arduino uses AVR microcontrollers, so why can't we use AVR code in arduino boards?