diff options
author | Jack Humbert <jack.humb@gmail.com> | 2019-01-10 11:26:40 -0500 |
---|---|---|
committer | MechMerlin <30334081+mechmerlin@users.noreply.github.com> | 2019-01-10 08:26:40 -0800 |
commit | d28684da90536b54ff7d145decb80e0bd9290996 (patch) | |
tree | 5e7607561b8440ae3f1d078c9d00bdcdfbdd653b /drivers/avr/i2c_master.c | |
parent | 3cf179be61a10860b2b66aecf2ec5ca6f0e30605 (diff) | |
download | qmk_firmware-d28684da90536b54ff7d145decb80e0bd9290996.tar.gz |
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/i2c_master.c')
-rwxr-xr-x | drivers/avr/i2c_master.c | 5 |
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 +} |