CameraC328

Dependents:   CameraC328_TestProgram CameraC328_Thresholding Camera_TestProgram_2015 Camera_TestProgram_2015 ... more

Revision:
12:4daa8c068bc5
Parent:
11:0c80f5829565
Child:
13:17cf1e2015f7
--- a/CameraC328.cpp	Mon Aug 30 14:43:37 2010 +0000
+++ b/CameraC328.cpp	Mon Aug 30 22:24:39 2010 +0000
@@ -1,5 +1,5 @@
 /**
- * C328-7640 device driver class (Version 0.0.3)
+ * C328-7640 device driver class (Version 0.0.4)
  * Reference documents: C328-7640 User Manual v3.0 2004.8.19
  *
  * Copyright (C) 2010 Shinichiro Nakamura (CuBeatSystems)
@@ -117,6 +117,11 @@
             return (ErrorNumber)UnexpectedReply;
         }
         imgcnt++;
+
+        /*
+         * Call a call back function.
+         * Please do not block this function.
+         */
         func(imgcnt, length, c);
     }
 
@@ -168,6 +173,11 @@
             return (ErrorNumber)UnexpectedReply;
         }
         imgcnt++;
+
+        /*
+         * Call a call back function.
+         * Please do not block this function.
+         */
         func(imgcnt, length, c);
     }
 
@@ -274,9 +284,16 @@
             return (ErrorNumber)UnexpectedReply;
         }
 
+        /*
+         * Call a call back function.
+         * You can block this function while working.
+         */
         func(databuf, ds);
-        wait_ms(10);
 
+        /*
+         * We should wait for camera working before reply a ACK.
+         */
+        wait_ms(100);
         en = sendAck(0x00, 1 + i);
         if (NoError != en) {
             return en;
@@ -368,9 +385,16 @@
             return (ErrorNumber)UnexpectedReply;
         }
 
+        /*
+         * Call a call back function.
+         * You can block this function while working.
+         */
         func(databuf, ds);
-        wait_ms(10);
-
+        
+        /*
+         * We should wait for camera working before reply a ACK.
+         */
+        wait_ms(100);
         en = sendAck(0x00, 1 + i);
         if (NoError != en) {
             return en;