ADS7952 Driver
API reference
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | List of all members
ads7952::SpiInterface< Derived > Class Template Reference

#include <ads7952_spi_interface.hpp>

Public Member Functions

bool transfer (const uint8_t *tx, uint8_t *rx, std::size_t len)
 Perform a full-duplex SPI data transfer.
 
 SpiInterface (const SpiInterface &)=delete
 
SpiInterface & operator= (const SpiInterface &)=delete
 

Protected Member Functions

 SpiInterface ()=default
 Protected constructor to prevent direct instantiation.
 
 SpiInterface (SpiInterface &&)=default
 
SpiInterface & operator= (SpiInterface &&)=default
 
 ~SpiInterface ()=default
 Protected destructor.
 

Detailed Description

template<typename Derived>
class ads7952::SpiInterface< Derived >

Definition at line 89 of file ads7952_spi_interface.hpp.

Constructor & Destructor Documentation

◆ SpiInterface() [1/3]

template<typename Derived >
ads7952::SpiInterface< Derived >::SpiInterface ( const SpiInterface< Derived > &  )
delete

◆ SpiInterface() [2/3]

template<typename Derived >
ads7952::SpiInterface< Derived >::SpiInterface ( )
protecteddefault

Protected constructor to prevent direct instantiation.

◆ SpiInterface() [3/3]

template<typename Derived >
ads7952::SpiInterface< Derived >::SpiInterface ( SpiInterface< Derived > &&  )
protecteddefault

◆ ~SpiInterface()

template<typename Derived >
ads7952::SpiInterface< Derived >::~SpiInterface ( )
protecteddefault

Protected destructor.

Note
Derived classes can have public destructors

Member Function Documentation

◆ operator=() [1/2]

template<typename Derived >
SpiInterface & ads7952::SpiInterface< Derived >::operator= ( const SpiInterface< Derived > &  )
delete

◆ operator=() [2/2]

template<typename Derived >
SpiInterface & ads7952::SpiInterface< Derived >::operator= ( SpiInterface< Derived > &&  )
protecteddefault

◆ transfer()

template<typename Derived >
bool ads7952::SpiInterface< Derived >::transfer ( const uint8_t *  tx,
uint8_t *  rx,
std::size_t  len 
)
inline

Perform a full-duplex SPI data transfer.

Sends len bytes from tx and simultaneously receives len bytes into rx. Implementations should assert the device's chip select for the duration of the transfer.

Parameters
txPointer to data to transmit (len bytes). If nullptr, zeros can be sent.
rxPointer to buffer for received data (len bytes). If nullptr, received data can be ignored.
lenNumber of bytes to transfer.
Returns
true when the frame was transferred, false on a bus error.

Definition at line 105 of file ads7952_spi_interface.hpp.

References ads7952::detail::Transfer().


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