Hallo Programmierer,

Ich mache ofters ein programmierfehler...
zum Beispiel:

TCCR1A|=(1<<WGM13);

obwohl WGM13 ein bit von TCCR1B ist und nicht von TCCR1A.

Mit
typedef enum{
myWGM10=0x01,
myWGM11=0x02
}teTCCR1A;

typedef enum{
myWGM12=0x08,
myWGM13=0x10
}teTCCR1B;

teTCCR1A myTCCR1A;
teTCCR1B myTCCR1B;

mochte Ich das losen, aber bei

myTCCR1A=myWGM13;

gibt die Compiler keine Fehlmeldung.

Borland C Compiler gibt bei so etwas ein Compile Error

Hat da Jemand ein gutes Idee?

Gruss,

Henk