]> git.donarmstrong.com Git - qmk_firmware.git/commitdiff
Merge pull request #1331 from ariasuni/master
authorErez Zukerman <bulk@ezuk.org>
Thu, 22 Jun 2017 12:40:59 +0000 (08:40 -0400)
committerGitHub <noreply@github.com>
Thu, 22 Jun 2017 12:40:59 +0000 (08:40 -0400)
Fix undefined reference errors with avr-gcc 7.1

keyboards/ergodox/ez/ez.c
keyboards/gh60/gh60.c
keyboards/pegasushoof/pegasushoof.c
keyboards/xd60/xd60.c

index 3e19f23028076a38d309734457987ac9a104aa56..d502249543837cda54bf519c34378b218deccd5e 100644 (file)
@@ -1,6 +1,30 @@
 #include "ez.h"
 #include "i2cmaster.h"
 
+
+extern inline void ergodox_board_led_on(void);
+extern inline void ergodox_right_led_1_on(void);
+extern inline void ergodox_right_led_2_on(void);
+extern inline void ergodox_right_led_3_on(void);
+extern inline void ergodox_right_led_on(uint8_t led);
+
+extern inline void ergodox_board_led_off(void);
+extern inline void ergodox_right_led_1_off(void);
+extern inline void ergodox_right_led_2_off(void);
+extern inline void ergodox_right_led_3_off(void);
+extern inline void ergodox_right_led_off(uint8_t led);
+
+extern inline void ergodox_led_all_on(void);
+extern inline void ergodox_led_all_off(void);
+
+extern inline void ergodox_right_led_1_set(uint8_t n);
+extern inline void ergodox_right_led_2_set(uint8_t n);
+extern inline void ergodox_right_led_3_set(uint8_t n);
+extern inline void ergodox_right_led_set(uint8_t led, uint8_t n);
+
+extern inline void ergodox_led_all_set(uint8_t n);
+
+
 bool i2c_initialized = 0;
 uint8_t mcp23018_status = 0x20;
 
@@ -57,7 +81,7 @@ uint8_t init_mcp23018(void) {
     // cli();
     if (i2c_initialized == 0) {
         i2c_init();  // on pins D(1,0)
-        i2c_initialized++;
+        i2c_initialized = true;
         _delay_ms(1000);
     }
 
index f5a158e12f99bd1e2a6d306e232e3d145057f8f8..441c799fa378918085f65987e7a784fa2a607295 100644 (file)
@@ -1,25 +1,39 @@
 #include "gh60.h"
 
+
+extern inline void gh60_caps_led_on(void);
+extern inline void gh60_poker_leds_on(void);
+extern inline void gh60_fn_led_on(void);
+extern inline void gh60_esc_led_on(void);
+extern inline void gh60_wasd_leds_on(void);
+
+extern inline void gh60_caps_led_off(void);
+extern inline void gh60_poker_leds_off(void);
+extern inline void gh60_fn_led_off(void);
+extern inline void gh60_esc_led_off(void);
+extern inline void gh60_wasd_leds_off(void);
+
+
 void led_set_kb(uint8_t usb_led) {
        // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
-       
+
     if (usb_led & (1<<USB_LED_CAPS_LOCK)) {
                gh60_caps_led_on();
                } else {
-               gh60_caps_led_off(); 
+               gh60_caps_led_off();
     }
-       
+
     // if (usb_led & (1<<USB_LED_NUM_LOCK)) {
                // gh60_esc_led_on();
                // } else {
-               // gh60_esc_led_off(); 
+               // gh60_esc_led_off();
     // }
-       
+
     // if (usb_led & (1<<USB_LED_SCROLL_LOCK)) {
                // gh60_fn_led_on();
                // } else {
-               // gh60_fn_led_off();   
+               // gh60_fn_led_off();
     // }
 
-       led_set_user(usb_led);  
+       led_set_user(usb_led);
 }
index 6bb249aef4efd35e83a4a6ac6081b300d7256f4c..cde814812e5bb85883a3bf78a03d1e61ab87246f 100644 (file)
@@ -17,6 +17,14 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 #include "pegasushoof.h"
 
+
+extern inline void ph_caps_led_on(void);
+extern inline void ph_caps_led_off(void);
+
+extern inline void ph_sclk_led_on(void);
+extern inline void ph_sclk_led_off(void);
+
+
 __attribute__ ((weak))
 void matrix_init_user(void) {
 };
index 4307f5f5931960b310a7d1d7db72f29fa2441929..c3b63e5eafdbb2948805db8d3af6477c3f55ae21 100644 (file)
@@ -1,5 +1,13 @@
 #include "xd60.h"
 
+
+extern inline void xd60_caps_led_on(void);
+extern inline void xd60_bl_led_on(void);
+
+extern inline void xd60_caps_led_off(void);
+extern inline void xd60_bl_led_off(void);
+
+
 void led_set_kb(uint8_t usb_led) {
        // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here