aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
Diffstat (limited to 'quantum')
-rw-r--r--quantum/audio/audio_arm.c10
-rw-r--r--quantum/backlight/backlight_avr.c58
-rw-r--r--quantum/encoder.c15
-rw-r--r--quantum/keymap_common.c20
-rw-r--r--quantum/process_keycode/process_backlight.c51
-rw-r--r--quantum/process_keycode/process_backlight.h21
-rw-r--r--quantum/quantum.c3
-rw-r--r--quantum/quantum.h4
-rw-r--r--quantum/serial_link/system/serial_link.c4
-rw-r--r--quantum/stm32/chconf.h269
-rw-r--r--quantum/stm32/halconf.h166
-rw-r--r--quantum/stm32/mcuconf.h62
-rw-r--r--quantum/visualizer/common_gfxconf.h453
-rw-r--r--quantum/visualizer/visualizer.c4
-rw-r--r--quantum/visualizer/visualizer.h4
15 files changed, 812 insertions, 332 deletions
diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c
index e4483c302..fba7c5987 100644
--- a/quantum/audio/audio_arm.c
+++ b/quantum/audio/audio_arm.c
@@ -218,17 +218,11 @@ static const dacsample_t dac_buffer_2[DAC_BUFFER_SIZE] = {
218/* 218/*
219 * DAC streaming callback. 219 * DAC streaming callback.
220 */ 220 */
221size_t nx = 0, ny = 0, nz = 0; 221size_t nz = 0;
222static void end_cb1(DACDriver *dacp, dacsample_t *buffer, size_t n) { 222static void end_cb1(DACDriver *dacp) {
223 (void)dacp; 223 (void)dacp;
224 224
225 nz++; 225 nz++;
226 if (dac_buffer == buffer) {
227 nx += n;
228 } else {
229 ny += n;
230 }
231
232 if ((nz % 1000) == 0) { 226 if ((nz % 1000) == 0) {
233 // palTogglePad(GPIOD, GPIOD_LED3); 227 // palTogglePad(GPIOD, GPIOD_LED3);
234 } 228 }
diff --git a/quantum/backlight/backlight_avr.c b/quantum/backlight/backlight_avr.c
index 7cf1e0fb3..519c0c2cf 100644
--- a/quantum/backlight/backlight_avr.c
+++ b/quantum/backlight/backlight_avr.c
@@ -22,12 +22,15 @@
22# define TOIEx TOIE1 22# define TOIEx TOIE1
23 23
24# if BACKLIGHT_PIN == B5 24# if BACKLIGHT_PIN == B5
25# define COMxx0 COM1A0
25# define COMxx1 COM1A1 26# define COMxx1 COM1A1
26# define OCRxx OCR1A 27# define OCRxx OCR1A
27# elif BACKLIGHT_PIN == B6 28# elif BACKLIGHT_PIN == B6
29# define COMxx0 COM1B0
28# define COMxx1 COM1B1 30# define COMxx1 COM1B1
29# define OCRxx OCR1B 31# define OCRxx OCR1B
30# elif BACKLIGHT_PIN == B7 32# elif BACKLIGHT_PIN == B7
33# define COMxx0 COM1C0
31# define COMxx1 COM1C1 34# define COMxx1 COM1C1
32# define OCRxx OCR1C 35# define OCRxx OCR1C
33# endif 36# endif
@@ -44,6 +47,7 @@
44# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) 47# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
45# error This MCU has no C4 pin! 48# error This MCU has no C4 pin!
46# else 49# else
50# define COMxx0 COM3C0
47# define COMxx1 COM3C1 51# define COMxx1 COM3C1
48# define OCRxx OCR3C 52# define OCRxx OCR3C
49# endif 53# endif
@@ -51,10 +55,12 @@
51# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__)) 55# if (defined(__AVR_ATmega16U4__) || defined(__AVR_ATmega32U4__))
52# error This MCU has no C5 pin! 56# error This MCU has no C5 pin!
53# else 57# else
58# define COMxx0 COM3B0
54# define COMxx1 COM3B1 59# define COMxx1 COM3B1
55# define OCRxx OCR3B 60# define OCRxx OCR3B
56# endif 61# endif
57# elif BACKLIGHT_PIN == C6 62# elif BACKLIGHT_PIN == C6
63# define COMxx0 COM3A0
58# define COMxx1 COM3A1 64# define COMxx1 COM3A1
59# define OCRxx OCR3A 65# define OCRxx OCR3A
60# endif 66# endif
@@ -68,12 +74,15 @@
68# define TOIEx TOIE1 74# define TOIEx TOIE1
69 75
70# if BACKLIGHT_PIN == B7 76# if BACKLIGHT_PIN == B7
77# define COMxx0 COM1C0
71# define COMxx1 COM1C1 78# define COMxx1 COM1C1
72# define OCRxx OCR1C 79# define OCRxx OCR1C
73# elif BACKLIGHT_PIN == C5 80# elif BACKLIGHT_PIN == C5
81# define COMxx0 COM1B0
74# define COMxx1 COM1B1 82# define COMxx1 COM1B1
75# define OCRxx OCR1B 83# define OCRxx OCR1B
76# elif BACKLIGHT_PIN == C6 84# elif BACKLIGHT_PIN == C6
85# define COMxx0 COM1A0
77# define COMxx1 COM1A1 86# define COMxx1 COM1A1
78# define OCRxx OCR1A 87# define OCRxx OCR1A
79# endif 88# endif
@@ -87,9 +96,11 @@
87# define TOIEx TOIE1 96# define TOIEx TOIE1
88 97
89# if BACKLIGHT_PIN == D4 98# if BACKLIGHT_PIN == D4
99# define COMxx0 COM1B0
90# define COMxx1 COM1B1 100# define COMxx1 COM1B1
91# define OCRxx OCR1B 101# define OCRxx OCR1B
92# elif BACKLIGHT_PIN == D5 102# elif BACKLIGHT_PIN == D5
103# define COMxx0 COM1A0
93# define COMxx1 COM1A1 104# define COMxx1 COM1A1
94# define OCRxx OCR1A 105# define OCRxx OCR1A
95# endif 106# endif
@@ -103,9 +114,11 @@
103# define TOIEx TOIE1 114# define TOIEx TOIE1
104 115
105# if BACKLIGHT_PIN == B1 116# if BACKLIGHT_PIN == B1
117# define COMxx0 COM1A0
106# define COMxx1 COM1A1 118# define COMxx1 COM1A1
107# define OCRxx OCR1A 119# define OCRxx OCR1A
108# elif BACKLIGHT_PIN == B2 120# elif BACKLIGHT_PIN == B2
121# define COMxx0 COM1B0
109# define COMxx1 COM1B1 122# define COMxx1 COM1B1
110# define OCRxx OCR1B 123# define OCRxx OCR1B
111# endif 124# endif
@@ -156,22 +169,22 @@
156# endif 169# endif
157 170
158# ifndef BACKLIGHT_ON_STATE 171# ifndef BACKLIGHT_ON_STATE
159# define BACKLIGHT_ON_STATE 0 172# define BACKLIGHT_ON_STATE 1
160# endif 173# endif
161 174
162void backlight_on(pin_t backlight_pin) { 175void backlight_on(pin_t backlight_pin) {
163# if BACKLIGHT_ON_STATE == 0 176# if BACKLIGHT_ON_STATE == 1
164 writePinLow(backlight_pin);
165# else
166 writePinHigh(backlight_pin); 177 writePinHigh(backlight_pin);
178# else
179 writePinLow(backlight_pin);
167# endif 180# endif
168} 181}
169 182
170void backlight_off(pin_t backlight_pin) { 183void backlight_off(pin_t backlight_pin) {
171# if BACKLIGHT_ON_STATE == 0 184# if BACKLIGHT_ON_STATE == 1
172 writePinHigh(backlight_pin);
173# else
174 writePinLow(backlight_pin); 185 writePinLow(backlight_pin);
186# else
187 writePinHigh(backlight_pin);
175# endif 188# endif
176} 189}
177 190
@@ -199,6 +212,22 @@ static const pin_t backlight_pins[BACKLIGHT_LED_COUNT] = BACKLIGHT_PIN_INIT;
199 212
200# else // full hardware PWM 213# else // full hardware PWM
201 214
215static inline void enable_pwm(void) {
216# if BACKLIGHT_ON_STATE == 1
217 TCCRxA |= _BV(COMxx1);
218# else
219 TCCRxA |= _BV(COMxx1) | _BV(COMxx0);
220# endif
221}
222
223static inline void disable_pwm(void) {
224# if BACKLIGHT_ON_STATE == 1
225 TCCRxA &= ~(_BV(COMxx1));
226# else
227 TCCRxA &= ~(_BV(COMxx1) | _BV(COMxx0));
228# endif
229}
230
202// we support only one backlight pin 231// we support only one backlight pin
203static const pin_t backlight_pin = BACKLIGHT_PIN; 232static const pin_t backlight_pin = BACKLIGHT_PIN;
204# define FOR_EACH_LED(x) x 233# define FOR_EACH_LED(x) x
@@ -309,12 +338,12 @@ void backlight_set(uint8_t level) {
309 if (OCRxx) { 338 if (OCRxx) {
310 TIMSKx &= ~(_BV(OCIExA)); 339 TIMSKx &= ~(_BV(OCIExA));
311 TIMSKx &= ~(_BV(TOIEx)); 340 TIMSKx &= ~(_BV(TOIEx));
312 FOR_EACH_LED(backlight_off(backlight_pin);)
313 } 341 }
314# else 342# else
315 // Turn off PWM control on backlight pin 343 // Turn off PWM control on backlight pin
316 TCCRxA &= ~(_BV(COMxx1)); 344 disable_pwm();
317# endif 345# endif
346 FOR_EACH_LED(backlight_off(backlight_pin);)
318 } else { 347 } else {
319# ifdef BACKLIGHT_PWM_TIMER 348# ifdef BACKLIGHT_PWM_TIMER
320 if (!OCRxx) { 349 if (!OCRxx) {
@@ -323,7 +352,7 @@ void backlight_set(uint8_t level) {
323 } 352 }
324# else 353# else
325 // Turn on PWM control of backlight pin 354 // Turn on PWM control of backlight pin
326 TCCRxA |= _BV(COMxx1); 355 enable_pwm();
327# endif 356# endif
328 } 357 }
329 // Set the brightness 358 // Set the brightness
@@ -471,8 +500,13 @@ void backlight_init_ports(void) {
471 "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]." 500 "In fast PWM mode, the compare units allow generation of PWM waveforms on the OCnx pins. Setting the COMnx1:0 bits to two will produce a non-inverted PWM [..]."
472 "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)." 501 "In fast PWM mode the counter is incremented until the counter value matches either one of the fixed values 0x00FF, 0x01FF, or 0x03FF (WGMn3:0 = 5, 6, or 7), the value in ICRn (WGMn3:0 = 14), or the value in OCRnA (WGMn3:0 = 15)."
473 */ 502 */
474 TCCRxA = _BV(COMxx1) | _BV(WGM11); // = 0b00001010; 503# if BACKLIGHT_ON_STATE == 1
475 TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10); // = 0b00011001; 504 TCCRxA = _BV(COMxx1) | _BV(WGM11);
505# else
506 TCCRxA = _BV(COMxx1) | _BV(COMxx0) | _BV(WGM11);
507# endif
508
509 TCCRxB = _BV(WGM13) | _BV(WGM12) | _BV(CS10);
476# endif 510# endif
477 // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0. 511 // Use full 16-bit resolution. Counter counts to ICR1 before reset to 0.
478 ICRx = TIMER_TOP; 512 ICRx = TIMER_TOP;
diff --git a/quantum/encoder.c b/quantum/encoder.c
index 8e11562eb..81ec1bb37 100644
--- a/quantum/encoder.c
+++ b/quantum/encoder.c
@@ -35,6 +35,13 @@
35static pin_t encoders_pad_a[] = ENCODERS_PAD_A; 35static pin_t encoders_pad_a[] = ENCODERS_PAD_A;
36static pin_t encoders_pad_b[] = ENCODERS_PAD_B; 36static pin_t encoders_pad_b[] = ENCODERS_PAD_B;
37 37
38#ifndef ENCODER_DIRECTION_FLIP
39# define ENCODER_CLOCKWISE true
40# define ENCODER_COUNTER_CLOCKWISE false
41#else
42# define ENCODER_CLOCKWISE false
43# define ENCODER_COUNTER_CLOCKWISE true
44#endif
38static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0}; 45static int8_t encoder_LUT[] = {0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0};
39 46
40static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0}; 47static uint8_t encoder_state[NUMBER_OF_ENCODERS] = {0};
@@ -86,11 +93,11 @@ static void encoder_update(int8_t index, uint8_t state) {
86 encoder_pulses[i] += encoder_LUT[state & 0xF]; 93 encoder_pulses[i] += encoder_LUT[state & 0xF];
87 if (encoder_pulses[i] >= ENCODER_RESOLUTION) { 94 if (encoder_pulses[i] >= ENCODER_RESOLUTION) {
88 encoder_value[index]++; 95 encoder_value[index]++;
89 encoder_update_kb(index, true); 96 encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE);
90 } 97 }
91 if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise 98 if (encoder_pulses[i] <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise
92 encoder_value[index]--; 99 encoder_value[index]--;
93 encoder_update_kb(index, false); 100 encoder_update_kb(index, ENCODER_CLOCKWISE);
94 } 101 }
95 encoder_pulses[i] %= ENCODER_RESOLUTION; 102 encoder_pulses[i] %= ENCODER_RESOLUTION;
96} 103}
@@ -113,12 +120,12 @@ void encoder_update_raw(uint8_t* slave_state) {
113 while (delta > 0) { 120 while (delta > 0) {
114 delta--; 121 delta--;
115 encoder_value[index]++; 122 encoder_value[index]++;
116 encoder_update_kb(index, true); 123 encoder_update_kb(index, ENCODER_COUNTER_CLOCKWISE);
117 } 124 }
118 while (delta < 0) { 125 while (delta < 0) {
119 delta++; 126 delta++;
120 encoder_value[index]--; 127 encoder_value[index]--;
121 encoder_update_kb(index, false); 128 encoder_update_kb(index, ENCODER_CLOCKWISE);
122 } 129 }
123 } 130 }
124} 131}
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c
index c82c44639..f34ba26e5 100644
--- a/quantum/keymap_common.c
+++ b/quantum/keymap_common.c
@@ -139,26 +139,6 @@ action_t action_for_key(uint8_t layer, keypos_t key) {
139 mod = mod_config((keycode >> 0x8) & 0x1F); 139 mod = mod_config((keycode >> 0x8) & 0x1F);
140 action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF); 140 action.code = ACTION_MODS_TAP_KEY(mod, keycode & 0xFF);
141 break; 141 break;
142#ifdef BACKLIGHT_ENABLE
143 case BL_ON:
144 action.code = ACTION_BACKLIGHT_ON();
145 break;
146 case BL_OFF:
147 action.code = ACTION_BACKLIGHT_OFF();
148 break;
149 case BL_DEC:
150 action.code = ACTION_BACKLIGHT_DECREASE();
151 break;
152 case BL_INC:
153 action.code = ACTION_BACKLIGHT_INCREASE();
154 break;
155 case BL_TOGG:
156 action.code = ACTION_BACKLIGHT_TOGGLE();
157 break;
158 case BL_STEP:
159 action.code = ACTION_BACKLIGHT_STEP();
160 break;
161#endif
162#ifdef SWAP_HANDS_ENABLE 142#ifdef SWAP_HANDS_ENABLE
163 case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX: 143 case QK_SWAP_HANDS ... QK_SWAP_HANDS_MAX:
164 action.code = ACTION(ACT_SWAP_HANDS, keycode & 0xff); 144 action.code = ACTION(ACT_SWAP_HANDS, keycode & 0xff);
diff --git a/quantum/process_keycode/process_backlight.c b/quantum/process_keycode/process_backlight.c
new file mode 100644
index 000000000..4d12f6813
--- /dev/null
+++ b/quantum/process_keycode/process_backlight.c
@@ -0,0 +1,51 @@
1/* Copyright 2019
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#include "process_backlight.h"
18
19#include "backlight.h"
20
21bool process_backlight(uint16_t keycode, keyrecord_t *record) {
22 if (record->event.pressed) {
23 switch (keycode) {
24 case BL_ON:
25 backlight_level(BACKLIGHT_LEVELS);
26 return false;
27 case BL_OFF:
28 backlight_level(0);
29 return false;
30 case BL_DEC:
31 backlight_decrease();
32 return false;
33 case BL_INC:
34 backlight_increase();
35 return false;
36 case BL_TOGG:
37 backlight_toggle();
38 return false;
39 case BL_STEP:
40 backlight_step();
41 return false;
42#ifdef BACKLIGHT_BREATHING
43 case BL_BRTG:
44 backlight_toggle_breathing();
45 return false;
46#endif
47 }
48 }
49
50 return true;
51}
diff --git a/quantum/process_keycode/process_backlight.h b/quantum/process_keycode/process_backlight.h
new file mode 100644
index 000000000..7fe887ae6
--- /dev/null
+++ b/quantum/process_keycode/process_backlight.h
@@ -0,0 +1,21 @@
1/* Copyright 2019
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18
19#include "quantum.h"
20
21bool process_backlight(uint16_t keycode, keyrecord_t *record);
diff --git a/quantum/quantum.c b/quantum/quantum.c
index 1b5ce3292..7c19a3bbb 100644
--- a/quantum/quantum.c
+++ b/quantum/quantum.c
@@ -224,6 +224,9 @@ bool process_record_quantum(keyrecord_t *record) {
224#ifdef AUDIO_ENABLE 224#ifdef AUDIO_ENABLE
225 process_audio(keycode, record) && 225 process_audio(keycode, record) &&
226#endif 226#endif
227#ifdef BACKLIGHT_ENABLE
228 process_backlight(keycode, record) &&
229#endif
227#ifdef STENO_ENABLE 230#ifdef STENO_ENABLE
228 process_steno(keycode, record) && 231 process_steno(keycode, record) &&
229#endif 232#endif
diff --git a/quantum/quantum.h b/quantum/quantum.h
index fbd5e9079..7dc14e628 100644
--- a/quantum/quantum.h
+++ b/quantum/quantum.h
@@ -88,6 +88,10 @@ extern layer_state_t layer_state;
88# include "process_music.h" 88# include "process_music.h"
89#endif 89#endif
90 90
91#ifdef BACKLIGHT_ENABLE
92# include "process_backlight.h"
93#endif
94
91#ifdef LEADER_ENABLE 95#ifdef LEADER_ENABLE
92# include "process_leader.h" 96# include "process_leader.h"
93#endif 97#endif
diff --git a/quantum/serial_link/system/serial_link.c b/quantum/serial_link/system/serial_link.c
index feac64e29..c59c06894 100644
--- a/quantum/serial_link/system/serial_link.c
+++ b/quantum/serial_link/system/serial_link.c
@@ -119,7 +119,7 @@ static THD_FUNCTION(serialThread, arg) {
119 eventflags_t flags1 = 0; 119 eventflags_t flags1 = 0;
120 eventflags_t flags2 = 0; 120 eventflags_t flags2 = 0;
121 if (need_wait) { 121 if (need_wait) {
122 eventmask_t mask = chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(1000)); 122 eventmask_t mask = chEvtWaitAnyTimeout(ALL_EVENTS, TIME_MS2I(1000));
123 if (mask & EVENT_MASK(1)) { 123 if (mask & EVENT_MASK(1)) {
124 flags1 = chEvtGetAndClearFlags(&sd1_listener); 124 flags1 = chEvtGetAndClearFlags(&sd1_listener);
125 print_error("DOWNLINK", flags1, &SD1); 125 print_error("DOWNLINK", flags1, &SD1);
@@ -192,7 +192,7 @@ void serial_link_update(void) {
192 192
193 systime_t current_time = chVTGetSystemTimeX(); 193 systime_t current_time = chVTGetSystemTimeX();
194 systime_t delta = current_time - last_update; 194 systime_t delta = current_time - last_update;
195 if (changed || delta > US2ST(5000)) { 195 if (changed || delta > TIME_US2I(5000)) {
196 last_update = current_time; 196 last_update = current_time;
197 last_matrix = matrix; 197 last_matrix = matrix;
198 matrix_object_t* m = begin_write_keyboard_matrix(); 198 matrix_object_t* m = begin_write_keyboard_matrix();
diff --git a/quantum/stm32/chconf.h b/quantum/stm32/chconf.h
index 6b691950a..b6e66f9e4 100644
--- a/quantum/stm32/chconf.h
+++ b/quantum/stm32/chconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2 ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio 2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3 3
4 Licensed under the Apache License, Version 2.0 (the "License"); 4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License. 5 you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15*/ 15*/
16 16
17/** 17/**
18 * @file templates/chconf.h 18 * @file rt/templates/chconf.h
19 * @brief Configuration file template. 19 * @brief Configuration file template.
20 * @details A copy of this file must be placed in each project directory, it 20 * @details A copy of this file must be placed in each project directory, it
21 * contains the application specific kernel settings. 21 * contains the application specific kernel settings.
@@ -29,6 +29,7 @@
29# define CHCONF_H 29# define CHCONF_H
30 30
31# define _CHIBIOS_RT_CONF_ 31# define _CHIBIOS_RT_CONF_
32# define _CHIBIOS_RT_CONF_VER_6_0_
32 33
33/*===========================================================================*/ 34/*===========================================================================*/
34/** 35/**
@@ -41,14 +42,34 @@
41 * @brief System time counter resolution. 42 * @brief System time counter resolution.
42 * @note Allowed values are 16 or 32 bits. 43 * @note Allowed values are 16 or 32 bits.
43 */ 44 */
44# define CH_CFG_ST_RESOLUTION 32 45# if !defined(CH_CFG_ST_RESOLUTION)
46# define CH_CFG_ST_RESOLUTION 32
47# endif
45 48
46/** 49/**
47 * @brief System tick frequency. 50 * @brief System tick frequency.
48 * @details Frequency of the system timer that drives the system ticks. This 51 * @details Frequency of the system timer that drives the system ticks. This
49 * setting also defines the system tick time unit. 52 * setting also defines the system tick time unit.
50 */ 53 */
51# define CH_CFG_ST_FREQUENCY 100000 54# if !defined(CH_CFG_ST_FREQUENCY)
55# define CH_CFG_ST_FREQUENCY 100000
56# endif
57
58/**
59 * @brief Time intervals data size.
60 * @note Allowed values are 16, 32 or 64 bits.
61 */
62# if !defined(CH_CFG_INTERVALS_SIZE)
63# define CH_CFG_INTERVALS_SIZE 32
64# endif
65
66/**
67 * @brief Time types data size.
68 * @note Allowed values are 16 or 32 bits.
69 */
70# if !defined(CH_CFG_TIME_TYPES_SIZE)
71# define CH_CFG_TIME_TYPES_SIZE 32
72# endif
52 73
53/** 74/**
54 * @brief Time delta constant for the tick-less mode. 75 * @brief Time delta constant for the tick-less mode.
@@ -58,7 +79,9 @@
58 * The value one is not valid, timeouts are rounded up to 79 * The value one is not valid, timeouts are rounded up to
59 * this value. 80 * this value.
60 */ 81 */
61# define CH_CFG_ST_TIMEDELTA 2 82# if !defined(CH_CFG_ST_TIMEDELTA)
83# define CH_CFG_ST_TIMEDELTA 2
84# endif
62 85
63/** @} */ 86/** @} */
64 87
@@ -81,7 +104,9 @@
81 * @note The round robin preemption is not supported in tickless mode and 104 * @note The round robin preemption is not supported in tickless mode and
82 * must be set to zero in that case. 105 * must be set to zero in that case.
83 */ 106 */
84# define CH_CFG_TIME_QUANTUM 0 107# if !defined(CH_CFG_TIME_QUANTUM)
108# define CH_CFG_TIME_QUANTUM 0
109# endif
85 110
86/** 111/**
87 * @brief Managed RAM size. 112 * @brief Managed RAM size.
@@ -94,7 +119,9 @@
94 * provide the @p __heap_base__ and @p __heap_end__ symbols. 119 * provide the @p __heap_base__ and @p __heap_end__ symbols.
95 * @note Requires @p CH_CFG_USE_MEMCORE. 120 * @note Requires @p CH_CFG_USE_MEMCORE.
96 */ 121 */
97# define CH_CFG_MEMCORE_SIZE 0 122# if !defined(CH_CFG_MEMCORE_SIZE)
123# define CH_CFG_MEMCORE_SIZE 0
124# endif
98 125
99/** 126/**
100 * @brief Idle thread automatic spawn suppression. 127 * @brief Idle thread automatic spawn suppression.
@@ -103,7 +130,9 @@
103 * function becomes the idle thread and must implement an 130 * function becomes the idle thread and must implement an
104 * infinite loop. 131 * infinite loop.
105 */ 132 */
106# define CH_CFG_NO_IDLE_THREAD FALSE 133# if !defined(CH_CFG_NO_IDLE_THREAD)
134# define CH_CFG_NO_IDLE_THREAD FALSE
135# endif
107 136
108/** @} */ 137/** @} */
109 138
@@ -122,7 +151,9 @@
122 * @note This is not related to the compiler optimization options. 151 * @note This is not related to the compiler optimization options.
123 * @note The default is @p TRUE. 152 * @note The default is @p TRUE.
124 */ 153 */
125# define CH_CFG_OPTIMIZE_SPEED TRUE 154# if !defined(CH_CFG_OPTIMIZE_SPEED)
155# define CH_CFG_OPTIMIZE_SPEED TRUE
156# endif
126 157
127/** @} */ 158/** @} */
128 159
@@ -140,7 +171,9 @@
140 * 171 *
141 * @note The default is @p TRUE. 172 * @note The default is @p TRUE.
142 */ 173 */
143# define CH_CFG_USE_TM TRUE 174# if !defined(CH_CFG_USE_TM)
175# define CH_CFG_USE_TM TRUE
176# endif
144 177
145/** 178/**
146 * @brief Threads registry APIs. 179 * @brief Threads registry APIs.
@@ -148,7 +181,9 @@
148 * 181 *
149 * @note The default is @p TRUE. 182 * @note The default is @p TRUE.
150 */ 183 */
151# define CH_CFG_USE_REGISTRY TRUE 184# if !defined(CH_CFG_USE_REGISTRY)
185# define CH_CFG_USE_REGISTRY TRUE
186# endif
152 187
153/** 188/**
154 * @brief Threads synchronization APIs. 189 * @brief Threads synchronization APIs.
@@ -157,7 +192,9 @@
157 * 192 *
158 * @note The default is @p TRUE. 193 * @note The default is @p TRUE.
159 */ 194 */
160# define CH_CFG_USE_WAITEXIT TRUE 195# if !defined(CH_CFG_USE_WAITEXIT)
196# define CH_CFG_USE_WAITEXIT TRUE
197# endif
161 198
162/** 199/**
163 * @brief Semaphores APIs. 200 * @brief Semaphores APIs.
@@ -165,7 +202,9 @@
165 * 202 *
166 * @note The default is @p TRUE. 203 * @note The default is @p TRUE.
167 */ 204 */
168# define CH_CFG_USE_SEMAPHORES TRUE 205# if !defined(CH_CFG_USE_SEMAPHORES)
206# define CH_CFG_USE_SEMAPHORES TRUE
207# endif
169 208
170/** 209/**
171 * @brief Semaphores queuing mode. 210 * @brief Semaphores queuing mode.
@@ -176,7 +215,9 @@
176 * requirements. 215 * requirements.
177 * @note Requires @p CH_CFG_USE_SEMAPHORES. 216 * @note Requires @p CH_CFG_USE_SEMAPHORES.
178 */ 217 */
179# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE 218# if !defined(CH_CFG_USE_SEMAPHORES_PRIORITY)
219# define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE
220# endif
180 221
181/** 222/**
182 * @brief Mutexes APIs. 223 * @brief Mutexes APIs.
@@ -184,7 +225,9 @@
184 * 225 *
185 * @note The default is @p TRUE. 226 * @note The default is @p TRUE.
186 */ 227 */
187# define CH_CFG_USE_MUTEXES TRUE 228# if !defined(CH_CFG_USE_MUTEXES)
229# define CH_CFG_USE_MUTEXES TRUE
230# endif
188 231
189/** 232/**
190 * @brief Enables recursive behavior on mutexes. 233 * @brief Enables recursive behavior on mutexes.
@@ -194,7 +237,9 @@
194 * @note The default is @p FALSE. 237 * @note The default is @p FALSE.
195 * @note Requires @p CH_CFG_USE_MUTEXES. 238 * @note Requires @p CH_CFG_USE_MUTEXES.
196 */ 239 */
197# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE 240# if !defined(CH_CFG_USE_MUTEXES_RECURSIVE)
241# define CH_CFG_USE_MUTEXES_RECURSIVE FALSE
242# endif
198 243
199/** 244/**
200 * @brief Conditional Variables APIs. 245 * @brief Conditional Variables APIs.
@@ -204,7 +249,9 @@
204 * @note The default is @p TRUE. 249 * @note The default is @p TRUE.
205 * @note Requires @p CH_CFG_USE_MUTEXES. 250 * @note Requires @p CH_CFG_USE_MUTEXES.
206 */ 251 */
207# define CH_CFG_USE_CONDVARS TRUE 252# if !defined(CH_CFG_USE_CONDVARS)
253# define CH_CFG_USE_CONDVARS TRUE
254# endif
208 255
209/** 256/**
210 * @brief Conditional Variables APIs with timeout. 257 * @brief Conditional Variables APIs with timeout.
@@ -214,7 +261,9 @@
214 * @note The default is @p TRUE. 261 * @note The default is @p TRUE.
215 * @note Requires @p CH_CFG_USE_CONDVARS. 262 * @note Requires @p CH_CFG_USE_CONDVARS.
216 */ 263 */
217# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE 264# if !defined(CH_CFG_USE_CONDVARS_TIMEOUT)
265# define CH_CFG_USE_CONDVARS_TIMEOUT TRUE
266# endif
218 267
219/** 268/**
220 * @brief Events Flags APIs. 269 * @brief Events Flags APIs.
@@ -222,7 +271,9 @@
222 * 271 *
223 * @note The default is @p TRUE. 272 * @note The default is @p TRUE.
224 */ 273 */
225# define CH_CFG_USE_EVENTS TRUE 274# if !defined(CH_CFG_USE_EVENTS)
275# define CH_CFG_USE_EVENTS TRUE
276# endif
226 277
227/** 278/**
228 * @brief Events Flags APIs with timeout. 279 * @brief Events Flags APIs with timeout.
@@ -232,7 +283,9 @@
232 * @note The default is @p TRUE. 283 * @note The default is @p TRUE.
233 * @note Requires @p CH_CFG_USE_EVENTS. 284 * @note Requires @p CH_CFG_USE_EVENTS.
234 */ 285 */
235# define CH_CFG_USE_EVENTS_TIMEOUT TRUE 286# if !defined(CH_CFG_USE_EVENTS_TIMEOUT)
287# define CH_CFG_USE_EVENTS_TIMEOUT TRUE
288# endif
236 289
237/** 290/**
238 * @brief Synchronous Messages APIs. 291 * @brief Synchronous Messages APIs.
@@ -241,7 +294,9 @@
241 * 294 *
242 * @note The default is @p TRUE. 295 * @note The default is @p TRUE.
243 */ 296 */
244# define CH_CFG_USE_MESSAGES TRUE 297# if !defined(CH_CFG_USE_MESSAGES)
298# define CH_CFG_USE_MESSAGES TRUE
299# endif
245 300
246/** 301/**
247 * @brief Synchronous Messages queuing mode. 302 * @brief Synchronous Messages queuing mode.
@@ -252,7 +307,9 @@
252 * requirements. 307 * requirements.
253 * @note Requires @p CH_CFG_USE_MESSAGES. 308 * @note Requires @p CH_CFG_USE_MESSAGES.
254 */ 309 */
255# define CH_CFG_USE_MESSAGES_PRIORITY TRUE 310# if !defined(CH_CFG_USE_MESSAGES_PRIORITY)
311# define CH_CFG_USE_MESSAGES_PRIORITY TRUE
312# endif
256 313
257/** 314/**
258 * @brief Mailboxes APIs. 315 * @brief Mailboxes APIs.
@@ -262,7 +319,9 @@
262 * @note The default is @p TRUE. 319 * @note The default is @p TRUE.
263 * @note Requires @p CH_CFG_USE_SEMAPHORES. 320 * @note Requires @p CH_CFG_USE_SEMAPHORES.
264 */ 321 */
265# define CH_CFG_USE_MAILBOXES TRUE 322# if !defined(CH_CFG_USE_MAILBOXES)
323# define CH_CFG_USE_MAILBOXES TRUE
324# endif
266 325
267/** 326/**
268 * @brief Core Memory Manager APIs. 327 * @brief Core Memory Manager APIs.
@@ -271,7 +330,9 @@
271 * 330 *
272 * @note The default is @p TRUE. 331 * @note The default is @p TRUE.
273 */ 332 */
274# define CH_CFG_USE_MEMCORE TRUE 333# if !defined(CH_CFG_USE_MEMCORE)
334# define CH_CFG_USE_MEMCORE TRUE
335# endif
275 336
276/** 337/**
277 * @brief Heap Allocator APIs. 338 * @brief Heap Allocator APIs.
@@ -283,7 +344,9 @@
283 * @p CH_CFG_USE_SEMAPHORES. 344 * @p CH_CFG_USE_SEMAPHORES.
284 * @note Mutexes are recommended. 345 * @note Mutexes are recommended.
285 */ 346 */
286# define CH_CFG_USE_HEAP TRUE 347# if !defined(CH_CFG_USE_HEAP)
348# define CH_CFG_USE_HEAP TRUE
349# endif
287 350
288/** 351/**
289 * @brief Memory Pools Allocator APIs. 352 * @brief Memory Pools Allocator APIs.
@@ -292,7 +355,31 @@
292 * 355 *
293 * @note The default is @p TRUE. 356 * @note The default is @p TRUE.
294 */ 357 */
295# define CH_CFG_USE_MEMPOOLS TRUE 358# if !defined(CH_CFG_USE_MEMPOOLS)
359# define CH_CFG_USE_MEMPOOLS TRUE
360# endif
361
362/**
363 * @brief Objects FIFOs APIs.
364 * @details If enabled then the objects FIFOs APIs are included
365 * in the kernel.
366 *
367 * @note The default is @p TRUE.
368 */
369# if !defined(CH_CFG_USE_OBJ_FIFOS)
370# define CH_CFG_USE_OBJ_FIFOS TRUE
371# endif
372
373/**
374 * @brief Pipes APIs.
375 * @details If enabled then the pipes APIs are included
376 * in the kernel.
377 *
378 * @note The default is @p TRUE.
379 */
380# if !defined(CH_CFG_USE_PIPES)
381# define CH_CFG_USE_PIPES TRUE
382# endif
296 383
297/** 384/**
298 * @brief Dynamic Threads APIs. 385 * @brief Dynamic Threads APIs.
@@ -303,7 +390,80 @@
303 * @note Requires @p CH_CFG_USE_WAITEXIT. 390 * @note Requires @p CH_CFG_USE_WAITEXIT.
304 * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. 391 * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS.
305 */ 392 */
306# define CH_CFG_USE_DYNAMIC TRUE 393# if !defined(CH_CFG_USE_DYNAMIC)
394# define CH_CFG_USE_DYNAMIC TRUE
395# endif
396
397/** @} */
398
399/*===========================================================================*/
400/**
401 * @name Objects factory options
402 * @{
403 */
404/*===========================================================================*/
405
406/**
407 * @brief Objects Factory APIs.
408 * @details If enabled then the objects factory APIs are included in the
409 * kernel.
410 *
411 * @note The default is @p FALSE.
412 */
413# if !defined(CH_CFG_USE_FACTORY)
414# define CH_CFG_USE_FACTORY TRUE
415# endif
416
417/**
418 * @brief Maximum length for object names.
419 * @details If the specified length is zero then the name is stored by
420 * pointer but this could have unintended side effects.
421 */
422# if !defined(CH_CFG_FACTORY_MAX_NAMES_LENGTH)
423# define CH_CFG_FACTORY_MAX_NAMES_LENGTH 8
424# endif
425
426/**
427 * @brief Enables the registry of generic objects.
428 */
429# if !defined(CH_CFG_FACTORY_OBJECTS_REGISTRY)
430# define CH_CFG_FACTORY_OBJECTS_REGISTRY TRUE
431# endif
432
433/**
434 * @brief Enables factory for generic buffers.
435 */
436# if !defined(CH_CFG_FACTORY_GENERIC_BUFFERS)
437# define CH_CFG_FACTORY_GENERIC_BUFFERS TRUE
438# endif
439
440/**
441 * @brief Enables factory for semaphores.
442 */
443# if !defined(CH_CFG_FACTORY_SEMAPHORES)
444# define CH_CFG_FACTORY_SEMAPHORES TRUE
445# endif
446
447/**
448 * @brief Enables factory for mailboxes.
449 */
450# if !defined(CH_CFG_FACTORY_MAILBOXES)
451# define CH_CFG_FACTORY_MAILBOXES TRUE
452# endif
453
454/**
455 * @brief Enables factory for objects FIFOs.
456 */
457# if !defined(CH_CFG_FACTORY_OBJ_FIFOS)
458# define CH_CFG_FACTORY_OBJ_FIFOS TRUE
459# endif
460
461/**
462 * @brief Enables factory for Pipes.
463 */
464# if !defined(CH_CFG_FACTORY_PIPES) || defined(__DOXYGEN__)
465# define CH_CFG_FACTORY_PIPES TRUE
466# endif
307 467
308/** @} */ 468/** @} */
309 469
@@ -319,7 +479,9 @@
319 * 479 *
320 * @note The default is @p FALSE. 480 * @note The default is @p FALSE.
321 */ 481 */
322# define CH_DBG_STATISTICS FALSE 482# if !defined(CH_DBG_STATISTICS)
483# define CH_DBG_STATISTICS FALSE
484# endif
323 485
324/** 486/**
325 * @brief Debug option, system state check. 487 * @brief Debug option, system state check.
@@ -328,7 +490,9 @@
328 * 490 *
329 * @note The default is @p FALSE. 491 * @note The default is @p FALSE.
330 */ 492 */
331# define CH_DBG_SYSTEM_STATE_CHECK FALSE 493# if !defined(CH_DBG_SYSTEM_STATE_CHECK)
494# define CH_DBG_SYSTEM_STATE_CHECK FALSE
495# endif
332 496
333/** 497/**
334 * @brief Debug option, parameters checks. 498 * @brief Debug option, parameters checks.
@@ -337,7 +501,9 @@
337 * 501 *
338 * @note The default is @p FALSE. 502 * @note The default is @p FALSE.
339 */ 503 */
340# define CH_DBG_ENABLE_CHECKS FALSE 504# if !defined(CH_DBG_ENABLE_CHECKS)
505# define CH_DBG_ENABLE_CHECKS FALSE
506# endif
341 507
342/** 508/**
343 * @brief Debug option, consistency checks. 509 * @brief Debug option, consistency checks.
@@ -347,7 +513,9 @@
347 * 513 *
348 * @note The default is @p FALSE. 514 * @note The default is @p FALSE.
349 */ 515 */
350# define CH_DBG_ENABLE_ASSERTS FALSE 516# if !defined(CH_DBG_ENABLE_ASSERTS)
517# define CH_DBG_ENABLE_ASSERTS FALSE
518# endif
351 519
352/** 520/**
353 * @brief Debug option, trace buffer. 521 * @brief Debug option, trace buffer.
@@ -355,14 +523,18 @@
355 * 523 *
356 * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. 524 * @note The default is @p CH_DBG_TRACE_MASK_DISABLED.
357 */ 525 */
358# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED 526# if !defined(CH_DBG_TRACE_MASK)
527# define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED
528# endif
359 529
360/** 530/**
361 * @brief Trace buffer entries. 531 * @brief Trace buffer entries.
362 * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is 532 * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is
363 * different from @p CH_DBG_TRACE_MASK_DISABLED. 533 * different from @p CH_DBG_TRACE_MASK_DISABLED.
364 */ 534 */
365# define CH_DBG_TRACE_BUFFER_SIZE 128 535# if !defined(CH_DBG_TRACE_BUFFER_SIZE)
536# define CH_DBG_TRACE_BUFFER_SIZE 128
537# endif
366 538
367/** 539/**
368 * @brief Debug option, stack checks. 540 * @brief Debug option, stack checks.
@@ -374,7 +546,9 @@
374 * @note The default failure mode is to halt the system with the global 546 * @note The default failure mode is to halt the system with the global
375 * @p panic_msg variable set to @p NULL. 547 * @p panic_msg variable set to @p NULL.
376 */ 548 */
377# define CH_DBG_ENABLE_STACK_CHECK TRUE 549# if !defined(CH_DBG_ENABLE_STACK_CHECK)
550# define CH_DBG_ENABLE_STACK_CHECK TRUE
551# endif
378 552
379/** 553/**
380 * @brief Debug option, stacks initialization. 554 * @brief Debug option, stacks initialization.
@@ -384,7 +558,9 @@
384 * 558 *
385 * @note The default is @p FALSE. 559 * @note The default is @p FALSE.
386 */ 560 */
387# define CH_DBG_FILL_THREADS FALSE 561# if !defined(CH_DBG_FILL_THREADS)
562# define CH_DBG_FILL_THREADS FALSE
563# endif
388 564
389/** 565/**
390 * @brief Debug option, threads profiling. 566 * @brief Debug option, threads profiling.
@@ -395,7 +571,9 @@
395 * @note This debug option is not currently compatible with the 571 * @note This debug option is not currently compatible with the
396 * tickless mode. 572 * tickless mode.
397 */ 573 */
398# define CH_DBG_THREADS_PROFILING FALSE 574# if !defined(CH_DBG_THREADS_PROFILING)
575# define CH_DBG_THREADS_PROFILING FALSE
576# endif
399 577
400/** @} */ 578/** @} */
401 579
@@ -407,6 +585,21 @@
407/*===========================================================================*/ 585/*===========================================================================*/
408 586
409/** 587/**
588 * @brief System structure extension.
589 * @details User fields added to the end of the @p ch_system_t structure.
590 */
591# define CH_CFG_SYSTEM_EXTRA_FIELDS /* Add threads custom fields here.*/
592
593/**
594 * @brief System initialization hook.
595 * @details User initialization code added to the @p chSysInit() function
596 * just before interrupts are enabled globally.
597 */
598# define CH_CFG_SYSTEM_INIT_HOOK() \
599 { /* Add threads initialization code here.*/ \
600 }
601
602/**
410 * @brief Threads descriptor structure extension. 603 * @brief Threads descriptor structure extension.
411 * @details User fields added to the end of the @p thread_t structure. 604 * @details User fields added to the end of the @p thread_t structure.
412 */ 605 */
@@ -414,9 +607,9 @@
414 607
415/** 608/**
416 * @brief Threads initialization hook. 609 * @brief Threads initialization hook.
417 * @details User initialization code added to the @p chThdInit() API. 610 * @details User initialization code added to the @p _thread_init() function.
418 * 611 *
419 * @note It is invoked from within @p chThdInit() and implicitly from all 612 * @note It is invoked from within @p _thread_init() and implicitly from all
420 * the threads creation APIs. 613 * the threads creation APIs.
421 */ 614 */
422# define CH_CFG_THREAD_INIT_HOOK(tp) \ 615# define CH_CFG_THREAD_INIT_HOOK(tp) \
diff --git a/quantum/stm32/halconf.h b/quantum/stm32/halconf.h
index 72e011d3d..106f0f575 100644
--- a/quantum/stm32/halconf.h
+++ b/quantum/stm32/halconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2 ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio 2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3 3
4 Licensed under the Apache License, Version 2.0 (the "License"); 4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License. 5 you may not use this file except in compliance with the License.
@@ -28,6 +28,9 @@
28#ifndef HALCONF_H 28#ifndef HALCONF_H
29# define HALCONF_H 29# define HALCONF_H
30 30
31# define _CHIBIOS_HAL_CONF_
32# define _CHIBIOS_HAL_CONF_VER_7_0_
33
31# include "mcuconf.h" 34# include "mcuconf.h"
32 35
33/** 36/**
@@ -52,17 +55,17 @@
52# endif 55# endif
53 56
54/** 57/**
55 * @brief Enables the DAC subsystem. 58 * @brief Enables the cryptographic subsystem.
56 */ 59 */
57# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) 60# if !defined(HAL_USE_CRY) || defined(__DOXYGEN__)
58# define HAL_USE_DAC TRUE 61# define HAL_USE_CRY FALSE
59# endif 62# endif
60 63
61/** 64/**
62 * @brief Enables the EXT subsystem. 65 * @brief Enables the DAC subsystem.
63 */ 66 */
64# if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) 67# if !defined(HAL_USE_DAC) || defined(__DOXYGEN__)
65# define HAL_USE_EXT FALSE 68# define HAL_USE_DAC TRUE
66# endif 69# endif
67 70
68/** 71/**
@@ -115,13 +118,6 @@
115# endif 118# endif
116 119
117/** 120/**
118 * @brief Enables the QSPI subsystem.
119 */
120# if !defined(HAL_USE_QSPI) || defined(__DOXYGEN__)
121# define HAL_USE_QSPI FALSE
122# endif
123
124/**
125 * @brief Enables the RTC subsystem. 121 * @brief Enables the RTC subsystem.
126 */ 122 */
127# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) 123# if !defined(HAL_USE_RTC) || defined(__DOXYGEN__)
@@ -150,6 +146,13 @@
150# endif 146# endif
151 147
152/** 148/**
149 * @brief Enables the SIO subsystem.
150 */
151# if !defined(HAL_USE_SIO) || defined(__DOXYGEN__)
152# define HAL_USE_SIO FALSE
153# endif
154
155/**
153 * @brief Enables the SPI subsystem. 156 * @brief Enables the SPI subsystem.
154 */ 157 */
155# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) 158# if !defined(HAL_USE_SPI) || defined(__DOXYGEN__)
@@ -157,6 +160,13 @@
157# endif 160# endif
158 161
159/** 162/**
163 * @brief Enables the TRNG subsystem.
164 */
165# if !defined(HAL_USE_TRNG) || defined(__DOXYGEN__)
166# define HAL_USE_TRNG FALSE
167# endif
168
169/**
160 * @brief Enables the UART subsystem. 170 * @brief Enables the UART subsystem.
161 */ 171 */
162# if !defined(HAL_USE_UART) || defined(__DOXYGEN__) 172# if !defined(HAL_USE_UART) || defined(__DOXYGEN__)
@@ -177,6 +187,33 @@
177# define HAL_USE_WDG FALSE 187# define HAL_USE_WDG FALSE
178# endif 188# endif
179 189
190/**
191 * @brief Enables the WSPI subsystem.
192 */
193# if !defined(HAL_USE_WSPI) || defined(__DOXYGEN__)
194# define HAL_USE_WSPI FALSE
195# endif
196
197/*===========================================================================*/
198/* PAL driver related settings. */
199/*===========================================================================*/
200
201/**
202 * @brief Enables synchronous APIs.
203 * @note Disabling this option saves both code and data space.
204 */
205# if !defined(PAL_USE_CALLBACKS) || defined(__DOXYGEN__)
206# define PAL_USE_CALLBACKS FALSE
207# endif
208
209/**
210 * @brief Enables synchronous APIs.
211 * @note Disabling this option saves both code and data space.
212 */
213# if !defined(PAL_USE_WAIT) || defined(__DOXYGEN__)
214# define PAL_USE_WAIT FALSE
215# endif
216
180/*===========================================================================*/ 217/*===========================================================================*/
181/* ADC driver related settings. */ 218/* ADC driver related settings. */
182/*===========================================================================*/ 219/*===========================================================================*/
@@ -208,6 +245,55 @@
208# define CAN_USE_SLEEP_MODE TRUE 245# define CAN_USE_SLEEP_MODE TRUE
209# endif 246# endif
210 247
248/**
249 * @brief Enforces the driver to use direct callbacks rather than OSAL events.
250 */
251# if !defined(CAN_ENFORCE_USE_CALLBACKS) || defined(__DOXYGEN__)
252# define CAN_ENFORCE_USE_CALLBACKS FALSE
253# endif
254
255/*===========================================================================*/
256/* CRY driver related settings. */
257/*===========================================================================*/
258
259/**
260 * @brief Enables the SW fall-back of the cryptographic driver.
261 * @details When enabled, this option, activates a fall-back software
262 * implementation for algorithms not supported by the underlying
263 * hardware.
264 * @note Fall-back implementations may not be present for all algorithms.
265 */
266# if !defined(HAL_CRY_USE_FALLBACK) || defined(__DOXYGEN__)
267# define HAL_CRY_USE_FALLBACK FALSE
268# endif
269
270/**
271 * @brief Makes the driver forcibly use the fall-back implementations.
272 */
273# if !defined(HAL_CRY_ENFORCE_FALLBACK) || defined(__DOXYGEN__)
274# define HAL_CRY_ENFORCE_FALLBACK FALSE
275# endif
276
277/*===========================================================================*/
278/* DAC driver related settings. */
279/*===========================================================================*/
280
281/**
282 * @brief Enables synchronous APIs.
283 * @note Disabling this option saves both code and data space.
284 */
285# if !defined(DAC_USE_WAIT) || defined(__DOXYGEN__)
286# define DAC_USE_WAIT TRUE
287# endif
288
289/**
290 * @brief Enables the @p dacAcquireBus() and @p dacReleaseBus() APIs.
291 * @note Disabling this option saves both code and data space.
292 */
293# if !defined(DAC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
294# define DAC_USE_MUTUAL_EXCLUSION TRUE
295# endif
296
211/*===========================================================================*/ 297/*===========================================================================*/
212/* I2C driver related settings. */ 298/* I2C driver related settings. */
213/*===========================================================================*/ 299/*===========================================================================*/
@@ -224,7 +310,7 @@
224/*===========================================================================*/ 310/*===========================================================================*/
225 311
226/** 312/**
227 * @brief Enables an event sources for incoming packets. 313 * @brief Enables the zero-copy API.
228 */ 314 */
229# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) 315# if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__)
230# define MAC_USE_ZERO_COPY FALSE 316# define MAC_USE_ZERO_COPY FALSE
@@ -284,6 +370,20 @@
284# define SDC_NICE_WAITING TRUE 370# define SDC_NICE_WAITING TRUE
285# endif 371# endif
286 372
373/**
374 * @brief OCR initialization constant for V20 cards.
375 */
376# if !defined(SDC_INIT_OCR_V20) || defined(__DOXYGEN__)
377# define SDC_INIT_OCR_V20 0x50FF8000U
378# endif
379
380/**
381 * @brief OCR initialization constant for non-V20 cards.
382 */
383# if !defined(SDC_INIT_OCR) || defined(__DOXYGEN__)
384# define SDC_INIT_OCR 0x80100000U
385# endif
386
287/*===========================================================================*/ 387/*===========================================================================*/
288/* SERIAL driver related settings. */ 388/* SERIAL driver related settings. */
289/*===========================================================================*/ 389/*===========================================================================*/
@@ -344,6 +444,14 @@
344# endif 444# endif
345 445
346/** 446/**
447 * @brief Enables circular transfers APIs.
448 * @note Disabling this option saves both code and data space.
449 */
450# if !defined(SPI_USE_CIRCULAR) || defined(__DOXYGEN__)
451# define SPI_USE_CIRCULAR FALSE
452# endif
453
454/**
347 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. 455 * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs.
348 * @note Disabling this option saves both code and data space. 456 * @note Disabling this option saves both code and data space.
349 */ 457 */
@@ -351,6 +459,14 @@
351# define SPI_USE_MUTUAL_EXCLUSION TRUE 459# define SPI_USE_MUTUAL_EXCLUSION TRUE
352# endif 460# endif
353 461
462/**
463 * @brief Handling method for SPI CS line.
464 * @note Disabling this option saves both code and data space.
465 */
466# if !defined(SPI_SELECT_MODE) || defined(__DOXYGEN__)
467# define SPI_SELECT_MODE SPI_SELECT_MODE_PAD
468# endif
469
354/*===========================================================================*/ 470/*===========================================================================*/
355/* UART driver related settings. */ 471/* UART driver related settings. */
356/*===========================================================================*/ 472/*===========================================================================*/
@@ -383,6 +499,26 @@
383# define USB_USE_WAIT TRUE 499# define USB_USE_WAIT TRUE
384# endif 500# endif
385 501
502/*===========================================================================*/
503/* WSPI driver related settings. */
504/*===========================================================================*/
505
506/**
507 * @brief Enables synchronous APIs.
508 * @note Disabling this option saves both code and data space.
509 */
510# if !defined(WSPI_USE_WAIT) || defined(__DOXYGEN__)
511# define WSPI_USE_WAIT TRUE
512# endif
513
514/**
515 * @brief Enables the @p wspiAcquireBus() and @p wspiReleaseBus() APIs.
516 * @note Disabling this option saves both code and data space.
517 */
518# if !defined(WSPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__)
519# define WSPI_USE_MUTUAL_EXCLUSION TRUE
520# endif
521
386#endif /* HALCONF_H */ 522#endif /* HALCONF_H */
387 523
388/** @} */ 524/** @} */
diff --git a/quantum/stm32/mcuconf.h b/quantum/stm32/mcuconf.h
index 4490dfed7..ca4ad7b51 100644
--- a/quantum/stm32/mcuconf.h
+++ b/quantum/stm32/mcuconf.h
@@ -1,5 +1,5 @@
1/* 1/*
2 ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio 2 ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio
3 3
4 Licensed under the Apache License, Version 2.0 (the "License"); 4 Licensed under the Apache License, Version 2.0 (the "License");
5 you may not use this file except in compliance with the License. 5 you may not use this file except in compliance with the License.
@@ -32,6 +32,7 @@
32 */ 32 */
33 33
34#define STM32F3xx_MCUCONF 34#define STM32F3xx_MCUCONF
35#define STM32F303_MCUCONF
35 36
36/* 37/*
37 * HAL driver system settings. 38 * HAL driver system settings.
@@ -66,9 +67,28 @@
66#define STM32_USB_CLOCK_REQUIRED TRUE 67#define STM32_USB_CLOCK_REQUIRED TRUE
67#define STM32_USBPRE STM32_USBPRE_DIV1P5 68#define STM32_USBPRE STM32_USBPRE_DIV1P5
68 69
69#undef STM32_HSE_BYPASS 70/*
70// #error "oh no" 71 * IRQ system settings.
71// #endif 72 */
73#define STM32_IRQ_EXTI0_PRIORITY 6
74#define STM32_IRQ_EXTI1_PRIORITY 6
75#define STM32_IRQ_EXTI2_PRIORITY 6
76#define STM32_IRQ_EXTI3_PRIORITY 6
77#define STM32_IRQ_EXTI4_PRIORITY 6
78#define STM32_IRQ_EXTI5_9_PRIORITY 6
79#define STM32_IRQ_EXTI10_15_PRIORITY 6
80#define STM32_IRQ_EXTI16_PRIORITY 6
81#define STM32_IRQ_EXTI17_PRIORITY 15
82#define STM32_IRQ_EXTI18_PRIORITY 6
83#define STM32_IRQ_EXTI19_PRIORITY 15
84#define STM32_IRQ_EXTI20_PRIORITY 15
85#define STM32_IRQ_EXTI21_22_29_PRIORITY 6
86#define STM32_IRQ_EXTI30_32_PRIORITY 6
87#define STM32_IRQ_EXTI33_PRIORITY 6
88#define STM32_IRQ_TIM1_BRK_TIM15_PRIORITY 7
89#define STM32_IRQ_TIM1_UP_TIM16_PRIORITY 7
90#define STM32_IRQ_TIM1_TRGCO_TIM17_PRIORITY 7
91#define STM32_IRQ_TIM1_CC_PRIORITY 7
72 92
73/* 93/*
74 * ADC driver system settings. 94 * ADC driver system settings.
@@ -115,25 +135,6 @@
115#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2 135#define STM32_DAC_DAC1_CH2_DMA_PRIORITY 2
116 136
117/* 137/*
118 * EXT driver system settings.
119 */
120#define STM32_EXT_EXTI0_IRQ_PRIORITY 6
121#define STM32_EXT_EXTI1_IRQ_PRIORITY 6
122#define STM32_EXT_EXTI2_IRQ_PRIORITY 6
123#define STM32_EXT_EXTI3_IRQ_PRIORITY 6
124#define STM32_EXT_EXTI4_IRQ_PRIORITY 6
125#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6
126#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6
127#define STM32_EXT_EXTI16_IRQ_PRIORITY 6
128#define STM32_EXT_EXTI17_IRQ_PRIORITY 6
129#define STM32_EXT_EXTI18_IRQ_PRIORITY 6
130#define STM32_EXT_EXTI19_IRQ_PRIORITY 6
131#define STM32_EXT_EXTI20_IRQ_PRIORITY 6
132#define STM32_EXT_EXTI21_22_29_IRQ_PRIORITY 6
133#define STM32_EXT_EXTI30_32_IRQ_PRIORITY 6
134#define STM32_EXT_EXTI33_IRQ_PRIORITY 6
135
136/*
137 * GPT driver system settings. 138 * GPT driver system settings.
138 */ 139 */
139#define STM32_GPT_USE_TIM1 FALSE 140#define STM32_GPT_USE_TIM1 FALSE
@@ -143,6 +144,9 @@
143#define STM32_GPT_USE_TIM6 TRUE 144#define STM32_GPT_USE_TIM6 TRUE
144#define STM32_GPT_USE_TIM7 TRUE 145#define STM32_GPT_USE_TIM7 TRUE
145#define STM32_GPT_USE_TIM8 TRUE 146#define STM32_GPT_USE_TIM8 TRUE
147#define STM32_GPT_USE_TIM15 FALSE
148#define STM32_GPT_USE_TIM16 FALSE
149#define STM32_GPT_USE_TIM17 FALSE
146#define STM32_GPT_TIM1_IRQ_PRIORITY 7 150#define STM32_GPT_TIM1_IRQ_PRIORITY 7
147#define STM32_GPT_TIM2_IRQ_PRIORITY 7 151#define STM32_GPT_TIM2_IRQ_PRIORITY 7
148#define STM32_GPT_TIM3_IRQ_PRIORITY 7 152#define STM32_GPT_TIM3_IRQ_PRIORITY 7
@@ -172,6 +176,7 @@
172#define STM32_ICU_USE_TIM3 FALSE 176#define STM32_ICU_USE_TIM3 FALSE
173#define STM32_ICU_USE_TIM4 FALSE 177#define STM32_ICU_USE_TIM4 FALSE
174#define STM32_ICU_USE_TIM8 FALSE 178#define STM32_ICU_USE_TIM8 FALSE
179#define STM32_ICU_USE_TIM15 FALSE
175#define STM32_ICU_TIM1_IRQ_PRIORITY 7 180#define STM32_ICU_TIM1_IRQ_PRIORITY 7
176#define STM32_ICU_TIM2_IRQ_PRIORITY 7 181#define STM32_ICU_TIM2_IRQ_PRIORITY 7
177#define STM32_ICU_TIM3_IRQ_PRIORITY 7 182#define STM32_ICU_TIM3_IRQ_PRIORITY 7
@@ -187,6 +192,9 @@
187#define STM32_PWM_USE_TIM3 TRUE 192#define STM32_PWM_USE_TIM3 TRUE
188#define STM32_PWM_USE_TIM4 TRUE 193#define STM32_PWM_USE_TIM4 TRUE
189#define STM32_PWM_USE_TIM8 FALSE 194#define STM32_PWM_USE_TIM8 FALSE
195#define STM32_PWM_USE_TIM15 FALSE
196#define STM32_PWM_USE_TIM16 FALSE
197#define STM32_PWM_USE_TIM17 FALSE
190#define STM32_PWM_TIM1_IRQ_PRIORITY 7 198#define STM32_PWM_TIM1_IRQ_PRIORITY 7
191#define STM32_PWM_TIM2_IRQ_PRIORITY 7 199#define STM32_PWM_TIM2_IRQ_PRIORITY 7
192#define STM32_PWM_TIM3_IRQ_PRIORITY 7 200#define STM32_PWM_TIM3_IRQ_PRIORITY 7
@@ -194,6 +202,14 @@
194#define STM32_PWM_TIM8_IRQ_PRIORITY 7 202#define STM32_PWM_TIM8_IRQ_PRIORITY 7
195 203
196/* 204/*
205 * RTC driver system settings.
206 */
207#define STM32_RTC_PRESA_VALUE 32
208#define STM32_RTC_PRESS_VALUE 1024
209#define STM32_RTC_CR_INIT 0
210#define STM32_RTC_TAMPCR_INIT 0
211
212/*
197 * SERIAL driver system settings. 213 * SERIAL driver system settings.
198 */ 214 */
199#define STM32_SERIAL_USE_USART1 FALSE 215#define STM32_SERIAL_USE_USART1 FALSE
diff --git a/quantum/visualizer/common_gfxconf.h b/quantum/visualizer/common_gfxconf.h
index 865e58869..e5bbddbb0 100644
--- a/quantum/visualizer/common_gfxconf.h
+++ b/quantum/visualizer/common_gfxconf.h
@@ -23,294 +23,335 @@
23#define COMMON_GFXCONF_H 23#define COMMON_GFXCONF_H
24 24
25/////////////////////////////////////////////////////////////////////////// 25///////////////////////////////////////////////////////////////////////////
26// GFX - Compatibility options //
27///////////////////////////////////////////////////////////////////////////
28//#define GFX_COMPAT_V2 GFXON
29//#define GFX_COMPAT_OLDCOLORS GFXON
30
31///////////////////////////////////////////////////////////////////////////
26// GOS - One of these must be defined, preferably in your Makefile // 32// GOS - One of these must be defined, preferably in your Makefile //
27/////////////////////////////////////////////////////////////////////////// 33///////////////////////////////////////////////////////////////////////////
28//#define GFX_USE_OS_CHIBIOS TRUE 34//#define GFX_USE_OS_CHIBIOS GFXOFF
29//#define GFX_USE_OS_FREERTOS FALSE 35//#define GFX_USE_OS_FREERTOS GFXOFF
30// #define GFX_FREERTOS_USE_TRACE FALSE 36// #define GFX_FREERTOS_USE_TRACE GFXOFF
31//#define GFX_USE_OS_WIN32 FALSE 37//#define GFX_USE_OS_WIN32 GFXOFF
32//#define GFX_USE_OS_LINUX FALSE 38//#define GFX_USE_OS_LINUX GFXOFF
33//#define GFX_USE_OS_OSX FALSE 39//#define GFX_USE_OS_OSX GFXOFF
34//#define GFX_USE_OS_ECOS FALSE 40//#define GFX_USE_OS_ECOS GFXOFF
35//#define GFX_USE_OS_RAWRTOS FALSE 41//#define GFX_USE_OS_RAWRTOS GFXOFF
36//#define GFX_USE_OS_ARDUINO FALSE 42//#define GFX_USE_OS_ARDUINO GFXOFF
37//#define GFX_USE_OS_KEIL FALSE 43//#define GFX_USE_OS_KEIL GFXOFF
38//#define GFX_USE_OS_CMSIS FALSE 44//#define GFX_USE_OS_RTX5 GFXOFF
39//#define GFX_USE_OS_RAW32 FALSE 45//#define GFX_USE_OS_CMSIS GFXOFF
46//#define GFX_USE_OS_CMSIS2 GFXOFF
47//#define GFX_USE_OS_RAW32 GFXOFF
48//#define GFX_USE_OS_ZEPHYR GFXOFF
49//#define GFX_USE_OS_NIOS GFXOFF
50//#define GFX_USE_OS_QT GFXOFF
40// #define INTERRUPTS_OFF() optional_code 51// #define INTERRUPTS_OFF() optional_code
41// #define INTERRUPTS_ON() optional_code 52// #define INTERRUPTS_ON() optional_code
42// These are not defined by default for some reason
43#define GOS_NEED_X_THREADS FALSE
44#define GOS_NEED_X_HEAP FALSE
45 53
46// Options that (should where relevant) apply to all operating systems 54// Options that (should where relevant) apply to all operating systems
47#define GFX_NO_INLINE FALSE 55#define GFX_NO_INLINE GFXON
48// #define GFX_COMPILER GFX_COMPILER_UNKNOWN 56// #define GFX_COMPILER GFX_COMPILER_UNKNOWN
57// #define GFX_SHOW_COMPILER GFXOFF
49// #define GFX_CPU GFX_CPU_UNKNOWN 58// #define GFX_CPU GFX_CPU_UNKNOWN
59// #define GFX_CPU_NO_ALIGNMENT_FAULTS GFXOFF
60// #define GFX_CPU_ENDIAN GFX_CPU_ENDIAN_UNKNOWN
50// #define GFX_OS_HEAP_SIZE 0 61// #define GFX_OS_HEAP_SIZE 0
51// #define GFX_OS_NO_INIT FALSE 62// #define GFX_OS_NO_INIT GFXOFF
52// #define GFX_OS_INIT_NO_WARNING FALSE 63// #define GFX_OS_INIT_NO_WARNING GFXOFF
53// #define GFX_OS_PRE_INIT_FUNCTION myHardwareInitRoutine 64// #define GFX_OS_PRE_INIT_FUNCTION myHardwareInitRoutine
54// #define GFX_OS_EXTRA_INIT_FUNCTION myOSInitRoutine 65// #define GFX_OS_EXTRA_INIT_FUNCTION myOSInitRoutine
55// #define GFX_OS_EXTRA_DEINIT_FUNCTION myOSDeInitRoutine 66// #define GFX_OS_EXTRA_DEINIT_FUNCTION myOSDeInitRoutine
67// #define GFX_OS_CALL_UGFXMAIN GFXOFF
68// #define GFX_OS_UGFXMAIN_STACKSIZE 0
69// #define GFX_EMULATE_MALLOC GFXOFF
70// #define GFX_MEM_LT64K GFXOFF
56 71
57/////////////////////////////////////////////////////////////////////////// 72///////////////////////////////////////////////////////////////////////////
58// GDISP // 73// GDISP //
59/////////////////////////////////////////////////////////////////////////// 74///////////////////////////////////////////////////////////////////////////
60#define GFX_USE_GDISP TRUE 75#define GFX_USE_GDISP GFXON
61 76
62//#define GDISP_NEED_AUTOFLUSH FALSE 77//#define GDISP_NEED_AUTOFLUSH GFXOFF
63//#define GDISP_NEED_TIMERFLUSH FALSE 78//#define GDISP_NEED_TIMERFLUSH GFXOFF
64//#define GDISP_NEED_VALIDATION TRUE 79//#define GDISP_NEED_VALIDATION GFXON
65//#define GDISP_NEED_CLIP TRUE 80//#define GDISP_NEED_CLIP GFXON
66#define GDISP_NEED_CIRCLE TRUE 81#define GDISP_NEED_CIRCLE GFXON
67#define GDISP_NEED_ELLIPSE TRUE 82//#define GDISP_NEED_DUALCIRCLE GFXOFF
68#define GDISP_NEED_ARC TRUE 83#define GDISP_NEED_ELLIPSE GFXON
69#define GDISP_NEED_ARCSECTORS TRUE 84#define GDISP_NEED_ARC GFXON
70#define GDISP_NEED_CONVEX_POLYGON TRUE 85#define GDISP_NEED_ARCSECTORS GFXON
71//#define GDISP_NEED_SCROLL FALSE 86#define GDISP_NEED_CONVEX_POLYGON GFXON
72#define GDISP_NEED_PIXELREAD TRUE 87//#define GDISP_NEED_SCROLL GFXOFF
73#define GDISP_NEED_CONTROL TRUE 88#define GDISP_NEED_PIXELREAD GFXON
74//#define GDISP_NEED_QUERY FALSE 89#define GDISP_NEED_CONTROL GFXON
75//#define GDISP_NEED_MULTITHREAD FALSE 90//#define GDISP_NEED_QUERY GFXOFF
76//#define GDISP_NEED_STREAMING FALSE 91//#define GDISP_NEED_MULTITHREAD GFXOFF
77#define GDISP_NEED_TEXT TRUE 92//#define GDISP_NEED_STREAMING GFXOFF
78// #define GDISP_NEED_TEXT_WORDWRAP FALSE 93#define GDISP_NEED_TEXT GFXON
79// #define GDISP_NEED_ANTIALIAS FALSE 94// #define GDISP_NEED_TEXT_WORDWRAP GFXOFF
80// #define GDISP_NEED_UTF8 FALSE 95// #define GDISP_NEED_TEXT_BOXPADLR 1
81#define GDISP_NEED_TEXT_KERNING TRUE 96// #define GDISP_NEED_TEXT_BOXPADTB 1
82// #define GDISP_INCLUDE_FONT_UI1 FALSE 97// #define GDISP_NEED_ANTIALIAS GFXOFF
83// #define GDISP_INCLUDE_FONT_UI2 FALSE // The smallest preferred font. 98// #define GDISP_NEED_UTF8 GFXOFF
84// #define GDISP_INCLUDE_FONT_LARGENUMBERS FALSE 99#define GDISP_NEED_TEXT_KERNING GFXON
85// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 FALSE 100// #define GDISP_INCLUDE_FONT_UI1 GFXOFF
86// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 FALSE 101// #define GDISP_INCLUDE_FONT_UI2 GFXOFF // The smallest preferred font.
87// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 FALSE 102// #define GDISP_INCLUDE_FONT_LARGENUMBERS GFXOFF
88// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 FALSE 103// #define GDISP_INCLUDE_FONT_DEJAVUSANS10 GFXOFF
89// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 FALSE 104// #define GDISP_INCLUDE_FONT_DEJAVUSANS12 GFXOFF
90// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 FALSE 105// #define GDISP_INCLUDE_FONT_DEJAVUSANS16 GFXOFF
91#define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 TRUE 106// #define GDISP_INCLUDE_FONT_DEJAVUSANS20 GFXOFF
92// #define GDISP_INCLUDE_FONT_FIXED_10X20 FALSE 107// #define GDISP_INCLUDE_FONT_DEJAVUSANS24 GFXOFF
93// #define GDISP_INCLUDE_FONT_FIXED_7X14 FALSE 108// #define GDISP_INCLUDE_FONT_DEJAVUSANS32 GFXOFF
94#define GDISP_INCLUDE_FONT_FIXED_5X8 TRUE 109#define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12 GFXON
95// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA FALSE 110// #define GDISP_INCLUDE_FONT_FIXED_10X20 GFXOFF
96// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA FALSE 111// #define GDISP_INCLUDE_FONT_FIXED_7X14 GFXOFF
97// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA FALSE 112#define GDISP_INCLUDE_FONT_FIXED_5X8 GFXON
98// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA FALSE 113// #define GDISP_INCLUDE_FONT_DEJAVUSANS12_AA GFXOFF
99// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA FALSE 114// #define GDISP_INCLUDE_FONT_DEJAVUSANS16_AA GFXOFF
100// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA FALSE 115// #define GDISP_INCLUDE_FONT_DEJAVUSANS20_AA GFXOFF
101// #define GDISP_INCLUDE_USER_FONTS FALSE 116// #define GDISP_INCLUDE_FONT_DEJAVUSANS24_AA GFXOFF
102 117// #define GDISP_INCLUDE_FONT_DEJAVUSANS32_AA GFXOFF
103//#define GDISP_NEED_IMAGE FALSE 118// #define GDISP_INCLUDE_FONT_DEJAVUSANSBOLD12_AA GFXOFF
104// #define GDISP_NEED_IMAGE_NATIVE FALSE 119// #define GDISP_INCLUDE_USER_FONTS GFXOFF
105// #define GDISP_NEED_IMAGE_GIF FALSE 120
106// #define GDISP_NEED_IMAGE_BMP FALSE 121//#define GDISP_NEED_IMAGE GFXOFF
107// #define GDISP_NEED_IMAGE_BMP_1 FALSE 122// #define GDISP_NEED_IMAGE_NATIVE GFXOFF
108// #define GDISP_NEED_IMAGE_BMP_4 FALSE 123// #define GDISP_NEED_IMAGE_GIF GFXOFF
109// #define GDISP_NEED_IMAGE_BMP_4_RLE FALSE 124// #define GDISP_IMAGE_GIF_BLIT_BUFFER_SIZE 32
110// #define GDISP_NEED_IMAGE_BMP_8 FALSE 125// #define GDISP_NEED_IMAGE_BMP GFXOFF
111// #define GDISP_NEED_IMAGE_BMP_8_RLE FALSE 126// #define GDISP_NEED_IMAGE_BMP_1 GFXON
112// #define GDISP_NEED_IMAGE_BMP_16 FALSE 127// #define GDISP_NEED_IMAGE_BMP_4 GFXON
113// #define GDISP_NEED_IMAGE_BMP_24 FALSE 128// #define GDISP_NEED_IMAGE_BMP_4_RLE GFXON
114// #define GDISP_NEED_IMAGE_BMP_32 FALSE 129// #define GDISP_NEED_IMAGE_BMP_8 GFXON
115// #define GDISP_NEED_IMAGE_JPG FALSE 130// #define GDISP_NEED_IMAGE_BMP_8_RLE GFXON
116// #define GDISP_NEED_IMAGE_PNG FALSE 131// #define GDISP_NEED_IMAGE_BMP_16 GFXON
117// #define GDISP_NEED_IMAGE_ACCOUNTING FALSE 132// #define GDISP_NEED_IMAGE_BMP_24 GFXON
118#ifdef EMULATOR 133// #define GDISP_NEED_IMAGE_BMP_32 GFXON
119# define GDISP_NEED_PIXMAP TRUE 134// #define GDISP_IMAGE_BMP_BLIT_BUFFER_SIZE 32
120#endif 135// #define GDISP_NEED_IMAGE_JPG GFXOFF
121// #define GDISP_NEED_PIXMAP_IMAGE FALSE 136// #define GDISP_NEED_IMAGE_PNG GFXOFF
122 137// #define GDISP_NEED_IMAGE_PNG_INTERLACED GFXOFF
123//#define GDISP_DEFAULT_ORIENTATION GDISP_ROTATE_LANDSCAPE // If not defined the native hardware orientation is used. 138// #define GDISP_NEED_IMAGE_PNG_TRANSPARENCY GFXON
139// #define GDISP_NEED_IMAGE_PNG_BACKGROUND GFXON
140// #define GDISP_NEED_IMAGE_PNG_ALPHACLIFF 32
141// #define GDISP_NEED_IMAGE_PNG_PALETTE_124 GFXON
142// #define GDISP_NEED_IMAGE_PNG_PALETTE_8 GFXON
143// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_124 GFXON
144// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_8 GFXON
145// #define GDISP_NEED_IMAGE_PNG_GRAYSCALE_16 GFXON
146// #define GDISP_NEED_IMAGE_PNG_GRAYALPHA_8 GFXON
147// #define GDISP_NEED_IMAGE_PNG_GRAYALPHA_16 GFXON
148// #define GDISP_NEED_IMAGE_PNG_RGB_8 GFXON
149// #define GDISP_NEED_IMAGE_PNG_RGB_16 GFXON
150// #define GDISP_NEED_IMAGE_PNG_RGBALPHA_8 GFXON
151// #define GDISP_NEED_IMAGE_PNG_RGBALPHA_16 GFXON
152// #define GDISP_IMAGE_PNG_BLIT_BUFFER_SIZE 32
153// #define GDISP_IMAGE_PNG_FILE_BUFFER_SIZE 8
154// #define GDISP_IMAGE_PNG_Z_BUFFER_SIZE 32768
155// #define GDISP_NEED_IMAGE_ACCOUNTING GFXOFF
156
157//#define GDISP_NEED_PIXMAP GFXOFF
158// #define GDISP_NEED_PIXMAP_IMAGE GFXOFF
159
160//#define GDISP_DEFAULT_ORIENTATION gOrientationLandscape // If not defined the native hardware orientation is used.
124//#define GDISP_LINEBUF_SIZE 128 161//#define GDISP_LINEBUF_SIZE 128
125//#define GDISP_STARTUP_COLOR Black 162//#define GDISP_STARTUP_COLOR GFX_BLACK
126#define GDISP_NEED_STARTUP_LOGO FALSE 163#define GDISP_NEED_STARTUP_LOGO GFXOFF
127 164
128//#define GDISP_TOTAL_DISPLAYS 2 165//#define GDISP_TOTAL_DISPLAYS 1
129 166
167//#define GDISP_DRIVER_LIST GDISPVMT_Win32, GDISPVMT_Win32
130#ifdef GDISP_DRIVER_LIST 168#ifdef GDISP_DRIVER_LIST
131// For code and speed optimization define as TRUE or FALSE if all controllers have the same capability 169// // For code and speed optimization define as GFXON or GFXOFF if all controllers have the same capability
132# define GDISP_HARDWARE_STREAM_WRITE FALSE 170# define GDISP_HARDWARE_STREAM_WRITE GFXOFF
133# define GDISP_HARDWARE_STREAM_READ FALSE 171# define GDISP_HARDWARE_STREAM_READ GFXOFF
134# define GDISP_HARDWARE_STREAM_POS FALSE 172# define GDISP_HARDWARE_STREAM_POS GFXOFF
135# define GDISP_HARDWARE_DRAWPIXEL TRUE 173# define GDISP_HARDWARE_DRAWPIXEL GFXON
136# define GDISP_HARDWARE_CLEARS FALSE 174# define GDISP_HARDWARE_CLEARS GFXOFF
137# define GDISP_HARDWARE_FILLS FALSE 175# define GDISP_HARDWARE_FILLS GFXOFF
138//#define GDISP_HARDWARE_BITFILLS FALSE 176//#define GDISP_HARDWARE_BITFILLS GFXOFF
139# define GDISP_HARDWARE_SCROLL FALSE 177# define GDISP_HARDWARE_SCROLL GFXOFF
140# define GDISP_HARDWARE_PIXELREAD TRUE 178# define GDISP_HARDWARE_PIXELREAD GFXON
141# define GDISP_HARDWARE_CONTROL TRUE 179# define GDISP_HARDWARE_CONTROL GFXON
142# define GDISP_HARDWARE_QUERY FALSE 180# define GDISP_HARDWARE_QUERY GFXOFF
143# define GDISP_HARDWARE_CLIP FALSE 181# define GDISP_HARDWARE_CLIP GFXOFF
144 182
145# define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB888 183# define GDISP_PIXELFORMAT GDISP_PIXELFORMAT_RGB888
146#endif 184#endif
147 185
148// The custom format is not defined for some reason, so define it as error 186#define GDISP_USE_GFXNET GFXOFF
149// so we don't get compiler warnings
150#define GDISP_PIXELFORMAT_CUSTOM GDISP_PIXELFORMAT_ERROR
151
152#define GDISP_USE_GFXNET FALSE
153// #define GDISP_GFXNET_PORT 13001 187// #define GDISP_GFXNET_PORT 13001
154// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP FALSE 188// #define GDISP_GFXNET_CUSTOM_LWIP_STARTUP GFXOFF
155// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY FALSE 189// #define GDISP_DONT_WAIT_FOR_NET_DISPLAY GFXOFF
156// #define GDISP_GFXNET_UNSAFE_SOCKETS FALSE 190// #define GDISP_GFXNET_UNSAFE_SOCKETS GFXOFF
157 191
158/////////////////////////////////////////////////////////////////////////// 192///////////////////////////////////////////////////////////////////////////
159// GWIN // 193// GWIN //
160/////////////////////////////////////////////////////////////////////////// 194///////////////////////////////////////////////////////////////////////////
161#define GFX_USE_GWIN FALSE 195#define GFX_USE_GWIN GFXOFF
162 196
163//#define GWIN_NEED_WINDOWMANAGER FALSE 197//#define GWIN_NEED_WINDOWMANAGER GFXOFF
164// #define GWIN_REDRAW_IMMEDIATE FALSE 198// #define GWIN_REDRAW_IMMEDIATE GFXOFF
165// #define GWIN_REDRAW_SINGLEOP FALSE 199// #define GWIN_REDRAW_SINGLEOP GFXOFF
166// #define GWIN_NEED_FLASHING FALSE 200// #define GWIN_NEED_FLASHING GFXOFF
167// #define GWIN_FLASHING_PERIOD 250 201// #define GWIN_FLASHING_PERIOD 250
168 202
169//#define GWIN_NEED_CONSOLE FALSE 203//#define GWIN_NEED_CONSOLE GFXOFF
170// #define GWIN_CONSOLE_USE_HISTORY FALSE 204// #define GWIN_CONSOLE_USE_HISTORY GFXOFF
171// #define GWIN_CONSOLE_HISTORY_AVERAGING FALSE 205// #define GWIN_CONSOLE_HISTORY_AVERAGING GFXOFF
172// #define GWIN_CONSOLE_HISTORY_ATCREATE FALSE 206// #define GWIN_CONSOLE_HISTORY_ATCREATE GFXOFF
173// #define GWIN_CONSOLE_ESCSEQ FALSE 207// #define GWIN_CONSOLE_ESCSEQ GFXOFF
174// #define GWIN_CONSOLE_USE_BASESTREAM FALSE 208// #define GWIN_CONSOLE_USE_BASESTREAM GFXOFF
175// #define GWIN_CONSOLE_USE_FLOAT FALSE 209// #define GWIN_CONSOLE_USE_FLOAT GFXOFF
176//#define GWIN_NEED_GRAPH FALSE 210//#define GWIN_NEED_GRAPH GFXOFF
177//#define GWIN_NEED_GL3D FALSE 211//#define GWIN_NEED_GL3D GFXOFF
178 212
179//#define GWIN_NEED_WIDGET FALSE 213//#define GWIN_NEED_WIDGET GFXOFF
180//#define GWIN_FOCUS_HIGHLIGHT_WIDTH 1 214//#define GWIN_FOCUS_HIGHLIGHT_WIDTH 1
181// #define GWIN_NEED_LABEL FALSE 215// #define GWIN_NEED_LABEL GFXOFF
182// #define GWIN_LABEL_ATTRIBUTE FALSE 216// #define GWIN_LABEL_ATTRIBUTE GFXOFF
183// #define GWIN_NEED_BUTTON FALSE 217// #define GWIN_NEED_BUTTON GFXOFF
184// #define GWIN_BUTTON_LAZY_RELEASE FALSE 218// #define GWIN_BUTTON_LAZY_RELEASE GFXOFF
185// #define GWIN_NEED_SLIDER FALSE 219// #define GWIN_NEED_SLIDER GFXOFF
186// #define GWIN_SLIDER_NOSNAP FALSE 220// #define GWIN_SLIDER_NOSNAP GFXOFF
187// #define GWIN_SLIDER_DEAD_BAND 5 221// #define GWIN_SLIDER_DEAD_BAND 5
188// #define GWIN_SLIDER_TOGGLE_INC 20 222// #define GWIN_SLIDER_TOGGLE_INC 20
189// #define GWIN_NEED_CHECKBOX FALSE 223// #define GWIN_NEED_CHECKBOX GFXOFF
190// #define GWIN_NEED_IMAGE FALSE 224// #define GWIN_NEED_IMAGE GFXOFF
191// #define GWIN_NEED_IMAGE_ANIMATION FALSE 225// #define GWIN_NEED_IMAGE_ANIMATION GFXOFF
192// #define GWIN_NEED_RADIO FALSE 226// #define GWIN_NEED_RADIO GFXOFF
193// #define GWIN_NEED_LIST FALSE 227// #define GWIN_NEED_LIST GFXOFF
194// #define GWIN_NEED_LIST_IMAGES FALSE 228// #define GWIN_NEED_LIST_IMAGES GFXOFF
195// #define GWIN_NEED_PROGRESSBAR FALSE 229// #define GWIN_NEED_PROGRESSBAR GFXOFF
196// #define GWIN_PROGRESSBAR_AUTO FALSE 230// #define GWIN_PROGRESSBAR_AUTO GFXOFF
197// #define GWIN_NEED_KEYBOARD FALSE 231// #define GWIN_NEED_KEYBOARD GFXOFF
198// #define GWIN_KEYBOARD_DEFAULT_LAYOUT VirtualKeyboard_English1 232// #define GWIN_KEYBOARD_DEFAULT_LAYOUT VirtualKeyboard_English1
199// #define GWIN_NEED_KEYBOARD_ENGLISH1 TRUE 233// #define GWIN_NEED_KEYBOARD_ENGLISH1 GFXON
200// #define GWIN_NEED_TEXTEDIT FALSE 234// #define GWIN_NEED_TEXTEDIT GFXOFF
201// #define GWIN_FLAT_STYLING FALSE 235// #define GWIN_FLAT_STYLING GFXOFF
202// #define GWIN_WIDGET_TAGS FALSE 236// #define GWIN_WIDGET_TAGS GFXOFF
203 237
204//#define GWIN_NEED_CONTAINERS FALSE 238//#define GWIN_NEED_CONTAINERS GFXOFF
205// #define GWIN_NEED_CONTAINER FALSE 239// #define GWIN_NEED_CONTAINER GFXOFF
206// #define GWIN_NEED_FRAME FALSE 240// #define GWIN_NEED_FRAME GFXOFF
207// #define GWIN_NEED_TABSET FALSE 241// #define GWIN_NEED_TABSET GFXOFF
208// #define GWIN_TABSET_TABHEIGHT 18 242// #define GWIN_TABSET_TABHEIGHT 18
209 243
210/////////////////////////////////////////////////////////////////////////// 244///////////////////////////////////////////////////////////////////////////
245// GTRANS //
246///////////////////////////////////////////////////////////////////////////
247//#define GFX_USE_GTRANS GFXOFF
248
249///////////////////////////////////////////////////////////////////////////
211// GEVENT // 250// GEVENT //
212/////////////////////////////////////////////////////////////////////////// 251///////////////////////////////////////////////////////////////////////////
213#define GFX_USE_GEVENT TRUE 252#define GFX_USE_GEVENT GFXON
214 253
215//#define GEVENT_ASSERT_NO_RESOURCE FALSE 254//#define GEVENT_ASSERT_NO_RESOURCE GFXOFF
216//#define GEVENT_MAXIMUM_SIZE 32 255//#define GEVENT_MAXIMUM_SIZE 32
217//#define GEVENT_MAX_SOURCE_LISTENERS 32 256//#define GEVENT_MAX_SOURCE_LISTENERS 32
218 257
219/////////////////////////////////////////////////////////////////////////// 258///////////////////////////////////////////////////////////////////////////
220// GTIMER // 259// GTIMER //
221/////////////////////////////////////////////////////////////////////////// 260///////////////////////////////////////////////////////////////////////////
222#define GFX_USE_GTIMER FALSE 261#define GFX_USE_GTIMER GFXOFF
223 262
224//#define GTIMER_THREAD_PRIORITY HIGH_PRIORITY 263//#define GTIMER_THREAD_PRIORITY gThreadpriorityHigh
225//#define GTIMER_THREAD_WORKAREA_SIZE 2048 264//#define GTIMER_THREAD_WORKAREA_SIZE 2048
226 265
227/////////////////////////////////////////////////////////////////////////// 266///////////////////////////////////////////////////////////////////////////
228// GQUEUE // 267// GQUEUE //
229/////////////////////////////////////////////////////////////////////////// 268///////////////////////////////////////////////////////////////////////////
230#define GFX_USE_GQUEUE FALSE 269#define GFX_USE_GQUEUE GFXOFF
231 270
232//#define GQUEUE_NEED_ASYNC FALSE 271//#define GQUEUE_NEED_ASYNC GFXOFF
233//#define GQUEUE_NEED_GSYNC FALSE 272//#define GQUEUE_NEED_GSYNC GFXOFF
234//#define GQUEUE_NEED_FSYNC FALSE 273//#define GQUEUE_NEED_FSYNC GFXOFF
235//#define GQUEUE_NEED_BUFFERS FALSE 274//#define GQUEUE_NEED_BUFFERS GFXOFF
236 275
237/////////////////////////////////////////////////////////////////////////// 276///////////////////////////////////////////////////////////////////////////
238// GINPUT // 277// GINPUT //
239/////////////////////////////////////////////////////////////////////////// 278///////////////////////////////////////////////////////////////////////////
240#define GFX_USE_GINPUT FALSE 279#define GFX_USE_GINPUT GFXOFF
241 280
242//#define GINPUT_NEED_MOUSE FALSE 281//#define GINPUT_NEED_MOUSE GFXOFF
243// #define GINPUT_TOUCH_STARTRAW FALSE 282// #define GINPUT_TOUCH_STARTRAW GFXOFF
244// #define GINPUT_TOUCH_NOTOUCH FALSE 283// #define GINPUT_TOUCH_NOTOUCH GFXOFF
245// #define GINPUT_TOUCH_NOCALIBRATE FALSE 284// #define GINPUT_TOUCH_NOCALIBRATE GFXOFF
246// #define GINPUT_TOUCH_NOCALIBRATE_GUI FALSE 285// #define GINPUT_TOUCH_NOCALIBRATE_GUI GFXOFF
247// #define GINPUT_MOUSE_POLL_PERIOD 25 286// #define GINPUT_MOUSE_POLL_PERIOD 25
248// #define GINPUT_MOUSE_CLICK_TIME 300 287// #define GINPUT_MOUSE_CLICK_TIME 300
249// #define GINPUT_TOUCH_CXTCLICK_TIME 700 288// #define GINPUT_TOUCH_CXTCLICK_TIME 700
250// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD FALSE 289// #define GINPUT_TOUCH_USER_CALIBRATION_LOAD GFXOFF
251// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE FALSE 290// #define GINPUT_TOUCH_USER_CALIBRATION_SAVE GFXOFF
252// #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32 291// #define GMOUSE_DRIVER_LIST GMOUSEVMT_Win32, GMOUSEVMT_Win32
253//#define GINPUT_NEED_KEYBOARD FALSE 292// #define GINPUT_TOUCH_CALIBRATION_FONT1 "* Double"
293// #define GINPUT_TOUCH_CALIBRATION_FONT2 "* Narrow"
294// #define GINPUT_TOUCH_CALIBRATION_TITLE "Calibration"
295// #define GINPUT_TOUCH_CALIBRATION_ERROR "Calibration Failed!"
296//#define GINPUT_NEED_KEYBOARD GFXOFF
254// #define GINPUT_KEYBOARD_POLL_PERIOD 200 297// #define GINPUT_KEYBOARD_POLL_PERIOD 200
255// #define GKEYBOARD_DRIVER_LIST GKEYBOARDVMT_Win32, GKEYBOARDVMT_Win32 298// #define GKEYBOARD_DRIVER_LIST GKEYBOARDVMT_Win32, GKEYBOARDVMT_Win32
256// #define GKEYBOARD_LAYOUT_OFF FALSE 299// #define GKEYBOARD_LAYOUT_OFF GFXOFF
257// #define GKEYBOARD_LAYOUT_SCANCODE2_US FALSE 300// #define GKEYBOARD_LAYOUT_SCANCODE2_US GFXOFF
258//#define GINPUT_NEED_TOGGLE FALSE 301//#define GINPUT_NEED_TOGGLE GFXOFF
259//#define GINPUT_NEED_DIAL FALSE 302//#define GINPUT_NEED_DIAL GFXOFF
260 303
261/////////////////////////////////////////////////////////////////////////// 304///////////////////////////////////////////////////////////////////////////
262// GFILE // 305// GFILE //
263/////////////////////////////////////////////////////////////////////////// 306///////////////////////////////////////////////////////////////////////////
264#define GFX_USE_GFILE FALSE 307#define GFX_USE_GFILE GFXOFF
265 308
266//#define GFILE_NEED_PRINTG FALSE 309//#define GFILE_NEED_PRINTG GFXOFF
267//#define GFILE_NEED_SCANG FALSE 310//#define GFILE_NEED_SCANG GFXOFF
268//#define GFILE_NEED_STRINGS FALSE 311//#define GFILE_NEED_STRINGS GFXOFF
269//#define GFILE_NEED_FILELISTS FALSE 312//#define GFILE_NEED_FILELISTS GFXOFF
270//#define GFILE_NEED_STDIO FALSE 313//#define GFILE_NEED_STDIO GFXOFF
271//#define GFILE_NEED_NOAUTOMOUNT FALSE 314//#define GFILE_NEED_NOAUTOMOUNT GFXOFF
272//#define GFILE_NEED_NOAUTOSYNC FALSE 315//#define GFILE_NEED_NOAUTOSYNC GFXOFF
273 316
274//#define GFILE_NEED_MEMFS FALSE 317//#define GFILE_NEED_MEMFS GFXOFF
275//#define GFILE_NEED_ROMFS FALSE 318//#define GFILE_NEED_ROMFS GFXOFF
276//#define GFILE_NEED_RAMFS FALSE 319//#define GFILE_NEED_RAMFS GFXOFF
277//#define GFILE_NEED_FATFS FALSE 320//#define GFILE_NEED_FATFS GFXOFF
278//#define GFILE_NEED_NATIVEFS FALSE 321//#define GFILE_NEED_NATIVEFS GFXOFF
279//#define GFILE_NEED_CHBIOSFS FALSE 322//#define GFILE_NEED_CHBIOSFS GFXOFF
280 323//#define GFILE_NEED_USERFS GFXOFF
281//#define GFILE_ALLOW_FLOATS FALSE 324
282//#define GFILE_ALLOW_DEVICESPECIFIC FALSE 325//#define GFILE_ALLOW_FLOATS GFXOFF
326//#define GFILE_ALLOW_DEVICESPECIFIC GFXOFF
283//#define GFILE_MAX_GFILES 3 327//#define GFILE_MAX_GFILES 3
284 328
285/////////////////////////////////////////////////////////////////////////// 329///////////////////////////////////////////////////////////////////////////
286// GADC // 330// GADC //
287/////////////////////////////////////////////////////////////////////////// 331///////////////////////////////////////////////////////////////////////////
288#define GFX_USE_GADC FALSE 332#define GFX_USE_GADC GFXOFF
289 333// #define GADC_MAX_LOWSPEED_DEVICES 4
290//#define GADC_MAX_LOWSPEED_DEVICES 4
291 334
292/////////////////////////////////////////////////////////////////////////// 335///////////////////////////////////////////////////////////////////////////
293// GAUDIO // 336// GAUDIO //
294/////////////////////////////////////////////////////////////////////////// 337///////////////////////////////////////////////////////////////////////////
295#define GFX_USE_GAUDIO FALSE 338#define GFX_USE_GAUDIO GFXOFF
296// There seems to be a bug in the ugfx code, the wrong define is used 339// #define GAUDIO_NEED_PLAY GFXOFF
297// So define it in order to avoid warnings 340// #define GAUDIO_NEED_RECORD GFXOFF
298#define GFX_USE_GAUDIN GFX_USE_GAUDIO
299// #define GAUDIO_NEED_PLAY FALSE
300// #define GAUDIO_NEED_RECORD FALSE
301 341
302/////////////////////////////////////////////////////////////////////////// 342///////////////////////////////////////////////////////////////////////////
303// GMISC // 343// GMISC //
304/////////////////////////////////////////////////////////////////////////// 344///////////////////////////////////////////////////////////////////////////
305#define GFX_USE_GMISC TRUE 345#define GFX_USE_GMISC GFXON
306 346
307//#define GMISC_NEED_ARRAYOPS FALSE 347//#define GMISC_NEED_ARRAYOPS GFXOFF
308//#define GMISC_NEED_FASTTRIG FALSE 348//#define GMISC_NEED_FASTTRIG GFXOFF
309//#define GMISC_NEED_FIXEDTRIG FALSE 349//#define GMISC_NEED_FIXEDTRIG GFXOFF
310//#define GMISC_NEED_INVSQRT FALSE 350//#define GMISC_NEED_INVSQRT GFXOFF
311// #define GMISC_INVSQRT_MIXED_ENDIAN FALSE 351// #define GMISC_INVSQRT_MIXED_ENDIAN GFXOFF
312// #define GMISC_INVSQRT_REAL_SLOW FALSE 352// #define GMISC_INVSQRT_REAL_SLOW GFXOFF
313#define GMISC_NEED_MATRIXFLOAT2D TRUE 353#define GMISC_NEED_MATRIXFLOAT2D GFXON
314#define GMISC_NEED_MATRIXFIXED2D FALSE 354#define GMISC_NEED_MATRIXFIXED2D GFXOFF
355//#define GMISC_NEED_HITTEST_POLY GFXOFF
315 356
316#endif /* COMMON_GFXCONF_H */ 357#endif /* COMMON_GFXCONF_H */
diff --git a/quantum/visualizer/visualizer.c b/quantum/visualizer/visualizer.c
index 3f182e74d..9e9cb6d41 100644
--- a/quantum/visualizer/visualizer.c
+++ b/quantum/visualizer/visualizer.c
@@ -352,7 +352,7 @@ static DECLARE_THREAD_FUNCTION(visualizerThread, arg) {
352 352
353 // On windows the system ticks is the same as milliseconds anyway 353 // On windows the system ticks is the same as milliseconds anyway
354 if (sleep_time != TIME_INFINITE) { 354 if (sleep_time != TIME_INFINITE) {
355 sleep_time = ST2MS(sleep_time); 355 sleep_time = TIME_I2MS(sleep_time);
356 } 356 }
357#endif 357#endif
358 geventEventWait(&event_listener, sleep_time); 358 geventEventWait(&event_listener, sleep_time);
@@ -400,7 +400,7 @@ void update_status(bool changed) {
400 static systime_t last_update = 0; 400 static systime_t last_update = 0;
401 systime_t current_update = chVTGetSystemTimeX(); 401 systime_t current_update = chVTGetSystemTimeX();
402 systime_t delta = current_update - last_update; 402 systime_t delta = current_update - last_update;
403 if (changed || delta > MS2ST(10)) { 403 if (changed || delta > TIME_MS2I(10)) {
404 last_update = current_update; 404 last_update = current_update;
405 visualizer_keyboard_status_t* r = begin_write_current_status(); 405 visualizer_keyboard_status_t* r = begin_write_current_status();
406 *r = current_status; 406 *r = current_status;
diff --git a/quantum/visualizer/visualizer.h b/quantum/visualizer/visualizer.h
index 7ca6837ce..488d130de 100644
--- a/quantum/visualizer/visualizer.h
+++ b/quantum/visualizer/visualizer.h
@@ -97,8 +97,8 @@ typedef struct visualizer_state_t {
97 uint32_t current_lcd_color; 97 uint32_t current_lcd_color;
98 uint32_t prev_lcd_color; 98 uint32_t prev_lcd_color;
99#ifdef LCD_ENABLE 99#ifdef LCD_ENABLE
100 font_t font_fixed5x8; 100 gFont font_fixed5x8;
101 font_t font_dejavusansbold12; 101 gFont font_dejavusansbold12;
102#endif 102#endif
103} visualizer_state_t; 103} visualizer_state_t;
104 104