Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: ov7670.h
- Revision:
- 1:014b5716c47f
- Parent:
- 0:d69a19a5c0ff
--- a/ov7670.h Tue Feb 14 13:25:25 2012 +0000
+++ b/ov7670.h Fri Apr 03 15:12:32 2020 +0000
@@ -11,14 +11,13 @@
//
// OV7670 + FIFO AL422B camera board test
//
-class OV7670 : public Base
+class OV7670
{
public:
I2C camera ;
InterruptIn vsync,href;
- DigitalOut wen ;
BusIn data ;
- DigitalOut rrst,oe,rclk ;
+ DigitalOut rrst,rclk ;
volatile int LineCounter ;
volatile int LastLines ;
volatile bool CaptureReq ;
@@ -30,7 +29,6 @@
PinName scl,// Camera I2C port
PinName vs, // VSYNC
PinName hr, // HREF
- PinName we, // WEN
PinName d7, // D7
PinName d6, // D6
PinName d5, // D5
@@ -40,9 +38,8 @@
PinName d1, // D1
PinName d0, // D0
PinName rt, // /RRST
- PinName o, // /OE
PinName rc // RCLK
- ) : camera(sda,scl),vsync(vs),href(hr),wen(we),data(d0,d1,d2,d3,d4,d5,d6,d7),rrst(rt),oe(o),rclk(rc)
+ ) : camera(sda,scl),vsync(vs),href(hr),data(d0,d1,d2,d3,d4,d5,d6,d7),rrst(rt),rclk(rc)
{
camera.stop() ;
camera.frequency(OV7670_I2CFREQ) ;
@@ -53,9 +50,7 @@
Done = false ;
LineCounter = 0 ;
rrst = 1 ;
- oe = 1 ;
rclk = 1 ;
- wen = 0 ;
}
// capture request
@@ -172,11 +167,9 @@
{
// Capture Enable
if (CaptureReq) {
- wen = 1 ;
Done = false ;
CaptureReq = false ;
} else {
- wen = 0 ;
if (Busy) {
Busy = false ;
Done = true ;
@@ -209,7 +202,6 @@
void ReadStart(void)
{
rrst = 0 ;
- oe = 0 ;
wait_us(1) ;
rclk = 0 ;
wait_us(1) ;
@@ -221,7 +213,6 @@
// Data Stop
void ReadStop(void)
{
- oe = 1 ;
ReadOneByte() ;
rclk = 1 ;
}