mirror of
				https://github.com/gnss-sdr/gnss-sdr
				synced 2025-10-31 15:23:04 +00:00 
			
		
		
		
	Avoid name clash with system macro in macOS
This commit is contained in:
		| @@ -119,7 +119,7 @@ void Fpga_Acquisition::open_device() | |||||||
|             LOG(WARNING) << "Cannot open deviceio" << d_device_name; |             LOG(WARNING) << "Cannot open deviceio" << d_device_name; | ||||||
|             std::cout << "Acq: cannot open deviceio" << d_device_name << std::endl; |             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)); |         PROT_READ | PROT_WRITE, MAP_SHARED, d_fd, 0)); | ||||||
|  |  | ||||||
|     if (d_map_base == reinterpret_cast<void *>(-1)) |     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() | void Fpga_Acquisition::close_device() | ||||||
| { | { | ||||||
|     auto *aux = const_cast<uint32_t *>(d_map_base); |     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; |             std::cout << "Failed to unmap memory uio" << std::endl; | ||||||
|         } |         } | ||||||
|   | |||||||
| @@ -146,7 +146,7 @@ public: | |||||||
|  |  | ||||||
| private: | private: | ||||||
|     // FPGA register parameters |     // 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 RESET_ACQUISITION = 2;                  // command to reset the multicorrelator | ||||||
|     static const uint32_t LAUNCH_ACQUISITION = 1;                 // command to launch 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) |     static const uint32_t TEST_REG_SANITY_CHECK = 0x55AA;         // value to check the presence of the test register (to detect the hw) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Carles Fernandez
					Carles Fernandez