summaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorzvecr <git@zvecr.com>2019-11-17 14:02:26 +0000
committerDrashna Jaelre <drashna@live.com>2019-11-17 08:25:58 -0800
commita91c0c476507cb8c12840abb59bff34ab0de3c03 (patch)
tree313d9a0ec2f17c47f33305b350eef8768b5efa1c /quantum
parent6b18ca2875ceb38011f32f2d17238ba55ce7ad67 (diff)
Run clang-format manually to fix recently changed files
Diffstat (limited to 'quantum')
-rw-r--r--quantum/backlight/backlight_avr.c2
-rw-r--r--quantum/config_common.h39
-rw-r--r--quantum/dip_switch.c37
-rw-r--r--quantum/encoder.c8
-rw-r--r--quantum/keymap_extras/keymap_italian.h54
-rw-r--r--quantum/keymap_extras/keymap_italian_osx_ansi.h60
-rw-r--r--quantum/keymap_extras/keymap_italian_osx_iso.h60
-rw-r--r--quantum/process_keycode/process_tap_dance.h6
-rw-r--r--quantum/quantum.c2
-rw-r--r--quantum/quantum.h5
-rw-r--r--quantum/quantum_keycodes.h2
-rw-r--r--quantum/rgblight.c2
-rw-r--r--quantum/stm32/chconf.h39
13 files changed, 159 insertions, 157 deletions
diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c
index 648a37adf3..edda6ea0b6 100644
--- a/quantum/backlight/backlight_avr.c
+++ b/quantum/backlight/backlight_avr.c
@@ -191,7 +191,7 @@ void backlight_off(pin_t backlight_pin) {
# define FOR_EACH_LED(x) \
for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \
- pin_t backlight_pin = backlight_pins[i]; \
+ pin_t backlight_pin = backlight_pins[i]; \
{ x } \
}
diff --git a/quantum/config_common.h b/quantum/config_common.h
index f42df6357d..c1c1d4bd42 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -303,25 +303,26 @@
UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
sei(); \
} while (0)
-# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
-# define SERIAL_UART_BAUD 115200
-# define SERIAL_UART_DATA UDR1
- /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */
-# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1)
-# define SERIAL_UART_RXD_VECT USART1_RX_vect
-# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
-# define SERIAL_UART_INIT() do { \
- UCSR1A = _BV(U2X1); \
- /* baud rate */ \
- UBRR1L = SERIAL_UART_UBRR; \
- /* baud rate */ \
- UBRR1H = SERIAL_UART_UBRR >> 8; \
- /* enable TX */ \
- UCSR1B = _BV(TXEN1); \
- /* 8-bit data */ \
- UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
- sei(); \
- } while(0)
+# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
+# define SERIAL_UART_BAUD 115200
+# define SERIAL_UART_DATA UDR1
+/* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */
+# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1)
+# define SERIAL_UART_RXD_VECT USART1_RX_vect
+# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
+# define SERIAL_UART_INIT() \
+ do { \
+ UCSR1A = _BV(U2X1); \
+ /* baud rate */ \
+ UBRR1L = SERIAL_UART_UBRR; \
+ /* baud rate */ \
+ UBRR1H = SERIAL_UART_UBRR >> 8; \
+ /* enable TX */ \
+ UCSR1B = _BV(TXEN1); \
+ /* 8-bit data */ \
+ UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
+ sei(); \
+ } while (0)
# else
# error "USART configuration is needed."
# endif
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c
index 3b5a8dadc9..ab74222d10 100644
--- a/quantum/dip_switch.c
+++ b/quantum/dip_switch.c
@@ -21,40 +21,33 @@
// for memcpy
#include <string.h>
-
#if !defined(DIP_SWITCH_PINS)
-# error "No DIP switch pads defined by DIP_SWITCH_PINS"
+# error "No DIP switch pads defined by DIP_SWITCH_PINS"
#endif
-#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad)/sizeof(pin_t))
-static pin_t dip_switch_pad[] = DIP_SWITCH_PINS;
-static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 };
-static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 };
-
+#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(pin_t))
+static pin_t dip_switch_pad[] = DIP_SWITCH_PINS;
+static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
+static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
-__attribute__((weak))
-void dip_switch_update_user(uint8_t index, bool active) {}
+__attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {}
-__attribute__((weak))
-void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); }
+__attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); }
-__attribute__((weak))
-void dip_switch_update_mask_user(uint32_t state) {}
+__attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {}
-__attribute__((weak))
-void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); }
+__attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); }
void dip_switch_init(void) {
- for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) {
- setPinInputHigh(dip_switch_pad[i]);
- }
- dip_switch_read(true);
+ for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) {
+ setPinInputHigh(dip_switch_pad[i]);
+ }
+ dip_switch_read(true);
}
-
void dip_switch_read(bool forced) {
- bool has_dip_state_changed = false;
- uint32_t dip_switch_mask = 0;
+ bool has_dip_state_changed = false;
+ uint32_t dip_switch_mask = 0;
for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) {
dip_switch_state[i] = !readPin(dip_switch_pad[i]);
diff --git a/quantum/encoder.c b/quantum/encoder.c
index e86a0045c6..4aeb3d0cde 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -37,8 +37,8 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B;
static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0};
-static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
-static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0};
+static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
+static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0};
#ifdef SPLIT_KEYBOARD
// right half encoders come over as second set of encoders
@@ -84,7 +84,7 @@ static void encoder_update(int8_t index, uint8_t state) {
encoder_value[index]++;
encoder_update_kb(index, true);
}
- if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
+ if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
encoder_value[index]--;
encoder_update_kb(index, false);
}
@@ -109,7 +109,7 @@ void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_valu
void encoder_update_raw(uint8_t* slave_state) {
for (int i = 0; i < NUMBER_OF_ENCODERS; i++) {
uint8_t index = i + thatHand;
- int8_t delta = slave_state[i] - encoder_value[index];
+ int8_t delta = slave_state[i] - encoder_value[index];
while (delta > 0) {
delta--;
encoder_value[index]++;
diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h
index a8c03b884f..063700aa0b 100644
--- a/quantum/keymap_extras/keymap_italian.h
+++ b/quantum/keymap_extras/keymap_italian.h
@@ -78,36 +78,36 @@
#define IT_MINS KC_SLSH // - and _
// shifted characters
-#define IT_DEGR LSFT(IT_AACC) // °
-#define IT_EXLM LSFT(KC_1) // !
-#define IT_DQOT LSFT(KC_2) // "
-#define IT_STRL LSFT(KC_3) // £
-#define IT_DLR LSFT(KC_4) // $
-#define IT_PERC LSFT(KC_5) // %
-#define IT_AMPR LSFT(KC_6) // &
-#define IT_SLSH LSFT(KC_7) // /
-#define IT_LPRN LSFT(KC_8) // (
-#define IT_RPRN LSFT(KC_9) // )
-#define IT_EQL LSFT(KC_0) // =
-#define IT_QST LSFT(IT_APOS) // ?
-#define IT_CRC LSFT(IT_IACC) // ^
-#define IT_ASTR LSFT(IT_PLUS) // *
-#define IT_MORE LSFT(IT_LESS) // >
-#define IT_COLN LSFT(IT_DOT) // :
-#define IT_SCLN LSFT(IT_COMM) // ;
-#define IT_UNDS LSFT(IT_MINS) // _
+#define IT_DEGR LSFT(IT_AACC) // °
+#define IT_EXLM LSFT(KC_1) // !
+#define IT_DQOT LSFT(KC_2) // "
+#define IT_STRL LSFT(KC_3) // £
+#define IT_DLR LSFT(KC_4) // $
+#define IT_PERC LSFT(KC_5) // %
+#define IT_AMPR LSFT(KC_6) // &
+#define IT_SLSH LSFT(KC_7) // /
+#define IT_LPRN LSFT(KC_8) // (
+#define IT_RPRN LSFT(KC_9) // )
+#define IT_EQL LSFT(KC_0) // =
+#define IT_QST LSFT(IT_APOS) // ?
+#define IT_CRC LSFT(IT_IACC) // ^
+#define IT_ASTR LSFT(IT_PLUS) // *
+#define IT_MORE LSFT(IT_LESS) // >
+#define IT_COLN LSFT(IT_DOT) // :
+#define IT_SCLN LSFT(IT_COMM) // ;
+#define IT_UNDS LSFT(IT_MINS) // _
// Alt Gr-ed characters
-#define IT_LCBR ALGR(KC_7) // {
-#define IT_LBRC ALGR(IT_EACC) // [
-#define IT_RBRC ALGR(IT_PLUS) // ]
-#define IT_RCBR ALGR(KC_0) // }
-#define IT_AT ALGR(IT_OACC) // @
-#define IT_EURO ALGR(KC_E) // €
-#define IT_PIPE LSFT(IT_BSLS) // |
-#define IT_SHRP ALGR(IT_AACC) // #
+#define IT_LCBR ALGR(KC_7) // {
+#define IT_LBRC ALGR(IT_EACC) // [
+#define IT_RBRC ALGR(IT_PLUS) // ]
+#define IT_RCBR ALGR(KC_0) // }
+#define IT_AT ALGR(IT_OACC) // @
+#define IT_EURO ALGR(KC_E) // €
+#define IT_PIPE LSFT(IT_BSLS) // |
+#define IT_SHRP ALGR(IT_AACC) // #
// Deprecated
-#define IT_X_PLUS X_RBRACKET // #
+#define IT_X_PLUS X_RBRACKET // #
#endif
diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h
index 2b7160ff33..fa12d05dce 100644
--- a/quantum/keymap_extras/keymap_italian_osx_ansi.h
+++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h
@@ -65,7 +65,7 @@
#define IT_COMM KC_COMM // , and ;
#define IT_APOS KC_MINS // ' and ?
#define IT_BSLS KC_NUBS // \ and |
-#define IT_LESS KC_GRV // < and >
+#define IT_LESS KC_GRV // < and >
#define IT_MINS KC_SLSH // - and _
// accented vowels (regular, with shift, with option, with option and shift)
@@ -77,37 +77,37 @@
#define IT_IACC KC_EQL // ì, ^, ˆ, ±
// shifted characters
-#define IT_EXLM LSFT(KC_1) // !
-#define IT_DQOT LSFT(KC_2) // "
-#define IT_STRL LSFT(KC_3) // £
-#define IT_DLR LSFT(KC_4) // $
-#define IT_PERC LSFT(KC_5) // %
-#define IT_AMPR LSFT(KC_6) // &
-#define IT_SLSH LSFT(KC_7) // /
-#define IT_LPRN LSFT(KC_8) // (
-#define IT_RPRN LSFT(KC_9) // )
-#define IT_EQL LSFT(KC_0) // =
-#define IT_DEGR LSFT(IT_AACC) // °
-#define IT_QST LSFT(IT_APOS) // ?
-#define IT_CRC LSFT(IT_IACC) // ^
-#define IT_ASTR LSFT(IT_PLUS) // *
-#define IT_MORE LSFT(IT_LESS) // >
-#define IT_COLN LSFT(IT_DOT) // :
-#define IT_SCLN LSFT(IT_COMM) // ;
-#define IT_UNDS LSFT(IT_MINS) // _
-#define IT_LCBR LSFT(IT_LBRC) // {
-#define IT_RCBR LSFT(IT_RBRC) // }
-#define IT_PIPE LSFT(IT_BSLS) // |
+#define IT_EXLM LSFT(KC_1) // !
+#define IT_DQOT LSFT(KC_2) // "
+#define IT_STRL LSFT(KC_3) // £
+#define IT_DLR LSFT(KC_4) // $
+#define IT_PERC LSFT(KC_5) // %
+#define IT_AMPR LSFT(KC_6) // &
+#define IT_SLSH LSFT(KC_7) // /
+#define IT_LPRN LSFT(KC_8) // (
+#define IT_RPRN LSFT(KC_9) // )
+#define IT_EQL LSFT(KC_0) // =
+#define IT_DEGR LSFT(IT_AACC) // °
+#define IT_QST LSFT(IT_APOS) // ?
+#define IT_CRC LSFT(IT_IACC) // ^
+#define IT_ASTR LSFT(IT_PLUS) // *
+#define IT_MORE LSFT(IT_LESS) // >
+#define IT_COLN LSFT(IT_DOT) // :
+#define IT_SCLN LSFT(IT_COMM) // ;
+#define IT_UNDS LSFT(IT_MINS) // _
+#define IT_LCBR LSFT(IT_LBRC) // {
+#define IT_RCBR LSFT(IT_RBRC) // }
+#define IT_PIPE LSFT(IT_BSLS) // |
// Alt -ed characters
-#define IT_LBRC LALT(IT_EACC) // [
-#define IT_RBRC LALT(IT_PLUS) // ]
-#define IT_AT LALT(IT_OACC) // @
-#define IT_EURO LALT(KC_E) // €
-#define IT_SHRP LALT(IT_AACC ) // #
-#define IT_ACUT LALT(KC_8) // ´
-#define IT_GRAVE LALT(KC_9) // `
-#define IT_TILDE LALT(KC_5) // ~
+#define IT_LBRC LALT(IT_EACC) // [
+#define IT_RBRC LALT(IT_PLUS) // ]
+#define IT_AT LALT(IT_OACC) // @
+#define IT_EURO LALT(KC_E) // €
+#define IT_SHRP LALT(IT_AACC) // #
+#define IT_ACUT LALT(KC_8) // ´
+#define IT_GRAVE LALT(KC_9) // `
+#define IT_TILDE LALT(KC_5) // ~
#define IT_PLMN LALT(LSFT(IT_IACC)) // ±
#endif
diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h
index 5c920014a1..a9b36f16e6 100644
--- a/quantum/keymap_extras/keymap_italian_osx_iso.h
+++ b/quantum/keymap_extras/keymap_italian_osx_iso.h
@@ -65,7 +65,7 @@
#define IT_COMM KC_COMM // , and ;
#define IT_APOS KC_MINS // ' and ?
#define IT_BSLS KC_GRV // \ and |
-#define IT_LESS KC_NUBS// < and >
+#define IT_LESS KC_NUBS // < and >
#define IT_MINS KC_SLSH // - and _
// accented vowels (regular, with shift, with option, with option and shift)
@@ -77,37 +77,37 @@
#define IT_IACC KC_EQL // ì, ^, ˆ, ±
// shifted characters
-#define IT_EXLM LSFT(KC_1) // !
-#define IT_DQOT LSFT(KC_2) // "
-#define IT_STRL LSFT(KC_3) // £
-#define IT_DLR LSFT(KC_4) // $
-#define IT_PERC LSFT(KC_5) // %
-#define IT_AMPR LSFT(KC_6) // &
-#define IT_SLSH LSFT(KC_7) // /
-#define IT_LPRN LSFT(KC_8) // (
-#define IT_RPRN LSFT(KC_9) // )
-#define IT_EQL LSFT(KC_0) // =
-#define IT_DEGR LSFT(IT_AACC) // °
-#define IT_QST LSFT(IT_APOS) // ?
-#define IT_CRC LSFT(IT_IACC) // ^
-#define IT_ASTR LSFT(IT_PLUS) // *
-#define IT_MORE LSFT(IT_LESS) // >
-#define IT_COLN LSFT(IT_DOT) // :
-#define IT_SCLN LSFT(IT_COMM) // ;
-#define IT_UNDS LSFT(IT_MINS) // _
-#define IT_LCBR LSFT(IT_LBRC) // {
-#define IT_RCBR LSFT(IT_RBRC) // }
-#define IT_PIPE LSFT(IT_BSLS) // |
+#define IT_EXLM LSFT(KC_1) // !
+#define IT_DQOT LSFT(KC_2) // "
+#define IT_STRL LSFT(KC_3) // £
+#define IT_DLR LSFT(KC_4) // $
+#define IT_PERC LSFT(KC_5) // %
+#define IT_AMPR LSFT(KC_6) // &
+#define IT_SLSH LSFT(KC_7) // /
+#define IT_LPRN LSFT(KC_8) // (
+#define IT_RPRN LSFT(KC_9) // )
+#define IT_EQL LSFT(KC_0) // =
+#define IT_DEGR LSFT(IT_AACC) // °
+#define IT_QST LSFT(IT_APOS) // ?
+#define IT_CRC LSFT(IT_IACC) // ^
+#define IT_ASTR LSFT(IT_PLUS) // *
+#define IT_MORE LSFT(IT_LESS) // >
+#define IT_COLN LSFT(IT_DOT) // :
+#define IT_SCLN LSFT(IT_COMM) // ;
+#define IT_UNDS LSFT(IT_MINS) // _
+#define IT_LCBR LSFT(IT_LBRC) // {
+#define IT_RCBR LSFT(IT_RBRC) // }
+#define IT_PIPE LSFT(IT_BSLS) // |
// Alt -ed characters
-#define IT_LBRC LALT(IT_EACC) // [
-#define IT_RBRC LALT(IT_PLUS) // ]
-#define IT_AT LALT(IT_OACC) // @
-#define IT_EURO LALT(KC_E) // €
-#define IT_SHRP LALT(IT_AACC ) // #
-#define IT_ACUT LALT(KC_8) // ´
-#define IT_GRAVE LALT(KC_9) // `
-#define IT_TILDE LALT(KC_5) // ~
+#define IT_LBRC LALT(IT_EACC) // [
+#define IT_RBRC LALT(IT_PLUS) // ]
+#define IT_AT LALT(IT_OACC) // @
+#define IT_EURO LALT(KC_E) // €
+#define IT_SHRP LALT(IT_AACC) // #
+#define IT_ACUT LALT(KC_8) // ´
+#define IT_GRAVE LALT(KC_9) // `
+#define IT_TILDE LALT(KC_5) // ~
#define IT_PLMN LALT(LSFT(IT_IACC)) // ±
#endif
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 8f3f3ff3c6..09ceef74d8 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -63,10 +63,10 @@ typedef struct {
{ .fn = {qk_tap_dance_pair_on_each_tap, qk_tap_dance_pair_finished, qk_tap_dance_pair_reset}, .user_data = (void *)&((qk_tap_dance_pair_t){kc1, kc2}), }
# define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) \
- { .fn = { qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer, layer_move }), }
+ { .fn = {qk_tap_dance_dual_role_on_each_tap, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset}, .user_data = (void *)&((qk_tap_dance_dual_role_t){kc, layer, layer_move}), }
# define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \
- { .fn = { NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset }, .user_data = (void *)&((qk_tap_dance_dual_role_t) { kc, layer, layer_invert }), }
+ { .fn = {NULL, qk_tap_dance_dual_role_finished, qk_tap_dance_dual_role_reset}, .user_data = (void *)&((qk_tap_dance_dual_role_t){kc, layer, layer_invert}), }
# define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)
@@ -79,8 +79,6 @@ typedef struct {
# define ACTION_TAP_DANCE_FN_ADVANCED_TIME(user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset, tap_specific_tapping_term) \
{ .fn = {user_fn_on_each_tap, user_fn_on_dance_finished, user_fn_on_dance_reset}, .user_data = NULL, .custom_tapping_term = tap_specific_tapping_term, }
-
-
extern qk_tap_dance_action_t tap_dance_actions[];
/* To be used internally */
diff --git a/quantum/quantum.c b/quantum/quantum.c
index c27c3aba61..2e5e6376b7 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -1116,7 +1116,7 @@ __attribute__((weak)) void led_set(uint8_t usb_led) {
#endif
led_set_kb(usb_led);
- led_update_kb((led_t) usb_led);
+ led_update_kb((led_t)usb_led);
}
//------------------------------------------------------------------------------
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 7988c58788..6beab65a32 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -146,14 +146,13 @@ extern layer_state_t layer_state;
#endif
#ifdef DIP_SWITCH_ENABLE
- #include "dip_switch.h"
+# include "dip_switch.h"
#endif
#ifdef DYNAMIC_MACRO_ENABLE
- #include "process_dynamic_macro.h"
+# include "process_dynamic_macro.h"
#endif
-
// Function substitutions to ease GPIO manipulation
#if defined(__AVR__)
typedef uint8_t pin_t;
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 51a7e290fa..66a3c66e85 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -771,4 +771,4 @@ enum quantum_keycodes {
#define DM_PLY1 DYN_MACRO_PLAY1
#define DM_PLY2 DYN_MACRO_PLAY2
-#endif // QUANTUM_KEYCODES_H
+#endif // QUANTUM_KEYCODES_H
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 80f276139c..7949bb688e 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -919,7 +919,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
ledp->g = 0;
ledp->b = 0;
# ifdef RGBW
- ledp->w = 0;
+ ledp->w = 0;
# endif
for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
k = pos + j * increment;
diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h
index f7b1b077d3..6b691950a6 100644
--- a/quantum/stm32/chconf.h
+++ b/quantum/stm32/chconf.h
@@ -419,34 +419,39 @@
* @note It is invoked from within @p chThdInit() and implicitly from all
* the threads creation APIs.
*/
-# define CH_CFG_THREAD_INIT_HOOK(tp) \
- { /* Add threads initialization code here.*/ }
+# define CH_CFG_THREAD_INIT_HOOK(tp) \
+ { /* Add threads initialization code here.*/ \
+ }
/**
* @brief Threads finalization hook.
* @details User finalization code added to the @p chThdExit() API.
*/
-# define CH_CFG_THREAD_EXIT_HOOK(tp) \
- { /* Add threads finalization code here.*/ }
+# define CH_CFG_THREAD_EXIT_HOOK(tp) \
+ { /* Add threads finalization code here.*/ \
+ }
/**
* @brief Context switch hook.
* @details This hook is invoked just before switching between threads.
*/
# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
- { /* Context switch code here.*/ }
+ { /* Context switch code here.*/ \
+ }
/**
* @brief ISR enter hook.
*/
# define CH_CFG_IRQ_PROLOGUE_HOOK() \
- { /* IRQ prologue code here.*/ }
+ { /* IRQ prologue code here.*/ \
+ }
/**
* @brief ISR exit hook.
*/
# define CH_CFG_IRQ_EPILOGUE_HOOK() \
- { /* IRQ epilogue code here.*/ }
+ { /* IRQ epilogue code here.*/ \
+ }
/**
* @brief Idle thread enter hook.
@@ -455,7 +460,8 @@
* @note This macro can be used to activate a power saving mode.
*/
# define CH_CFG_IDLE_ENTER_HOOK() \
- { /* Idle-enter code here.*/ }
+ { /* Idle-enter code here.*/ \
+ }
/**
* @brief Idle thread leave hook.
@@ -464,22 +470,25 @@
* @note This macro can be used to deactivate a power saving mode.
*/
# define CH_CFG_IDLE_LEAVE_HOOK() \
- { /* Idle-leave code here.*/ }
+ { /* Idle-leave code here.*/ \
+ }
/**
* @brief Idle Loop hook.
* @details This hook is continuously invoked by the idle thread loop.
*/
# define CH_CFG_IDLE_LOOP_HOOK() \
- { /* Idle loop code here.*/ }
+ { /* Idle loop code here.*/ \
+ }
/**
* @brief System tick event hook.
* @details This hook is invoked in the system tick handler immediately
* after processing the virtual timers queue.
*/
-# define CH_CFG_SYSTEM_TICK_HOOK() \
- { /* System tick event code here.*/ }
+# define CH_CFG_SYSTEM_TICK_HOOK() \
+ { /* System tick event code here.*/ \
+ }
/**
* @brief System halt hook.
@@ -487,7 +496,8 @@
* the system is halted.
*/
# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
- { /* System halt code here.*/ }
+ { /* System halt code here.*/ \
+ }
/**
* @brief Trace hook.
@@ -495,7 +505,8 @@
* trace buffer.
*/
# define CH_CFG_TRACE_HOOK(tep) \
- { /* Trace code here.*/ }
+ { /* Trace code here.*/ \
+ }
/** @} */