//  leds_on.c -- turns on LEDs connected to PORTB
//  implemented and tested on an AT90S8515 & STK500 
// 
//  Copyleft (!C) 2003 S. Mann and C. Manders,
//  (http://www.gnu.org/copyleft/gpl.html)
//  based on Stephen Lacy's "mirror.c"


//#include <io-avr.h> (doesn't compile when this is there)
#include <io.h>
#include <wdt.h> 
//#include <unistd.h>

void delay(long N) {
    long n;
    for (n=0; n<N; n++);
}

int main(void) {
    wdt_disable();
    
    outp (0xFF,DDRB); /* PORTB is all output; 1 means output; 0 means input */
    outp (0x00,DDRD); /* PORTD is all input */

    //outp(0,PORTB);
    //while (1) {
	//unsigned char x, y;
	//x = inp(PIND);
	//y = 255;
	//outb(y, PORTB);
	//usleep(500000);
	//delay(500000);
	//y=255;
	//outb(y, PORTB);
	//delay(500000);
	//outb(x, PORTB);
	//delay(500000);
    //}
}

