diff --git a/keyboards/orthodox/i2c.h b/keyboards/orthodox/i2c.h index 503666f8f67e..5326d3cc18c9 100644 --- a/keyboards/orthodox/i2c.h +++ b/keyboards/orthodox/i2c.h @@ -14,10 +14,10 @@ #define I2C_ACK 1 #define I2C_NACK 0 -#define SLAVE_BUFFER_SIZE 0x10 +#define SLAVE_BUFFER_SIZE 0x20 // i2c SCL clock frequency -#define SCL_CLOCK 400000L +#define SCL_CLOCK 100000UL extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; diff --git a/keyboards/orthodox/matrix.c b/keyboards/orthodox/matrix.c index fd1dc0b555d3..c6a44193df00 100644 --- a/keyboards/orthodox/matrix.c +++ b/keyboards/orthodox/matrix.c @@ -181,11 +181,11 @@ int i2c_transaction(void) { *((uint8_t*)&matrix[slaveOffset]+i) = i2c_master_read(I2C_NACK); */ - i2c_master_read(I2C_ACK); + // i2c_master_read(I2C_ACK); matrix[slaveOffset+0] = i2c_master_read(I2C_ACK); - i2c_master_read(I2C_ACK); + // i2c_master_read(I2C_ACK); matrix[slaveOffset+1] = i2c_master_read(I2C_ACK); - i2c_master_read(I2C_ACK); + // i2c_master_read(I2C_ACK); matrix[slaveOffset+2] = i2c_master_read(I2C_NACK); i2c_master_stop(); @@ -255,12 +255,17 @@ void matrix_slave_scan(void) { // SLAVE_BUFFER_SIZE is from i2c.h // (MATRIX_ROWS/2*sizeof(matrix_row_t)) // memcpy((void*)i2c_slave_buffer, (const void*)&matrix[offset], (ROWS_PER_HAND*sizeof(matrix_row_t))); - i2c_slave_buffer[0] = (uint8_t)matrix[offset+0]; + i2c_slave_buffer[0] = (uint8_t)(matrix[offset+0]); + i2c_slave_buffer[1] = (uint8_t)(matrix[offset+1]); + i2c_slave_buffer[2] = (uint8_t)(matrix[offset+2]); + // note: looks like a possible operator-precedence bug here, in last version? + /* i2c_slave_buffer[1] = (uint8_t)matrix[offset+0]; i2c_slave_buffer[2] = (uint8_t)(matrix[offset+1]>>8); i2c_slave_buffer[3] = (uint8_t)(matrix[offset+1]>>8); i2c_slave_buffer[4] = (uint8_t)(matrix[offset+2]>>8); i2c_slave_buffer[5] = (uint8_t)matrix[offset+2]; + */ #else // USE_SERIAL for (int i = 0; i < ROWS_PER_HAND; ++i) { serial_slave_buffer[i] = matrix[offset+i]; diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h index 9f4b353919cf..46bb99440277 100644 --- a/keyboards/orthodox/rev1/config.h +++ b/keyboards/orthodox/rev1/config.h @@ -62,9 +62,9 @@ along with this program. If not, see . #define DEBOUNCING_DELAY 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE +// #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE +// #define LOCKING_RESYNC_ENABLE /* key combination for command */ #define IS_COMMAND() ( \ diff --git a/keyboards/orthodox/rules.mk b/keyboards/orthodox/rules.mk index 79860ea35d5c..0efa785505a7 100644 --- a/keyboards/orthodox/rules.mk +++ b/keyboards/orthodox/rules.mk @@ -1,8 +1,7 @@ SRC += matrix.c \ i2c.c \ split_util.c \ - serial.c \ - ssd1306.c + serial.c # MCU name #MCU = at90usb1287