On 11/26/14 14:25, Andreas Höschler wrote:

#define F_CPU 16000000UL  /* 16 MHz CPU clock */
#include <avr/io.h>
#include <util/delay.h>
#define OUTPUTPORT PORTB
#define OUTPUTPIN PB7
int main (void) {
  DDRB = 0xff;          // all outputs
  while (1)                       /* loop forever */
        {
      if ((PORTB & _BV(PB7)) > 0) PORTB &= ~_BV(PB7);
      else PORTB |= _BV(PB7);
      _delay_ms(500);
        }
  return (0);
}


> avr-gcc -mmcu=atmega2560 -Wall -O2 -I /usr/lib/avr/include/ main.c

No errors.

Tom Dean

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to