|
| 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_t bits) |
|
uint32_t | 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_t | GetOutputFIFOAvailable () |
|
virtual uint16_t | GetNumReceived () |
|
virtual bool | IsDone () |
|
bool | HadReceiveOverflow () |
|
virtual void | Write (uint32_t data) |
|
virtual uint32_t | 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_t lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. More...
|
|
virtual void | SetImaqError (int success, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
| Set the current error information associated from the nivision Imaq API. More...
|
|
virtual void | SetError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | SetWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
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. More...
|
|
|
static void | DeleteSingletons () |
|
static uint32_t | GetDefaultAnalogModule () |
|
static uint32_t | GetDefaultDigitalModule () |
|
static uint32_t | GetDefaultSolenoidModule () |
|
static bool | CheckAnalogModule (uint8_t moduleNumber) |
|
static bool | CheckDigitalModule (uint8_t moduleNumber) |
|
static bool | CheckPWMModule (uint8_t moduleNumber) |
|
static bool | CheckRelayModule (uint8_t moduleNumber) |
|
static bool | CheckSolenoidModule (uint8_t moduleNumber) |
|
static bool | CheckDigitalChannel (uint32_t channel) |
|
static bool | CheckRelayChannel (uint32_t channel) |
|
static bool | CheckPWMChannel (uint32_t channel) |
|
static bool | CheckAnalogChannel (uint32_t channel) |
|
static bool | CheckSolenoidChannel (uint32_t channel) |
|
static void | SetGlobalError (Error::Code code, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) |
|
static void | SetGlobalWPIError (const char *errorMessage, const char *contextMessage, const char *filename, const char *function, uint32_t lineNumber) |
|
static Error & | GetGlobalError () |
|
static const uint32_t | kSystemClockTicksPerMicrosecond = 40 |
|
static const uint32_t | kDigitalChannels = 14 |
|
static const uint32_t | kAnalogChannels = 8 |
|
static const uint32_t | kAnalogModules = 2 |
|
static const uint32_t | kDigitalModules = 2 |
|
static const uint32_t | kSolenoidChannels = 8 |
|
static const uint32_t | kSolenoidModules = 2 |
|
static const uint32_t | kPwmChannels = 10 |
|
static const uint32_t | kRelayChannels = 8 |
|
static const uint32_t | kChassisSlots = 8 |
|
void | AddToSingletonList () |
|
| ErrorBase () |
| Initialize the instance status to 0 for now.
|
|
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_t 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 466 of file SPI.cpp.