Added global variable declarations
Added SPI Functions