Gast
#438455
dieses foo=4 wegoptimiert wird ( oder erwarte ich da zuviel ??? )
#include <avr/io.h>
uint8_t foo;
int main(void)
{
/* Setzt das Richtungsregister des Ports A auf 0xff
(alle Pins als Ausgang): */
DDRB = 0xff;
foo = 4;
/* Setzt PortA auf 0x03, Bit 0 und 1 "high", restliche "low": */
PORTB = 0x03;
}