This is an involuntary fork, created because the repository would not update mmSPI. SPI library used to communicate with an altera development board attached to four zigbee-header pins.

Dependents:   Embedded_RTOS_Project

Fork of mmSPI by Mike Moore

Revision:
24:d3b8c68f41f2
Parent:
23:dbd89a56716d
Child:
25:5bb59ae7b814
--- a/mmSPI.h	Tue Aug 20 14:25:47 2013 +0000
+++ b/mmSPI.h	Tue Aug 20 14:38:50 2013 +0000
@@ -28,25 +28,22 @@
              mmSPI();                           // constructor.
             ~mmSPI();                           // destructor.
         void allocations();                     // object allocations.
-        void setSPIfrequency(float);            // set SPI clock frequency.
-
-                                                // byte transceive.
+        void setSPIfrequency (float);           // initializations.
+        void setSendBuffer   (char * pcSendBuffer);
+        void setReceiveBuffer(char * pcReceiveBuffer);
+        void setNumberOfBytes(int    dNumberOfBytes);
 
-                                                // SPI transceive loop.
-        void transceive_vector();
+        void transceive_vector();               // SPI transceive loop.
         
-
-                                
+                                                // write/read CPU registers.     
         void write_register(char cRegister, char cValue);
-        char read_register(char cRegister);
-
-        void write_memory(char cHData, char cLdata, char cAddress);
-        unsigned int read_memory(char cAddress);
+        char read_register (char cRegister);
+                                                // write/read CPU main-memory.
+        void         write_memory(char cHData, char cLdata, char cAddress);
+        unsigned int read_memory (char cAddress);
         
-        void setSendBuffer(char * pcSendBuffer);
-        void setReceiveBuffer(char * pcReceiveBuffer);
-        void setNumberOfBytes(int dNumberOfBytes);
-
+        void clear_transmit_vector();           // fill with 0.
+        
       private:
       
       DigitalOut * pMOSI;                       // SPI pin.