14 : _c2h(devicePath +
"/c2h" +
std::
to_string(channelIdx), O_RDONLY),
15 _h2c(devicePath +
"/h2c" +
std::
to_string(channelIdx), O_WRONLY) {}
19 void DmaIntf::read(uintptr_t address, int32_t* __restrict__ buf,
size_t nbytes) {
20 ssize_t result = ::pread(_c2h, buf, nbytes, address);
21 if(result !=
static_cast<ssize_t
>(nbytes)) {
28 ssize_t result = ::pwrite(_h2c, data, nbytes, address);
29 if(result !=
static_cast<ssize_t
>(nbytes)) {
void read(uintptr_t address, int32_t *__restrict__ buf, size_t nbytes) override
void write(uintptr_t address, const int32_t *data, size_t nbytes) override
Exception thrown when a runtime error has occured.
This header collects some conversion routines which should be useful both for ApplicationCore Python ...
std::string to_string(Boolean &value)
std::string to_string(const std::string &v)