For my device 4 endpoints of type bulk/interrupt are required. How I can add 2 more endpoints?
Thanks!
How to add endpoints ?
More endpoints would require a change in the assembler modules. Since the bits of the endpoint field are scattered over two bytes, we only evaluate one of them.
To distinguish more endpoints, you must reconstruct the full endpoint address, mask it and then compare. There are no spare cycles left in the 12 MHz module. It might be possible to add this feature at 16 MHz, but that's definitely not easy.
To distinguish more endpoints, you must reconstruct the full endpoint address, mask it and then compare. There are no spare cycles left in the 12 MHz module. It might be possible to add this feature at 16 MHz, but that's definitely not easy.
Thanks for the answer!
On a site http://www.recursion.jp/avrcdc/ there are source codes from 2007-07-07 in which is present usbdrvasm.S under 12, 16 and 16,5 MHz. It will not suit?
On a site http://www.recursion.jp/avrcdc/ there are source codes from 2007-07-07 in which is present usbdrvasm.S under 12, 16 and 16,5 MHz. It will not suit?
This is the latest version of our driver. Yes, it supports 4 endpoints: One control endpoint (0), two interrupt- or bulk-in endpoints and one interrupt- or bulk-out endpoint.
The interrupt-out endpoint can have the same number as one of the interrupt-in endpoints, we therefore need only one bit to distinguish them.
I had the impression that you want 4 interrupt/bulk endpoints. This is not easily possible. If you want to enable the endpoints as described above, see AVR-CDC for an example.
The interrupt-out endpoint can have the same number as one of the interrupt-in endpoints, we therefore need only one bit to distinguish them.
I had the impression that you want 4 interrupt/bulk endpoints. This is not easily possible. If you want to enable the endpoints as described above, see AVR-CDC for an example.
Correcting myself: You might be able to share endpoints even if all functions run simultaneously. You can probably use endpoint 0 for all three functions because the function can be distinguished by the request. You can also probably share the interrupt endpoint because CDC does not really require interrupts. Then the two bulk endpoints are free for CDC.
The critical question is whether you can share the interrupt-in endpoint. That's worth an experiment.
The critical question is whether you can share the interrupt-in endpoint. That's worth an experiment.