summaryrefslogtreecommitdiff
path: root/fw/fe310/eos/i2c/ov2640.c
diff options
context:
space:
mode:
authorUros Majstorovic <majstor@majstor.org>2021-12-01 01:20:10 +0100
committerUros Majstorovic <majstor@majstor.org>2021-12-01 01:20:10 +0100
commit7ded8116d90081851e0ddb1b4bdd77b645f6535c (patch)
treedc89dbc4269fc0d2e3ac0e43ca8a533371d21531 /fw/fe310/eos/i2c/ov2640.c
parent5506d89d97db87f78ab2ba4715c4248a3d49f98f (diff)
i2c added 16 bit register read/write
Diffstat (limited to 'fw/fe310/eos/i2c/ov2640.c')
-rw-r--r--fw/fe310/eos/i2c/ov2640.c4
1 files changed, 2 insertions, 2 deletions
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]) {