MTS_SPI_Slave unfinished
Fork of MTS-Serial by
MTS_SPI_Slave.h
- Committer:
- ScottHoppeMultitech
- Date:
- 2017-11-16
- Revision:
- 14:d5a86071845e
- Parent:
- 13:010d349bc731
File content as of revision 14:d5a86071845e:
#ifndef MTS_SPI_Slave_H #define MTS_SPI_Slave_H #include "MTSBufferedIO.h" namespace mts { class MTS_SPI_Slave : public MTSBufferedIO { public: MTS_SPI_Slave(PinName mosi, PinName miso, PinName sclk, PinName ssel, int txBufferSize = 256, int rxBufferSize = 256); ~MTS_SPI_Slave(); void recieved_Read(); void frequency(int frequency); void format(int format_bits=8,int format_mode=0); protected: SPISlave spi; private: virtual int receive(); virtual void handleRead(); virtual void handleWrite(); Thread* _thread; }; } #endif /* MTS_SPI_Slave_H */