diff options
| author | ariasuni <perso@hack-libre.org> | 2017-05-27 00:25:35 +0200 |
|---|---|---|
| committer | ariasuni <perso@hack-libre.org> | 2017-05-27 00:25:35 +0200 |
| commit | e87691fa5db011e50fa2a9a5e2881dfda9392bef (patch) | |
| tree | 041b84d8f926cada5826875d6d1e7ac4090c4904 | |
| parent | 7a4ec3bd926865e490fbf7c5ec68d762e998683f (diff) | |
| download | qmk_firmware-e87691fa5db011e50fa2a9a5e2881dfda9392bef.tar.gz qmk_firmware-e87691fa5db011e50fa2a9a5e2881dfda9392bef.zip | |
Fix undefined reference errors with avr-gcc 7.1
| -rw-r--r-- | keyboards/ergodox/ez/ez.c | 26 | ||||
| -rw-r--r-- | keyboards/gh60/gh60.c | 28 | ||||
| -rw-r--r-- | keyboards/pegasushoof/pegasushoof.c | 8 | ||||
| -rw-r--r-- | keyboards/xd60/xd60.c | 8 |
4 files changed, 62 insertions, 8 deletions
diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index 3e19f2302..d50224954 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c | |||
| @@ -1,6 +1,30 @@ | |||
| 1 | #include "ez.h" | 1 | #include "ez.h" |
| 2 | #include "i2cmaster.h" | 2 | #include "i2cmaster.h" |
| 3 | 3 | ||
| 4 | |||
| 5 | extern inline void ergodox_board_led_on(void); | ||
| 6 | extern inline void ergodox_right_led_1_on(void); | ||
| 7 | extern inline void ergodox_right_led_2_on(void); | ||
| 8 | extern inline void ergodox_right_led_3_on(void); | ||
| 9 | extern inline void ergodox_right_led_on(uint8_t led); | ||
| 10 | |||
| 11 | extern inline void ergodox_board_led_off(void); | ||
| 12 | extern inline void ergodox_right_led_1_off(void); | ||
| 13 | extern inline void ergodox_right_led_2_off(void); | ||
| 14 | extern inline void ergodox_right_led_3_off(void); | ||
| 15 | extern inline void ergodox_right_led_off(uint8_t led); | ||
| 16 | |||
| 17 | extern inline void ergodox_led_all_on(void); | ||
| 18 | extern inline void ergodox_led_all_off(void); | ||
| 19 | |||
| 20 | extern inline void ergodox_right_led_1_set(uint8_t n); | ||
| 21 | extern inline void ergodox_right_led_2_set(uint8_t n); | ||
| 22 | extern inline void ergodox_right_led_3_set(uint8_t n); | ||
| 23 | extern inline void ergodox_right_led_set(uint8_t led, uint8_t n); | ||
| 24 | |||
| 25 | extern inline void ergodox_led_all_set(uint8_t n); | ||
| 26 | |||
| 27 | |||
| 4 | bool i2c_initialized = 0; | 28 | bool i2c_initialized = 0; |
| 5 | uint8_t mcp23018_status = 0x20; | 29 | uint8_t mcp23018_status = 0x20; |
| 6 | 30 | ||
| @@ -57,7 +81,7 @@ uint8_t init_mcp23018(void) { | |||
| 57 | // cli(); | 81 | // cli(); |
| 58 | if (i2c_initialized == 0) { | 82 | if (i2c_initialized == 0) { |
| 59 | i2c_init(); // on pins D(1,0) | 83 | i2c_init(); // on pins D(1,0) |
| 60 | i2c_initialized++; | 84 | i2c_initialized = true; |
| 61 | _delay_ms(1000); | 85 | _delay_ms(1000); |
| 62 | } | 86 | } |
| 63 | 87 | ||
diff --git a/keyboards/gh60/gh60.c b/keyboards/gh60/gh60.c index f5a158e12..441c799fa 100644 --- a/keyboards/gh60/gh60.c +++ b/keyboards/gh60/gh60.c | |||
| @@ -1,25 +1,39 @@ | |||
| 1 | #include "gh60.h" | 1 | #include "gh60.h" |
| 2 | 2 | ||
| 3 | |||
| 4 | extern inline void gh60_caps_led_on(void); | ||
| 5 | extern inline void gh60_poker_leds_on(void); | ||
| 6 | extern inline void gh60_fn_led_on(void); | ||
| 7 | extern inline void gh60_esc_led_on(void); | ||
| 8 | extern inline void gh60_wasd_leds_on(void); | ||
| 9 | |||
| 10 | extern inline void gh60_caps_led_off(void); | ||
| 11 | extern inline void gh60_poker_leds_off(void); | ||
| 12 | extern inline void gh60_fn_led_off(void); | ||
| 13 | extern inline void gh60_esc_led_off(void); | ||
| 14 | extern inline void gh60_wasd_leds_off(void); | ||
| 15 | |||
| 16 | |||
| 3 | void led_set_kb(uint8_t usb_led) { | 17 | void led_set_kb(uint8_t usb_led) { |
| 4 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | 18 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here |
| 5 | 19 | ||
| 6 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { | 20 | if (usb_led & (1<<USB_LED_CAPS_LOCK)) { |
| 7 | gh60_caps_led_on(); | 21 | gh60_caps_led_on(); |
| 8 | } else { | 22 | } else { |
| 9 | gh60_caps_led_off(); | 23 | gh60_caps_led_off(); |
| 10 | } | 24 | } |
| 11 | 25 | ||
| 12 | // if (usb_led & (1<<USB_LED_NUM_LOCK)) { | 26 | // if (usb_led & (1<<USB_LED_NUM_LOCK)) { |
| 13 | // gh60_esc_led_on(); | 27 | // gh60_esc_led_on(); |
| 14 | // } else { | 28 | // } else { |
| 15 | // gh60_esc_led_off(); | 29 | // gh60_esc_led_off(); |
| 16 | // } | 30 | // } |
| 17 | 31 | ||
| 18 | // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { | 32 | // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { |
| 19 | // gh60_fn_led_on(); | 33 | // gh60_fn_led_on(); |
| 20 | // } else { | 34 | // } else { |
| 21 | // gh60_fn_led_off(); | 35 | // gh60_fn_led_off(); |
| 22 | // } | 36 | // } |
| 23 | 37 | ||
| 24 | led_set_user(usb_led); | 38 | led_set_user(usb_led); |
| 25 | } | 39 | } |
diff --git a/keyboards/pegasushoof/pegasushoof.c b/keyboards/pegasushoof/pegasushoof.c index 6bb249aef..cde814812 100644 --- a/keyboards/pegasushoof/pegasushoof.c +++ b/keyboards/pegasushoof/pegasushoof.c | |||
| @@ -17,6 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. | |||
| 17 | 17 | ||
| 18 | #include "pegasushoof.h" | 18 | #include "pegasushoof.h" |
| 19 | 19 | ||
| 20 | |||
| 21 | extern inline void ph_caps_led_on(void); | ||
| 22 | extern inline void ph_caps_led_off(void); | ||
| 23 | |||
| 24 | extern inline void ph_sclk_led_on(void); | ||
| 25 | extern inline void ph_sclk_led_off(void); | ||
| 26 | |||
| 27 | |||
| 20 | __attribute__ ((weak)) | 28 | __attribute__ ((weak)) |
| 21 | void matrix_init_user(void) { | 29 | void matrix_init_user(void) { |
| 22 | }; | 30 | }; |
diff --git a/keyboards/xd60/xd60.c b/keyboards/xd60/xd60.c index 4307f5f59..c3b63e5ea 100644 --- a/keyboards/xd60/xd60.c +++ b/keyboards/xd60/xd60.c | |||
| @@ -1,5 +1,13 @@ | |||
| 1 | #include "xd60.h" | 1 | #include "xd60.h" |
| 2 | 2 | ||
| 3 | |||
| 4 | extern inline void xd60_caps_led_on(void); | ||
| 5 | extern inline void xd60_bl_led_on(void); | ||
| 6 | |||
| 7 | extern inline void xd60_caps_led_off(void); | ||
| 8 | extern inline void xd60_bl_led_off(void); | ||
| 9 | |||
| 10 | |||
| 3 | void led_set_kb(uint8_t usb_led) { | 11 | void led_set_kb(uint8_t usb_led) { |
| 4 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here | 12 | // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here |
| 5 | 13 | ||
