summary refs log tree commit diff
path: root/quantum/split_common/split_util.c
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2022-02-12 10:29:31 -0800
committerGitHub <noreply@github.com>2022-02-12 18:29:31 +0000
commit63646e8906e062d1c1de3925cba70c4e3426a855 (patch)
tree4e91648b77b838e1125cf86331d7e84bde6d07a9 /quantum/split_common/split_util.c
parentafcdd7079c774dec2aa4b7f2d08adf8b7310919b (diff)
Format code according to conventions (#16322)
Diffstat (limited to 'quantum/split_common/split_util.c')
-rw-r--r--quantum/split_common/split_util.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/quantum/split_common/split_util.c b/quantum/split_common/split_util.c
index 35f0a9d181..7d50adf758 100644
--- a/quantum/split_common/split_util.c
+++ b/quantum/split_common/split_util.c
@@ -43,14 +43,14 @@
 // Set to 0 to disable the disconnection check altogether.
 #ifndef SPLIT_MAX_CONNECTION_ERRORS
 #    define SPLIT_MAX_CONNECTION_ERRORS 10
-#endif  // SPLIT_MAX_CONNECTION_ERRORS
+#endif // SPLIT_MAX_CONNECTION_ERRORS
 
 // How long (in milliseconds) to block all connection attempts after the communication has been flagged as disconnected.
 // One communication attempt will be allowed everytime this amount of time has passed since the last attempt. If that attempt succeeds, the communication is seen as working again.
 // Set to 0 to disable communication throttling while disconnected
 #ifndef SPLIT_CONNECTION_CHECK_TIMEOUT
 #    define SPLIT_CONNECTION_CHECK_TIMEOUT 500
-#endif  // SPLIT_CONNECTION_CHECK_TIMEOUT
+#endif // SPLIT_CONNECTION_CHECK_TIMEOUT
 
 static uint8_t connection_errors = 0;
 
@@ -68,7 +68,9 @@ static bool usbIsActive(void) {
     return false;
 }
 #else
-static inline bool usbIsActive(void) { return usb_vbus_state(); }
+static inline bool usbIsActive(void) {
+    return usb_vbus_state();
+}
 #endif
 
 #ifdef SPLIT_HAND_MATRIX_GRID
@@ -83,7 +85,7 @@ static uint8_t peek_matrix_intersection(pin_t out_pin, pin_t in_pin) {
     uint8_t pin_state = readPin(in_pin);
     // Set out_pin to a setting that is less susceptible to noise.
     setPinInputHigh(out_pin);
-    matrix_io_delay();  // Wait for the pull-up to go HIGH.
+    matrix_io_delay(); // Wait for the pull-up to go HIGH.
     return pin_state;
 }
 #endif
@@ -158,7 +160,9 @@ void split_post_init(void) {
     }
 }
 
-bool is_transport_connected(void) { return connection_errors < SPLIT_MAX_CONNECTION_ERRORS; }
+bool is_transport_connected(void) {
+    return connection_errors < SPLIT_MAX_CONNECTION_ERRORS;
+}
 
 bool transport_master_if_connected(matrix_row_t master_matrix[], matrix_row_t slave_matrix[]) {
 #if SPLIT_MAX_CONNECTION_ERRORS > 0 && SPLIT_CONNECTION_CHECK_TIMEOUT > 0
@@ -169,7 +173,7 @@ bool transport_master_if_connected(matrix_row_t master_matrix[], matrix_row_t sl
     if (is_disconnected && timer_elapsed(connection_check_timer) < SPLIT_CONNECTION_CHECK_TIMEOUT) {
         return false;
     }
-#endif  // SPLIT_MAX_CONNECTION_ERRORS > 0 && SPLIT_CONNECTION_CHECK_TIMEOUT > 0
+#endif // SPLIT_MAX_CONNECTION_ERRORS > 0 && SPLIT_CONNECTION_CHECK_TIMEOUT > 0
 
     __attribute__((unused)) bool okay = transport_master(master_matrix, slave_matrix);
 #if SPLIT_MAX_CONNECTION_ERRORS > 0
@@ -186,10 +190,10 @@ bool transport_master_if_connected(matrix_row_t master_matrix[], matrix_row_t sl
         return connected;
     } else if (is_disconnected) {
         dprintln("Target connected");
-#    endif  // SPLIT_CONNECTION_CHECK_TIMEOUT > 0
+#    endif // SPLIT_CONNECTION_CHECK_TIMEOUT > 0
     }
 
     connection_errors = 0;
-#endif  // SPLIT_MAX_CONNECTION_ERRORS > 0
+#endif // SPLIT_MAX_CONNECTION_ERRORS > 0
     return true;
 }