From 5950acfb05fb3e172fa5710f1cda6ab347f51f2f Mon Sep 17 00:00:00 2001 From: root Date: Thu, 13 Nov 2014 17:39:18 +0000 Subject: leds --- app/kvm.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'app/kvm.c') diff --git a/app/kvm.c b/app/kvm.c index 3c8a900..54346bb 100644 --- a/app/kvm.c +++ b/app/kvm.c @@ -26,8 +26,13 @@ kvm_dispatch (void) addr, endpoint, len, buf[0], buf[1], buf[2], buf[3]); #endif - if (len) + if (len) { + if (endpoint==0x81) + led_set(GPIO8); + else + led_set(GPIO9); usbd_ep_write_packet (usbd_dev, endpoint, buf, len); + } } void @@ -82,10 +87,12 @@ kvm_recv (uint8_t d) buf[ptr++] = d; if (ptr >= len) { - if (!addr) + if (addr==BUS_ID) kvm_dispatch (); state = STATE_SYNC; } break; + default: + break; } } -- cgit v1.2.3