Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
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 */