- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi
if i use wordwide =1 in slavefifo mode, what am i do for read in windwos application program?
i usually use like below in wordwide=0,
if (USBDevice->BulkInEndPt)
USBDevice->BulkInEndPt->XferData(buf, length);
buf have [512] array and length is 512.
but, if i use wordwide =1, what am i setting value for buf array count and length value ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You must set the length in bytes.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What you mean bytes?
Could you please let me know more detail?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
it looks like:
UCHAR buf[512];
length = sizeof(buf);
USBDevice->BulkInEndPt->XferData(buf, length);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You mean that i shoud use same value length and buf[]. Right?
Then if i use 16bitmode , how to out data from xferdata()?
If original data is 0x1618, buf arrary data have like this ? buf[0]=0x16 buf[1]=0x18?
Or buf[0]= 0x1618 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in my opinion the 16 mode is only important in the development of hardware and firmware (program inside chip). not important in the development of software.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
one more example:
union{
UCHAR buf[512];
short int bufshort[256];
};
bufshort[0] = 0x1234;// you can write short int directly to buf
.....
length = sizeof(buf);
USBDevice->BulkInEndPt->XferData(buf, length);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm not sure.
Please let me know my question.
Which one ? buf[0]= 0x1234 or buf[0]=0x12 and buf[1]=0x34 ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Oh i see thanks a lot