1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Fix compilation in macOS when ENABLE_AD9361=ON

This commit is contained in:
Carles Fernandez 2019-09-23 14:36:09 +02:00
parent 4dc30da649
commit 54661af0a4
2 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ Fpga_Switch::Fpga_Switch(const std::string &device_name)
{
LOG(WARNING) << "Cannot open deviceio" << device_name;
}
d_map_base = reinterpret_cast<volatile unsigned *>(mmap(nullptr, PAGE_SIZE,
d_map_base = reinterpret_cast<volatile unsigned *>(mmap(nullptr, FPGA_PAGE_SIZE,
PROT_READ | PROT_WRITE, MAP_SHARED, d_device_descriptor, 0));
if (d_map_base == reinterpret_cast<void *>(-1))
@ -104,7 +104,7 @@ unsigned Fpga_Switch::fpga_switch_test_register(
void Fpga_Switch::close_device()
{
auto *aux = const_cast<unsigned *>(d_map_base);
if (munmap(static_cast<void *>(aux), PAGE_SIZE) == -1)
if (munmap(static_cast<void *>(aux), FPGA_PAGE_SIZE) == -1)
{
std::cout << "Failed to unmap memory uio" << std::endl;
}

View File

@ -62,7 +62,7 @@ public:
void set_switch_position(int32_t switch_position);
private:
static const size_t PAGE_SIZE = 0x10000;
static const size_t FPGA_PAGE_SIZE = 0x10000;
static const uint32_t TEST_REGISTER_TRACK_WRITEVAL = 0x55AA;
static const uint32_t MAX_LENGTH_DEVICEIO_NAME = 50;