summaryrefslogtreecommitdiff
path: root/components/omnivision/ov9655
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2011-07-04 20:52:54 +0200
committerHarald Welte <laforge@gnumonks.org>2011-07-04 20:52:54 +0200
commit044ad7c3987460ede48ff27afd6bdb0ca05a0432 (patch)
tree924818cdb0d39ca08aec540d18da7bd406eaae8c /components/omnivision/ov9655
import at91lib from at91lib_20100901_softpack_1_9_v_1_0_svn_v1501120100901_softpack_1_9_v_1_0_svn_v15011
it's sad to see that atmel doesn't publish their svn repo or has a centralized location or even puts proper version/release info into the library itself
Diffstat (limited to 'components/omnivision/ov9655')
-rw-r--r--components/omnivision/ov9655/9655_yuv_cif.h165
-rw-r--r--components/omnivision/ov9655/9655_yuv_qcif.h162
-rw-r--r--components/omnivision/ov9655/9655_yuv_qqcif.h163
-rw-r--r--components/omnivision/ov9655/9655_yuv_qqvga.h169
-rw-r--r--components/omnivision/ov9655/9655_yuv_qvga.h166
-rw-r--r--components/omnivision/ov9655/9655_yuv_sxga.h164
-rw-r--r--components/omnivision/ov9655/9655_yuv_vga.h168
-rw-r--r--components/omnivision/ov9655/ov9655.c163
-rw-r--r--components/omnivision/ov9655/ov9655.dir46
9 files changed, 1366 insertions, 0 deletions
diff --git a/components/omnivision/ov9655/9655_yuv_cif.h b/components/omnivision/ov9655/9655_yuv_cif.h
new file mode 100644
index 0000000..d40bbb7
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_cif.h
@@ -0,0 +1,165 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.1
+//;
+
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_cif[]= {
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x09 }, // Vertical Control Frame
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x01 },
+ { 0x12, 0x62 },
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x18 },
+ { 0x18, 0x0c },
+ { 0x19, 0x01 },
+ { 0x1a, 0x81 },
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0xe4 },
+ { 0x33, 0x00 },
+ { 0x34, 0x3f },
+ { 0x35, 0x00 },
+ { 0x36, 0x3a },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x0e },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x01 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+
+ { 0x52, 0x28 }, // Matrix Coefficient 4
+ { 0x53, 0x88 }, // Matrix Coefficient 5
+ { 0x54, 0xb0 }, // Matrix Coefficient 6
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x00 },
+ { 0x58, 0x1a },
+
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x20 },
+ { 0x66, 0x00 },
+ { 0x69, 0x0a },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x00 }, // Pixel Output Index
+ { 0x73, 0x01 }, // Horizontal Scaling Down Coefficients
+ { 0x74, 0x3a },
+ { 0x75, 0x35 },
+ { 0x76, 0x01 },
+ { 0x77, 0x02 },
+
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+
+ { 0x8c, 0x80 },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x02 },
+ { 0x9e, 0x02 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xaa },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x81 }, // Common control 24
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/9655_yuv_qcif.h b/components/omnivision/ov9655/9655_yuv_qcif.h
new file mode 100644
index 0000000..5eb8c33
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_qcif.h
@@ -0,0 +1,162 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.1
+//;
+
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_qcif[]= {
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x12 },
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x01 },
+ { 0x12, 0x62 },
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x18 },
+ { 0x18, 0x0c },
+ { 0x19, 0x01 },
+ { 0x1a, 0x81 },
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0xa4 },
+ { 0x33, 0x00 },
+ { 0x34, 0x3f },
+ { 0x35, 0x00 },
+ { 0x36, 0x3a },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x0e },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x01 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x00 },
+ { 0x58, 0x1a },
+
+
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x20 },
+ { 0x66, 0x00 },
+ { 0x69, 0x0a },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x11 },
+ { 0x73, 0x02 },
+ { 0x74, 0x3a },
+ { 0x75, 0x35 },
+ { 0x76, 0x01 },
+ { 0x77, 0x02 },
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+ { 0x8a, 0x24 },
+ { 0x8c, 0x80 },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x02 },
+ { 0x9e, 0x02 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xaa },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x82 },
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/9655_yuv_qqcif.h b/components/omnivision/ov9655/9655_yuv_qqcif.h
new file mode 100644
index 0000000..e327635
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_qqcif.h
@@ -0,0 +1,163 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.1
+//;
+
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_qqcif[]= {
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x12 },
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x01 },
+ { 0x12, 0x62 },
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x3a },
+ { 0x18, 0x02 },
+ { 0x19, 0x01 },
+ { 0x1a, 0x3d },
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0xbf },
+ { 0x33, 0x00 },
+ { 0x34, 0x3f },
+ { 0x35, 0x00 },
+ { 0x36, 0x3a },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x02 },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x01 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x00 },
+ { 0x58, 0x1a },
+ { 0x59, 0x85 },
+ { 0x5a, 0xa9 },
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x20 },
+ { 0x66, 0x00 },
+ { 0x69, 0x0a },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x22 },
+ { 0x73, 0x02 },
+ { 0x74, 0x3a },
+ { 0x75, 0x35 },
+ { 0x76, 0x29 },
+ { 0x77, 0x02 },
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+
+
+ { 0x8a, 0x24 },
+ { 0x8c, 0x80 },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x02 },
+ { 0x9e, 0x02 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xaa },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x82 },
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/9655_yuv_qqvga.h b/components/omnivision/ov9655/9655_yuv_qqvga.h
new file mode 100644
index 0000000..f30b5b9
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_qqvga.h
@@ -0,0 +1,169 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.1
+//;
+
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_qqvga[]= {
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x02 },
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x01 },
+ { 0x12, 0x62 },
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x18 },
+ { 0x18, 0x04 },
+ { 0x19, 0x01 },
+ { 0x1a, 0x81 },
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0xa4 },
+ { 0x33, 0x00 },
+ { 0x34, 0x3f },
+ { 0x35, 0x00 },
+ { 0x36, 0x3a },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x0e },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x01 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+
+
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x00 },
+ { 0x58, 0x1a },
+
+
+
+ { 0x59, 0x85 },
+ { 0x5a, 0xa9 },
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x20 },
+ { 0x66, 0x00 },
+ { 0x69, 0x0a },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x22 },
+ { 0x73, 0x02 },
+ { 0x74, 0x10 },
+ { 0x75, 0x10 },
+ { 0x76, 0x01 },
+ { 0x77, 0x02 },
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+
+
+ { 0x8a, 0x24 },
+
+ { 0x8c, 0x80 },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x02 },
+ { 0x9e, 0x02 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xaa },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x82 },
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/9655_yuv_qvga.h b/components/omnivision/ov9655/9655_yuv_qvga.h
new file mode 100644
index 0000000..c2bc02d
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_qvga.h
@@ -0,0 +1,166 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.1
+//;
+
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_qvga[]= {
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x02 },
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x01 },
+ { 0x12, 0x62 },
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x18 },
+ { 0x18, 0x04 },
+ { 0x19, 0x01 },
+ { 0x1a, 0x81 },
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0x24 },
+ { 0x33, 0x00 },
+ { 0x34, 0x3f },
+ { 0x35, 0x00 },
+ { 0x36, 0x3a },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x0e },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x01 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x00 },
+ { 0x58, 0x1a },
+
+ { 0x59, 0x85 },
+ { 0x5a, 0xa9 },
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x20 },
+ { 0x66, 0x00 },
+ { 0x69, 0x0a },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x11 },
+ { 0x73, 0x01 },
+ { 0x74, 0x10 },
+ { 0x75, 0x10 },
+ { 0x76, 0x01 },
+ { 0x77, 0x02 },
+
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+
+
+ { 0x8a, 0x24 },
+ { 0x8c, 0x80 },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x02 },
+ { 0x9e, 0x02 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xaa },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x81 },
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/9655_yuv_sxga.h b/components/omnivision/ov9655/9655_yuv_sxga.h
new file mode 100644
index 0000000..9ee1aa4
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_sxga.h
@@ -0,0 +1,164 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.1
+//;
+
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_sxga[]= {
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x1b },
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x00 },
+ { 0x12, 0x02 },
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x1d },
+ { 0x18, 0xbd },
+ { 0x19, 0x01 },
+ { 0x1a, 0x81 },
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0xff },
+ { 0x33, 0x00 },
+ { 0x34, 0x3d },
+ { 0x35, 0x00 },
+ { 0x36, 0xf8 },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x0c },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x00 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x00 },
+ { 0x58, 0x1a },
+ { 0x58, 0x1a },
+ { 0x59, 0x85 },
+ { 0x5a, 0xa9 },
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x16 },
+ { 0x66, 0x01 },
+ { 0x69, 0x02 },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x00 },
+ { 0x73, 0x01 },
+ { 0x74, 0x3a },
+ { 0x75, 0x35 },
+ { 0x76, 0x01 },
+ { 0x77, 0x02 },
+
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+
+
+ { 0x8a, 0x03 },
+ { 0x8c, 0x0d },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x03 },
+ { 0x9e, 0x04 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xe2 },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x80 },
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/9655_yuv_vga.h b/components/omnivision/ov9655/9655_yuv_vga.h
new file mode 100644
index 0000000..adddf08
--- /dev/null
+++ b/components/omnivision/ov9655/9655_yuv_vga.h
@@ -0,0 +1,168 @@
+//; Generated by Sensor Tool
+//; Ver: 1.2.2
+//;
+#include <omnivision/omnivision.h>
+
+const struct ov_reg ov9655_yuv_vga[]= {
+
+ { 0x12, 0x80 },
+ { 0x00, 0x00 },
+ { 0x01, 0x80 },
+ { 0x02, 0x80 },
+ { 0x03, 0x12 },
+ { 0x04, 0x03 },
+ { 0x0e, 0x61 },
+ { 0x0f, 0x42 },
+ { 0x11, 0x01 },
+
+ { 0x12, 0x62 }, // YUV 30fps
+ { 0x13, 0xe7 },
+ { 0x14, 0x3a },
+ { 0x16, 0x24 },
+ { 0x17, 0x16 },
+ { 0x18, 0x02 },
+ { 0x19, 0x01 },
+ { 0x1a, 0x3d },
+
+ { 0x1e, 0x04 },
+ { 0x24, 0x3c },
+ { 0x25, 0x36 },
+ { 0x26, 0x72 },
+ { 0x27, 0x08 },
+
+ { 0x28, 0x08 },
+ { 0x29, 0x15 },
+ { 0x2a, 0x00 },
+ { 0x2b, 0x00 },
+ { 0x2c, 0x08 },
+ { 0x32, 0xff },
+ { 0x33, 0x00 },
+ { 0x34, 0x3F },
+
+ { 0x35, 0x00 },
+ { 0x36, 0xfa },
+ { 0x38, 0x72 },
+ { 0x39, 0x57 },
+ // { 0x3a, 0x80 }, // YUYV output sequence
+ { 0x3a, 0x00 }, // No delay
+
+ { 0x3b, 0x04 },
+ { 0x3d, 0x99 },
+ { 0x3e, 0x0c },
+ { 0x3f, 0xc1 },
+ { 0x40, 0xc0 },
+ { 0x41, 0x00 },
+ { 0x42, 0xc0 },
+ { 0x43, 0x0a },
+ { 0x44, 0xf0 },
+ { 0x45, 0x46 },
+ { 0x46, 0x62 },
+ { 0x47, 0x2a },
+ { 0x48, 0x3c },
+ { 0x4a, 0xfc },
+ { 0x4b, 0xfc },
+ { 0x4c, 0x7f },
+ { 0x4d, 0x7f },
+ { 0x4e, 0x7f },
+
+ { 0x52, 0x28 },
+ { 0x53, 0x88 },
+ { 0x54, 0xb0 },
+ { 0x4f, 0x98 },
+ { 0x50, 0x98 },
+ { 0x51, 0x0 },
+ { 0x58, 0x1a },
+
+ { 0x59, 0x85 },
+ { 0x5a, 0xa9 },
+ { 0x5b, 0x64 },
+ { 0x5c, 0x84 },
+ { 0x5d, 0x53 },
+ { 0x5e, 0x0e },
+ { 0x5f, 0xf0 },
+ { 0x60, 0xf0 },
+ { 0x61, 0xf0 },
+ { 0x62, 0x00 },
+ { 0x63, 0x00 },
+ { 0x64, 0x02 },
+ { 0x65, 0x20 },
+ { 0x66, 0x00 },
+ { 0x69, 0x0a },
+ { 0x6b, 0x5a }, //bypass internal regulator
+// { 0x6b, 0x4a }, // use internal regulator
+ { 0x6c, 0x04 },
+ { 0x6d, 0x55 },
+ { 0x6e, 0x00 },
+ { 0x6f, 0x9d },
+ { 0x70, 0x21 },
+ { 0x71, 0x78 },
+ { 0x72, 0x00 },
+ { 0x73, 0x00 },
+ { 0x74, 0x3a },
+ { 0x75, 0x35 },
+ { 0x76, 0x01 },
+ { 0x77, 0x02 },
+
+ { 0x7a, 0x12 },
+ { 0x7b, 0x08 },
+ { 0x7c, 0x15 },
+ { 0x7d, 0x24 },
+ { 0x7e, 0x45 },
+ { 0x7f, 0x55 },
+ { 0x80, 0x6a },
+ { 0x81, 0x78 },
+ { 0x82, 0x87 },
+ { 0x83, 0x96 },
+ { 0x84, 0xa3 },
+ { 0x85, 0xb4 },
+ { 0x86, 0xc3 },
+ { 0x87, 0xd6 },
+ { 0x88, 0xe6 },
+ { 0x89, 0xf2 },
+
+ { 0x8c, 0x8d },
+ { 0x90, 0x7d },
+ { 0x91, 0x7b },
+ { 0x9d, 0x02 },
+ { 0x9e, 0x02 },
+ { 0x9f, 0x7a },
+ { 0xa0, 0x79 },
+ { 0xa1, 0x40 },
+ { 0xa4, 0x50 },
+ { 0xa5, 0x68 },
+ { 0xa6, 0x4a },
+ { 0xa8, 0xc1 },
+ { 0xa9, 0xef },
+ { 0xaa, 0x92 },
+ { 0xab, 0x04 },
+ { 0xac, 0x80 },
+ { 0xad, 0x80 },
+ { 0xae, 0x80 },
+ { 0xaf, 0x80 },
+ { 0xb2, 0xf2 },
+ { 0xb3, 0x20 },
+ { 0xb4, 0x20 },
+ { 0xb5, 0x00 },
+ { 0xb6, 0xaf },
+ { 0xbb, 0xae },
+ { 0xbc, 0x7f },
+ { 0xbd, 0x7f },
+ { 0xbe, 0x7f },
+ { 0xbf, 0x7f },
+ { 0xc0, 0xaa },
+ { 0xc1, 0xc0 },
+ { 0xc2, 0x01 },
+ { 0xc3, 0x4e },
+ { 0xc6, 0x05 },
+ { 0xc7, 0x80 },
+ { 0xc9, 0xe0 },
+ { 0xca, 0xe8 },
+ { 0xcb, 0xf0 },
+ { 0xcc, 0xd8 },
+ { 0xcd, 0x93 },
+ { 0xcd, 0x93 }
+
+ ,{ 0xFF, 0xFF }
+};
+
+
diff --git a/components/omnivision/ov9655/ov9655.c b/components/omnivision/ov9655/ov9655.c
new file mode 100644
index 0000000..6ee9873
--- /dev/null
+++ b/components/omnivision/ov9655/ov9655.c
@@ -0,0 +1,163 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+#include <board.h>
+
+#if defined(BOARD_CAPTOR_OV9650)
+//------------------------------------------------------------------------------
+/// \unit
+///
+/// !!!Purpose
+///
+/// Specific configuration for Omnivision OV6555 captor
+///
+/// !!!Usage
+///
+/// -# Different files are been provided by Omnivision:
+/// - 9655_yuv_cif.h
+/// - 9655_yuv_qcif.h
+/// - 9655_yuv_qqcif.h
+/// - 9655_yuv_qqvga.h
+/// - 9655_yuv_qvga.h
+/// - 9655_yuv_sxga.h
+/// - 9655_yuv_vga.h
+/// -# Configure the captor using theses files
+//------------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+// Headers
+//-----------------------------------------------------------------------------
+#include <drivers/twi/twid.h>
+#include <utility/trace.h>
+
+#include <omnivision/omnivision.h>
+
+#include "9655_yuv_cif.h"
+#include "9655_yuv_qcif.h"
+#include "9655_yuv_qqcif.h"
+#include "9655_yuv_qvga.h"
+#include "9655_yuv_qqvga.h"
+#include "9655_yuv_sxga.h"
+#include "9655_yuv_vga.h"
+
+//------------------------------------------------------------------------------
+/// Array of image sizes supported by OV965x
+//------------------------------------------------------------------------------
+const static struct capture_size ov965x_sizes[] = {
+// {width, height}
+ /// QQCIF
+ { 88, 72 },
+ /// QQVGA
+ { 160, 120 },
+ /// QCIF
+ { 176, 144 },
+ /// QVGA
+ { 320, 240 },
+ /// CIF
+ { 352, 288 },
+ /// VGA
+ { 640, 480 },
+ /// SXGA
+ {1280, 1024 }
+};
+
+//------------------------------------------------------------------------------
+// Global Functions
+//------------------------------------------------------------------------------
+
+//-----------------------------------------------------------------------------
+/// Configure the OV9650 for a specified image size, pixel format,
+/// and frame period.
+//-----------------------------------------------------------------------------
+void ov_configure(Twid *pTwid, unsigned int width, unsigned int heigth)
+{
+ const struct ov_reg *reg_conf;
+ unsigned char goodCaptureSize = 0;
+ unsigned char i;
+
+ TRACE_DEBUG("ov965x_configure\n\r");
+ for( i=0; i<sizeof(ov965x_sizes); i++ ) {
+ if( ov965x_sizes[i].width == width ) {
+ if( ov965x_sizes[i].height != heigth ) {
+ TRACE_ERROR("ov965x_configure vsize not define\n\r");
+ }
+ else {
+ goodCaptureSize = 1;
+ break;
+ }
+ }
+ }
+
+ if( goodCaptureSize == 0 ) {
+ TRACE_ERROR("Problem size\n\r");
+ while(1);
+ return;
+ }
+
+ // Default value
+ reg_conf = ov9655_yuv_vga;
+
+ // common register initialization
+ switch(width) {
+ case 1280: //SXGA
+ TRACE_DEBUG("SXGA\n\r");
+ reg_conf = ov9655_yuv_sxga;
+ break;
+ case 640: //VGA
+ TRACE_DEBUG("VGA\n\r");
+ reg_conf = ov9655_yuv_vga;
+ break;
+ case 352: //CIF
+ TRACE_DEBUG("CIF\n\r");
+ reg_conf = ov9655_yuv_cif;
+ break;
+ case 320: //QVGA
+ TRACE_DEBUG("QVGA\n\r");
+ reg_conf = ov9655_yuv_qvga;
+ break;
+
+ case 176: //QCIF
+ TRACE_DEBUG("QCIF\n\r");
+ reg_conf = ov9655_yuv_qcif;
+ break;
+ case 160: //QQVGA
+ TRACE_DEBUG("QQVGA\n\r");
+ reg_conf = ov9655_yuv_qqvga;
+ break;
+ case 88: //QQCIF
+ TRACE_DEBUG("QQCIF\n\r");
+ reg_conf = ov9655_yuv_qqcif;
+ break;
+ default:
+ TRACE_DEBUG("ov965x_configure problem\n\r");
+ break;
+ }
+ ov_write_regs(pTwid, reg_conf);
+}
+#endif
diff --git a/components/omnivision/ov9655/ov9655.dir b/components/omnivision/ov9655/ov9655.dir
new file mode 100644
index 0000000..ed1b4d4
--- /dev/null
+++ b/components/omnivision/ov9655/ov9655.dir
@@ -0,0 +1,46 @@
+/* ----------------------------------------------------------------------------
+ * ATMEL Microcontroller Software Support
+ * ----------------------------------------------------------------------------
+ * Copyright (c) 2008, Atmel Corporation
+ *
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * - Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the disclaimer below.
+ *
+ * Atmel's name may not be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * DISCLAIMER: THIS SOFTWARE IS PROVIDED BY ATMEL "AS IS" AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT ARE
+ * DISCLAIMED. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA,
+ * OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ * ----------------------------------------------------------------------------
+ */
+
+//------------------------------------------------------------------------------
+/// \dir
+///
+/// !!!Purpose
+///
+/// This directory contains an API for configuring the Omnivision OV9655 captor.
+///
+/// !!!Contents
+///
+/// Driver for Omnivision OV9655 captor.
+/// The Omnivision OV9655 image sensors are low voltage CMOS devices that
+/// provide the full functionnality of a single SXGA (1280x1024) camera and
+/// image processor in a small footprint package. The OV9655 provides full-frame,
+/// sub-sampled, scaled or windowed 8-bit/10-bit images in a wide range of
+/// formats, controlled through the TWI interface.
+//------------------------------------------------------------------------------
+
personal git repositories of Harald Welte. Your mileage may vary