openFPGALoader/src/efinixHexParser.hpp

38 lines
823 B
C++
Raw Normal View History

2021-06-26 15:24:07 +02:00
// SPDX-License-Identifier: Apache-2.0
2020-10-31 08:46:53 +01:00
/*
* Copyright (C) 2020 Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>
*/
#ifndef SRC_EFINIXHEXPARSER_HPP_
#define SRC_EFINIXHEXPARSER_HPP_
#include <string>
#include "configBitstreamParser.hpp"
/*!
* \file efinixHexParser
* \class EfinixHexParser
* \brief class used to read a raw data file
* \author Gwenhael Goavec-Merou
*/
class EfinixHexParser: public ConfigBitstreamParser {
public:
/*!
* \brief constructor
* \param[in] filename: raw file to read
*/
EfinixHexParser(const std::string &filename);
2020-10-31 08:46:53 +01:00
/*!
* \brief read full content of the file, fill the buffer
2022-12-18 13:56:54 +01:00
* \return EXIT_SUCCESS is file is fully read, EXIT_FAILURE otherwise
2020-10-31 08:46:53 +01:00
*/
int parse() override;
private:
int parseHeader();
2020-10-31 08:46:53 +01:00
};
#endif // SRC_EFINIXHEXPARSER_HPP_