aboutsummaryrefslogtreecommitdiffstats
path: root/keyboards/ergodox
diff options
context:
space:
mode:
authorGravatar Erez Zukerman <bulk@ezuk.org>2017-06-22 08:40:59 -0400
committerGravatar GitHub <noreply@github.com>2017-06-22 08:40:59 -0400
commitfe9556104bcf6b101b95929c93fd21c9026fb4d2 (patch)
treeb8091c0818882e849bf5e9056c7abacd360a6c03 /keyboards/ergodox
parent9d22a1a6d8491971ce87be48f0993db9a2309277 (diff)
parente87691fa5db011e50fa2a9a5e2881dfda9392bef (diff)
downloadqmk_firmware-fe9556104bcf6b101b95929c93fd21c9026fb4d2.tar.gz
Merge pull request #1331 from ariasuni/master
Fix undefined reference errors with avr-gcc 7.1
Diffstat (limited to 'keyboards/ergodox')
-rw-r--r--keyboards/ergodox/ez/ez.c26
1 files changed, 25 insertions, 1 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 @@
#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);
}