From 68cdcbdcce049cd26e3ff21d0ade02d0a8e3314b Mon Sep 17 00:00:00 2001 From: wuzheng Date: Mon, 21 Nov 2022 11:12:35 +0800 Subject: [PATCH] improve dvp driver by add one effective mode --- .../edu-riscv64/third_party_driver/dvp/connect_dvp.c | 1 + .../edu-riscv64/third_party_driver/dvp/ov2640.c | 12 +++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/connect_dvp.c b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/connect_dvp.c index fb3c02219..c78b242a6 100644 --- a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/connect_dvp.c +++ b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/connect_dvp.c @@ -138,6 +138,7 @@ static uint32 dvpDrvConfigure(void *drv, struct BusConfigureInfo *args) readDvpReg(drv, (struct DvpRegConfigureInfo *)args->private_data); break; case REG_SCCB_WRITE: + //for ov2640,write reg 0x04 to Horizontal mirror or Vertical flip writeDvpReg(drv, (struct DvpRegConfigureInfo *)args->private_data); break; default: diff --git a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/ov2640.c b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/ov2640.c index 867642bda..ba5dfea9b 100644 --- a/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/ov2640.c +++ b/Ubiquitous/XiZi_IIoT/board/edu-riscv64/third_party_driver/dvp/ov2640.c @@ -30,7 +30,7 @@ const uint8_t ov2640_config[][2]= {0x3c, 0x32}, {0x11, 0x00}, {0x09, 0x02}, - {0x04, 0x58}, + {0x04, 0x28}, {0x13, 0xe5}, {0x14, 0x48}, {0x2c, 0x0c}, @@ -218,7 +218,7 @@ const uint8_t ov2640_config[][2]= {0x3C, 0x32}, {0x11, 0x00}, {0x09, 0x02}, - {0x04, 0xA8}, + {0x04, 0x28}, {0x13, 0xE5}, {0x14, 0x48}, {0x2C, 0x0C}, @@ -387,7 +387,13 @@ const uint8_t ov2640_config[][2]= {0xE5, 0x1F}, {0xE1, 0x67}, {0xE0, 0x00}, - {0xDD, 0x7F}, + {0xDD, 0x7F}, + {0x05, 0x00}, + {0xe0, 0x04}, + {0x5a, 0x50}, + {0x5b, 0x3c}, + {0x5c, 0x00}, + {0xe0, 0x00}, {0x00, 0x00} }; #else