mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-19 05:33:02 +00:00
Fix includes
This commit is contained in:
parent
8b3a77cdb4
commit
c9dc767c96
@ -1,7 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file uio_fpga.cc
|
* \file uio_fpga.cc
|
||||||
* \brief This library contains functions to determine the uio device driver file that
|
* \brief This library contains functions to determine the uio device driver
|
||||||
* corresponds to a hardware accelerator device name in the FPGA
|
* file that corresponds to a hardware accelerator device name in the FPGA.
|
||||||
* \author Marc Majoral, 2020. mmajoral(at)cttc.es
|
* \author Marc Majoral, 2020. mmajoral(at)cttc.es
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
@ -20,7 +20,7 @@
|
|||||||
|
|
||||||
#include "uio_fpga.h"
|
#include "uio_fpga.h"
|
||||||
#include <algorithm> // sort
|
#include <algorithm> // sort
|
||||||
#include <cstdint> // int8_t
|
#include <cstdlib> // atoi, size_t
|
||||||
#include <fstream> // ifstream
|
#include <fstream> // ifstream
|
||||||
#include <iostream> // cout
|
#include <iostream> // cout
|
||||||
#include <locale> // isdigit
|
#include <locale> // isdigit
|
||||||
@ -67,17 +67,17 @@ void get_uio_name(uint32_t uio_num, std::string &uio_name)
|
|||||||
infile.open(filename.str());
|
infile.open(filename.str());
|
||||||
if (infile.is_open())
|
if (infile.is_open())
|
||||||
{
|
{
|
||||||
getline(infile, uio_name);
|
std::getline(infile, uio_name);
|
||||||
if (infile.bad())
|
if (infile.bad())
|
||||||
{
|
{
|
||||||
std::cout << "Could not read the FPGA uio device information file" << std::endl;
|
std::cout << "Could not read the FPGA uio device information file\n";
|
||||||
throw std::exception();
|
throw std::exception();
|
||||||
}
|
}
|
||||||
infile.close();
|
infile.close();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
std::cout << "Could not open the FPGA uio device information file" << std::endl;
|
std::cout << "Could not open the FPGA uio device information file\n";
|
||||||
throw std::exception();
|
throw std::exception();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*!
|
/*!
|
||||||
* \file uio_fpga.h
|
* \file uio_fpga.h
|
||||||
* \brief This library contains functions to determine the uio device driver file that
|
* \brief This library contains functions to determine the uio device driver
|
||||||
* corresponds to a hardware accelerator device name in the FPGA
|
* file that corresponds to a hardware accelerator device name in the FPGA.
|
||||||
* \author Marc Majoral, 2020. mmajoral(at)cttc.es
|
* \author Marc Majoral, 2020. mmajoral(at)cttc.es
|
||||||
*
|
*
|
||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
@ -18,19 +18,23 @@
|
|||||||
* -----------------------------------------------------------------------------
|
* -----------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_SIM_GNSS_UIO_FPGA_H
|
#ifndef GNSS_SDR_UIO_FPGA_H
|
||||||
#define GNSS_SDR_SIM_GNSS_UIO_FPGA_H
|
#define GNSS_SDR_UIO_FPGA_H
|
||||||
|
|
||||||
#include <string> // string, memset()
|
#include <cstdint>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
const std::string uio_dir = "/sys/class/uio/";
|
const std::string uio_dir("/sys/class/uio/");
|
||||||
const std::string uio_filename = "uio";
|
const std::string uio_filename("uio");
|
||||||
const std::string uio_subdir_name = "/name";
|
const std::string uio_subdir_name("/name");
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief This function finds the uio device driver device file name out of the device name and the device number
|
* \brief This function finds the uio device driver device file name out of the
|
||||||
|
* device name and the device number.
|
||||||
*/
|
*/
|
||||||
int32_t find_uio_dev_file_name(std::string &device_file_name, const std::string &device_name, uint32_t device_num);
|
int32_t find_uio_dev_file_name(std::string &device_file_name,
|
||||||
|
const std::string &device_name,
|
||||||
|
uint32_t device_num);
|
||||||
|
|
||||||
|
|
||||||
#endif // GNSS_SDR_GNSS_UIO_FPGA_H
|
#endif // GNSS_SDR_UIO_FPGA_H
|
||||||
|
Loading…
Reference in New Issue
Block a user