USRP Hardware Driver and USRP Manual  Version: 4.4.0.HEAD-0-g5fac246b
UHD and USRP Manual
memmap_iface.hpp
Go to the documentation of this file.
1 //
2 // Copyright 2020 Ettus Research, a National Instruments Brand
3 //
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 //
6 
7 #pragma once
8 
9 #include <uhd/config.hpp>
10 #include <uhd/types/time_spec.hpp>
11 #include <stdint.h>
12 #include <functional>
13 
14 namespace uhd {
15 
17 // This is a simplified version of wb_iface, useful for those cases when we use
18 // closures to provide bespoke peek/poke interfaces to objects.
20 {
21  using poke32_fn_t = std::function<void(const uint32_t addr, const uint32_t data)>;
22  using peek32_fn_t = std::function<uint32_t(const uint32_t addr)>;
23 
26 };
27 
29 //
30 // The difference to memmap32_iface is that the poke command will require a command
31 // time.
33 {
34  using poke32_fn_t = std::function<void(
35  const uint32_t addr, const uint32_t data, const uhd::time_spec_t& time)>;
36  using peek32_fn_t = std::function<uint32_t(const uint32_t addr)>;
37 
40 };
41 
42 } // namespace uhd
time_spec.hpp
config.hpp
uhd::memmap32_iface::poke32_fn_t
std::function< void(const uint32_t addr, const uint32_t data)> poke32_fn_t
Definition: memmap_iface.hpp:21
uhd::memmap32_iface_timed
Represents a 32-bit, memory-mapped interface (peek/poke).
Definition: memmap_iface.hpp:32
uhd::memmap32_iface::poke32
poke32_fn_t poke32
Definition: memmap_iface.hpp:24
UHD_API
#define UHD_API
Definition: config.h:87
uhd::memmap32_iface_timed::poke32_fn_t
std::function< void(const uint32_t addr, const uint32_t data, const uhd::time_spec_t &time)> poke32_fn_t
Definition: memmap_iface.hpp:35
uhd::memmap32_iface_timed::poke32
poke32_fn_t poke32
Definition: memmap_iface.hpp:38
uhd::memmap32_iface_timed::peek32
peek32_fn_t peek32
Definition: memmap_iface.hpp:39
uhd
Definition: build_info.hpp:12
uhd::time_spec_t
Definition: time_spec.hpp:28
uhd::memmap32_iface::peek32
peek32_fn_t peek32
Definition: memmap_iface.hpp:25
uhd::memmap32_iface::peek32_fn_t
std::function< uint32_t(const uint32_t addr)> peek32_fn_t
Definition: memmap_iface.hpp:22
uhd::memmap32_iface
Represents a 32-bit, memory-mapped interface (peek/poke).
Definition: memmap_iface.hpp:19
uhd::memmap32_iface_timed::peek32_fn_t
std::function< uint32_t(const uint32_t addr)> peek32_fn_t
Definition: memmap_iface.hpp:36