cyapi中同时打开多台设备,并且他的输出节点和输出节点怎么定义
int devices = USBDevice->DeviceCount();//计算设备数量
int d = 0;
if (devices)
{
do {
USBDevice->Open(d);
//device_names[d] = USBDevice->DeviceName;
device_names << USBDevice->DeviceName;
找到USBDevice->EndPoints[i]中的in端点和out端点
这里对当前设备的in_endpoint 和out_endpoint进行赋值
USBDevice->Close();
d++;
} while (d < devices);
}
假如我有四台设备,那么是不是要定义8个endpoint分别对应四个设备的输入输出节点。然后以后通信都是着8个端点进行
然后对设备1的端点初始化好以后,再对设备2的端点初始化需要close设备1吗,还是直接open设备2,然后usbdevice->EndPointCount()和USBDevice->EndPoints都是设备2 的了
相关推荐
基于QT的CYUSB3014,CYAPI的基础上位机文档介绍
This is a simple Qt app that can do transfers over USB. Prerequisites 1. Download Qt from http://qt-project.org/downloads. Make sure to specifically download Qt x.y.z for Windows (MinGW 4.8.2, OpenGL) 2. The installer comes with MinGW but if it doesn’t, then download it from http://www.mingw.org/ 3. The SuperSpeed USB Suite from Cypress. You will also need the source code for CyAPI.lib as we’ll need to recompile it Compiling CyAPI The C++ USB API from Cypress needs to be recompiled with MinGW before we use it to build our project. Extract the source code to a folder and then run the following in a command prompt: set PATH=%PATH%;C:\Qt\Tools\mingw482_32\bin mingw32-make % And this requires a Makefile with the following contents: all:
VS2013利用CyAPI驱动读取USB数据
本工程是基于VS2013平台下的,可通过调用CyAPI库来读取USB的数据。附上整个工程,可直接使用
CYAPI函数简介
CYAPI中文描述,供开发者快速上手使用!
CyApi.zip_ CyAPI_CYAPI USB_CyAPI 上位机_Cypress cyapi_cyapi
cypress,上位机开发用的,cyAPI.chm,另外里面还有开发徐加载的头文件,库文件。
CyAPI库包括CAPI.lib及CyAPI.h,cyioct.h
CyAPI.h,cyioct.h,usb100.h,usb200.h以及32位和64位的cyapi.lib,编写USB开发时必用的库


硬件/系统
