You are here

How to receive data from two devices | Cypress Semiconductor

How to receive data from two devices

Summary: 1 Reply, Latest post by scutifer on 01 Dec 2014 04:13 PM PST
Verified Answers: 0
Last post
Log in to post new comments.
ChongHan's picture
57 posts



I would like to do a program that only read data from devices.

I plan to send a vendor command to request data from both devices and both devices will send data to host. Is it open two threading?


Best regards

Chong Han 

scutifer's picture
Cypress Employee
134 posts

Yes, you can have a separate thread for each device and do your transfers. This approach will scale to as many devices you want. It will also be easy to add >2 devices and it will prevent any one device from locking up transfers on other devices.



You can alternatively go for a simple run loop by polling all devices. It is very simple to code but can introduce a lot of delays between samples of different devices. And one failed device can hold up every other devices in your loop.

Log in to post new comments.