SPI library used to communicate with an altera development board attached to four zigbee-header pins.
Diff: mmSPI.h
- Revision:
- 35:6152c9709697
- Parent:
- 34:d5553509f31a
diff -r d5553509f31a -r 6152c9709697 mmSPI.h --- a/mmSPI.h Sat Aug 31 02:19:42 2013 +0000 +++ b/mmSPI.h Sun Sep 01 02:29:08 2013 +0000 @@ -4,12 +4,18 @@ student : m-moore email : gated.clock@gmail.com class : usb device drivers - directory : mmSPI + directory : USB_device_project/mmSPI file : mmSPI.h date : september 3, 2013. -----description---------------------------------//------------------------------ +----copyright-----------------------------------//------------------------------ + licensed for personal and academic use. + commercial use must be approved by the account-holder of + gated.clock@gmail.com +----description---------------------------------//------------------------------ + this library provides the low-level SPI data and clock signaling + for communication with the altera development board, via four i/o + pins available on the mbed development board's zigbee header. ----notes---------------------------------------//------------------------------ - 1. the SPI interface pins are routed to the zigbee header. ------------------------------------------------//----------------------------*/ #include "mbed.h" // standard mbed.org class. //---defines------------------------------------//------------------------------ @@ -17,9 +23,6 @@ #define mmSPI_MISO p30 // SPI interface pin. #define mmSPI_SCLK p9 // SPI interface pin. #define mmCPU_CLK p10 // soft CPU system clock. -/*----------------------------------------------//------------------------------ -------------------------------------------------//----------------------------*/ - //==============================================//============================== class mmSPI { @@ -38,7 +41,7 @@ // write/read CPU registers. void write_register(char cRegister, char cValue); - void write_IR(char cValueH, char cValueL); + void write_IR (char cValueH, char cValueL); char read_register (char cRegister); // write/read CPU main-memory.