[Top][All Lists]
[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: |
Mon, 26 Nov 2001 10:40:01 -0500 (EST) |
It appears that when I start using functions the code stops working. Why?
/*
*************************************************************************
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>
void led1(void);
int ledlight;
int main(void) {
outp(0xff, DDRB); // port B all outputs
outp(0xff, PORTB); // turn all leds off
led1();
for(;;){
outp(ledlight, PORTB); // turn led on
}
}
void led1(void){
ledlight = 0x0;
};
Patrick Lanphier
The Artemis Group
http://www.artemisgroup.com
phone: 814-235-0444
fax: 800-582-9710
- [avr-gcc-list] GCC Functions,
Patrick Lanphier <=