I have the following structure and has to write down it on the USB device.
Then to read out from it the answer.
In a synchronous mode everything works well.
Somehow most to make asynchronously?
If it is possible, help with an example
ZUM_Block *pSaveBlock = new ZUM_Block;
//*****************************************************************************************
//Write
int actual_length = 0;
r = libusb_bulk_transfer(handle, 0x4, (unsigned char*)pSaveBlock, 512, &actual_length, 0);
if (r == 0 && actual_length == 512)
{
// always Ok
}
//******************************************************************************************
//Read
memset(pSaveBlock,0,512);
actual_length = 0;
r = libusb_bulk_transfer(handle, 0x88, (unsigned char*)pSaveBlock, 512, &actual_length, 0);
if (r == 0 && actual_length == 512)
{
// always Ok
}
//*******************************************************************************************
Then to read out from it the answer.
In a synchronous mode everything works well.
Somehow most to make asynchronously?
If it is possible, help with an example
ZUM_Block *pSaveBlock = new ZUM_Block;
//*****************************************************************************************
//Write
int actual_length = 0;
r = libusb_bulk_transfer(handle, 0x4, (unsigned char*)pSaveBlock, 512, &actual_length, 0);
if (r == 0 && actual_length == 512)
{
// always Ok
}
//******************************************************************************************
//Read
memset(pSaveBlock,0,512);
actual_length = 0;
r = libusb_bulk_transfer(handle, 0x88, (unsigned char*)pSaveBlock, 512, &actual_length, 0);
if (r == 0 && actual_length == 512)
{
// always Ok
}
//*******************************************************************************************
------------------------------------------------------------------------------ Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft MVPs and experts. ON SALE this month only -- learn more at: http://p.sf.net/sfu/learnnow-d2d
_______________________________________________ libusbx-devel mailing list libusbx-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libusbx-devel