1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-01-15 11:45:47 +00:00

Avoid name clash with system macro in macOS

This commit is contained in:
Carles Fernandez 2019-07-26 13:22:11 +02:00
parent d626ca1f88
commit d818aacde4
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 3 additions and 3 deletions

View File

@ -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<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE,
d_map_base = reinterpret_cast<volatile uint32_t *>(mmap(nullptr, PAGE_SIZE_DEFAULT,
PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0));
if (d_map_base == reinterpret_cast<void *>(-1))
@ -255,7 +255,7 @@ void Fpga_Acquisition::read_acquisition_results(uint32_t *max_index,
void Fpga_Acquisition::close_device()
{
auto *aux = const_cast<uint32_t *>(d_map_base);
if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1)
if (munmap(static_cast<void *>(aux), PAGE_SIZE_DEFAULT) == -1)
{
std::cout << "Failed to unmap memory uio" << std::endl;
}

View File

@ -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)