Mini SmartGPU Intelligent Graphics Processor. Mbed library Rev1.0 Vizic Technologies 2012 http://vizictechnologies.com/#/mini-smart-gpu/4566376187

Dependents:   BounceBallMSG BouncingBallsMSG HouseMSG NiceClockMSG ... more

Revision:
1:83a75a056cfa
Parent:
0:1c3989d263f4
--- a/MINISMARTGPU.cpp	Tue Aug 28 01:40:19 2012 +0000
+++ b/MINISMARTGPU.cpp	Wed Aug 29 22:31:40 2012 +0000
@@ -310,9 +310,7 @@
   
   _serialMINISMARTGPU.putc('I'); 
   _serialMINISMARTGPU.putc('S'); //from SD
-  _serialMINISMARTGPU.putc(x>>8); 
   _serialMINISMARTGPU.putc(x);
-  _serialMINISMARTGPU.putc(y>>8);
   _serialMINISMARTGPU.putc(y);
   
   while(1){
@@ -339,11 +337,11 @@
   _serialMINISMARTGPU.putc('O'); //file open
   _serialMINISMARTGPU.putc(mode);
   while(1){
-	_serialMINISMARTGPU.putc(name[counter]);
+    _serialMINISMARTGPU.putc(name[counter]);
     if(name[counter]==0x00){
       break;
-	}	
-	counter++;
+    }    
+    counter++;
   }
   aux= _serialMINISMARTGPU.getc();   //Get FAT result
   _serialMINISMARTGPU.getc();        //Discard 'O' or 'F'
@@ -386,7 +384,7 @@
   aux= _serialMINISMARTGPU.getc();   //Get FAT result
   _serialMINISMARTGPU.getc();        //Discard 'O' or 'F'
   return aux;                        //Return FAT result 
-}	
+}    
 
 unsigned char MINISMARTGPU::SDfread(unsigned int BTR, char buffer[], unsigned int *SRB){ //Bytes to Read, Read Buffer, Succesfully Readed Bytes
   unsigned char aux = 0;
@@ -397,7 +395,7 @@
   _serialMINISMARTGPU.putc(BTR>>8);
   _serialMINISMARTGPU.putc(BTR);  
   for(x=0;x<BTR;x++){
-	buffer[x]=_serialMINISMARTGPU.getc();
+    buffer[x]=_serialMINISMARTGPU.getc();
   }
   sr=_serialMINISMARTGPU.getc();
   sr=sr<<8;
@@ -407,7 +405,7 @@
   _serialMINISMARTGPU.getc();        //Discard 'O' or 'F'
   *SRB = sr;
   return aux;                        //Return FAT result
-}	
+}    
 
 unsigned char MINISMARTGPU::SDfwrite(unsigned int BTW, char buffer[], unsigned int *SWB){ //Bytes to Write, Write Buffer, Succesfully Written Bytes
   unsigned char aux = 0;
@@ -415,22 +413,22 @@
   
   wait_ms(1);
   if(BTW>512){       //Mini SmartGPU accept to write more than 512 bytes, however this is not recommended, remove this IF for fully write support
-	aux = 19;        //Invalid Parameter == 19
+    aux = 19;        //Invalid Parameter == 19
   }else{
-	_serialMINISMARTGPU.putc('F'); //memory card file management
-	_serialMINISMARTGPU.putc('W'); //file write
-	_serialMINISMARTGPU.putc(BTW>>8);
-	_serialMINISMARTGPU.putc(BTW);    
-	for(x=0;x<BTW;x++){
-		_serialMINISMARTGPU.putc(buffer[x]);
-	}
-	sw=_serialMINISMARTGPU.getc();
-	sw=sw<<8;
-	sw|=_serialMINISMARTGPU.getc();
+    _serialMINISMARTGPU.putc('F'); //memory card file management
+    _serialMINISMARTGPU.putc('W'); //file write
+    _serialMINISMARTGPU.putc(BTW>>8);
+    _serialMINISMARTGPU.putc(BTW);    
+    for(x=0;x<BTW;x++){
+        _serialMINISMARTGPU.putc(buffer[x]);
+    }
+    sw=_serialMINISMARTGPU.getc();
+    sw=sw<<8;
+    sw|=_serialMINISMARTGPU.getc();
  
-	aux= _serialMINISMARTGPU.getc();   //Get FAT result
-	_serialMINISMARTGPU.getc();        //Discard 'O' or 'F'
-	*SWB = sw;  
+    aux= _serialMINISMARTGPU.getc();   //Get FAT result
+    _serialMINISMARTGPU.getc();        //Discard 'O' or 'F'
+    *SWB = sw;  
   }
   return aux;           //Return FAT result   
 }