summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/main.c b/main.c
index 841cba2..f7c8756 100644
--- a/main.c
+++ b/main.c
@@ -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)