diff options
author | Joel Challis <git@zvecr.com> | 2020-12-18 17:28:29 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-18 17:28:29 +0000 |
commit | a9f7d4dccc9cd0351658e64d5fbc809c93ac9b46 (patch) | |
tree | bfaaaf23c39f4ab72541309592e6f162b9ba4d06 | |
parent | 6ea4b06f9fc19825605477cdc27f5bec0f3dc0a9 (diff) |
Various compilation fixes for avr-gcc 10 (#9269)
-rw-r--r-- | drivers/haptic/DRV2605L.c | 5 | ||||
-rw-r--r-- | keyboards/ai03/orbit/orbit.c | 2 | ||||
-rw-r--r-- | keyboards/ai03/orbit/orbit.h | 2 | ||||
-rw-r--r-- | keyboards/butterstick/sten.h | 3 | ||||
-rw-r--r-- | keyboards/georgi/sten.h | 3 | ||||
-rw-r--r-- | keyboards/gergo/matrix.c | 54 | ||||
-rw-r--r-- | keyboards/omnikeyish/dynamic_macro.c | 2 | ||||
-rw-r--r-- | keyboards/omnikeyish/dynamic_macro.h | 2 | ||||
-rw-r--r-- | quantum/fauxclicky.h | 2 |
9 files changed, 33 insertions, 42 deletions
diff --git a/drivers/haptic/DRV2605L.c b/drivers/haptic/DRV2605L.c index 830d629dae..5de2b354c9 100644 --- a/drivers/haptic/DRV2605L.c +++ b/drivers/haptic/DRV2605L.c @@ -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; } diff --git a/keyboards/ai03/orbit/orbit.c b/keyboards/ai03/orbit/orbit.c index 2f149875b1..b51ddbc6e6 100644 --- a/keyboards/ai03/orbit/orbit.c +++ b/keyboards/ai03/orbit/orbit.c @@ -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 diff --git a/keyboards/ai03/orbit/orbit.h b/keyboards/ai03/orbit/orbit.h index 211b9ebca9..2ada881f3f 100644 --- a/keyboards/ai03/orbit/orbit.h +++ b/keyboards/ai03/orbit/orbit.h @@ -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); diff --git a/keyboards/butterstick/sten.h b/keyboards/butterstick/sten.h index 84635a554c..0d5c58df21 100644 --- a/keyboards/butterstick/sten.h +++ b/keyboards/butterstick/sten.h @@ -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;}; \ } diff --git a/keyboards/georgi/sten.h b/keyboards/georgi/sten.h index e94f10fc28..320c49514c 100644 --- a/keyboards/georgi/sten.h +++ b/keyboards/georgi/sten.h @@ -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;}; \ } diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c index f659ed52c2..080eaea40f 100644 --- a/keyboards/gergo/matrix.c +++ b/keyboards/gergo/matrix.c @@ -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 diff --git a/keyboards/omnikeyish/dynamic_macro.c b/keyboards/omnikeyish/dynamic_macro.c index c359b0bdd0..9dd0340099 100644 --- a/keyboards/omnikeyish/dynamic_macro.c +++ b/keyboards/omnikeyish/dynamic_macro.c @@ -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)); diff --git a/keyboards/omnikeyish/dynamic_macro.h b/keyboards/omnikeyish/dynamic_macro.h index 87665c443b..68e129a9e9 100644 --- a/keyboards/omnikeyish/dynamic_macro.h +++ b/keyboards/omnikeyish/dynamic_macro.h @@ -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); diff --git a/quantum/fauxclicky.h b/quantum/fauxclicky.h index bfaacf9096..ed54d0edcf 100644 --- a/quantum/fauxclicky.h +++ b/quantum/fauxclicky.h @@ -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 |