2016-10-30 18:24:19 +01:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2008-10-12 18:41:06 +02:00
|
|
|
#ifndef cmHexFileConverter_h
|
|
|
|
#define cmHexFileConverter_h
|
|
|
|
|
|
|
|
/** \class cmHexFileConverter
|
2013-03-16 19:13:01 +02:00
|
|
|
* \brief Can detects Intel Hex and Motorola S-record files and convert them
|
2008-10-12 18:41:06 +02:00
|
|
|
* to binary files.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
class cmHexFileConverter
|
|
|
|
{
|
|
|
|
public:
|
2016-07-09 11:21:54 +02:00
|
|
|
enum FileType
|
|
|
|
{
|
|
|
|
Binary,
|
|
|
|
IntelHex,
|
|
|
|
MotorolaSrec
|
|
|
|
};
|
2008-10-12 18:41:06 +02:00
|
|
|
static FileType DetermineFileType(const char* inFileName);
|
|
|
|
static bool TryConvert(const char* inFileName, const char* outFileName);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|