summaryrefslogtreecommitdiff
path: root/tmk_core
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 /tmk_core
parent7043561459942c7cba8fef8547145196a8d03398 (diff)
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.
Diffstat (limited to 'tmk_core')
-rw-r--r--tmk_core/protocol/arm_atsam/i2c_master.c3
-rw-r--r--tmk_core/protocol/arm_atsam/i2c_master.h4
2 files changed, 5 insertions, 2 deletions
diff --git a/tmk_core/protocol/arm_atsam/i2c_master.c b/tmk_core/protocol/arm_atsam/i2c_master.c
index d3319ab447..dda2f85b00 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/>.
# define I2C_LED_USE_DMA 1 // Set 1 to use background DMA transfers for leds, Set 0 to use inline software transfers
+DmacDescriptor dmac_desc;
+DmacDescriptor dmac_desc_wb;
+
static uint8_t i2c_led_q[I2C_Q_SIZE]; // I2C queue circular buffer
static uint8_t i2c_led_q_s; // Start of circular buffer
static 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 44dbdfbffa..68773f213f 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/>.
# include "issi3733_driver.h"
# include "config.h"
-__attribute__((__aligned__(16))) DmacDescriptor dmac_desc;
-__attribute__((__aligned__(16))) DmacDescriptor dmac_desc_wb;
+extern __attribute__((__aligned__(16))) DmacDescriptor dmac_desc;
+extern __attribute__((__aligned__(16))) DmacDescriptor dmac_desc_wb;
uint8_t I2C3733_Init_Control(void);
uint8_t I2C3733_Init_Drivers(void);