Skip to content

Commit

Permalink
Various compilation fixes for avr-gcc 10 (qmk#9269)
Browse files Browse the repository at this point in the history
  • Loading branch information
zvecr authored Dec 18, 2020
1 parent 6ea4b06 commit a9f7d4d
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 42 deletions.
5 changes: 1 addition & 4 deletions drivers/haptic/DRV2605L.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
Expand Down
2 changes: 0 additions & 2 deletions keyboards/ai03/orbit/orbit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions keyboards/ai03/orbit/orbit.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
3 changes: 1 addition & 2 deletions keyboards/butterstick/sten.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;}; \
}

Expand Down
3 changes: 1 addition & 2 deletions keyboards/georgi/sten.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;}; \
}

Expand Down
54 changes: 27 additions & 27 deletions keyboards/gergo/matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions keyboards/omnikeyish/dynamic_macro.c
Original file line number Diff line number Diff line change
@@ -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));
Expand Down
2 changes: 0 additions & 2 deletions keyboards/omnikeyish/dynamic_macro.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion quantum/fauxclicky.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a9f7d4d

Please sign in to comment.