Modified SPI module code to be more complete, you can now send as well as receive via SPI (will be needed for interfacing with a DAC)