Skip to content
This repository has been archived by the owner on Apr 11, 2023. It is now read-only.

Feature Request - Multiple xinput on a single board (2 or 4 players) #56

Open
leecyrille opened this issue Feb 18, 2022 · 3 comments
Open

Comments

@leecyrille
Copy link

Is it possible to provide 2 input devices from a single board? This would be a great option for arcade cabinets.

@547grbluser
Copy link

我已经实现了,运行在STM32F103 MCU

@leecyrille
Copy link
Author

我已经实现了,运行在STM32F103 MCU
image

Very cool!
Can I take a look at how you managed it?
image

@547grbluser
Copy link

547grbluser commented May 18, 2022

我可以给你双Xinput的USB配置描述符:
这组配置描述符使用端点1和端点2可以单芯片实现两个Xinput手柄。

const u8 Xbox360_Joystick_ConfigDescriptor[89] =
{

0x09, 0x02 ,0x59 ,0x00 ,0x02 ,0x01 ,0x00 ,0xC0 ,0x32 ,
	
0x09 ,0x04 ,0x00 ,0x00 ,0x02 ,0xFF ,0x5D ,0x01 ,0x00 ,
0x11 ,0x21 ,0x00 ,0x01 ,0x01 ,0x25 ,0x81/*IN1*/ ,0x14 ,0x00 ,0x00 ,0x00 ,0x00 ,0x13 ,0x01/*OUT1*/ ,0x08 ,0x00 ,0x00 ,
0x07 ,0x05 ,0x81 ,0x03 ,0x20 ,0x00 ,0x01 ,
0x07 ,0x05 ,0x01 ,0x03 ,0x20 ,0x00 ,0x08 ,

0x09 ,0x04 ,0x01 ,0x00 ,0x02 ,0xFF ,0x5D ,0x01 ,0x00 ,
0x11 ,0x21 ,0x00 ,0x01 ,0x01 ,0x25 ,0x82/*IN2*/ ,0x14 ,0x00 ,0x00 ,0x00 ,0x00 ,0x13 ,0x02/*OUT2*/ ,0x08 ,0x00 ,0x00 ,
0x07 ,0x05 ,0x82 ,0x03 ,0x20 ,0x00 ,0x01 ,
0x07 ,0x05 ,0x02 ,0x03 ,0x20 ,0x00 ,0x08 ,
	
};

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants