#include <uhd/utils/soft_register.hpp>
Public Types | |
typedef std::shared_ptr< soft_register_t< reg_data_t, readable, writable > > | sptr |
Static Public Attributes | |
static const uhd::soft_reg_field_t | REGISTER = ((( 0 & 0xFF) << 8) | ( sizeof(reg_data_t) * 8 & 0xFF)) |
Additional Inherited Members | |
![]() | |
template<typename soft_reg_t > | |
static UHD_INLINE soft_reg_t & | cast (soft_register_base ®) |
Soft register object that holds offset, soft-copy and the control iface. Methods give convenient field-level access to soft-copy and the ability to do read-modify-write operations.
typedef std::shared_ptr<soft_register_t<reg_data_t, readable, writable> > uhd::soft_register_t< reg_data_t, readable, writable >::sptr |
|
inline |
Generic constructor for all soft_register types
|
inlineexplicit |
Constructor for read-only, write-only registers and read-write registers with rd_addr == wr_addr
|
inlinevirtual |
Write the contents of the soft-copy to hardware.
Implements uhd::soft_register_base.
Reimplemented in uhd::soft_register_sync_t< reg_data_t, readable, writable >.
|
inline |
Get the value of the specified field from the soft-copy. NOTE: This does not read anything from hardware.
|
inlinevirtual |
Get bitwidth for this register
Implements uhd::soft_register_base.
|
inlinevirtual |
Initialize the register when the underlying bus is usable. Can be optionally synced with hardware. NOTE: Memory management of the iface is up to the caller
Implements uhd::soft_register_base.
Reimplemented in uhd::soft_register_sync_t< reg_data_t, readable, writable >.
|
inlinevirtual |
Is the register readable?
Implements uhd::soft_register_base.
|
inlinevirtual |
Is the register writable?
Implements uhd::soft_register_base.
|
inline |
Shortcut for refresh and get
|
inlinevirtual |
Read the contents of the register from hardware and update the soft copy.
Implements uhd::soft_register_base.
Reimplemented in uhd::soft_register_sync_t< reg_data_t, readable, writable >.
|
inline |
Update specified field in the soft-copy with the arg value. Performs a read-modify-write operation so all other field are preserved. NOTE: This does not write the value to hardware.
|
inline |
Shortcut for a set and a flush.
|
static |