peary::interface::SPICLICpix2Endpoint

Class representing the SPI interface for CLICpix2 devices.

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

Inherits from peary::interface::SPIEndpoint<>, peary::interface::Endpoint< SpiInterface, uint8_t, uint8_t >

Public Functions

Name
SPICLICpix2Endpoint(const std::string & bus)Constructor for the iface_spi_CLICpix2 class.
~SPICLICpix2Endpoint() =default

Protected Functions

Name
pair_t write_impl(const pair_t & data) overrideWrite data to the SPI interface and read the response.
std::vector< pair_t > write_impl(const std::vector< pair_t > & data) overrideWrite multiple data entries to the SPI interface and read the responses.

Additional inherited members

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

Name
using typename Base::reg_t reg_t
using typename Base::pair_t pair_t
using typename Base::data_t data_t
using typename Base::vector_t vector_t

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

Name
SPIEndpoint(const std::string & bus)Constructor for SPIEndpoint.
~SPIEndpoint()Destructor for SPIEndpoint.

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

Name
vector_t read_impl(const reg_t & reg, const unsigned int length) overrideRead multiple data from a register.

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

Name
int fd_
const uint32_t bits_per_word

Public Types inherited from peary::interface::Endpoint< SpiInterface, uint8_t, uint8_t >

Name
using RegisterType reg_t
using DataType data_t
using std::pair< RegisterType, DataType > pair_t
using std::vector< DataType > vector_t

Public Functions inherited from peary::interface::Endpoint< SpiInterface, uint8_t, uint8_t >

Name
Endpoint(const Endpoint & ) =delete
Endpoint & operator=(const Endpoint & ) =delete
Endpoint(Endpoint && ) =delete
Endpoint & operator=(Endpoint && ) =delete
std::string info() constReturn human-readable endpoint information.
data_t write(const data_t & value)Write a single data word to a device which does not contain internal registers.
vector_t write(const vector_t & values)Write multiple data words to a device which does not contain internal registers.
pair_t write(const pair_t & regData)Write a single data word to a device containing internal registers.
vector_t write(const reg_t & reg, const vector_t & values)Write multiple data words to a specific register of a device containing internal registers.
std::vector< pair_t > write(const std::vector< pair_t > & regDataVec)Write multiple data words to multiple registers of a device containing internal registers.
data_t read()Read a single data word from a device which does not contain internal registers.
vector_t read(unsigned int count)Read multiple data words from a device which does not contain internal registers.
vector_t read(const reg_t & reg, unsigned int count)Read a single data word from a specific register of a device containing internal registers.

Protected Functions inherited from peary::interface::Endpoint< SpiInterface, uint8_t, uint8_t >

Name
Endpoint(const std::string & info)
virtual ~Endpoint() =default
virtual data_t read_impl()
virtual vector_t read_impl(const unsigned int )
virtual vector_t read_impl(const reg_t & , const unsigned int )

Public Functions Documentation

function SPICLICpix2Endpoint

  inline explicit SPICLICpix2Endpoint(
    const std::string & bus
)
  

Constructor for the iface_spi_CLICpix2 class.

Parameters:

  • bus The SPI bus address

function ~SPICLICpix2Endpoint

  ~SPICLICpix2Endpoint() =default
  

Protected Functions Documentation

function write_impl

  pair_t write_impl(
    const pair_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_impl

  std::vector< pair_t > write_impl(
    const std::vector< pair_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.


Updated on 2026-01-30 at 22:01:05 +0100