This is the configuration descriptor taken from (Device Monitoring Studio)
Configuration Descriptor
Number of interfaces: 1
Configuration value: 0x1
Attributes: Bus powered
Max power: 50 mA
Interface Descriptor: 0, Alternate setting: 0
Number of endpoints: 2
Interface class: 0xfe - Application Specific Interface
Interface subclass: 0x3 - Test and Measurement
Interface protocol: 0x0 - Unknown
Endpoint address 0x1, Input, Bulk, max packet size: 64 bytes
Endpoint address 0x2, Output, Bulk, max packet size: 64 bytes
I enabled the usb usbFunctionWriteOut in the usbconfig
#define USB_CFG_IMPLEMENT_FN_WRITEOUT 1
/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints.
* You must implement the function usbFunctionWriteOut() which receives all
* interrupt/bulk data sent to any endpoint other than 0. The endpoint number
* can be found in 'usbRxToken'.
*/
but when i send bulk data using usbtool
this function is never called.
in the usbdrv.c seems that usbRxToken is never <0x10
#if USB_CFG_IMPLEMENT_FN_WRITEOUT
if(usbRxToken < 0x10){ /* OUT to endpoint != 0: endpoint number in usbRxToken */
usbFunctionWriteOut(data, len);
return;
}
#endif
Anyone can explain how to use bulk out transfer ?
Tnx, Fabio.