SatNOGS-COMMS  4.1.0
A COMMS subsystem for CubeSats
Loading...
Searching...
No Matches
satnogs::comms::spi_bsp Class Reference

#include <bsp.hpp>

Inheritance diagram for satnogs::comms::spi_bsp:
satnogs::comms::lib::bsp::spi satnogs::comms::spi_manual_cs_bsp

Public Member Functions

 spi_bsp (const struct device *dev, const struct spi_config &spi_cfg)
void read (uint8_t *rx, const uint8_t *tx, size_t tx_len, size_t rx_len) override
 Performs an SPI read operation.
void write (const uint8_t *tx, size_t len) override
 Performs an SPI write operation.
Public Member Functions inherited from satnogs::comms::lib::bsp::spi
 spi ()
 Construct a new SPI object.
 ~spi ()
virtual gpiocs ()
 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.

Detailed Description

Definition at line 182 of file bsp.hpp.

Constructor & Destructor Documentation

◆ spi_bsp()

satnogs::comms::spi_bsp::spi_bsp ( const struct device * dev,
const struct spi_config & spi_cfg )

Definition at line 31 of file bsp.cpp.

Member Function Documentation

◆ read()

void satnogs::comms::spi_bsp::read ( uint8_t * rx,
const uint8_t * tx,
size_t tx_len,
size_t rx_len )
overridevirtual

Performs an SPI read operation.

Parameters
rxthe receive buffer. Should be at least len bytes in size
txthe transmit buffer. Should be at least len bytes in size
tx_lennumber of bytes to be transmitted
rx_lennumber of bytes to be received

Implements satnogs::comms::lib::bsp::spi.

Definition at line 38 of file bsp.cpp.

◆ write()

void satnogs::comms::spi_bsp::write ( const uint8_t * tx,
size_t len )
overridevirtual

Performs an SPI write operation.

Parameters
txthe transmit buffer. Should be at least len bytes in size
lennumber of bytes to be transmitted

Implements satnogs::comms::lib::bsp::spi.

Definition at line 60 of file bsp.cpp.


The documentation for this class was generated from the following files: