Receiving HID data from computer

Technical questions regarding the XTC tools and programming with XMOS.
Post Reply
jon_harris7
Newbie
Posts: 1
Joined: Mon Sep 26, 2022 9:16 pm

Receiving HID data from computer

Post by jon_harris7 »

I am looking for information about receiving USB HID messages sent by a computer: PC -> XMOS. There are lots of answers and articles about the other direction, sending from XMOS -> PC. But less so about the opposite direction. An example would be a conferencing product sending a notification about an incoming call to the XMOS. Or the computer sending a message to turn on a LED on a peripheral.
Any information or examples on how to set up XMOS endpoints to do this? I will be integrating this with audio functionality.


RitchRock
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

HI there, I was able to do this. Happy to help with any specific issues you might have. I would start with this app note: https://www.xmos.ai/download/AN00129:-U ... .2rc1).pdf
User avatar
Ross
XCore Expert
Posts: 962
Joined: Thu Dec 10, 2009 9:20 pm
Location: Bristol, UK

Post by Ross »

I haven't personally done this - I do know customers that have though. It shouldn't be too hard.

- first step would be to add the descriptors
- figure out how to get host to send HID messages to device (this may be super easy or less so, I'm not sure without investigation - probably depends on the OS)
- add HID EP handling code to device
- add HID data handling code to device
RitchRock
XCore Addict
Posts: 186
Joined: Tue Jan 17, 2017 9:25 pm

Post by RitchRock »

Simple HID Write is the test program I use on Windows host for development. http://janaxelson.com/hidpage.htm
Post Reply