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
hal_queues vs. hal_buffers with USB
-
- Posts: 35
- Joined: Fri Feb 09, 2018 12:44 am
- Has thanked: 2 times
- Been thanked: 5 times
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: hal_queues vs. hal_buffers with USB
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
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
-
- Posts: 35
- Joined: Fri Feb 09, 2018 12:44 am
- Has thanked: 2 times
- Been thanked: 5 times
Re: hal_queues vs. hal_buffers with USB
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?
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Who is online
Users browsing this forum: No registered users and 20 guests