Program:
i błędy
LCD.c:10: warning: implicit declaration of function '_SFR_IO8'
LCD.c:10: error: lvalue required as left operand of assignment
LCD.c:15: error: lvalue required as left operand of assignment
Nie dołączam pliku avr.io.h i chce aby program działał. Z biblioteki avr/io.h wyciągnąłem definicje DDRB, i PORTB - ale są błędy. Jak temu zaradzić. Program ma działać ale bez bibliotek.
//#include <avr/io.h>
#define DDRB _SFR_IO8(0x17)
#define PORTB _SFR_IO8(0x18)
int main(void)
{
DDRB = 0xFF;
unsigned char i=0;
for(;;)
PORTB = i++;
}
i błędy
LCD.c:10: warning: implicit declaration of function '_SFR_IO8'
LCD.c:10: error: lvalue required as left operand of assignment
LCD.c:15: error: lvalue required as left operand of assignment
Nie dołączam pliku avr.io.h i chce aby program działał. Z biblioteki avr/io.h wyciągnąłem definicje DDRB, i PORTB - ale są błędy. Jak temu zaradzić. Program ma działać ale bez bibliotek.
