USRP Hardware Driver and USRP Manual  Version: 4.2.0.0+ds1-3
UHD and USRP Manual
spi_getter_iface.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2021 Ettus Research, a National Instruments Brand
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #pragma once
8 
10 #include <uhd/types/serial.hpp>
11 #include <memory>
12 
13 namespace uhd { namespace features {
14 
20 {
22  uint8_t slave_ss;
23 
25  uint8_t slave_miso;
26 
28  uint8_t slave_mosi;
29 
31  uint8_t slave_clk;
32 };
33 
37 {
38 public:
39  using sptr = std::shared_ptr<spi_getter_iface>;
40 
42  {
44  }
45 
46  std::string get_feature_name() const
47  {
48  return "SPI Getter Interface";
49  }
50 
51  virtual ~spi_getter_iface() = default;
52 
57  const std::vector<uhd::features::spi_slave_config_t>& spi_slave_config) const = 0;
58 };
59 
60 }} // namespace uhd::features
Definition: discoverable_feature.hpp:25
feature_id_t
An enum of all features supported by the driver. When creating a new.
Definition: discoverable_feature.hpp:31
@ SPI_GETTER_IFACE
Definition: discoverable_feature.hpp:39
std::shared_ptr< discoverable_feature > sptr
Definition: discoverable_feature.hpp:27
Definition: spi_getter_iface.hpp:37
virtual ~spi_getter_iface()=default
std::string get_feature_name() const
Returns a human-readable string name of this feature.
Definition: spi_getter_iface.hpp:46
virtual uhd::spi_iface::sptr get_spi_ref(const std::vector< uhd::features::spi_slave_config_t > &spi_slave_config) const =0
static discoverable_feature::feature_id_t get_feature_id()
Definition: spi_getter_iface.hpp:41
std::shared_ptr< spi_iface > sptr
Definition: serial.hpp:124
Definition: build_info.hpp:12
Definition: spi_getter_iface.hpp:20
uint8_t slave_clk
Indicates which GPIO line to use for this the SCLK signal.
Definition: spi_getter_iface.hpp:31
uint8_t slave_mosi
Indicates which GPIO line to use for this the MOSI signal.
Definition: spi_getter_iface.hpp:28
uint8_t slave_miso
Indicates which GPIO line to use for this the MISO signal.
Definition: spi_getter_iface.hpp:25
uint8_t slave_ss
Indicates which GPIO line to use for this the CS signal.
Definition: spi_getter_iface.hpp:22