diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | Florian Didron <fdidron@users.noreply.github.com> | 2019-10-01 10:21:12 +0900 |
commit | 93f6749e06b70ba81e15f8b77e5a18675dacddfe (patch) | |
tree | fcf75ef930800a948e5a3ba015d6759889f2284d /quantum/serial_link/protocol/triple_buffered_object.h | |
parent | da34bddba16ba7a8495dc30bfe4542551ba87ed4 (diff) |
clang-format changes
Diffstat (limited to 'quantum/serial_link/protocol/triple_buffered_object.h')
-rw-r--r-- | quantum/serial_link/protocol/triple_buffered_object.h | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/quantum/serial_link/protocol/triple_buffered_object.h b/quantum/serial_link/protocol/triple_buffered_object.h index 2e57db3f50..6ec98d52bf 100644 --- a/quantum/serial_link/protocol/triple_buffered_object.h +++ b/quantum/serial_link/protocol/triple_buffered_object.h @@ -30,22 +30,18 @@ SOFTWARE. typedef struct { uint8_t state; uint8_t buffer[] __attribute__((aligned(4))); -}triple_buffer_object_t; +} triple_buffer_object_t; void triple_buffer_init(triple_buffer_object_t* object); -#define triple_buffer_begin_write(object) \ - (typeof(*object.buffer[0])*)triple_buffer_begin_write_internal(sizeof(*object.buffer[0]), (triple_buffer_object_t*)object) +#define triple_buffer_begin_write(object) (typeof(*object.buffer[0])*)triple_buffer_begin_write_internal(sizeof(*object.buffer[0]), (triple_buffer_object_t*)object) -#define triple_buffer_end_write(object) \ - triple_buffer_end_write_internal((triple_buffer_object_t*)object) +#define triple_buffer_end_write(object) triple_buffer_end_write_internal((triple_buffer_object_t*)object) -#define triple_buffer_read(object) \ - (typeof(*object.buffer[0])*)triple_buffer_read_internal(sizeof(*object.buffer[0]), (triple_buffer_object_t*)object) +#define triple_buffer_read(object) (typeof(*object.buffer[0])*)triple_buffer_read_internal(sizeof(*object.buffer[0]), (triple_buffer_object_t*)object) void* triple_buffer_begin_write_internal(uint16_t object_size, triple_buffer_object_t* object); -void triple_buffer_end_write_internal(triple_buffer_object_t* object); +void triple_buffer_end_write_internal(triple_buffer_object_t* object); void* triple_buffer_read_internal(uint16_t object_size, triple_buffer_object_t* object); - #endif |