mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-07-11 02:29:11 +02:00
implemented bus read and write
This commit is contained in:
@@ -0,0 +1,30 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <string_view>
|
||||
|
||||
namespace sls {
|
||||
|
||||
enum class IPCore : uint32_t; // forward declaration of IPCore enum class
|
||||
|
||||
struct Register {
|
||||
/// @brief IP core address space
|
||||
const IPCore ip_core{}; // TODO replace by enum type
|
||||
|
||||
/// @brief Offset of the register in bytes from the base address of the IP
|
||||
/// core
|
||||
const uint32_t offset_in_bytes{};
|
||||
};
|
||||
|
||||
struct RegisterField {
|
||||
/// @brief Register to which the field belongs
|
||||
const Register register_{};
|
||||
|
||||
/// @brief Bit position of the least significant bit of the field in the
|
||||
/// register
|
||||
const uint32_t bit_position{};
|
||||
|
||||
/// @brief Bitmask for the field
|
||||
const uint32_t bitmask{};
|
||||
};
|
||||
|
||||
} // namespace sls
|
||||
Reference in New Issue
Block a user