diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-09-17 11:39:43 +0900 |
commit | f8fe33acfac01064112fd2b5da680abfb5190b97 (patch) | |
tree | fcf75ef930800a948e5a3ba015d6759889f2284d /quantum/serial_link/protocol/triple_buffered_object.c | |
parent | c339d670684674165b422a0168bfd2016ff2e6ef (diff) |
clang-format changes
Diffstat (limited to 'quantum/serial_link/protocol/triple_buffered_object.c')
-rw-r--r-- | quantum/serial_link/protocol/triple_buffered_object.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/quantum/serial_link/protocol/triple_buffered_object.c b/quantum/serial_link/protocol/triple_buffered_object.c index e3e8989d30..e0c6d702a5 100644 --- a/quantum/serial_link/protocol/triple_buffered_object.c +++ b/quantum/serial_link/protocol/triple_buffered_object.c @@ -49,14 +49,13 @@ void* triple_buffer_read_internal(uint16_t object_size, triple_buffer_object_t* serial_link_lock(); if (GET_DATA_AVAILABLE()) { uint8_t shared_index = GET_SHARED_INDEX(); - uint8_t read_index = GET_READ_INDEX(); + uint8_t read_index = GET_READ_INDEX(); SET_READ_INDEX(shared_index); SET_SHARED_INDEX(read_index); SET_DATA_AVAILABLE(false); serial_link_unlock(); return object->buffer + object_size * shared_index; - } - else { + } else { serial_link_unlock(); return NULL; } @@ -70,7 +69,7 @@ void* triple_buffer_begin_write_internal(uint16_t object_size, triple_buffer_obj void triple_buffer_end_write_internal(triple_buffer_object_t* object) { serial_link_lock(); uint8_t shared_index = GET_SHARED_INDEX(); - uint8_t write_index = GET_WRITE_INDEX(); + uint8_t write_index = GET_WRITE_INDEX(); SET_SHARED_INDEX(write_index); SET_WRITE_INDEX(shared_index); SET_DATA_AVAILABLE(true); |