From d188293b15cdfbe26390bf4475d553d6794584b2 Mon Sep 17 00:00:00 2001 From: Ruediger Bartz <ruediger.bartz@haw-hamburg.de> Date: Fri, 20 Nov 2015 11:41:52 +0100 Subject: [PATCH] drivers/tcs37727: fixed ATIME setup in init function --- drivers/tcs37727/tcs37727.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/tcs37727/tcs37727.c b/drivers/tcs37727/tcs37727.c index ca8aba669b..5dec081d5e 100644 --- a/drivers/tcs37727/tcs37727.c +++ b/drivers/tcs37727/tcs37727.c @@ -81,8 +81,8 @@ int tcs37727_init(tcs37727_t *dev, i2c_t i2c, uint8_t address, int atime_us) } dev->again = 4; - if (i2c_write_reg(dev->i2c, dev->addr, - TCS37727_ATIME_TO_REG(atime_us), 0) != 1) { + if (i2c_write_reg(dev->i2c, dev->addr, TCS37727_ATIME, + TCS37727_ATIME_TO_REG(atime_us)) != 1) { i2c_release(dev->i2c); return -3; } -- GitLab