#ifndef _SPIPORT_H_ #define _SPIPORT_H_ #include class SpiPort { public: SpiPort(const std::string& path); ~SpiPort(); bool Open(); int Write(unsigned char *buf, int len); int Read(unsigned char *buf, int len); bool Close(); std::string GetLog() const { return m_log; } protected: std::string m_path; std::string m_log; int m_fd; }; #endif