pflib v3.9.0-rc3-11-g2537d8f
Pretty Fine HGCROC Interaction Library
Loading...
Searching...
No Matches
pflib::UIO Class Reference
Collaboration diagram for pflib::UIO:
[legend]

Public Member Functions

 UIO (const std::string &name, size_t size=4096)
 Open the UIO device given a name, mapping the amount of memory indicated.
 
 ~UIO ()
 Open the UIO device given, mapping the amount of memory indicated.
 
uint32_t read (size_t i)
 Read the given word from the UIO device register space.
 
void write (size_t where, uint32_t what)
 Write the given value to the UIO device register.
 
uint32_t readMasked (size_t where, uint32_t mask)
 read with a mask (including shifts)
 
void writeMasked (size_t where, uint32_t mask, uint32_t val)
 write with a mask (including shifts)
 
void rmw (size_t where, uint32_t bits_to_modify, uint32_t newval)
 Generate an RMW cycle (read, apply INVERSE OF MASK, apply OR)
 

Private Member Functions

void iopen (const std::string &dev, size_t size=4096)
 Open a given device file directly.
 
int first_bit_set (uint32_t mask)
 

Private Attributes

std::string name_
 
size_t size_
 
uint32_t * ptr_
 
int handle_
 

Constructor & Destructor Documentation

◆ UIO()

pflib::UIO::UIO ( const std::string & name,
size_t size = 4096 )

Open the UIO device given a name, mapping the amount of memory indicated.

first, look for the DTSI map


The documentation for this class was generated from the following files: