ChimeraTK-DeviceAccess
03.18.00
|
Implements a generic userspace interface for UIO devices. More...
#include <UioAccess.h>
Public Member Functions | |
UioAccess (const std::string &deviceFilePath) | |
~UioAccess () | |
void | open () |
Opens UIO device for read and write operations and interrupt handling. More... | |
void | close () |
Closes UIO device. More... | |
void | read (uint64_t map, uint64_t address, int32_t *data, size_t sizeInBytes) |
Read data from the specified memory offset address. More... | |
void | write (uint64_t map, uint64_t address, int32_t const *data, size_t sizeInBytes) |
Write data to the specified memory offset address. More... | |
uint32_t | waitForInterrupt (int timeoutMs) |
Wait for hardware interrupt to occur within specified timeout period. More... | |
void | clearInterrupts () |
Clear all pending interrupts. More... | |
std::string | getDeviceFilePath () |
Return UIO device file path. More... | |
Implements a generic userspace interface for UIO devices.
Definition at line 13 of file UioAccess.h.
|
explicit |
Definition at line 17 of file UioAccess.cc.
ChimeraTK::UioAccess::~UioAccess | ( | ) |
void ChimeraTK::UioAccess::clearInterrupts | ( | ) |
Clear all pending interrupts.
Definition at line 121 of file UioAccess.cc.
void ChimeraTK::UioAccess::close | ( | ) |
Closes UIO device.
Definition at line 41 of file UioAccess.cc.
std::string ChimeraTK::UioAccess::getDeviceFilePath | ( | ) |
Return UIO device file path.
Definition at line 130 of file UioAccess.cc.
void ChimeraTK::UioAccess::open | ( | ) |
Opens UIO device for read and write operations and interrupt handling.
Definition at line 23 of file UioAccess.cc.
void ChimeraTK::UioAccess::read | ( | uint64_t | map, |
uint64_t | address, | ||
int32_t * | data, | ||
size_t | sizeInBytes | ||
) |
Read data from the specified memory offset address.
The address range starts at '0'.
map | Selected UIO memory region. Only region '0' is currently supported. |
address | Start address of memory to read from |
data | Address pointer to which data is to be copied |
sizeInBytes | Number of bytes to copy |
Definition at line 49 of file UioAccess.cc.
uint32_t ChimeraTK::UioAccess::waitForInterrupt | ( | int | timeoutMs | ) |
Wait for hardware interrupt to occur within specified timeout period.
timeoutMs | Timeout period in ms |
Definition at line 87 of file UioAccess.cc.
void ChimeraTK::UioAccess::write | ( | uint64_t | map, |
uint64_t | address, | ||
int32_t const * | data, | ||
size_t | sizeInBytes | ||
) |
Write data to the specified memory offset address.
The address range starts at '0'.
map | Selected UIO memory region. Only region '0' is currently supported. |
address | Start address of memory to write to |
data | Address pointer from which data is to be copied |
sizeInBytes | Number of bytes to copy |
Definition at line 68 of file UioAccess.cc.