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.
Revision 3:b4e0cefc37f6, committed 2013-04-07
- Comitter:
- edodm85
- Date:
- Sun Apr 07 10:52:10 2013 +0000
- Parent:
- 2:bbd557817319
- Child:
- 4:d0d4760d32b2
- Commit message:
- Added VGA RAW
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
| ov7670.lib | Show annotated file Show diff for this revision Revisions of this file |
--- a/main.cpp Sat Mar 16 13:45:09 2013 +0000
+++ b/main.cpp Sun Apr 07 10:52:10 2013 +0000
@@ -1,6 +1,6 @@
/*
* Author: Edoardo De Marchi
- * Date: 10/03/13
+ * Date: 07/04/13
* Notes: OV7670 + FIFO AL422B camera test
*/
@@ -54,9 +54,8 @@
CameraSnap();
memset(word, 0, sizeof(word));
}else
- if(strcmp("init_bw_VGA", word) == 0) // Set up for 640*480 pixels YUV (Only Y)
+ if(strcmp("init_bw_VGA", word) == 0) // Set up for 640*480 pixels RAW
{
- pc.printf("Initializing ov7670 - Format YUV422(Y only) & VGA Mode\r\n");
format = 'b';
resolution = VGA;
if(camera.Init('b', VGA) != 1)
@@ -68,7 +67,6 @@
}else
if(strcmp("init_yuv_QVGA", word) == 0) // Set up for 320*240 pixels YUV422
{
- pc.printf("Initializing ov7670 - Format YUV422 & QVGA Mode\r\n");
format = 'y';
resolution = QVGA;
if(camera.Init('b', QVGA) != 1)
@@ -80,7 +78,6 @@
}else
if(strcmp("init_rgb_QVGA", word) == 0) // Set up for 320*240 pixels RGB565
{
- pc.printf("Initializing ov7670 - Format RGB565 & QVGA Mode\r\n");
format = 'r';
resolution = QVGA;
if(camera.Init('r', QVGA) != 1)
@@ -92,7 +89,6 @@
}else
if(strcmp("init_bw_QVGA", word) == 0) // Set up for 320*240 pixels YUV (Only Y)
{
- pc.printf("Initializing ov7670 - Format YUV422(Y only) & QVGA Mode\r\n");
format = 'b';
resolution = QVGA;
if(camera.Init('b', QVGA) != 1)
@@ -104,7 +100,6 @@
}else
if(strcmp("init_yuv_QQVGA", word) == 0) // Set up for 160*120 pixels YUV422
{
- pc.printf("Initializing ov7670 - Format YUV422 & QQVGA Mode\r\n");
format = 'y';
resolution = QQVGA;
if(camera.Init('b', QQVGA) != 1)
@@ -116,7 +111,6 @@
}else
if(strcmp("init_rgb_QQVGA", word) == 0) // Set up for 160*120 pixels RGB565
{
- pc.printf("Initializing ov7670 - Format RGB565 & QQVGA Mode\r\n");
format = 'r';
resolution = QQVGA;
if(camera.Init('r', QQVGA) != 1)
@@ -128,7 +122,6 @@
}else
if(strcmp("init_bw_QQVGA", word) == 0) // Set up for 160*120 pixels YUV (Only Y)
{
- pc.printf("Initializing ov7670 - Format YUV422(Y only) & QQVGA Mode\r\n");
format = 'b';
resolution = QQVGA;
if(camera.Init('b', QQVGA) != 1)
@@ -166,7 +159,7 @@
for(int x = 0; x<resolution; x++)
{
// Read in the first half of the image
- if(format == 'b')
+ if(format == 'b' && resolution != VGA)
{
camera.ReadOnebyte();
}else
--- a/ov7670.lib Sat Mar 16 13:45:09 2013 +0000 +++ b/ov7670.lib Sun Apr 07 10:52:10 2013 +0000 @@ -1,1 +1,1 @@ -http://mbed.org/users/edodm85/code/ov7670/#d82dbad9c06b +http://mbed.org/users/edodm85/code/ov7670/#354a00023f79