Various compilation fixes for avr-gcc 10 (#9269)

This commit is contained in:
Joel Challis 2020-12-18 17:28:29 +00:00 committed by GitHub
parent 6ea4b06f9f
commit a9f7d4dccc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 33 additions and 42 deletions

View file

@ -21,8 +21,6 @@
#include <math.h>
uint8_t DRV2605L_transfer_buffer[2];
uint8_t DRV2605L_tx_register[0];
uint8_t DRV2605L_read_buffer[0];
uint8_t DRV2605L_read_register;
void DRV_write(uint8_t drv_register, uint8_t settings) {
@ -32,8 +30,7 @@ void DRV_write(uint8_t drv_register, uint8_t settings) {
}
uint8_t DRV_read(uint8_t regaddress) {
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, DRV2605L_read_buffer, 1, 100);
DRV2605L_read_register = (uint8_t)DRV2605L_read_buffer[0];
i2c_readReg(DRV2605L_BASE_ADDRESS << 1, regaddress, &DRV2605L_read_register, 1, 100);
return DRV2605L_read_register;
}

View file

@ -208,8 +208,6 @@ uint32_t layer_state_set_kb(uint32_t state) {
if (is_keyboard_master())
{
current_layer = biton32(state);
serial_m2s_buffer.current_layer = biton32(state);
// If left half, do the LED toggle thing

View file

@ -56,8 +56,6 @@
{ R40, R41, R42, R43, R44, R45, KC_NO } \
}
uint8_t current_layer;
extern void led_toggle(int id, bool on);
void set_all_leds(bool leds[6]);
extern void set_layer_indicators(uint8_t layer);

View file

@ -15,7 +15,6 @@ extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord
extern uint32_t stenoLayers[]; // Chords that simulate QMK layers
extern size_t stenoLayerCount; // Number of simulated layers
uint32_t refChord; // Reference chord for PC macro
// Function defs
void processChord(bool useFakeSteno);
@ -35,7 +34,7 @@ void CLICK_MOUSE(uint8_t);
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \
for(int i = 0; i < stenoLayerCount; i++) { \
refChord = stenoLayers[i] | chord; \
uint32_t refChord = stenoLayers[i] | chord; \
if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \
}

View file

@ -15,7 +15,6 @@ extern size_t keymapsCount; // Total keymaps
extern uint32_t cChord; // Current Chord
extern uint32_t stenoLayers[]; // Chords that simulate QMK layers
extern size_t stenoLayerCount; // Number of simulated layers
uint32_t refChord; // Reference chord for PC macro
// Function defs
void processChord(bool useFakeSteno);
@ -35,7 +34,7 @@ void CLICK_MOUSE(uint8_t);
#define P(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;}
#define PC(chord, act) if (cChord == (chord)) { if (!lookup) {act;} return chord;} \
for(int i = 0; i < stenoLayerCount; i++) { \
refChord = stenoLayers[i] | chord; \
uint32_t refChord = stenoLayers[i] | chord; \
if (cChord == (refChord)) { if (!lookup) {act;} return refChord;}; \
}

View file

@ -38,37 +38,37 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#endif
// MCP Pin Defs
#define RROW1 (1<<3)
#define RROW2 (1<<2)
#define RROW3 (1<<1)
#define RROW4 (1<<0)
#define COL0 (1<<0)
#define COL1 (1<<1)
#define COL2 (1<<2)
#define COL3 (1<<3)
#define COL4 (1<<4)
#define COL5 (1<<5)
#define COL6 (1<<6)
#define RROW1 (1u<<3)
#define RROW2 (1u<<2)
#define RROW3 (1u<<1)
#define RROW4 (1u<<0)
#define COL0 (1u<<0)
#define COL1 (1u<<1)
#define COL2 (1u<<2)
#define COL3 (1u<<3)
#define COL4 (1u<<4)
#define COL5 (1u<<5)
#define COL6 (1u<<6)
// ATmega pin defs
#define ROW1 (1<<6)
#define ROW2 (1<<5)
#define ROW3 (1<<4)
#define ROW4 (1<<1)
#define COL7 (1<<0)
#define COL8 (1<<1)
#define COL9 (1<<2)
#define COL10 (1<<3)
#define COL11 (1<<2)
#define COL12 (1<<3)
#define COL13 (1<<6)
#define ROW1 (1u<<6)
#define ROW2 (1u<<5)
#define ROW3 (1u<<4)
#define ROW4 (1u<<1)
#define COL7 (1u<<0)
#define COL8 (1u<<1)
#define COL9 (1u<<2)
#define COL10 (1u<<3)
#define COL11 (1u<<2)
#define COL12 (1u<<3)
#define COL13 (1u<<6)
//Trackball pin defs
#define TRKUP (1<<4)
#define TRKDN (1<<5)
#define TRKLT (1<<6)
#define TRKRT (1<<7)
#define TRKBTN (1<<6)
#define TRKUP (1u<<4)
#define TRKDN (1u<<5)
#define TRKLT (1u<<6)
#define TRKRT (1u<<7)
#define TRKBTN (1u<<6)
// Multiple for mouse moves

View file

@ -1,6 +1,8 @@
#include QMK_KEYBOARD_H
#include <string.h>
dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT];
void dynamic_macro_init(void) {
/* zero out macro blocks */
memset(&dynamic_macros, 0, DYNAMIC_MACRO_COUNT * sizeof(dynamic_macro_t));

View file

@ -71,8 +71,6 @@ typedef struct {
uint16_t checksum;
} dynamic_macro_t;
dynamic_macro_t dynamic_macros[DYNAMIC_MACRO_COUNT];
void dynamic_macro_init(void);
void dynamic_macro_led_blink(void);
void dynamic_macro_record_start(uint8_t macro_id);

View file

@ -24,7 +24,7 @@ __attribute__((weak)) float fauxclicky_pressed_note[2] = MUSICAL_NOTE(_D4, 0.25
__attribute__((weak)) float fauxclicky_released_note[2] = MUSICAL_NOTE(_C4, 0.125);
__attribute__((weak)) float fauxclicky_beep_note[2] = MUSICAL_NOTE(_C4, 0.25);
bool fauxclicky_enabled;
extern bool fauxclicky_enabled;
//
// tempo in BPM