![]() |
SatNOGS-COMMS
4.1.0
A COMMS subsystem for CubeSats
|
SPI device abstraction. More...
#include <spi.hpp>
Public Member Functions | |
| spi () | |
| Construct a new SPI object. | |
| ~spi () | |
| virtual void | read (uint8_t *rx, const uint8_t *tx, size_t tx_len, size_t rx_len)=0 |
| Performs an SPI read operation. | |
| virtual void | write (const uint8_t *tx, size_t len)=0 |
| Performs an SPI write operation. | |
| virtual gpio & | cs () |
| Returns a GPIO control handle for the CS of the SPI. If this is performed automatically by the hardware, users does not have to provide an implementation for this method, as it returns an object of dummy_gpio class, which has no effect. | |
SPI device abstraction.
This class provides a generic SPI communication abstraction.
|
inline |
|
inlinevirtual |
Returns a GPIO control handle for the CS of the SPI. If this is performed automatically by the hardware, users does not have to provide an implementation for this method, as it returns an object of dummy_gpio class, which has no effect.
Reimplemented in satnogs::comms::spi_manual_cs_bsp.
|
pure virtual |
Performs an SPI read operation.
| rx | the receive buffer. Should be at least len bytes in size |
| tx | the transmit buffer. Should be at least len bytes in size |
| tx_len | number of bytes to be transmitted |
| rx_len | number of bytes to be received |
Implemented in satnogs::comms::spi_bsp.
|
pure virtual |
Performs an SPI write operation.
| tx | the transmit buffer. Should be at least len bytes in size |
| len | number of bytes to be transmitted |
Implemented in satnogs::comms::spi_bsp.