summaryrefslogtreecommitdiff
path: root/quantum/ring_buffer.h
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
committerzvecr <git@zvecr.com>2022-02-25 23:45:40 +0000
commite7931289918221081cbe2a7ea5df27a5d86324db (patch)
tree0b06145520f8aaf5ff5cb928aa5176fc2dd23619 /quantum/ring_buffer.h
parentc0ee3d2c79388187883b1b1b1d1a0b6842acf741 (diff)
parentcf31355f08dca311a013168eb3eb995e2fc6a3d1 (diff)
Merge remote-tracking branch 'origin/develop'
Diffstat (limited to 'quantum/ring_buffer.h')
-rw-r--r--quantum/ring_buffer.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/quantum/ring_buffer.h b/quantum/ring_buffer.h
index 284745ca8e..85419de11b 100644
--- a/quantum/ring_buffer.h
+++ b/quantum/ring_buffer.h
@@ -36,9 +36,13 @@ static inline uint8_t rbuf_dequeue(void) {
}
static inline bool rbuf_has_data(void) {
bool has_data;
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { has_data = (rbuf_head != rbuf_tail); }
+ ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
+ has_data = (rbuf_head != rbuf_tail);
+ }
return has_data;
}
static inline void rbuf_clear(void) {
- ATOMIC_BLOCK(ATOMIC_RESTORESTATE) { rbuf_head = rbuf_tail = 0; }
+ ATOMIC_BLOCK(ATOMIC_RESTORESTATE) {
+ rbuf_head = rbuf_tail = 0;
+ }
}