Library for LinkSprite Y201 JPEG serial camera.
Revision 4:6e575c19681f, committed 2012-07-17
- Comitter:
- ashleymills
- Date:
- Tue Jul 17 16:35:35 2012 +0000
- Parent:
- 3:decf96d8e6b0
- Child:
- 5:df71c00b97d8
- Child:
- 6:d8f5f576712b
- Commit message:
- Removed printf (otherwise these get sent to the camera since Y201 extends serial)
Changed in this revision
| Y201.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Y201.cpp Mon Jul 02 09:37:28 2012 +0000
+++ b/Y201.cpp Tue Jul 17 16:35:35 2012 +0000
@@ -25,13 +25,11 @@
if(readable()) {
uint8_t c = getc();
readBuffer[nread] = c;
- //printf("Read(%d): 0x%x\r\n",nread,readBuffer[nread]);
nread++;
}
}
Thread::wait(1);
} else {
- printf("Error during file read\r\n");
return false;
}
return true;
@@ -44,7 +42,6 @@
while(spos<seqLen) {
if(readable()) {
int c = getc();
- //printf("read %x\r\n",c);
if(seq[spos]==c) {
spos++;
} else {
@@ -54,7 +51,6 @@
if(timer<timeout) {
timer++;
} else {
- printf("timeout\r\n");
return false;
}
}
@@ -91,7 +87,6 @@
void Y201::putSeq(const int *seq, int seqLen) {
while(seqLen--) {
- //printf("sent %x\r\n",*seq);
putc(*seq++);
}
}
@@ -137,18 +132,14 @@
// wait for trash
int count = 3;
- printf("Waiting ");
while(count) {
- printf("%d ",count);
count--;
if(readable()) {
while(readable()) {
int c = getc();
- printf("READ %x\r\n",c);
}
}
Thread::wait(1000);
}
- printf("done.\r\n");
return ret;
}



