avr-gcc-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] GCC Functions


From: Patrick Lanphier
Subject: [avr-gcc-list] GCC Functions
Date: Wed, 28 Nov 2001 09:08:05 -0500 (EST)

Thanks everyone for the help but things are still not working.  It has to
do with the function or the global variable.  If you toggle between the
lines you will see this.  Thank you very much for your help.

  led1();
  //ledlight = 0


/*
*************************************************************************
avr-gcc -O0 -Wall -mmcu=at90s2313 -c demo2c.c -o demo1.o
avr-gcc -o demo1.elf demo1.o
avr-objcopy -O ihex demo1.elf demo1.hex
**************************************************************************
*/

#include <io2313.h>
#include <interrupt.h>
typedef unsigned char BYTE;

void led1(void);
BYTE ledlight;

void led1(void){
  ledlight = 0;// = 0x00;
}

int main(void) {
  outp(255, DDRB);           // port B all outputs
  outp(255, PORTB);          // turn all leds off

  led1();
  //ledlight = 0;

  for(;;){
    outp(ledlight, PORTB);        // turn led on
  }
}

Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
  fax: 800-582-9710






reply via email to

[Prev in Thread] Current Thread [Next in Thread]