From 682555faac8a67deff5688b956165cd1c39389cb Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Tue, 15 May 2018 22:30:58 -0400 Subject: i2c fix --- keyboards/ergodox_ez/ergodox_ez.c | 4 +--- keyboards/ergodox_ez/ergodox_ez.h | 2 +- keyboards/ergodox_ez/matrix.c | 3 +-- keyboards/ergodox_ez/rules.mk | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) (limited to 'keyboards/ergodox_ez') diff --git a/keyboards/ergodox_ez/ergodox_ez.c b/keyboards/ergodox_ez/ergodox_ez.c index 21854ef77e..36eb58a3c7 100644 --- a/keyboards/ergodox_ez/ergodox_ez.c +++ b/keyboards/ergodox_ez/ergodox_ez.c @@ -1,6 +1,4 @@ #include QMK_KEYBOARD_H -#include "i2cmaster.h" - extern inline void ergodox_board_led_on(void); extern inline void ergodox_right_led_1_on(void); @@ -329,7 +327,7 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { {{3|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 20 {{4|(6<<4)}, {24.9*3, 16*2}, 0}, // LED 21 - {{4|(7<<4)}, {24.9*3, 16*2}, 0}, // LED 22 + {{4|(7<<4)}, {24.9*2, 16*2}, 0}, // LED 22 {{4|(8<<4)}, {24.9*1, 16*2}, 0}, // LED 23 {{4|(9<<4)}, {24.9*0, 16*2}, 0}, // LED 24 }; diff --git a/keyboards/ergodox_ez/ergodox_ez.h b/keyboards/ergodox_ez/ergodox_ez.h index eda6d767cf..3ffc32553c 100644 --- a/keyboards/ergodox_ez/ergodox_ez.h +++ b/keyboards/ergodox_ez/ergodox_ez.h @@ -4,7 +4,7 @@ #include "quantum.h" #include #include -#include "i2cmaster.h" +#include "i2c_master.h" #include #define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index e101711334..2aad997817 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c @@ -34,7 +34,6 @@ along with this program. If not, see . #include "util.h" #include "matrix.h" #include QMK_KEYBOARD_H -#include "i2cmaster.h" #ifdef DEBUG_MATRIX_SCAN_RATE #include "timer.h" #endif @@ -297,7 +296,7 @@ static matrix_row_t read_cols(uint8_t row) mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out; mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out; - data = i2c_readNak(); + data = i2c_read_nack(); data = ~data; out: i2c_stop(); diff --git a/keyboards/ergodox_ez/rules.mk b/keyboards/ergodox_ez/rules.mk index a3b2ba5cab..0e0b3cdefd 100644 --- a/keyboards/ergodox_ez/rules.mk +++ b/keyboards/ergodox_ez/rules.mk @@ -15,8 +15,8 @@ #---------------------------------------------------------------------------- # # project specific files -SRC = twimaster.c \ - matrix.c +SRC = matrix.c \ + i2c_master.c # MCU name MCU = atmega32u4 -- cgit v1.2.3