Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
9
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
Jacob Vosmaer
crowbx
Commits
c9107676
Commit
c9107676
authored
Aug 13, 2020
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make ring buffer increment easier to read
parent
48b66f9b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
crowbx.c
crowbx.c
+4
-4
No files found.
crowbx.c
View file @
c9107676
...
...
@@ -561,8 +561,8 @@ static struct {
void
uart_buffer_push
(
uint8_t
x
)
{
ATOMIC_BLOCK
(
ATOMIC_RESTORESTATE
)
{
uart_buffer
.
data
[
uart_buffer
.
tail
]
=
x
;
uart_buffer
.
tail
=
(
uart_buffer
.
tail
+
1
)
%
ARRAY_SIZE
(
uart_buffer
.
data
);
uart_buffer
.
tail
++
;
uart_buffer
.
tail
%
=
ARRAY_SIZE
(
uart_buffer
.
data
);
}
}
...
...
@@ -573,8 +573,8 @@ uint8_t uart_buffer_pop(uint8_t *x) {
}
*
x
=
uart_buffer
.
data
[
uart_buffer
.
head
];
uart_buffer
.
head
=
(
uart_buffer
.
head
+
1
)
%
ARRAY_SIZE
(
uart_buffer
.
data
);
uart_buffer
.
head
++
;
uart_buffer
.
head
%
=
ARRAY_SIZE
(
uart_buffer
.
data
);
}
return
true
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment