![]() |
ChimeraTK-DeviceAccess 03.25.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. | |
| void | close () |
| Closes UIO device. | |
| void | read (uint64_t map, uint64_t address, int32_t *data, size_t sizeInBytes) |
| Read data from the specified memory offset address. | |
| void | write (uint64_t map, uint64_t address, int32_t const *data, size_t sizeInBytes) |
| Write data to the specified memory offset address. | |
| uint32_t | waitForInterrupt (int timeoutMs) |
| Wait for hardware interrupt to occur within specified timeout period. | |
| void | clearInterrupts () |
| Clear all pending interrupts. | |
| std::string | getDeviceFilePath () |
| Return UIO device file path. | |
Implements a generic userspace interface for UIO devices.
Definition at line 13 of file UioAccess.h.
|
explicit |
Definition at line 19 of file UioAccess.cc.
| ChimeraTK::UioAccess::~UioAccess | ( | ) |
Definition at line 21 of file UioAccess.cc.
| void ChimeraTK::UioAccess::clearInterrupts | ( | ) |
Clear all pending interrupts.
Definition at line 123 of file UioAccess.cc.
| void ChimeraTK::UioAccess::close | ( | ) |
Closes UIO device.
Definition at line 43 of file UioAccess.cc.
| std::string ChimeraTK::UioAccess::getDeviceFilePath | ( | ) |
| void ChimeraTK::UioAccess::open | ( | ) |
Opens UIO device for read and write operations and interrupt handling.
Definition at line 25 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 51 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 89 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 70 of file UioAccess.cc.