5 #include <boost/filesystem.hpp>
15 boost::filesystem::path _deviceFilePath;
16 int _deviceFileDescriptor = 0;
17 void* _deviceUserBase =
nullptr;
18 void* _deviceKernelBase =
nullptr;
19 size_t _deviceMemSize = 0;
20 uint32_t _lastInterruptCount = 0;
21 std::atomic<bool> _opened{
false};
33 uint32_t subtractUint32OverflowSafe(uint32_t minuend, uint32_t subtrahend);
38 uint32_t readUint32FromFile(std::string fileName);
43 uint64_t readUint64HexFromFile(std::string fileName);
46 explicit UioAccess(
const std::string& deviceFilePath);
60 void read(uint64_t map, uint64_t address, int32_t* data,
size_t sizeInBytes);
67 void write(uint64_t map, uint64_t address, int32_t
const* data,
size_t sizeInBytes);