summaryrefslogtreecommitdiffstats
path: root/drivers/avr
diff options
context:
space:
mode:
authorJack Humbert <jack.humb@gmail.com>2019-01-10 17:26:40 +0100
committerMechMerlin <30334081+mechmerlin@users.noreply.github.com>2019-01-10 17:26:40 +0100
commitd28684da90536b54ff7d145decb80e0bd9290996 (patch)
tree5e7607561b8440ae3f1d078c9d00bdcdfbdd653b /drivers/avr
parent3cf179be61a10860b2b66aecf2ec5ca6f0e30605 (diff)
downloadqmk_firmware-d28684da90536b54ff7d145decb80e0bd9290996.tar.gz
qmk_firmware-d28684da90536b54ff7d145decb80e0bd9290996.tar.xz
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 a04e6570d..19bae33e9 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
+}