diff options
-rw-r--r-- | drivers/haptic/DRV2605L.c | 12 | ||||
-rw-r--r-- | drivers/haptic/haptic.c | 85 | ||||
-rw-r--r-- | drivers/haptic/haptic.h | 16 | ||||
-rw-r--r-- | quantum/backlight/backlight_avr.c | 2 | ||||
-rw-r--r-- | quantum/config_common.h | 39 | ||||
-rw-r--r-- | quantum/dip_switch.c | 37 | ||||
-rw-r--r-- | quantum/encoder.c | 8 | ||||
-rw-r--r-- | quantum/keymap_extras/keymap_italian.h | 54 | ||||
-rw-r--r-- | quantum/keymap_extras/keymap_italian_osx_ansi.h | 60 | ||||
-rw-r--r-- | quantum/keymap_extras/keymap_italian_osx_iso.h | 60 | ||||
-rw-r--r-- | quantum/process_keycode/process_tap_dance.h | 6 | ||||
-rw-r--r-- | quantum/quantum.c | 2 | ||||
-rw-r--r-- | quantum/quantum.h | 5 | ||||
-rw-r--r-- | quantum/quantum_keycodes.h | 2 | ||||
-rw-r--r-- | quantum/rgblight.c | 2 | ||||
-rw-r--r-- | quantum/stm32/chconf.h | 39 | ||||
-rw-r--r-- | tmk_core/common/arm_atsam/suspend.c | 3 | ||||
-rw-r--r-- | tmk_core/common/eeconfig.c | 4 | ||||
-rw-r--r-- | tmk_core/common/host.c | 2 | ||||
-rw-r--r-- | tmk_core/common/led.h | 10 | ||||
-rw-r--r-- | tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h | 7 | ||||
-rw-r--r-- | tmk_core/protocol/chibios/usb_main.c | 6 | ||||
-rw-r--r-- | tmk_core/protocol/iwrap/iwrap.c | 3 | ||||
-rw-r--r-- | tmk_core/protocol/lufa/adafruit_ble.cpp | 6 |
24 files changed, 235 insertions, 235 deletions
diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 728554b01..c40731913 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c | |||
@@ -115,15 +115,13 @@ void DRV_init(void) { | |||
115 | } | 115 | } |
116 | 116 | ||
117 | void DRV_rtp_init(void) { | 117 | void DRV_rtp_init(void) { |
118 | DRV_write(DRV_GO, 0x00); | 118 | DRV_write(DRV_GO, 0x00); |
119 | DRV_write(DRV_RTP_INPUT, 20); //20 is the lowest value I've found where haptics can still be felt. | 119 | DRV_write(DRV_RTP_INPUT, 20); // 20 is the lowest value I've found where haptics can still be felt. |
120 | DRV_write(DRV_MODE, 0x05); | 120 | DRV_write(DRV_MODE, 0x05); |
121 | DRV_write(DRV_GO, 0x01); | 121 | DRV_write(DRV_GO, 0x01); |
122 | } | 122 | } |
123 | 123 | ||
124 | void DRV_amplitude(uint8_t amplitude) { | 124 | void DRV_amplitude(uint8_t amplitude) { DRV_write(DRV_RTP_INPUT, amplitude); } |
125 | DRV_write(DRV_RTP_INPUT, amplitude); | ||
126 | } | ||
127 | 125 | ||
128 | void DRV_pulse(uint8_t sequence) { | 126 | void DRV_pulse(uint8_t sequence) { |
129 | DRV_write(DRV_GO, 0x00); | 127 | DRV_write(DRV_GO, 0x00); |
diff --git a/drivers/haptic/haptic.c b/drivers/haptic/haptic.c index 989970bee..2ce279b75 100644 --- a/drivers/haptic/haptic.c +++ b/drivers/haptic/haptic.c | |||
@@ -169,12 +169,12 @@ void haptic_set_mode(uint8_t mode) { | |||
169 | } | 169 | } |
170 | 170 | ||
171 | void haptic_set_amplitude(uint8_t amp) { | 171 | void haptic_set_amplitude(uint8_t amp) { |
172 | haptic_config.amplitude = amp; | 172 | haptic_config.amplitude = amp; |
173 | eeconfig_update_haptic(haptic_config.raw); | 173 | eeconfig_update_haptic(haptic_config.raw); |
174 | xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); | 174 | xprintf("haptic_config.amplitude = %u\n", haptic_config.amplitude); |
175 | #ifdef DRV2605L | 175 | #ifdef DRV2605L |
176 | DRV_amplitude(amp); | 176 | DRV_amplitude(amp); |
177 | #endif | 177 | #endif |
178 | } | 178 | } |
179 | 179 | ||
180 | void haptic_set_buzz(uint8_t buzz) { | 180 | void haptic_set_buzz(uint8_t buzz) { |
@@ -211,52 +211,50 @@ uint8_t haptic_get_dwell(void) { | |||
211 | } | 211 | } |
212 | 212 | ||
213 | void haptic_enable_continuous(void) { | 213 | void haptic_enable_continuous(void) { |
214 | haptic_config.cont = 1; | 214 | haptic_config.cont = 1; |
215 | xprintf("haptic_config.cont = %u\n", haptic_config.cont); | 215 | xprintf("haptic_config.cont = %u\n", haptic_config.cont); |
216 | eeconfig_update_haptic(haptic_config.raw); | 216 | eeconfig_update_haptic(haptic_config.raw); |
217 | #ifdef DRV2605L | 217 | #ifdef DRV2605L |
218 | DRV_rtp_init(); | 218 | DRV_rtp_init(); |
219 | #endif | 219 | #endif |
220 | } | 220 | } |
221 | 221 | ||
222 | void haptic_disable_continuous(void) { | 222 | void haptic_disable_continuous(void) { |
223 | haptic_config.cont = 0; | 223 | haptic_config.cont = 0; |
224 | xprintf("haptic_config.cont = %u\n", haptic_config.cont); | 224 | xprintf("haptic_config.cont = %u\n", haptic_config.cont); |
225 | eeconfig_update_haptic(haptic_config.raw); | 225 | eeconfig_update_haptic(haptic_config.raw); |
226 | #ifdef DRV2605L | 226 | #ifdef DRV2605L |
227 | DRV_write(DRV_MODE,0x00); | 227 | DRV_write(DRV_MODE, 0x00); |
228 | #endif | 228 | #endif |
229 | } | 229 | } |
230 | 230 | ||
231 | void haptic_toggle_continuous(void) { | 231 | void haptic_toggle_continuous(void) { |
232 | #ifdef DRV2605L | 232 | #ifdef DRV2605L |
233 | if (haptic_config.cont) { | 233 | if (haptic_config.cont) { |
234 | haptic_disable_continuous(); | 234 | haptic_disable_continuous(); |
235 | } else { | 235 | } else { |
236 | haptic_enable_continuous(); | 236 | haptic_enable_continuous(); |
237 | } | 237 | } |
238 | eeconfig_update_haptic(haptic_config.raw); | 238 | eeconfig_update_haptic(haptic_config.raw); |
239 | #endif | 239 | #endif |
240 | } | 240 | } |
241 | 241 | ||
242 | |||
243 | void haptic_cont_increase(void) { | 242 | void haptic_cont_increase(void) { |
244 | uint8_t amp = haptic_config.amplitude + 10; | 243 | uint8_t amp = haptic_config.amplitude + 10; |
245 | if (haptic_config.amplitude >= 120) { | 244 | if (haptic_config.amplitude >= 120) { |
246 | amp = 120; | 245 | amp = 120; |
247 | } | 246 | } |
248 | haptic_set_amplitude(amp); | 247 | haptic_set_amplitude(amp); |
249 | } | 248 | } |
250 | 249 | ||
251 | void haptic_cont_decrease(void) { | 250 | void haptic_cont_decrease(void) { |
252 | uint8_t amp = haptic_config.amplitude - 10; | 251 | uint8_t amp = haptic_config.amplitude - 10; |
253 | if (haptic_config.amplitude < 20) { | 252 | if (haptic_config.amplitude < 20) { |
254 | amp = 20; | 253 | amp = 20; |
255 | } | 254 | } |
256 | haptic_set_amplitude(amp); | 255 | haptic_set_amplitude(amp); |
257 | } | 256 | } |
258 | 257 | ||
259 | |||
260 | void haptic_play(void) { | 258 | void haptic_play(void) { |
261 | #ifdef DRV2605L | 259 | #ifdef DRV2605L |
262 | uint8_t play_eff = 0; | 260 | uint8_t play_eff = 0; |
@@ -269,7 +267,6 @@ void haptic_play(void) { | |||
269 | } | 267 | } |
270 | 268 | ||
271 | bool process_haptic(uint16_t keycode, keyrecord_t *record) { | 269 | bool process_haptic(uint16_t keycode, keyrecord_t *record) { |
272 | |||
273 | if (keycode == HPT_ON && record->event.pressed) { | 270 | if (keycode == HPT_ON && record->event.pressed) { |
274 | haptic_enable(); | 271 | haptic_enable(); |
275 | } | 272 | } |
@@ -300,16 +297,16 @@ bool process_haptic(uint16_t keycode, keyrecord_t *record) { | |||
300 | if (keycode == HPT_DWLD && record->event.pressed) { | 297 | if (keycode == HPT_DWLD && record->event.pressed) { |
301 | haptic_dwell_decrease(); | 298 | haptic_dwell_decrease(); |
302 | } | 299 | } |
303 | if (keycode == HPT_CONT && record->event.pressed) { | 300 | if (keycode == HPT_CONT && record->event.pressed) { |
304 | haptic_toggle_continuous(); | 301 | haptic_toggle_continuous(); |
305 | } | 302 | } |
306 | if (keycode == HPT_CONI && record->event.pressed) { | 303 | if (keycode == HPT_CONI && record->event.pressed) { |
307 | haptic_cont_increase(); | 304 | haptic_cont_increase(); |
308 | } | 305 | } |
309 | if (keycode == HPT_COND && record->event.pressed) { | 306 | if (keycode == HPT_COND && record->event.pressed) { |
310 | haptic_cont_decrease(); | 307 | haptic_cont_decrease(); |
311 | } | 308 | } |
312 | 309 | ||
313 | if (haptic_config.enable) { | 310 | if (haptic_config.enable) { |
314 | if (record->event.pressed) { | 311 | if (record->event.pressed) { |
315 | // keypress | 312 | // keypress |
diff --git a/drivers/haptic/haptic.h b/drivers/haptic/haptic.h index 2f6eb31fc..5d3bd1c31 100644 --- a/drivers/haptic/haptic.h +++ b/drivers/haptic/haptic.h | |||
@@ -34,14 +34,14 @@ | |||
34 | typedef union { | 34 | typedef union { |
35 | uint32_t raw; | 35 | uint32_t raw; |
36 | struct { | 36 | struct { |
37 | bool enable :1; | 37 | bool enable : 1; |
38 | uint8_t feedback :2; | 38 | uint8_t feedback : 2; |
39 | uint8_t mode :7; | 39 | uint8_t mode : 7; |
40 | bool buzz :1; | 40 | bool buzz : 1; |
41 | uint8_t dwell :7; | 41 | uint8_t dwell : 7; |
42 | bool cont :1; | 42 | bool cont : 1; |
43 | uint8_t amplitude :8; | 43 | uint8_t amplitude : 8; |
44 | uint16_t reserved :7; | 44 | uint16_t reserved : 7; |
45 | }; | 45 | }; |
46 | } haptic_config_t; | 46 | } haptic_config_t; |
47 | 47 | ||
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)) |
30 | static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; | 29 | static pin_t dip_switch_pad[] = DIP_SWITCH_PINS; |
31 | static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 }; | 30 | static bool dip_switch_state[NUMBER_OF_DIP_SWITCHES] = {0}; |
32 | static bool last_dip_switch_state[NUMBER_OF_DIP_SWITCHES] = { 0 }; | 31 | static 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) {} |
36 | void 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); } |
39 | void 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) {} |
42 | void 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); } |
45 | void dip_switch_update_mask_kb(uint32_t state) { dip_switch_update_mask_user(state); } | ||
46 | 40 | ||
47 | void dip_switch_init(void) { | 41 | void 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 | |||
55 | void dip_switch_read(bool forced) { | 48 | void 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 | ||
38 | static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; | 38 | static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; |
39 | 39 | ||
40 | static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; | 40 | static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; |
41 | static int8_t encoder_pulses[NUMBER_OF_ENCODERS] = {0}; | 41 | static 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 | |||
109 | void encoder_update_raw(uint8_t* slave_state) { | 109 | void 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 | |||
84 | extern qk_tap_dance_action_t tap_dance_actions[]; | 82 | extern 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__) |
159 | typedef uint8_t pin_t; | 158 | typedef 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 | ||
diff --git a/tmk_core/common/arm_atsam/suspend.c b/tmk_core/common/arm_atsam/suspend.c index 2dad00570..d1077be4c 100644 --- a/tmk_core/common/arm_atsam/suspend.c +++ b/tmk_core/common/arm_atsam/suspend.c | |||
@@ -7,7 +7,8 @@ | |||
7 | * | 7 | * |
8 | * FIXME: needs doc | 8 | * FIXME: needs doc |
9 | */ | 9 | */ |
10 | void suspend_idle(uint8_t time) { /* Note: Not used anywhere currently */ } | 10 | void suspend_idle(uint8_t time) { /* Note: Not used anywhere currently */ |
11 | } | ||
11 | 12 | ||
12 | /** \brief Run user level Power down | 13 | /** \brief Run user level Power down |
13 | * | 14 | * |
diff --git a/tmk_core/common/eeconfig.c b/tmk_core/common/eeconfig.c index 72f198d6c..7cec4bd7d 100644 --- a/tmk_core/common/eeconfig.c +++ b/tmk_core/common/eeconfig.c | |||
@@ -51,10 +51,10 @@ void eeconfig_init_quantum(void) { | |||
51 | // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS | 51 | // TODO: Remove once ARM has a way to configure EECONFIG_HANDEDNESS |
52 | // within the emulated eeprom via dfu-util or another tool | 52 | // within the emulated eeprom via dfu-util or another tool |
53 | #if defined INIT_EE_HANDS_LEFT | 53 | #if defined INIT_EE_HANDS_LEFT |
54 | #pragma message "Faking EE_HANDS for left hand" | 54 | # pragma message "Faking EE_HANDS for left hand" |
55 | eeprom_update_byte(EECONFIG_HANDEDNESS, 1); | 55 | eeprom_update_byte(EECONFIG_HANDEDNESS, 1); |
56 | #elif defined INIT_EE_HANDS_RIGHT | 56 | #elif defined INIT_EE_HANDS_RIGHT |
57 | #pragma message "Faking EE_HANDS for right hand" | 57 | # pragma message "Faking EE_HANDS for right hand" |
58 | eeprom_update_byte(EECONFIG_HANDEDNESS, 0); | 58 | eeprom_update_byte(EECONFIG_HANDEDNESS, 0); |
59 | #endif | 59 | #endif |
60 | 60 | ||
diff --git a/tmk_core/common/host.c b/tmk_core/common/host.c index 713b0d945..e7d92cfac 100644 --- a/tmk_core/common/host.c +++ b/tmk_core/common/host.c | |||
@@ -41,7 +41,7 @@ uint8_t host_keyboard_leds(void) { | |||
41 | } | 41 | } |
42 | 42 | ||
43 | led_t host_keyboard_led_state(void) { | 43 | led_t host_keyboard_led_state(void) { |
44 | if (!driver) return (led_t) {0}; | 44 | if (!driver) return (led_t){0}; |
45 | return (led_t)((*driver->keyboard_leds)()); | 45 | return (led_t)((*driver->keyboard_leds)()); |
46 | } | 46 | } |
47 | 47 | ||
diff --git a/tmk_core/common/led.h b/tmk_core/common/led.h index daf974bed..990282862 100644 --- a/tmk_core/common/led.h +++ b/tmk_core/common/led.h | |||
@@ -36,11 +36,11 @@ extern "C" { | |||
36 | typedef union { | 36 | typedef union { |
37 | uint8_t raw; | 37 | uint8_t raw; |
38 | struct { | 38 | struct { |
39 | bool num_lock : 1; | 39 | bool num_lock : 1; |
40 | bool caps_lock : 1; | 40 | bool caps_lock : 1; |
41 | bool scroll_lock : 1; | 41 | bool scroll_lock : 1; |
42 | bool compose : 1; | 42 | bool compose : 1; |
43 | bool kana : 1; | 43 | bool kana : 1; |
44 | uint8_t reserved : 3; | 44 | uint8_t reserved : 3; |
45 | }; | 45 | }; |
46 | } led_t; | 46 | } led_t; |
diff --git a/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h b/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h index 2f8a39bdd..fb97f63ce 100644 --- a/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h +++ b/tmk_core/protocol/arm_atsam/usb/usb_protocol_hid.h | |||
@@ -186,9 +186,10 @@ COMPILER_PACK_RESET() | |||
186 | #define USB_HID_COUNTRY_UK 32 // UK | 186 | #define USB_HID_COUNTRY_UK 32 // UK |
187 | #define USB_HID_COUNTRY_US 33 // US | 187 | #define USB_HID_COUNTRY_US 33 // US |
188 | #define USB_HID_COUNTRY_YUGOSLAVIA 34 // Yugoslavia | 188 | #define USB_HID_COUNTRY_YUGOSLAVIA 34 // Yugoslavia |
189 | #define USB_HID_COUNTRY_TURKISH_F 35 // Turkish-F | 189 | #define USB_HID_COUNTRY_TURKISH_F \ |
190 | //! @} | 190 | 35 // Turkish-F |
191 | //! @} | 191 | //! @} |
192 | //! @} | ||
192 | //! @} | 193 | //! @} |
193 | 194 | ||
194 | //! \name HID KEYS values | 195 | //! \name HID KEYS values |
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c index f7bfa20b2..b90bcd037 100644 --- a/tmk_core/protocol/chibios/usb_main.c +++ b/tmk_core/protocol/chibios/usb_main.c | |||
@@ -310,7 +310,7 @@ static void usb_event_cb(USBDriver *usbp, usbevent_t event) { | |||
310 | case USB_EVENT_SUSPEND: | 310 | case USB_EVENT_SUSPEND: |
311 | #ifdef SLEEP_LED_ENABLE | 311 | #ifdef SLEEP_LED_ENABLE |
312 | sleep_led_enable(); | 312 | sleep_led_enable(); |
313 | #endif /* SLEEP_LED_ENABLE */ | 313 | #endif /* SLEEP_LED_ENABLE */ |
314 | /* Falls into.*/ | 314 | /* Falls into.*/ |
315 | case USB_EVENT_UNCONFIGURED: | 315 | case USB_EVENT_UNCONFIGURED: |
316 | /* Falls into.*/ | 316 | /* Falls into.*/ |
@@ -453,9 +453,9 @@ static bool usb_request_hook_cb(USBDriver *usbp) { | |||
453 | #ifdef NKRO_ENABLE | 453 | #ifdef NKRO_ENABLE |
454 | keymap_config.nkro = !!keyboard_protocol; | 454 | keymap_config.nkro = !!keyboard_protocol; |
455 | if (!keymap_config.nkro && keyboard_idle) { | 455 | if (!keymap_config.nkro && keyboard_idle) { |
456 | #else /* NKRO_ENABLE */ | 456 | #else /* NKRO_ENABLE */ |
457 | if (keyboard_idle) { | 457 | if (keyboard_idle) { |
458 | #endif /* NKRO_ENABLE */ | 458 | #endif /* NKRO_ENABLE */ |
459 | /* arm the idle timer if boot protocol & idle */ | 459 | /* arm the idle timer if boot protocol & idle */ |
460 | osalSysLockFromISR(); | 460 | osalSysLockFromISR(); |
461 | chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); | 461 | chVTSetI(&keyboard_idle_timer, 4 * MS2ST(keyboard_idle), keyboard_idle_timer_cb, (void *)usbp); |
diff --git a/tmk_core/protocol/iwrap/iwrap.c b/tmk_core/protocol/iwrap/iwrap.c index 05e632da3..4d0ca5756 100644 --- a/tmk_core/protocol/iwrap/iwrap.c +++ b/tmk_core/protocol/iwrap/iwrap.c | |||
@@ -320,7 +320,8 @@ static void send_mouse(report_mouse_t *report) { | |||
320 | #endif | 320 | #endif |
321 | } | 321 | } |
322 | 322 | ||
323 | static void send_system(uint16_t data) { /* not supported */ } | 323 | static void send_system(uint16_t data) { /* not supported */ |
324 | } | ||
324 | 325 | ||
325 | static void send_consumer(uint16_t data) { | 326 | static void send_consumer(uint16_t data) { |
326 | #ifdef EXTRAKEY_ENABLE | 327 | #ifdef EXTRAKEY_ENABLE |
diff --git a/tmk_core/protocol/lufa/adafruit_ble.cpp b/tmk_core/protocol/lufa/adafruit_ble.cpp index 505794a80..7b3ffdef7 100644 --- a/tmk_core/protocol/lufa/adafruit_ble.cpp +++ b/tmk_core/protocol/lufa/adafruit_ble.cpp | |||
@@ -31,9 +31,9 @@ | |||
31 | #define ConnectionUpdateInterval 1000 /* milliseconds */ | 31 | #define ConnectionUpdateInterval 1000 /* milliseconds */ |
32 | 32 | ||
33 | #ifdef SAMPLE_BATTERY | 33 | #ifdef SAMPLE_BATTERY |
34 | #ifndef BATTERY_LEVEL_PIN | 34 | # ifndef BATTERY_LEVEL_PIN |
35 | # define BATTERY_LEVEL_PIN 7 | 35 | # define BATTERY_LEVEL_PIN 7 |
36 | #endif | 36 | # endif |
37 | #endif | 37 | #endif |
38 | 38 | ||
39 | static struct { | 39 | static struct { |