- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't unstand the API method of AltIntfcCount();
The explain is:
This function returns the number of alternate interfaces exposed by the device.
The primary interface (AltSetting == 0) is not counted as an alternate interface.
IN the descriptor it has a interface
but in the bulkloop application ,why it +1;,the result is 1
int interfaces = this->m_selectedUSBDevice->AltIntfcCount()+1;
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Interface descriptors have a bInterfaceNumber field specifying the Interface number and a bAlternateSetting which allows an interface to change settings on the fly.for example you could have device with one interface, that interface has bInterfaceNumber set to zero indicating it is the first interface descriptor and a bAlternativeSetting of zero.
Please refer to following link:"https://www.beyondlogic.org/usbnutshell/usb5.shtml#DeviceDescriptors "
Regards,
Anil Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I changed cyfxbulklpdscr's const uint8_t CyFxUSBSSConfigDscr[] __attribute__ ((aligned (32)))
as added another interface ,but when I loaded to FX3,it did work and display.Could you tell me why?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
If you increase the number of interfaces that means indirectly increases the number of devices(i.e number of interfaces proportional to the number of devices). I added two interfaces to bulkloopdescriptor file corresponding devices shows in device manager.
Explanation of your firmware: You have two interfaces in configuration descriptor and device manager shows two devices.
Device-1: Interface one has bInterfaceNumber set to zero indicating it is the first interface descriptor and a bAlternativeSetting of zero.
Device-2: Interface two would have a bInterfaceNumber set to one indicating it is the second interface and a bAlternativeSetting of zero.
Regards,
Anil Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi !
I added a interface,but it cann't find.
The result: "The device cannot start (Code 10)".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Please do small modifications in above code replace CY_FX_EP_PRODUCER2 with 0x02 and CY_FX_EP_CONSUMER2 with 0x82.
Regards,
Anil Srinivas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did it .All the same like before!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content