ov7670 library

Dependents:   Project_test Capture_bw_portin Capture_bw_v3 Project_190659132

Files at this revision

API Documentation at this revision

Comitter:
sebbarpar
Date:
Mon Aug 31 10:12:40 2020 +0000
Parent:
6:b1b77891bddf
Commit message:
Final version;

Changed in this revision

ov7670.cpp Show annotated file Show diff for this revision Revisions of this file
ov7670.h Show annotated file Show diff for this revision Revisions of this file
--- a/ov7670.cpp	Sat Jun 20 11:07:03 2020 +0000
+++ b/ov7670.cpp	Mon Aug 31 10:12:40 2020 +0000
@@ -6,7 +6,6 @@
         _i2c.stop();
         _i2c.frequency(OV7670_I2CFREQ);
         vsync.fall(this,&OV7670::VsyncHandler);     // interrupt fall edge
-        href.fall(this,&OV7670::HrefHandler);     // interrupt fall edge
         CaptureReq = false;
         Busy = false;
         Done = false;
@@ -17,7 +16,6 @@
         wen = 0;
 }
 
-int bit=0;
 OV7670::~OV7670()
 {
 }
@@ -67,10 +65,7 @@
     }
 }
 
-void OV7670::HrefHandler(void)
-{
-    
-}
+
 
 
 // Data Read
@@ -81,6 +76,7 @@
 //        wait_us(1) ;
         result = data ;
         
+        //Shift bits to form pixel value
         int top= result>>4;
         result=result&0x0F;
         result=result+top;
--- a/ov7670.h	Sat Jun 20 11:07:03 2020 +0000
+++ b/ov7670.h	Mon Aug 31 10:12:40 2020 +0000
@@ -24,16 +24,6 @@
             PinName vs,     // VSYNC
             PinName hr,     // HREF
             PinName we,     // WEN
-            /*
-            PinName d7, // D7
-            PinName d6, // D6
-            PinName d5, // D5
-            PinName d4, // D4
-            PinName d3, // D3
-            PinName d2, // D2
-            PinName d1, // D1
-            PinName d0, // D0
-            */
             PortName port,
             int mask,
             PinName rt,     // /RRST
@@ -62,16 +52,6 @@
         //BusIn data;
         
         DigitalOut wen;
-        /*
-        DigitalIn da7;
-        DigitalIn da6;
-        DigitalIn da5;
-        DigitalIn da4;
-        DigitalIn da3;
-        DigitalIn da2;
-        DigitalIn da1;
-        DigitalIn da0;
-        */
         DigitalOut rrst,oe,rclk;
         volatile int LineCounter;
         volatile int LastLines;