Thank you @Idahowalker. But I am looking for a library in C. I have attached the .cpp libraries I'm talking about
SPI.cpp (7,1 KB) SPI.h (2,8 KB)