Fixed support for multiple controllers

Thanks Tim:
http://blog.tkjelectronics.dk/2012/12/xbox-360-receiver-added-to-the-usb
-host-library/#comment-262631
This commit is contained in:
Kristian Sloth Lauszus 2013-01-03 20:18:23 +01:00
parent 67b61dea17
commit 47d1a6b8b6

View file

@ -261,8 +261,8 @@ uint8_t XBOXRECV::Release() {
uint8_t XBOXRECV::Poll() {
if (!bPollEnable)
return 0;
uint16_t BUFFER_SIZE = EP_MAXPKTSIZE;
for(uint8_t i=0;i<4;i++) {
uint16_t BUFFER_SIZE = EP_MAXPKTSIZE;
switch (i) {
case 0:
pUsb->inTransfer(bAddress, epInfo[ XBOX_INPUT_PIPE_1 ].epAddr, &BUFFER_SIZE, readBuf);