diff options
| author | esinlayo <esinlayo@gmail.com> | 2020-02-07 18:52:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-07 18:52:02 -0800 |
| commit | 7182e9a8ad5e5baa36be5c032c16923396838b3f (patch) | |
| tree | 0c8a205cb12cf45bc9c1877c47a873aaab772de0 /keyboards/ergodox_ez | |
| parent | 3b1f29a5d6d171c7c659eb0d76fff806a52ac1cf (diff) | |
| download | qmk_firmware-7182e9a8ad5e5baa36be5c032c16923396838b3f.tar.gz qmk_firmware-7182e9a8ad5e5baa36be5c032c16923396838b3f.zip | |
[Keyboard] Remove i2c write command when reading columns on Ergodox EZ (#8092)
* Remove i2c write command when reading cols on Ergodox EZ
* Comment on mcp23018 address state during read_cols
Diffstat (limited to 'keyboards/ergodox_ez')
| -rw-r--r-- | keyboards/ergodox_ez/matrix.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/keyboards/ergodox_ez/matrix.c b/keyboards/ergodox_ez/matrix.c index c70772938..28dc37a09 100644 --- a/keyboards/ergodox_ez/matrix.c +++ b/keyboards/ergodox_ez/matrix.c | |||
| @@ -208,10 +208,8 @@ static matrix_row_t read_cols(uint8_t row) { | |||
| 208 | return 0; | 208 | return 0; |
| 209 | } else { | 209 | } else { |
| 210 | uint8_t data = 0; | 210 | uint8_t data = 0; |
| 211 | mcp23018_status = i2c_start(I2C_ADDR_WRITE, ERGODOX_EZ_I2C_TIMEOUT); | 211 | // reading GPIOB (column port) since in mcp23018's sequential mode |
| 212 | if (mcp23018_status) goto out; | 212 | // it is addressed directly after writing to GPIOA in select_row() |
| 213 | mcp23018_status = i2c_write(GPIOB, ERGODOX_EZ_I2C_TIMEOUT); | ||
| 214 | if (mcp23018_status) goto out; | ||
| 215 | mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); | 213 | mcp23018_status = i2c_start(I2C_ADDR_READ, ERGODOX_EZ_I2C_TIMEOUT); |
| 216 | if (mcp23018_status) goto out; | 214 | if (mcp23018_status) goto out; |
| 217 | mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); | 215 | mcp23018_status = i2c_read_nack(ERGODOX_EZ_I2C_TIMEOUT); |
