aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesper Jensen <DelusionalLogic@users.noreply.github.com>2020-12-06 07:24:49 +0100
committerGitHub <noreply@github.com>2020-12-06 17:24:49 +1100
commit63d06655e65a4399d4d1213f38cff80e3f23a8cd (patch)
treeb0294394479c660673a72625da0744ce7b792d3e
parent7043561459942c7cba8fef8547145196a8d03398 (diff)
downloadqmk_firmware-63d06655e65a4399d4d1213f38cff80e3f23a8cd.tar.gz
qmk_firmware-63d06655e65a4399d4d1213f38cff80e3f23a8cd.zip
gcc 10 compatibility for Drop alt (#9485)
* Split dmac_desc declaration and definition According to the official documentation[1] gcc 10 is more strict about correct extern usage. I've had to move the definition of dmac_desc and dmac_desc_wb from i2c_master.h to the corresponding .c file. This could be an issue if anyone includes the i2c_master.h file without liking with the object file. [1]: https://gcc.gnu.org/gcc-10/porting_to.html * Remove the keymap_config definition from keymaps The keymap_config def was conflicting with the one found in tmk_core/common/magic.c. Declaring it extern in magic.c breaks a bunch of keyboard that rely on that declaration (like the ergodox). Instead I've removed the one found in the keymap.c of the massdrop alt. The same change will have to be made to other keyboards.
-rw-r--r--keyboards/massdrop/alt/keymaps/abishalom/keymap.c2
-rw-r--r--keyboards/massdrop/alt/keymaps/bonta/keymap.c2
-rw-r--r--keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c2
-rw-r--r--keyboards/massdrop/alt/keymaps/reywood/keymap.c2
-rw-r--r--tmk_core/protocol/arm_atsam/i2c_master.c3
-rw-r--r--tmk_core/protocol/arm_atsam/i2c_master.h4
6 files changed, 5 insertions, 10 deletions
diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
index f6f79ad91..a08123b0f 100644
--- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c
@@ -12,8 +12,6 @@ enum alt_keycodes {
12 12
13#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode 13#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
14 14
15keymap_config_t keymap_config;
16
17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 15const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
18 [0] = LAYOUT( 16 [0] = LAYOUT(
19 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ 17 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
diff --git a/keyboards/massdrop/alt/keymaps/bonta/keymap.c b/keyboards/massdrop/alt/keymaps/bonta/keymap.c
index c1acf2c15..9ac27f57e 100644
--- a/keyboards/massdrop/alt/keymaps/bonta/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/bonta/keymap.c
@@ -14,8 +14,6 @@ enum alt_keycodes {
14#define RGB_BRU RGB_VAI 14#define RGB_BRU RGB_VAI
15#define RGB_BRD RGB_VAD 15#define RGB_BRD RGB_VAD
16 16
17keymap_config_t keymap_config;
18
19const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 17const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
20 [0] = LAYOUT( 18 [0] = LAYOUT(
21 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ 19 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
diff --git a/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c b/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c
index 873d18449..4c079a6aa 100644
--- a/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/favorable-mutation/keymap.c
@@ -28,8 +28,6 @@ enum alt_keycodes {
28// 28//
29//TODO tap/toggle for layers 29//TODO tap/toggle for layers
30 30
31keymap_config_t keymap_config;
32
33const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
34 [0] = LAYOUT( 32 [0] = LAYOUT(
35 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_SPOT, 33 KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_SPOT,
diff --git a/keyboards/massdrop/alt/keymaps/reywood/keymap.c b/keyboards/massdrop/alt/keymaps/reywood/keymap.c
index cf60acfe6..6279b509b 100644
--- a/keyboards/massdrop/alt/keymaps/reywood/keymap.c
+++ b/keyboards/massdrop/alt/keymaps/reywood/keymap.c
@@ -26,8 +26,6 @@ enum alt_keycodes {
26#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode 26#define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode
27#define ______ KC_TRNS 27#define ______ KC_TRNS
28 28
29keymap_config_t keymap_config;
30
31const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 29const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
32 [0] = LAYOUT( 30 [0] = LAYOUT(
33 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \ 31 KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, \
diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c
index d3319ab44..dda2f85b0 100644
--- a/tmk_core/protocol/arm_atsam/i2c_master.c
+++ b/tmk_core/protocol/arm_atsam/i2c_master.c
@@ -28,6 +28,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
28 28
29# define I2C_LED_USE_DMA 1 // Set 1 to use background DMA transfers for leds, Set 0 to use inline software transfers 29# define I2C_LED_USE_DMA 1 // Set 1 to use background DMA transfers for leds, Set 0 to use inline software transfers
30 30
31DmacDescriptor dmac_desc;
32DmacDescriptor dmac_desc_wb;
33
31static uint8_t i2c_led_q[I2C_Q_SIZE]; // I2C queue circular buffer 34static uint8_t i2c_led_q[I2C_Q_SIZE]; // I2C queue circular buffer
32static uint8_t i2c_led_q_s; // Start of circular buffer 35static uint8_t i2c_led_q_s; // Start of circular buffer
33static uint8_t i2c_led_q_e; // End of circular buffer 36static uint8_t i2c_led_q_e; // End of circular buffer
diff --git a/tmk_core/protocol/arm_atsam/i2c_master.h b/tmk_core/protocol/arm_atsam/i2c_master.h
index 44dbdfbff..68773f213 100644
--- a/tmk_core/protocol/arm_atsam/i2c_master.h
+++ b/tmk_core/protocol/arm_atsam/i2c_master.h
@@ -24,8 +24,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
24# include "issi3733_driver.h" 24# include "issi3733_driver.h"
25# include "config.h" 25# include "config.h"
26 26
27__attribute__((__aligned__(16))) DmacDescriptor dmac_desc; 27extern __attribute__((__aligned__(16))) DmacDescriptor dmac_desc;
28__attribute__((__aligned__(16))) DmacDescriptor dmac_desc_wb; 28extern __attribute__((__aligned__(16))) DmacDescriptor dmac_desc_wb;
29 29
30uint8_t I2C3733_Init_Control(void); 30uint8_t I2C3733_Init_Control(void);
31uint8_t I2C3733_Init_Drivers(void); 31uint8_t I2C3733_Init_Drivers(void);