peary::interface::iface_spi_CLICpix2

Class representing the SPI interface for CLICpix2 devices.

#include <peary/interfaces/SPI_CLICpix2/spi_CLICpix2.hpp>

Inherits from peary::interface::iface_spi<>, peary::interface::Interface< uint8_t, spi_t >

Public Functions

Name
iface_spi_CLICpix2() =deleteDelete the default constructor to prevent instantiation without configuration.

Protected Functions

Name
iface_spi_CLICpix2(const Interface<>::configuration_type & config)Constructor for the iface_spi_CLICpix2 class.
~iface_spi_CLICpix2() override =defaultDestructor for the iface_spi_CLICpix2 class.
std::pair< iface_spi<>::spi_reg_t, spi_t > write(const std::pair< iface_spi<>::spi_reg_t, spi_t > & data) overrideWrite data to the SPI interface and read the response.
std::vector< std::pair< iface_spi<>::spi_reg_t, spi_t > > write(const std::vector< std::pair< iface_spi<>::spi_reg_t, spi_t » & data) overrideWrite multiple data entries to the SPI interface and read the responses.

Friends

Name
iface_spi_CLICpix2 & InterfaceManager::getInterface(const Interface<>::configuration_type & config) Get an instance of the iface_spi_CLICpix2 interface.
void InterfaceManager::deleteInterface(iface_spi_CLICpix2 * ) Delete an instance of the iface_spi_CLICpix2 interface.

Additional inherited members

Public Types inherited from peary::interface::iface_spi<>

Name
using REG_T spi_reg_t

Public Functions inherited from peary::interface::iface_spi<>

Name
iface_spi() =deleteDeleted default constructor to prevent instantiation without configuration.

Protected Functions inherited from peary::interface::iface_spi<>

Name
iface_spi(const Interface<>::configuration_type & config)Constructor for iface_spi.
~iface_spi() overrideDestructor for iface_spi.
Interface ::dataVector_type read(const REG_T & reg, const unsigned int length) overrideRead multiple data from a register.

Protected Attributes inherited from peary::interface::iface_spi<>

Name
int spiDesc
std::mutex mutex
const uint32_t bits_per_word

Public Types inherited from peary::interface::Interface< uint8_t, spi_t >

Name
using REG_T reg_type Type aliases for register type, data type, configuration type, and data vector type.
using DATA_T data_type
using CONFIG_T configuration_type
using std::vector< data_type > dataVector_type

Public Functions inherited from peary::interface::Interface< uint8_t, spi_t >

Name
std::string devicePath() constGet the device path associated with the interface.

Protected Functions inherited from peary::interface::Interface< uint8_t, spi_t >

Name
Interface(const InterfaceConfiguration & config)Constructor for Interface class.
virtual ~Interface() =defaultVirtual destructor for Interface class.
virtual DATA_T read()Read a single data word from a device which does not contain internal registers.
virtual dataVector_type read(const unsigned int )Read multiple data words from a device which does not contain internal registers.
virtual dataVector_type read(const REG_T & , const unsigned int )Read a single data word from a specific register of a device containing internal registers.

Public Functions Documentation

function iface_spi_CLICpix2

  iface_spi_CLICpix2() =delete
  

Delete the default constructor to prevent instantiation without configuration.

Protected Functions Documentation

function iface_spi_CLICpix2

  inline explicit iface_spi_CLICpix2(
    const Interface<>::configuration_type & config
)
  

Constructor for the iface_spi_CLICpix2 class.

Parameters:

  • config The configuration parameters for the interface.

function ~iface_spi_CLICpix2

  ~iface_spi_CLICpix2() override =default
  

Destructor for the iface_spi_CLICpix2 class.

function write

  std::pair< iface_spi<>::spi_reg_t, spi_t > write(
    const std::pair< iface_spi<>::spi_reg_t, spi_t > & data
) override
  

Write data to the SPI interface and read the response.

Parameters:

  • data A pair containing the register address and the data to be written.

Return: A pair containing the register address and the data read from the interface.

function write

  std::vector< std::pair< iface_spi<>::spi_reg_t, spi_t > > write(
    const std::vector< std::pair< iface_spi<>::spi_reg_t, spi_t >> & data
) override
  

Write multiple data entries to the SPI interface and read the responses.

Parameters:

  • data A vector of pairs, each containing a register address and the data to be written.

Return: A vector of pairs, each containing a register address and the data read from the interface.

Friends

friend InterfaceManager::getInterface

  friend iface_spi_CLICpix2 & InterfaceManager::getInterface(
    const Interface<>::configuration_type & config
);
  

Get an instance of the iface_spi_CLICpix2 interface.

Parameters:

  • config The configuration parameters for the interface.

Return: A reference to the iface_spi_CLICpix2 interface instance.

friend InterfaceManager::deleteInterface

  friend void InterfaceManager::deleteInterface(
    iface_spi_CLICpix2 * 
);
  

Delete an instance of the iface_spi_CLICpix2 interface.


Updated on 2025-11-14 at 11:31:23 +0100