aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
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 648a37adf..edda6ea0b 100644
--- a/quantum/backlight/backlight_avr.c
+++ b/quantum/backlight/backlight_avr.c
@@ -191,7 +191,7 @@ void backlight_off(pin_t backlight_pin) {
191 191
192# define FOR_EACH_LED(x) \ 192# define FOR_EACH_LED(x) \
193 for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \ 193 for (uint8_t i = 0; i < BACKLIGHT_LED_COUNT; i++) { \
194 pin_t backlight_pin = backlight_pins[i]; \ 194 pin_t backlight_pin = backlight_pins[i]; \
195 { x } \ 195 { x } \
196 } 196 }
197 197
diff --git a/quantum/config_common.h b/quantum/config_common.h
index f42df6357..c1c1d4bd4 100644
--- a/quantum/config_common.h
+++ b/quantum/config_common.h
@@ -303,25 +303,26 @@
303 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ 303 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
304 sei(); \ 304 sei(); \
305 } while (0) 305 } while (0)
306# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) 306# elif (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
307# define SERIAL_UART_BAUD 115200 307# define SERIAL_UART_BAUD 115200
308# define SERIAL_UART_DATA UDR1 308# define SERIAL_UART_DATA UDR1
309 /* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */ 309/* UBRR should result in ~16 and set UCSR1A = _BV(U2X1) as per rn42 documentation. HC05 needs baudrate configured accordingly */
310# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1) 310# define SERIAL_UART_UBRR (F_CPU / (8UL * SERIAL_UART_BAUD) - 1)
311# define SERIAL_UART_RXD_VECT USART1_RX_vect 311# define SERIAL_UART_RXD_VECT USART1_RX_vect
312# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) 312# define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1))
313# define SERIAL_UART_INIT() do { \ 313# define SERIAL_UART_INIT() \
314 UCSR1A = _BV(U2X1); \ 314 do { \
315 /* baud rate */ \ 315 UCSR1A = _BV(U2X1); \
316 UBRR1L = SERIAL_UART_UBRR; \ 316 /* baud rate */ \
317 /* baud rate */ \ 317 UBRR1L = SERIAL_UART_UBRR; \
318 UBRR1H = SERIAL_UART_UBRR >> 8; \ 318 /* baud rate */ \
319 /* enable TX */ \ 319 UBRR1H = SERIAL_UART_UBRR >> 8; \
320 UCSR1B = _BV(TXEN1); \ 320 /* enable TX */ \
321 /* 8-bit data */ \ 321 UCSR1B = _BV(TXEN1); \
322 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ 322 /* 8-bit data */ \
323 sei(); \ 323 UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \
324 } while(0) 324 sei(); \
325 } while (0)
325# else 326# else
326# error "USART configuration is needed." 327# error "USART configuration is needed."
327# endif 328# endif
diff --git a/quantum/dip_switch.c b/quantum/dip_switch.c
index 3b5a8dadc..ab74222d1 100644
--- a/quantum/dip_switch.c
+++ b/quantum/dip_switch.c
@@ -21,40 +21,33 @@
21// for memcpy 21// for memcpy
22#include <string.h> 22#include <string.h>
23 23
24
25#if !defined(DIP_SWITCH_PINS) 24#if !defined(DIP_SWITCH_PINS)
26# error "No DIP switch pads defined by DIP_SWITCH_PINS" 25# error "No DIP switch pads defined by DIP_SWITCH_PINS"
27#endif 26#endif
28 27
29#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad)/sizeof(pin_t)) 28#define NUMBER_OF_DIP_SWITCHES (sizeof(dip_switch_pad) / sizeof(pin_t))
30static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; 29static pin_t dip_switch_pad[] = DIP_SWITCH_PINS;
31static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 }; 30static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
32static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 }; 31static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0};
33
34 32
35__attribute__((weak)) 33__attribute__((weak)) void dip_switch_update_user(uint8_t index, bool active) {}
36void dip_switch_update_user(uint8_t index, bool active) {}
37 34
38__attribute__((weak)) 35__attribute__((weak)) void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); }
39void dip_switch_update_kb(uint8_t index, bool active) { dip_switch_update_user(index, active); }
40 36
41__attribute__((weak)) 37__attribute__((weak)) void dip_switch_update_mask_user(uint32_t state) {}
42void dip_switch_update_mask_user(uint32_t state) {}
43 38
44__attribute__((weak)) 39__attribute__((weak)) void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); }
45void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); }
46 40
47void dip_switch_init(void) { 41void dip_switch_init(void) {
48 for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { 42 for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) {
49 setPinInputHigh(dip_switch_pad[i]); 43 setPinInputHigh(dip_switch_pad[i]);
50 } 44 }
51 dip_switch_read(true); 45 dip_switch_read(true);
52} 46}
53 47
54
55void dip_switch_read(bool forced) { 48void dip_switch_read(bool forced) {
56 bool has_dip_state_changed = false; 49 bool has_dip_state_changed = false;
57 uint32_t dip_switch_mask = 0; 50 uint32_t dip_switch_mask = 0;
58 51
59 for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) { 52 for (uint8_t i = 0; i < NUMBER_OF_DIP_SWITCHES; i++) {
60 dip_switch_state[i] = !readPin(dip_switch_pad[i]); 53 dip_switch_state[i] = !readPin(dip_switch_pad[i]);
diff --git a/quantum/encoder.c b/quantum/encoder.c
index e86a0045c..4aeb3d0cd 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -37,8 +37,8 @@ static pin_t encoders_pad_b[] = ENCODERS_PAD_B;
37 37
38static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; 38static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0};
39 39
40static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; 40static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
41static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; 41static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0};
42 42
43#ifdef SPLIT_KEYBOARD 43#ifdef SPLIT_KEYBOARD
44// right half encoders come over as second set of encoders 44// right half encoders come over as second set of encoders
@@ -84,7 +84,7 @@ static void encoder_update(int8_t index, uint8_t state) {
84 encoder_value[index]++; 84 encoder_value[index]++;
85 encoder_update_kb(index, true); 85 encoder_update_kb(index, true);
86 } 86 }
87 if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise 87 if (encoder_pulses[index] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
88 encoder_value[index]--; 88 encoder_value[index]--;
89 encoder_update_kb(index, false); 89 encoder_update_kb(index, false);
90 } 90 }
@@ -109,7 +109,7 @@ void encoder_state_raw(uint8_t* slave_state) { memcpy(slave_state, &encoder_valu
109void encoder_update_raw(uint8_t* slave_state) { 109void encoder_update_raw(uint8_t* slave_state) {
110 for (int i = 0; i < NUMBER_OF_ENCODERS; i++) { 110 for (int i = 0; i < NUMBER_OF_ENCODERS; i++) {
111 uint8_t index = i + thatHand; 111 uint8_t index = i + thatHand;
112 int8_t delta = slave_state[i] - encoder_value[index]; 112 int8_t delta = slave_state[i] - encoder_value[index];
113 while (delta > 0) { 113 while (delta > 0) {
114 delta--; 114 delta--;
115 encoder_value[index]++; 115 encoder_value[index]++;
diff --git a/quantum/keymap_extras/keymap_italian.h b/quantum/keymap_extras/keymap_italian.h
index a8c03b884..063700aa0 100644
--- a/quantum/keymap_extras/keymap_italian.h
+++ b/quantum/keymap_extras/keymap_italian.h
@@ -78,36 +78,36 @@
78#define IT_MINS KC_SLSH // - and _ 78#define IT_MINS KC_SLSH // - and _
79 79
80// shifted characters 80// shifted characters
81#define IT_DEGR LSFT(IT_AACC) // ° 81#define IT_DEGR LSFT(IT_AACC) // °
82#define IT_EXLM LSFT(KC_1) // ! 82#define IT_EXLM LSFT(KC_1) // !
83#define IT_DQOT LSFT(KC_2) // " 83#define IT_DQOT LSFT(KC_2) // "
84#define IT_STRL LSFT(KC_3) // £ 84#define IT_STRL LSFT(KC_3) // £
85#define IT_DLR LSFT(KC_4) // $ 85#define IT_DLR LSFT(KC_4) // $
86#define IT_PERC LSFT(KC_5) // % 86#define IT_PERC LSFT(KC_5) // %
87#define IT_AMPR LSFT(KC_6) // & 87#define IT_AMPR LSFT(KC_6) // &
88#define IT_SLSH LSFT(KC_7) // / 88#define IT_SLSH LSFT(KC_7) // /
89#define IT_LPRN LSFT(KC_8) // ( 89#define IT_LPRN LSFT(KC_8) // (
90#define IT_RPRN LSFT(KC_9) // ) 90#define IT_RPRN LSFT(KC_9) // )
91#define IT_EQL LSFT(KC_0) // = 91#define IT_EQL LSFT(KC_0) // =
92#define IT_QST LSFT(IT_APOS) // ? 92#define IT_QST LSFT(IT_APOS) // ?
93#define IT_CRC LSFT(IT_IACC) // ^ 93#define IT_CRC LSFT(IT_IACC) // ^
94#define IT_ASTR LSFT(IT_PLUS) // * 94#define IT_ASTR LSFT(IT_PLUS) // *
95#define IT_MORE LSFT(IT_LESS) // > 95#define IT_MORE LSFT(IT_LESS) // >
96#define IT_COLN LSFT(IT_DOT) // : 96#define IT_COLN LSFT(IT_DOT) // :
97#define IT_SCLN LSFT(IT_COMM) // ; 97#define IT_SCLN LSFT(IT_COMM) // ;
98#define IT_UNDS LSFT(IT_MINS) // _ 98#define IT_UNDS LSFT(IT_MINS) // _
99 99
100// Alt Gr-ed characters 100// Alt Gr-ed characters
101#define IT_LCBR ALGR(KC_7) // { 101#define IT_LCBR ALGR(KC_7) // {
102#define IT_LBRC ALGR(IT_EACC) // [ 102#define IT_LBRC ALGR(IT_EACC) // [
103#define IT_RBRC ALGR(IT_PLUS) // ] 103#define IT_RBRC ALGR(IT_PLUS) // ]
104#define IT_RCBR ALGR(KC_0) // } 104#define IT_RCBR ALGR(KC_0) // }
105#define IT_AT ALGR(IT_OACC) // @ 105#define IT_AT ALGR(IT_OACC) // @
106#define IT_EURO ALGR(KC_E) // € 106#define IT_EURO ALGR(KC_E) // €
107#define IT_PIPE LSFT(IT_BSLS) // | 107#define IT_PIPE LSFT(IT_BSLS) // |
108#define IT_SHRP ALGR(IT_AACC) // # 108#define IT_SHRP ALGR(IT_AACC) // #
109 109
110// Deprecated 110// Deprecated
111#define IT_X_PLUS X_RBRACKET // # 111#define IT_X_PLUS X_RBRACKET // #
112 112
113#endif 113#endif
diff --git a/quantum/keymap_extras/keymap_italian_osx_ansi.h b/quantum/keymap_extras/keymap_italian_osx_ansi.h
index 2b7160ff3..fa12d05dc 100644
--- a/quantum/keymap_extras/keymap_italian_osx_ansi.h
+++ b/quantum/keymap_extras/keymap_italian_osx_ansi.h
@@ -65,7 +65,7 @@
65#define IT_COMM KC_COMM // , and ; 65#define IT_COMM KC_COMM // , and ;
66#define IT_APOS KC_MINS // ' and ? 66#define IT_APOS KC_MINS // ' and ?
67#define IT_BSLS KC_NUBS // \ and | 67#define IT_BSLS KC_NUBS // \ and |
68#define IT_LESS KC_GRV // < and > 68#define IT_LESS KC_GRV // < and >
69#define IT_MINS KC_SLSH // - and _ 69#define IT_MINS KC_SLSH // - and _
70 70
71// accented vowels (regular, with shift, with option, with option and shift) 71// accented vowels (regular, with shift, with option, with option and shift)
@@ -77,37 +77,37 @@
77#define IT_IACC KC_EQL // ì, ^, ˆ, ± 77#define IT_IACC KC_EQL // ì, ^, ˆ, ±
78 78
79// shifted characters 79// shifted characters
80#define IT_EXLM LSFT(KC_1) // ! 80#define IT_EXLM LSFT(KC_1) // !
81#define IT_DQOT LSFT(KC_2) // " 81#define IT_DQOT LSFT(KC_2) // "
82#define IT_STRL LSFT(KC_3) // £ 82#define IT_STRL LSFT(KC_3) // £
83#define IT_DLR LSFT(KC_4) // $ 83#define IT_DLR LSFT(KC_4) // $
84#define IT_PERC LSFT(KC_5) // % 84#define IT_PERC LSFT(KC_5) // %
85#define IT_AMPR LSFT(KC_6) // & 85#define IT_AMPR LSFT(KC_6) // &
86#define IT_SLSH LSFT(KC_7) // / 86#define IT_SLSH LSFT(KC_7) // /
87#define IT_LPRN LSFT(KC_8) // ( 87#define IT_LPRN LSFT(KC_8) // (
88#define IT_RPRN LSFT(KC_9) // ) 88#define IT_RPRN LSFT(KC_9) // )
89#define IT_EQL LSFT(KC_0) // = 89#define IT_EQL LSFT(KC_0) // =
90#define IT_DEGR LSFT(IT_AACC) // ° 90#define IT_DEGR LSFT(IT_AACC) // °
91#define IT_QST LSFT(IT_APOS) // ? 91#define IT_QST LSFT(IT_APOS) // ?
92#define IT_CRC LSFT(IT_IACC) // ^ 92#define IT_CRC LSFT(IT_IACC) // ^
93#define IT_ASTR LSFT(IT_PLUS) // * 93#define IT_ASTR LSFT(IT_PLUS) // *
94#define IT_MORE LSFT(IT_LESS) // > 94#define IT_MORE LSFT(IT_LESS) // >
95#define IT_COLN LSFT(IT_DOT) // : 95#define IT_COLN LSFT(IT_DOT) // :
96#define IT_SCLN LSFT(IT_COMM) // ; 96#define IT_SCLN LSFT(IT_COMM) // ;
97#define IT_UNDS LSFT(IT_MINS) // _ 97#define IT_UNDS LSFT(IT_MINS) // _
98#define IT_LCBR LSFT(IT_LBRC) // { 98#define IT_LCBR LSFT(IT_LBRC) // {
99#define IT_RCBR LSFT(IT_RBRC) // } 99#define IT_RCBR LSFT(IT_RBRC) // }
100#define IT_PIPE LSFT(IT_BSLS) // | 100#define IT_PIPE LSFT(IT_BSLS) // |
101 101
102// Alt -ed characters 102// Alt -ed characters
103#define IT_LBRC LALT(IT_EACC) // [ 103#define IT_LBRC LALT(IT_EACC) // [
104#define IT_RBRC LALT(IT_PLUS) // ] 104#define IT_RBRC LALT(IT_PLUS) // ]
105#define IT_AT LALT(IT_OACC) // @ 105#define IT_AT LALT(IT_OACC) // @
106#define IT_EURO LALT(KC_E) // € 106#define IT_EURO LALT(KC_E) // €
107#define IT_SHRP LALT(IT_AACC ) // # 107#define IT_SHRP LALT(IT_AACC) // #
108#define IT_ACUT LALT(KC_8) // ´ 108#define IT_ACUT LALT(KC_8) // ´
109#define IT_GRAVE LALT(KC_9) // ` 109#define IT_GRAVE LALT(KC_9) // `
110#define IT_TILDE LALT(KC_5) // ~ 110#define IT_TILDE LALT(KC_5) // ~
111#define IT_PLMN LALT(LSFT(IT_IACC)) // ± 111#define IT_PLMN LALT(LSFT(IT_IACC)) // ±
112 112
113#endif 113#endif
diff --git a/quantum/keymap_extras/keymap_italian_osx_iso.h b/quantum/keymap_extras/keymap_italian_osx_iso.h
index 5c920014a..a9b36f16e 100644
--- a/quantum/keymap_extras/keymap_italian_osx_iso.h
+++ b/quantum/keymap_extras/keymap_italian_osx_iso.h
@@ -65,7 +65,7 @@
65#define IT_COMM KC_COMM // , and ; 65#define IT_COMM KC_COMM // , and ;
66#define IT_APOS KC_MINS // ' and ? 66#define IT_APOS KC_MINS // ' and ?
67#define IT_BSLS KC_GRV // \ and | 67#define IT_BSLS KC_GRV // \ and |
68#define IT_LESS KC_NUBS// < and > 68#define IT_LESS KC_NUBS // < and >
69#define IT_MINS KC_SLSH // - and _ 69#define IT_MINS KC_SLSH // - and _
70 70
71// accented vowels (regular, with shift, with option, with option and shift) 71// accented vowels (regular, with shift, with option, with option and shift)
@@ -77,37 +77,37 @@
77#define IT_IACC KC_EQL // ì, ^, ˆ, ± 77#define IT_IACC KC_EQL // ì, ^, ˆ, ±
78 78
79// shifted characters 79// shifted characters
80#define IT_EXLM LSFT(KC_1) // ! 80#define IT_EXLM LSFT(KC_1) // !
81#define IT_DQOT LSFT(KC_2) // " 81#define IT_DQOT LSFT(KC_2) // "
82#define IT_STRL LSFT(KC_3) // £ 82#define IT_STRL LSFT(KC_3) // £
83#define IT_DLR LSFT(KC_4) // $ 83#define IT_DLR LSFT(KC_4) // $
84#define IT_PERC LSFT(KC_5) // % 84#define IT_PERC LSFT(KC_5) // %
85#define IT_AMPR LSFT(KC_6) // & 85#define IT_AMPR LSFT(KC_6) // &
86#define IT_SLSH LSFT(KC_7) // / 86#define IT_SLSH LSFT(KC_7) // /
87#define IT_LPRN LSFT(KC_8) // ( 87#define IT_LPRN LSFT(KC_8) // (
88#define IT_RPRN LSFT(KC_9) // ) 88#define IT_RPRN LSFT(KC_9) // )
89#define IT_EQL LSFT(KC_0) // = 89#define IT_EQL LSFT(KC_0) // =
90#define IT_DEGR LSFT(IT_AACC) // ° 90#define IT_DEGR LSFT(IT_AACC) // °
91#define IT_QST LSFT(IT_APOS) // ? 91#define IT_QST LSFT(IT_APOS) // ?
92#define IT_CRC LSFT(IT_IACC) // ^ 92#define IT_CRC LSFT(IT_IACC) // ^
93#define IT_ASTR LSFT(IT_PLUS) // * 93#define IT_ASTR LSFT(IT_PLUS) // *
94#define IT_MORE LSFT(IT_LESS) // > 94#define IT_MORE LSFT(IT_LESS) // >
95#define IT_COLN LSFT(IT_DOT) // : 95#define IT_COLN LSFT(IT_DOT) // :
96#define IT_SCLN LSFT(IT_COMM) // ; 96#define IT_SCLN LSFT(IT_COMM) // ;
97#define IT_UNDS LSFT(IT_MINS) // _ 97#define IT_UNDS LSFT(IT_MINS) // _
98#define IT_LCBR LSFT(IT_LBRC) // { 98#define IT_LCBR LSFT(IT_LBRC) // {
99#define IT_RCBR LSFT(IT_RBRC) // } 99#define IT_RCBR LSFT(IT_RBRC) // }
100#define IT_PIPE LSFT(IT_BSLS) // | 100#define IT_PIPE LSFT(IT_BSLS) // |
101 101
102// Alt -ed characters 102// Alt -ed characters
103#define IT_LBRC LALT(IT_EACC) // [ 103#define IT_LBRC LALT(IT_EACC) // [
104#define IT_RBRC LALT(IT_PLUS) // ] 104#define IT_RBRC LALT(IT_PLUS) // ]
105#define IT_AT LALT(IT_OACC) // @ 105#define IT_AT LALT(IT_OACC) // @
106#define IT_EURO LALT(KC_E) // € 106#define IT_EURO LALT(KC_E) // €
107#define IT_SHRP LALT(IT_AACC ) // # 107#define IT_SHRP LALT(IT_AACC) // #
108#define IT_ACUT LALT(KC_8) // ´ 108#define IT_ACUT LALT(KC_8) // ´
109#define IT_GRAVE LALT(KC_9) // ` 109#define IT_GRAVE LALT(KC_9) // `
110#define IT_TILDE LALT(KC_5) // ~ 110#define IT_TILDE LALT(KC_5) // ~
111#define IT_PLMN LALT(LSFT(IT_IACC)) // ± 111#define IT_PLMN LALT(LSFT(IT_IACC)) // ±
112 112
113#endif 113#endif
diff --git a/quantum/process_keycode/process_tap_dance.h b/quantum/process_keycode/process_tap_dance.h
index 8f3f3ff3c..09ceef74d 100644
--- a/quantum/process_keycode/process_tap_dance.h
+++ b/quantum/process_keycode/process_tap_dance.h
@@ -63,10 +63,10 @@ typedef struct {
63 { .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}), } 63 { .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}), }
64 64
65# define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) \ 65# define ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) \
66 { .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 }), } 66 { .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}), }
67 67
68# define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \ 68# define ACTION_TAP_DANCE_LAYER_TOGGLE(kc, layer) \
69 { .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 }), } 69 { .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}), }
70 70
71# define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) ACTION_TAP_DANCE_DUAL_ROLE(kc, layer) 71# define ACTION_TAP_DANCE_LAYER_MOVE(kc, layer) ACTION_TAP_DANCE_DUAL_ROLE(kc, layer)
72 72
@@ -79,8 +79,6 @@ typedef struct {
79# 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) \ 79# 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) \
80 { .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, } 80 { .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, }
81 81
82
83
84extern qk_tap_dance_action_t tap_dance_actions[]; 82extern qk_tap_dance_action_t tap_dance_actions[];
85 83
86/* To be used internally */ 84/* To be used internally */
diff --git a/quantum/quantum.c b/quantum/quantum.c
index c27c3aba6..2e5e6376b 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -1116,7 +1116,7 @@ __attribute__((weak)) void led_set(uint8_t usb_led) {
1116#endif 1116#endif
1117 1117
1118 led_set_kb(usb_led); 1118 led_set_kb(usb_led);
1119 led_update_kb((led_t) usb_led); 1119 led_update_kb((led_t)usb_led);
1120} 1120}
1121 1121
1122//------------------------------------------------------------------------------ 1122//------------------------------------------------------------------------------
diff --git a/quantum/quantum.h b/quantum/quantum.h
index 7988c5878..6beab65a3 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -146,14 +146,13 @@ extern layer_state_t layer_state;
146#endif 146#endif
147 147
148#ifdef DIP_SWITCH_ENABLE 148#ifdef DIP_SWITCH_ENABLE
149 #include "dip_switch.h" 149# include "dip_switch.h"
150#endif 150#endif
151 151
152#ifdef DYNAMIC_MACRO_ENABLE 152#ifdef DYNAMIC_MACRO_ENABLE
153 #include "process_dynamic_macro.h" 153# include "process_dynamic_macro.h"
154#endif 154#endif
155 155
156
157// Function substitutions to ease GPIO manipulation 156// Function substitutions to ease GPIO manipulation
158#if defined(__AVR__) 157#if defined(__AVR__)
159typedef uint8_t pin_t; 158typedef uint8_t pin_t;
diff --git a/quantum/quantum_keycodes.h b/quantum/quantum_keycodes.h
index 51a7e290f..66a3c66e8 100644
--- a/quantum/quantum_keycodes.h
+++ b/quantum/quantum_keycodes.h
@@ -771,4 +771,4 @@ enum quantum_keycodes {
771#define DM_PLY1 DYN_MACRO_PLAY1 771#define DM_PLY1 DYN_MACRO_PLAY1
772#define DM_PLY2 DYN_MACRO_PLAY2 772#define DM_PLY2 DYN_MACRO_PLAY2
773 773
774#endif // QUANTUM_KEYCODES_H 774#endif // QUANTUM_KEYCODES_H
diff --git a/quantum/rgblight.c b/quantum/rgblight.c
index 80f276139..7949bb688 100644
--- a/quantum/rgblight.c
+++ b/quantum/rgblight.c
@@ -919,7 +919,7 @@ void rgblight_effect_snake(animation_status_t *anim) {
919 ledp->g = 0; 919 ledp->g = 0;
920 ledp->b = 0; 920 ledp->b = 0;
921# ifdef RGBW 921# ifdef RGBW
922 ledp->w = 0; 922 ledp->w = 0;
923# endif 923# endif
924 for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) { 924 for (j = 0; j < RGBLIGHT_EFFECT_SNAKE_LENGTH; j++) {
925 k = pos + j * increment; 925 k = pos + j * increment;
diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h
index f7b1b077d..6b691950a 100644
--- a/quantum/stm32/chconf.h
+++ b/quantum/stm32/chconf.h
@@ -419,34 +419,39 @@
419 * @note It is invoked from within @p chThdInit() and implicitly from all 419 * @note It is invoked from within @p chThdInit() and implicitly from all
420 * the threads creation APIs. 420 * the threads creation APIs.
421 */ 421 */
422# define CH_CFG_THREAD_INIT_HOOK(tp) \ 422# define CH_CFG_THREAD_INIT_HOOK(tp) \
423 { /* Add threads initialization code here.*/ } 423 { /* Add threads initialization code here.*/ \
424 }
424 425
425/** 426/**
426 * @brief Threads finalization hook. 427 * @brief Threads finalization hook.
427 * @details User finalization code added to the @p chThdExit() API. 428 * @details User finalization code added to the @p chThdExit() API.
428 */ 429 */
429# define CH_CFG_THREAD_EXIT_HOOK(tp) \ 430# define CH_CFG_THREAD_EXIT_HOOK(tp) \
430 { /* Add threads finalization code here.*/ } 431 { /* Add threads finalization code here.*/ \
432 }
431 433
432/** 434/**
433 * @brief Context switch hook. 435 * @brief Context switch hook.
434 * @details This hook is invoked just before switching between threads. 436 * @details This hook is invoked just before switching between threads.
435 */ 437 */
436# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \ 438# define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) \
437 { /* Context switch code here.*/ } 439 { /* Context switch code here.*/ \
440 }
438 441
439/** 442/**
440 * @brief ISR enter hook. 443 * @brief ISR enter hook.
441 */ 444 */
442# define CH_CFG_IRQ_PROLOGUE_HOOK() \ 445# define CH_CFG_IRQ_PROLOGUE_HOOK() \
443 { /* IRQ prologue code here.*/ } 446 { /* IRQ prologue code here.*/ \
447 }
444 448
445/** 449/**
446 * @brief ISR exit hook. 450 * @brief ISR exit hook.
447 */ 451 */
448# define CH_CFG_IRQ_EPILOGUE_HOOK() \ 452# define CH_CFG_IRQ_EPILOGUE_HOOK() \
449 { /* IRQ epilogue code here.*/ } 453 { /* IRQ epilogue code here.*/ \
454 }
450 455
451/** 456/**
452 * @brief Idle thread enter hook. 457 * @brief Idle thread enter hook.
@@ -455,7 +460,8 @@
455 * @note This macro can be used to activate a power saving mode. 460 * @note This macro can be used to activate a power saving mode.
456 */ 461 */
457# define CH_CFG_IDLE_ENTER_HOOK() \ 462# define CH_CFG_IDLE_ENTER_HOOK() \
458 { /* Idle-enter code here.*/ } 463 { /* Idle-enter code here.*/ \
464 }
459 465
460/** 466/**
461 * @brief Idle thread leave hook. 467 * @brief Idle thread leave hook.
@@ -464,22 +470,25 @@
464 * @note This macro can be used to deactivate a power saving mode. 470 * @note This macro can be used to deactivate a power saving mode.
465 */ 471 */
466# define CH_CFG_IDLE_LEAVE_HOOK() \ 472# define CH_CFG_IDLE_LEAVE_HOOK() \
467 { /* Idle-leave code here.*/ } 473 { /* Idle-leave code here.*/ \
474 }
468 475
469/** 476/**
470 * @brief Idle Loop hook. 477 * @brief Idle Loop hook.
471 * @details This hook is continuously invoked by the idle thread loop. 478 * @details This hook is continuously invoked by the idle thread loop.
472 */ 479 */
473# define CH_CFG_IDLE_LOOP_HOOK() \ 480# define CH_CFG_IDLE_LOOP_HOOK() \
474 { /* Idle loop code here.*/ } 481 { /* Idle loop code here.*/ \
482 }
475 483
476/** 484/**
477 * @brief System tick event hook. 485 * @brief System tick event hook.
478 * @details This hook is invoked in the system tick handler immediately 486 * @details This hook is invoked in the system tick handler immediately
479 * after processing the virtual timers queue. 487 * after processing the virtual timers queue.
480 */ 488 */
481# define CH_CFG_SYSTEM_TICK_HOOK() \ 489# define CH_CFG_SYSTEM_TICK_HOOK() \
482 { /* System tick event code here.*/ } 490 { /* System tick event code here.*/ \
491 }
483 492
484/** 493/**
485 * @brief System halt hook. 494 * @brief System halt hook.
@@ -487,7 +496,8 @@
487 * the system is halted. 496 * the system is halted.
488 */ 497 */
489# define CH_CFG_SYSTEM_HALT_HOOK(reason) \ 498# define CH_CFG_SYSTEM_HALT_HOOK(reason) \
490 { /* System halt code here.*/ } 499 { /* System halt code here.*/ \
500 }
491 501
492/** 502/**
493 * @brief Trace hook. 503 * @brief Trace hook.
@@ -495,7 +505,8 @@
495 * trace buffer. 505 * trace buffer.
496 */ 506 */
497# define CH_CFG_TRACE_HOOK(tep) \ 507# define CH_CFG_TRACE_HOOK(tep) \
498 { /* Trace code here.*/ } 508 { /* Trace code here.*/ \
509 }
499 510
500/** @} */ 511/** @} */
501 512