Public Member Functions |
| | SPI (DigitalOutput &clk, DigitalOutput &mosi, DigitalInput &miso) |
| | SPI (DigitalOutput *clk, DigitalOutput *mosi, DigitalInput *miso) |
| | SPI (DigitalOutput &clk, DigitalOutput &mosi) |
| | SPI (DigitalOutput *clk, DigitalOutput *mosi) |
| | SPI (DigitalOutput &clk, DigitalInput &miso) |
| | SPI (DigitalOutput *clk, DigitalInput *miso) |
| virtual | ~SPI () |
| void | SetBitsPerWord (UINT32 bits) |
| UINT32 | GetBitsPerWord () |
| void | SetClockRate (double hz) |
| void | SetMSBFirst () |
| void | SetLSBFirst () |
| void | SetSampleDataOnFalling () |
| void | SetSampleDataOnRising () |
| void | SetSlaveSelect (DigitalOutput *ss, tFrameMode mode=kChipSelect, bool activeLow=false) |
| void | SetSlaveSelect (DigitalOutput &ss, tFrameMode mode=kChipSelect, bool activeLow=false) |
| DigitalOutput * | GetSlaveSelect (tFrameMode *mode=NULL, bool *activeLow=NULL) |
| void | SetClockActiveLow () |
| void | SetClockActiveHigh () |
| virtual void | ApplyConfig () |
| virtual UINT16 | GetOutputFIFOAvailable () |
| virtual UINT16 | GetNumReceived () |
| virtual bool | IsDone () |
| bool | HadReceiveOverflow () |
| virtual void | Write (UINT32 data) |
| virtual UINT32 | Read (bool initiate=false) |
| virtual void | Reset () |
| virtual void | ClearReceivedData () |
| | SensorBase () |
| virtual | ~SensorBase () |
|
virtual Error & | GetError () |
| | Retrieve the current error. Get the current error information associated with this sensor.
|
|
virtual const Error & | GetError () const |
| virtual void | SetErrnoError (const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| | Set error information associated with a C library call that set an error to the "errno" global variable.
|
| virtual void | SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| | Set the current error information associated from the nivision Imaq API.
|
| virtual void | SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| | Set the current error information associated with this sensor.
|
| virtual void | SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, UINT32 lineNumber) const |
| | Set the current error information associated with this sensor.
|
|
virtual void | CloneError (ErrorBase *rhs) const |
|
virtual void | ClearError () const |
| | Clear the current error information associated with this sensor.
|
| virtual bool | StatusIsFatal () const |
| | Check if the current error code represents a fatal error.
|
Additional Inherited Members |
| static void | DeleteSingletons () |
|
static UINT32 | GetDefaultAnalogModule () |
|
static UINT32 | GetDefaultDigitalModule () |
|
static UINT32 | GetDefaultSolenoidModule () |
| static bool | CheckAnalogModule (UINT8 moduleNumber) |
| static bool | CheckDigitalModule (UINT8 moduleNumber) |
| static bool | CheckPWMModule (UINT8 moduleNumber) |
| static bool | CheckRelayModule (UINT8 moduleNumber) |
| static bool | CheckSolenoidModule (UINT8 moduleNumber) |
| static bool | CheckDigitalChannel (UINT32 channel) |
| static bool | CheckRelayChannel (UINT32 channel) |
| static bool | CheckPWMChannel (UINT32 channel) |
| static bool | CheckAnalogChannel (UINT32 channel) |
| static bool | CheckSolenoidChannel (UINT32 channel) |
|
static const UINT32 | kSystemClockTicksPerMicrosecond = 40 |
|
static const UINT32 | kDigitalChannels = 14 |
|
static const UINT32 | kAnalogChannels = 8 |
|
static const UINT32 | kAnalogModules = 2 |
|
static const UINT32 | kDigitalModules = 2 |
|
static const UINT32 | kSolenoidChannels = 8 |
|
static const UINT32 | kSolenoidModules = 2 |
|
static const UINT32 | kPwmChannels = 10 |
|
static const UINT32 | kRelayChannels = 8 |
|
static const UINT32 | kChassisSlots = 8 |
| void | AddToSingletonList () |
SPI bus interface class.
This class is intended to be used by sensor (and other SPI device) drivers. It probably should not be used directly.
The FPGA only supports a single SPI interface.
Definition at line 24 of file SPI.h.
| UINT32 SPI::Read |
( |
bool |
initiate = false | ) |
|
|
virtual |
Read a word from the receive FIFO.
Waits for the current transfer to complete if the receive FIFO is empty.
If the receive FIFO is empty, there is no active transfer, and initiate is false, errors.
- Parameters
-
| initiate | If true, this function pushes "0" into the transmit buffer and initiates a transfer. If false, this function assumes that data is already in the receive FIFO from a previous write. |
Definition at line 468 of file SPI.cpp.