Version.h
/*
* File: Version.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_Version_h_)
#define _Version_h_
#include <string>
#include "stdafx.h"
namespace elftosb
{
struct version_t
{
uint16_t m_major;
uint16_t m_pad0;
uint16_t m_minor;
uint16_t m_pad1;
uint16_t m_revision;
uint16_t m_pad2;
version_t()
: m_major(0x999)
, m_pad0(0)
, m_minor(0x999)
, m_pad1(0)
, m_revision(0x999)
, m_pad2(0)
{
}
version_t(uint16_t maj, uint16_t min, uint16_t rev)
: m_major(maj)
, m_pad0(0)
, m_minor(min)
, m_pad1(0)
, m_revision(rev)
, m_pad2(0)
{
}
version_t(const std::string &versionString)
: m_major(0x999)
, m_pad0(0)
, m_minor(0x999)
, m_pad1(0)
, m_revision(0x999)
, m_pad2(0)
{
set(versionString);
}
void set(const std::string &versionString);
void fixByteOrder();
};
}; // namespace elftosb
#endif // _Version_h_
elftosb
Definition: BootImage.h:13
elftosb::version_t::fixByteOrder
void fixByteOrder()
Converts host endian BCD version values to the equivalent big-endian BCD values.
Definition: Version.cpp:138
elftosb::version_t
Same version struct used for 3600 boot image.
Definition: Version.h:16