Skip to content

fix serial dma rx ringbuffer position mismatch #10535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions components/drivers/include/ipc/ringbuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ struct rt_ringbuffer
* read_idx-^ ^-write_idx
*/

rt_uint32_t read_mirror : 1;
rt_uint32_t read_index : 31;
rt_uint32_t write_mirror : 1;
rt_uint32_t write_index : 31;
volatile rt_uint32_t read_mirror : 1;
volatile rt_uint32_t read_index : 31;
volatile rt_uint32_t write_mirror : 1;
volatile rt_uint32_t write_index : 31;
/* as we use msb of index as mirror bit, the size should be signed and
* could only be positive. */
rt_int32_t buffer_size;
Expand Down