added the c and header file for SPI