#pragma once #include //Needed for SPI port #include //Needed for SPI port #include //Needed for SPI port #include //Needed for SPI port #include #include #include #include #include #include class SPI { public: SPI(int port); ~SPI(); int SpiOpenPort(); int SpiClosePort(); int SpiWriteAndRead(unsigned char *data, int length); private: int spi_device; int spi_cs_fd; //int spi_cs0_fd; //file descriptor for the SPI device //int spi_cs1_fd; //file descriptor for the SPI device unsigned char spi_mode; unsigned char spi_bitsPerWord; unsigned int spi_speed; };