Loading...
Searching...
No Matches
memmap_iface.hpp
Go to the documentation of this file.
//
// Copyright 2020 Ettus Research, a National Instruments Brand
//
// SPDX-License-Identifier: GPL-3.0-or-later
//
#pragma once
#include <uhd/config.hpp>
#include <uhd/types/time_spec.hpp>
#include <stdint.h>
#include <functional>
namespace uhd {
// This is a simplified version of wb_iface, useful for those cases when we use
// closures to provide bespoke peek/poke interfaces to objects.
struct UHD_API memmap32_iface
{
using poke32_fn_t = std::function<void(const uint32_t addr, const uint32_t data)>;
using peek32_fn_t = std::function<uint32_t(const uint32_t addr)>;
poke32_fn_t poke32;
peek32_fn_t peek32;
};
//
// The difference to memmap32_iface is that the poke command will require a command
// time.
struct UHD_API memmap32_iface_timed
{
using poke32_fn_t = std::function<void(
const uint32_t addr, const uint32_t data, const uhd::time_spec_t& time)>;
using peek32_fn_t = std::function<uint32_t(const uint32_t addr)>;
poke32_fn_t poke32;
peek32_fn_t peek32;
};
} // namespace uhd
uhd::time_spec_t
Definition time_spec.hpp:31
UHD_API
#define UHD_API
Definition config.h:87
config.hpp
uhd
Definition build_info.hpp:12
uhd::memmap32_iface_timed
Represents a 32-bit, memory-mapped interface (peek/poke).
Definition memmap_iface.hpp:33
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:34
uhd::memmap32_iface_timed::poke32
poke32_fn_t poke32
Definition memmap_iface.hpp:38
uhd::memmap32_iface_timed::peek32_fn_t
std::function< uint32_t(const uint32_t addr)> peek32_fn_t
Definition memmap_iface.hpp:36
uhd::memmap32_iface_timed::peek32
peek32_fn_t peek32
Definition memmap_iface.hpp:39
uhd::memmap32_iface
Represents a 32-bit, memory-mapped interface (peek/poke).
Definition memmap_iface.hpp:20
uhd::memmap32_iface::peek32
peek32_fn_t peek32
Definition memmap_iface.hpp:25
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::poke32
poke32_fn_t poke32
Definition memmap_iface.hpp:24
uhd::memmap32_iface::peek32_fn_t
std::function< uint32_t(const uint32_t addr)> peek32_fn_t
Definition memmap_iface.hpp:22
time_spec.hpp