summaryrefslogtreecommitdiffstats
path: root/quantum/serial_link/protocol/triple_buffered_object.c
diff options
context:
space:
mode:
authorskullY <skullydazed@gmail.com>2019-08-30 11:19:03 -0700
committerskullydazed <skullydazed@users.noreply.github.com>2019-08-30 15:01:52 -0700
commitb624f32f944acdc59dcb130674c09090c5c404cb (patch)
treebc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/serial_link/protocol/triple_buffered_object.c
parent61af76a10d00aba185b8338604171de490a13e3b (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.c7
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);