From d28684da90536b54ff7d145decb80e0bd9290996 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 10 Jan 2019 11:26:40 -0500 Subject: 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 * updates --- drivers/avr/i2c_master.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers') 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 +} -- cgit v1.2.3-24-g4f1b