|
SatCat5
|
Polymorphic API for a generic SPI interface.
This a generic interface for issuing SPI transactions, to be implemented by any SPI controller.
#include <cfg_spi.h>
Public Member Functions | |
| virtual bool | busy ()=0 |
| Is the SPI controller currently busy? | |
| virtual bool | exchange (u8 devidx, const u8 *wrdata, u8 rwbytes, satcat5::cfg::SpiEventListener *callback=0)=0 |
| Queue an exchange transaction (simultaneous write+read). More... | |
| virtual bool | query (u8 devidx, const u8 *wrdata, u8 wrbytes, u8 rdbytes, satcat5::cfg::SpiEventListener *callback=0)=0 |
| Queue a query transaction (write, read, or write-then-read). More... | |
|
pure virtual |
Queue an exchange transaction (simultaneous write+read).
Returns true if the command was added to the queue. Returns false if the user should try again later.
Implemented in satcat5::cfg::Spi, and satcat5::device::i2c::Sc18is602.
|
pure virtual |
Queue a query transaction (write, read, or write-then-read).
Returns true if the command was added to the queue. Returns false if the user should try again later.
Implemented in satcat5::cfg::Spi, and satcat5::device::i2c::Sc18is602.