This commit is contained in:
Jack Humbert
2018-05-15 22:30:58 -04:00
parent 6dc215cd67
commit 682555faac
6 changed files with 33 additions and 29 deletions

View File

@@ -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
};

View File

@@ -4,7 +4,7 @@
#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
#include "i2cmaster.h"
#include "i2c_master.h"
#include <util/delay.h>
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))

View File

@@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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();

View File

@@ -15,8 +15,8 @@
#----------------------------------------------------------------------------
# # project specific files
SRC = twimaster.c \
matrix.c
SRC = matrix.c \
i2c_master.c
# MCU name
MCU = atmega32u4