diff options
author | root <root@circe.panaceas.james.local> | 2014-11-13 17:39:18 +0000 |
---|---|---|
committer | root <root@circe.panaceas.james.local> | 2014-11-13 17:39:18 +0000 |
commit | 5950acfb05fb3e172fa5710f1cda6ab347f51f2f (patch) | |
tree | 6188f6041b360bc37d3278dd6eac8fb3b5ec6b7d /app/kvm.c | |
parent | 12287ff0a55f929bf840dcb4780d3f77b862c434 (diff) | |
download | stm32_usb_kvm-5950acfb05fb3e172fa5710f1cda6ab347f51f2f.tar.gz stm32_usb_kvm-5950acfb05fb3e172fa5710f1cda6ab347f51f2f.tar.bz2 stm32_usb_kvm-5950acfb05fb3e172fa5710f1cda6ab347f51f2f.zip |
leds
Diffstat (limited to 'app/kvm.c')
-rw-r--r-- | app/kvm.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; } } |