10 #include "ChipObject.h"
11 #include "SensorBase.h"
27 enum tFrameMode {kChipSelect, kPreLatchPulse, kPostLatchPulse, kPreAndPostLatchPulse};
28 enum tSPIConstants {kReceiveFIFODepth=512, kTransmitFIFODepth=512};
63 virtual void Write(uint32_t data);
64 virtual uint32_t
Read(
bool initiate =
false);
70 static SEM_ID m_semaphore;
73 tSPI::tConfig m_config;
74 tSPI::tChannels m_channels;
80 DISALLOW_COPY_AND_ASSIGN(
SPI);
void SetMSBFirst()
Definition: SPI.cpp:220
virtual void ApplyConfig()
Definition: SPI.cpp:361
void SetBitsPerWord(uint32_t bits)
Definition: SPI.cpp:176
DigitalOutput * GetSlaveSelect(tFrameMode *mode=NULL, bool *activeLow=NULL)
Definition: SPI.cpp:327
void SetLSBFirst()
Definition: SPI.cpp:229
virtual void ClearReceivedData()
Definition: SPI.cpp:521
bool HadReceiveOverflow()
Definition: SPI.cpp:419
Definition: DigitalOutput.h:21
virtual ~SPI()
Definition: SPI.cpp:101
virtual bool IsDone()
Definition: SPI.cpp:405
Definition: SensorBase.h:20
virtual void Write(uint32_t data)
Definition: SPI.cpp:434
virtual void Reset()
Definition: SPI.cpp:511
virtual uint16_t GetOutputFIFOAvailable()
Definition: SPI.cpp:378
uint32_t GetBitsPerWord()
Definition: SPI.cpp:187
virtual uint32_t Read(bool initiate=false)
Definition: SPI.cpp:466
void SetSampleDataOnFalling()
Definition: SPI.cpp:238
SPI(DigitalOutput &clk, DigitalOutput &mosi, DigitalInput &miso)
Definition: SPI.cpp:31
virtual uint16_t GetNumReceived()
Definition: SPI.cpp:392
void SetClockActiveLow()
Definition: SPI.cpp:344
void SetSlaveSelect(DigitalOutput *ss, tFrameMode mode=kChipSelect, bool activeLow=false)
Definition: SPI.cpp:263
void SetClockActiveHigh()
Definition: SPI.cpp:353
void SetClockRate(double hz)
Definition: SPI.cpp:198
void SetSampleDataOnRising()
Definition: SPI.cpp:247