diff options
| author | Florian Jung <flo@windfisch.org> | 2014-03-30 18:15:15 +0200 | 
|---|---|---|
| committer | Florian Jung <flo@windfisch.org> | 2014-03-30 18:15:48 +0200 | 
| commit | 0dc2a225b7716d05d0526336566e715c1d421fc5 (patch) | |
| tree | 4b986fbfb0771c93a96d3847413101666b496600 | |
| parent | 0089ffa778c2ee955c90750752c18679d7018f4c (diff) | |
toggle led works sometimes
| -rw-r--r-- | main.c | 11 | 
1 files changed, 11 insertions, 0 deletions
@@ -14,6 +14,14 @@  USB_PUBLIC uchar usbFunctionSetup(uchar data[8])  { +	usbRequest_t* rq = (usbRequest_t*) data; + +	switch(rq->bRequest) +	{ +		case 0: PORTB |= 1; break; +		case 1: PORTB &= ~1; break; +	} +  	return 0;  } @@ -43,11 +51,14 @@ int main (void)  	usbDeviceDisconnect();  	for (int i=0;i<100;i++)  	{ +		PORTB=~i;  		wdt_reset();  		_delay_ms(5);  	}  	usbDeviceConnect(); +	PORTB=~42; +  	sei();  	while(1)  | 
