Hey,
ich habe es wohl noch immer nicht verstanden.
Ich habe folgendes Testprogramm:
main.c:
Code:
#include <avr/io.h>
#include "incl.h"
int main (void)
{
DDRC |= (1<<PC0); //PortC 0 als Ausgang
while(1){
Modul();
}
}
incl.c:
Code:
void Modul (void){
PORTC = 0x01;
}
und incl.h:
Ich bekomme aber immer folgende Fehler:
../incl.c:2: error: 'PORTC' undeclared (first use in this function)
../incl.c:2: error: (Each undeclared identifier is reported only once
../incl.c:2: error: for each function it appears in.)
make: *** [incl.o] Error 1
Darf ich den Pin nicht im Modul auf eins setzen? Ich habe schon 3 Tutorials durchgelesen, es ffunzt aber noch immer nicht.
Ich bin für jeden Tipp dankbar.
Lesezeichen