Skip to content

Commit

Permalink
Fix i2c calls for HotDox keyboard (qmk#5387)
Browse files Browse the repository at this point in the history
  • Loading branch information
drashna authored and mechmerlin committed Mar 13, 2019
1 parent f34244a commit 4a90828
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions keyboards/hotdox/left.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ void left_scan(void)

if (ret == 0)
{
i2c_stop(HOTDOX_I2C_TIMEOUT);
i2c_stop();

if (!i2c_initialized)
{
Expand Down Expand Up @@ -102,10 +102,10 @@ uint8_t left_write(uint8_t reg, uint8_t data)

ret = i2c_start(I2C_ADDR_WRITE, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
ret = i2c_write(reg, HOTDOX_I2C_TIMEOUT); if (ret) goto out;
ret = i2c_write(data, HOTDOX_I2C_TIMEOUT);
ret = i2c_write(data, HOTDOX_I2C_TIMEOUT);

out:
i2c_stop(HOTDOX_I2C_TIMEOUT);
i2c_stop();
return ret;
}

Expand All @@ -125,6 +125,6 @@ uint8_t left_read(uint8_t reg, uint8_t *data)
*data = i2c_read_nack(HOTDOX_I2C_TIMEOUT);

out:
i2c_stop(HOTDOX_I2C_TIMEOUT);
i2c_stop();
return ret;
}

0 comments on commit 4a90828

Please sign in to comment.