- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello Cypress,
Could you please advise how I can identify SBC0/SBC1 of cy7c65216D if both of them are set as I2C?
I am using linux C++ cyusbserial API and want to control 12 GPIOs, do I need to grab both handles of SBC0 and SBC1?
Thanks!
Derlin
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derlin,
Please refer this KBA: https://community.infineon.com/t5/Knowledge-Base-Articles/USB-Serial-Bridge-Controller-Managing-I-Os... for managing GPIOs with API.
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derlin,
Please refer this KBA: https://community.infineon.com/t5/Knowledge-Base-Articles/USB-Serial-Bridge-Controller-Managing-I-Os... for managing GPIOs with API.
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Meghavi,
Thank you for your reply. Based on the link you sent me, there is no need for me to grab handle by checking "CY_TYPE_I2C"? as below.
Derlin
rStatus = CyGetListofDevices(&numDevices);
printf("Number of Decice: %d \n",numDevices);
if ((rStatus != CY_SUCCESS) || (numDevices == 0))
{
printf(" Did not get it");
}
for (DeviceIdx = 0; DeviceIdx < numDevices; DeviceIdx++)
{
rStatus = CyGetDeviceInfo(DeviceIdx, &DeviceInfo);
if (rStatus != CY_SUCCESS)
{
continue;
}
for (InterfaceIdx = 0; InterfaceIdx < DeviceInfo.numInterfaces; InterfaceIdx++)
{
if (DeviceInfo.deviceType[InterfaceIdx] == CY_TYPE_I2C)
{
devicenumber[indexNumber]=DeviceIdx;
interfacenum[indexNumber]=InterfaceIdx;
printf("found I2C DeviceIndex: %d, InterfaceIndex: %d \n", DeviceIdx, InterfaceIdx);
indexNumber++;
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derlin,
It is not necessary to check the Interface type. However, it won't affect any functionality if it is used.
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Meghavi,
Can I ask one more question?
When I check the devices (rStatus = CyGetListofDevices(&numDevices);), usually it will return several devices (cypress devices?? why there are many devices), then I can further check the serial number to get the device I want then grab the handle without checking the CY_TYPE_I2C?
Thanks!
Derlin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Derlin,
You can refer the function findCypressDevice() mentioned in the KBA and get the cypress devices. After getting the cypress device you can grab the handle without checking CY_TYPE_I2C.
Best Regards