> Here is first level of transport API wich doesnot support large
> buffers:
>           JAYLINK_API int jaylink_jtag_io(struct
> jaylink_device_handle *devh, const uint8_t *tms, const uint8_t *tdi,
> uint8_t *tdo,
>                                                               
> uint16_t length, enum jaylink_jtag_version version)
> Length(here it is amount of bits to transfer) is 16bit variable, so
> maximum size is 8KB. I tried to fix it, but met another problem —
> USB_TIMEOUT  (i didnot inspect why it happens). 

There is a good reason why this argument is uint16_t: the underlying J-
Link protocol expects 2 bytes of length information (jtag.c:118).
The reason you get an USB timeout is that you violate the protocol by
sending more JTAG data than expected. 
 
> Concerning Architecture. I want to use asynchronous libusb API. The
> idea to make transfer asynchrounous is to use exchange time for
> preparing new buffer. I want to implement object like transfer
> manager which will prepare transfers and control its completition. It
> is possible to implement it inside ‘jaylink_jtag_io’ function, this
> function will start/add transfers and also I will need function to
> wait completing of all started transfers. I think asynchronous 
> libusb API works in separate thread so possible I will need objects
> for synchronization.

If you come up with a clear API and implementation, I'll be happy to
merge that. I have async API on the roadmap but not with a high
priority.

Best regards,
Marc



_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to