Test for LinkSprite Y201 JPEG camera

Dependencies:   mbed MODSERIAL Y201 mbed-rtos

Files at this revision

API Documentation at this revision

Comitter:
donatien
Date:
Wed Jul 18 11:07:35 2012 +0000
Parent:
3:f87ddad1906f
Child:
5:98d57f3ef81f
Commit message:
Removed filesystem for now; added timeout / missing bytes detection in Y201 library

Changed in this revision

Y201.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/Y201.lib	Wed Jul 18 07:35:31 2012 +0000
+++ b/Y201.lib	Wed Jul 18 11:07:35 2012 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/ashleymills/code/Y201/#6e575c19681f
+http://mbed.org/users/ashleymills/code/Y201/#df71c00b97d8
--- a/main.cpp	Wed Jul 18 07:35:31 2012 +0000
+++ b/main.cpp	Wed Jul 18 11:07:35 2012 +0000
@@ -26,8 +26,8 @@
 
 
 void test(void const*) {
-  LocalFileSystem fs("fs");
-  FILE *fp = fopen("/fs/picture.jpg","w");
+  //LocalFileSystem fs("fs");
+  //FILE *fp = fopen("/fs/picture.jpg","w");
   pc.baud(115200);
   pc.printf("RESET V^V^V^V^V^V^V^V^V^V^V RESET\r\n");
   
@@ -79,11 +79,11 @@
         printf("Error in file read\r\n");
     }
     bytesRead += chunkSize;
-    printf("%d..",bytesRead,w);
+    printf("%d..\n",bytesRead,w);
     if(bytesRead<fileSize) {
-        size_t w = fwrite(readBuffer,chunkSize,1,fp);
+       // size_t w = fwrite(readBuffer,chunkSize,1,fp);
     } else {
-        size_t w = fwrite(readBuffer,(chunkSize-(bytesRead-fileSize)),1,fp);
+        // size_t w = fwrite(readBuffer,(chunkSize-(bytesRead-fileSize)),1,fp);
     }
     
     camera.trash();
@@ -91,7 +91,7 @@
   }
   
   printf("\r\n");
-  fclose(fp);
+  //fclose(fp);
   printf("loop exit\r\n");
   printf("filesize: %d\r\n",fileSize);  
 }