From: Ze H. Z. <ze....@ma...> - 2020-04-08 11:45:46
|
Hi All I made mistake on claim usb interface { int state = usb_set_configuration(*deviceHandle, configurationValue); return state<0? usb_claim_interface(*deviceHandle, interfaceid):state; } fixed, bulk_read works fine On Wed, 1 Apr 2020 at 17:28, Ze Hou Zhang <ze....@ma...> wrote: > Hi All > I dont have a lot experience for developping embedded system. > I encounter this problem > My hardware is : > int vid = 0x24aa; > int pid = 0x1000; > std::string firmwarePartNum = "170003"; > std::string firmwareDesc = "FX2 USB Board"; > bool isSupported; > unsigned int defaultPixels = 1024; > unsigned int spectraBlockSize = 1024 * 2; > unsigned int usbDelayMS = 0; > bool hasDefaultTECSetpointDegC = false; > int defaultTECSetpointDegC = 0; > ============================================================= > int size = 512; > char* buf = new char[size]; > int endpoint = 130; > int timeout = 150; > > int isok = usb_bulk_read(*deviceHandle, endpoint, bytes, size, > timeout); > > Output: ok = -22 > Thanks > -- __ Séanadh Ríomhphoist/_ Email Disclaimer__ ** Tá an ríomhphost seo agus aon chomhad a sheoltar leis faoi rún agus is lena úsáid ag an seolaí agus sin amháin é. Is féidir tuilleadh a léamh anseo. <https://www4.dcu.ie/iss/seanadh-riomhphoist.shtml> <https://www4.dcu.ie/iss/seanadh-riomhphoist.shtml>* _ This e-mail and any files transmitted with it are confidential and are intended solely for use by the addressee. Read more here. <https://www4.dcu.ie/iss/email-disclaimer.shtml> _ *_ |