From 7ded8116d90081851e0ddb1b4bdd77b645f6535c Mon Sep 17 00:00:00 2001 From: Uros Majstorovic Date: Wed, 1 Dec 2021 01:20:10 +0100 Subject: i2c added 16 bit register read/write --- fw/fe310/eos/i2c/ov2640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fw/fe310/eos/i2c/ov2640.c') diff --git a/fw/fe310/eos/i2c/ov2640.c b/fw/fe310/eos/i2c/ov2640.c index 1a29463..6e54f10 100644 --- a/fw/fe310/eos/i2c/ov2640.c +++ b/fw/fe310/eos/i2c/ov2640.c @@ -339,11 +339,11 @@ static const uint8_t saturation_regs[NUM_SATURATION_LEVELS + 1][5] = { }; static int reg_read(int8_t reg, uint8_t *data) { - return eos_i2c_read8(OV2640_ADDR, reg, data); + return eos_i2c_read8(OV2640_ADDR, reg, data, 1); } static int reg_write(uint8_t reg, uint8_t data) { - return eos_i2c_write8(OV2640_ADDR, reg, data); + return eos_i2c_write8(OV2640_ADDR, reg, &data, 1); } static int regarr_write(const uint8_t (*regs)[2]) { -- cgit v1.2.3