zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
10.03k stars 6.17k forks source link

Port drivers to use sys/ring_buffer #21155

Open ceolin opened 4 years ago

ceolin commented 4 years ago

There are some drivers that are implementing their own ring_buffer, there are cases where even functions names are colliding with sys/ring_buffer.

Drivers doing it: drivers/ethernet/eth_sam_gmac.c drivers/i2s/i2s_sam_ssc.c drivers/i2s/i2s_ll_stm32.h

nandojve commented 3 years ago

CC: @mnkp

psarvesh commented 2 years ago

I have worked on one minor issue (in Zephyr) before and would be interested in trying this particular issue out as well if no one else is working on it.

The task seems fairly straightforward. What would be a good way to test that my commits work as expected? I have STM32F446RE Nucleo Board. But I don't think I can test any of the above files on it (since it does not have i2s or ethernet).

nashif commented 2 years ago

to test this, you will need a platform that uses the above drivers..

wolterhv commented 2 years ago

So, to solve this issue, we need to be able to test it (at least)

It seems to me however that this would be a final validation test. In the meantime, I don't see why the replacement of the ring buffer couldn't be unit tested to verify functional equivalence with the current implementation. What do you think about this @nashif ?

Spice-Weasel commented 8 months ago

Think I've got a couple ATSAM boards that I can try this on, not supported devkits though.

nandojve commented 8 months ago

I can help with network test for SAM. I don't have a way to test SSC driver but if it uses the same approach from networking I think solution will be similar and we can move forward to replace for the SAM's.