diff --git a/src/algorithms/acquisition/libs/fpga_acquisition.cc b/src/algorithms/acquisition/libs/fpga_acquisition.cc index 94bd423f3..dd1a7fe1c 100644 --- a/src/algorithms/acquisition/libs/fpga_acquisition.cc +++ b/src/algorithms/acquisition/libs/fpga_acquisition.cc @@ -119,7 +119,7 @@ void Fpga_Acquisition::open_device() LOG(WARNING) << "Cannot open deviceio" << d_device_name; std::cout << "Acq: cannot open deviceio" << d_device_name << std::endl; } - d_map_base = reinterpret_cast(mmap(nullptr, PAGE_SIZE, + d_map_base = reinterpret_cast(mmap(nullptr, PAGE_SIZE_DEFAULT, PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0)); if (d_map_base == reinterpret_cast(-1)) @@ -255,7 +255,7 @@ void Fpga_Acquisition::read_acquisition_results(uint32_t *max_index, void Fpga_Acquisition::close_device() { auto *aux = const_cast(d_map_base); - if (munmap(static_cast(aux), PAGE_SIZE) == -1) + if (munmap(static_cast(aux), PAGE_SIZE_DEFAULT) == -1) { std::cout << "Failed to unmap memory uio" << std::endl; } diff --git a/src/algorithms/acquisition/libs/fpga_acquisition.h b/src/algorithms/acquisition/libs/fpga_acquisition.h index 1c49c23b1..33a5a6867 100644 --- a/src/algorithms/acquisition/libs/fpga_acquisition.h +++ b/src/algorithms/acquisition/libs/fpga_acquisition.h @@ -146,7 +146,7 @@ public: private: // FPGA register parameters - static const uint32_t PAGE_SIZE = 0x10000; // default page size for the multicorrelator memory map + static const uint32_t PAGE_SIZE_DEFAULT = 0x10000; // default page size for the multicorrelator memory map static const uint32_t RESET_ACQUISITION = 2; // command to reset the multicorrelator static const uint32_t LAUNCH_ACQUISITION = 1; // command to launch the multicorrelator static const uint32_t TEST_REG_SANITY_CHECK = 0x55AA; // value to check the presence of the test register (to detect the hw)