mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-02-16 02:50:26 +00:00
Fix compilation in macOS when ENABLE_AD9361=ON
This commit is contained in:
parent
4dc30da649
commit
54661af0a4
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user