summaryrefslogtreecommitdiffstats
path: root/app/kvm.c
diff options
context:
space:
mode:
authorroot <root@circe.panaceas.james.local>2014-11-13 17:39:18 +0000
committerroot <root@circe.panaceas.james.local>2014-11-13 17:39:18 +0000
commit5950acfb05fb3e172fa5710f1cda6ab347f51f2f (patch)
tree6188f6041b360bc37d3278dd6eac8fb3b5ec6b7d /app/kvm.c
parent12287ff0a55f929bf840dcb4780d3f77b862c434 (diff)
downloadstm32_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.c11
1 files changed, 9 insertions, 2 deletions
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;
}
}