Tedd OKANO / MARY_CAMERA
Revision:
11:61a025e8ab68
Parent:
8:23d14d5254d2
Child:
13:210f4bbd0cd6
--- a/MARY_CAMERA.h	Thu Mar 06 12:34:25 2014 +0000
+++ b/MARY_CAMERA.h	Sat Mar 08 04:59:00 2014 +0000
@@ -1,9 +1,7 @@
 #ifndef MBED_MARY_CAMERA
 #define MBED_MARY_CAMERA
 
-//#define SPI_FREQUENCY       12000000
-#define SPI_FREQUENCY       6000000
-
+#define SPI_FREQUENCY       12000000
 
 /** MARY_CAMERA class
  *
@@ -95,7 +93,7 @@
      *
      *  This function takes about 2 seconds because there is 99 times I2C access with 20ms interval. 
      */
-    void init( void );
+    int init( void );
 
     /** Check camera availability
      *
@@ -103,6 +101,8 @@
      *  This returns non-zero value id the camera initialization failed
      *
      *  This function takes about 2 seconds because there is 99 times I2C access with 20ms interval. 
+     *
+     *  @return error code in init function (I2C API return value)
      */
     int ready( void );
 
@@ -135,10 +135,10 @@
     void transfer_a_line( short *p, int line_number, int x_offset, int n_of_pixels );
 
 private:
-    int send_spi( char data );
-    void write_register( char reg, char value );
-    int read_register( char reg );
-    void set_address( int address );
+    int     send_spi( char data );
+    void    write_register( char reg, char value );
+    int     read_register( char reg );
+    void    set_address( int address );
 
     SPI         _spi;
     DigitalOut  _cs;
@@ -147,6 +147,4 @@
     int         _error_state;
 };
 
-
-
 #endif  //  MBED_MARY_CAMERA
\ No newline at end of file