git-svn-id: svn://db.shs.com.ru/pip@581 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5

This commit is contained in:
2017-12-13 14:37:34 +00:00
parent cab51ddca9
commit 8d6ebfaebd
2 changed files with 10 additions and 2 deletions

View File

@@ -8,9 +8,16 @@ class PIP_EXPORT PISPI: public PIIODevice
{
PIIODEVICE(PISPI)
public:
explicit PISPI(const PIString & path = PIString(), uint speed_hz = 100000, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
explicit PISPI(const PIString & path = PIString(), uint speed_hz = 1000000, PIIODevice::DeviceMode mode = PIIODevice::ReadWrite);
~PISPI() {}
//! \brief Parameters of PISPI
enum Parameters {
ClockInverse /*! SPI clk polarity control check and generate */ = 0x1,
ParityOdd /*! Parity is odd instead of even */ = 0x2,
TwoStopBits /*! Two stop bits instead of one */ = 0x4
};
void setSpeed(uint speed_hz);
uint speed() const {return spi_speed;}