diff options
author | skullY <skullydazed@gmail.com> | 2019-08-30 11:19:03 -0700 |
---|---|---|
committer | skullydazed <skullydazed@users.noreply.github.com> | 2019-08-30 15:01:52 -0700 |
commit | b624f32f944acdc59dcb130674c09090c5c404cb (patch) | |
tree | bc13adbba137d122d9a2c2fb2fafcbb08ac10e25 /quantum/serial_link/protocol/frame_router.c | |
parent | 61af76a10d00aba185b8338604171de490a13e3b (diff) |
clang-format changes
Diffstat (limited to 'quantum/serial_link/protocol/frame_router.c')
-rw-r--r-- | quantum/serial_link/protocol/frame_router.c | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/quantum/serial_link/protocol/frame_router.c b/quantum/serial_link/protocol/frame_router.c index 04b8c2e75c..5292673700 100644 --- a/quantum/serial_link/protocol/frame_router.c +++ b/quantum/serial_link/protocol/frame_router.c @@ -28,26 +28,22 @@ SOFTWARE. static bool is_master; -void router_set_master(bool master) { - is_master = master; -} +void router_set_master(bool master) { is_master = master; } -void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size){ +void route_incoming_frame(uint8_t link, uint8_t* data, uint16_t size) { if (is_master) { if (link == DOWN_LINK) { - transport_recv_frame(data[size-1], data, size - 1); + transport_recv_frame(data[size - 1], data, size - 1); } - } - else { + } else { if (link == UP_LINK) { - if (data[size-1] & 1) { + if (data[size - 1] & 1) { transport_recv_frame(0, data, size - 1); } - data[size-1] >>= 1; + data[size - 1] >>= 1; validator_send_frame(DOWN_LINK, data, size); - } - else { - data[size-1]++; + } else { + data[size - 1]++; validator_send_frame(UP_LINK, data, size); } } @@ -59,8 +55,7 @@ void router_send_frame(uint8_t destination, uint8_t* data, uint16_t size) { data[size] = 1; validator_send_frame(UP_LINK, data, size + 1); } - } - else { + } else { if (is_master) { data[size] = destination; validator_send_frame(DOWN_LINK, data, size + 1); |