Page 1 of 1

hal_queues vs. hal_buffers with USB

Posted: Sun Mar 11, 2018 2:05 pm
by tsichevski
Hi all,
I want my device to implement a simple subset of MTP (https://en.wikipedia.org/wiki/Media_Transfer_Protocol) over USB.
What is the best way to do it with ChibiOS?
I consider using the hal_serial_usb, but it is based on hal_buffers, and I cannot understand why. Why this is better than hal_queues? Besides, the later is well documented in the "ChibiOS/RT 3.0 - The Ultimate Guide", and the former is not.

Regards,
Vladimir

Re: hal_queues vs. hal_buffers with USB

Posted: Sun Mar 11, 2018 3:59 pm
by Giovanni
Hi,

hal_buffers offers better performance for blocks of data, hal_queues is byte-based, queues have been removed from RT and added to HAL, the book refers to RT 3.0, now we are at 5.0 and some things have changed, also, the book only covers RT, not HAL.

Giovanni

Re: hal_queues vs. hal_buffers with USB

Posted: Sun Mar 11, 2018 5:56 pm
by tsichevski
Giovanni wrote:Hi,

hal_buffers offers better performance for blocks of data, hal_queues is byte-based, queues have been removed from RT and added to HAL, the book refers to RT 3.0, now we are at 5.0 and some things have changed, also, the book only covers RT, not HAL.

Giovanni


Thank you, Giovanni,
so, I gather, if I do not know the package size in advance, I shall use I/O Bytes Queues: http://chibios.sourceforge.net/docs3/ha ... u_e_s.html

Regards,
Vladimir.

PS: The book is great! Do you plan to publish an updated version?

Re: hal_queues vs. hal_buffers with USB

Posted: Sun Mar 11, 2018 6:05 pm
by Giovanni
Eventually yes.

Giovanni