OV7670 + 23LC1024 + Bluetooth
Dependencies: FastPWM MODSERIAL mbed
Diff: OV7670.h
- Revision:
- 1:6e4d2cff76e8
- Parent:
- 0:f309a2b2f27b
diff -r f309a2b2f27b -r 6e4d2cff76e8 OV7670.h --- a/OV7670.h Mon Jul 22 23:55:34 2013 +0000 +++ b/OV7670.h Tue Jul 23 06:33:27 2013 +0000 @@ -1,6 +1,7 @@ #include "mbed.h" #include "OV7670reg.h" #include "FastPWM.h" +#include "spi_ram.h" #define OV7670_WRITE (0x42) #define OV7670_READ (0x43) @@ -17,11 +18,9 @@ I2C camera; PinName xclkPin; PortIn data, inPort; - volatile int LineCounter; - volatile int LastLines; - volatile bool CaptureReq; - volatile bool Busy; - volatile bool Done; + SPI spi; + SRAM ram; + int size; OV7670( PinName sda, // Camera I2C port @@ -49,7 +48,9 @@ void scopeTest(Serial *host); - // Capture image in two arrays. Returns number of bytes received - int captureImage(unsigned char *arr1, unsigned char* arr2); + // Capture image to external SRAM. Returns number of bytes received + int captureImage(); + + void sendImage(Serial *dest, int numBytes); }; \ No newline at end of file