summaryrefslogtreecommitdiff
path: root/drivers/avr
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2019-01-10 11:26:40 -0500
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-01-10 08:26:40 -0800
commitd28684da90536b54ff7d145decb80e0bd9290996 (patch)
tree5e7607561b8440ae3f1d078c9d00bdcdfbdd653b /drivers/avr
parent3cf179be61a10860b2b66aecf2ec5ca6f0e30605 (diff)
Adds support for JacoBurge's TouchPad (#4186)
* add touchpad * progress * working with leds and vibrations * adds readme * Update keyboards/touchpad/readme.md Co-Authored-By: jackhumbert <jack.humb@gmail.com> * updates
Diffstat (limited to 'drivers/avr')
-rwxr-xr-xdrivers/avr/i2c_master.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/avr/i2c_master.c b/drivers/avr/i2c_master.c
index a04e6570d7..19bae33e9f 100755
--- a/drivers/avr/i2c_master.c
+++ b/drivers/avr/i2c_master.c
@@ -179,6 +179,9 @@ i2c_status_t i2c_readReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16
status = i2c_write(regaddr, timeout);
if (status) return status;
+ status = i2c_stop(timeout);
+ if (status) return status;
+
status = i2c_start(devaddr | 0x01, timeout);
if (status) return status;
@@ -217,4 +220,4 @@ i2c_status_t i2c_stop(uint16_t timeout)
}
return I2C_STATUS_SUCCESS;
-} \ No newline at end of file
+}