18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci/** HPI Version Definitions 38c2ecf20Sopenharmony_ciDevelopment releases have odd minor version. 48c2ecf20Sopenharmony_ciProduction releases have even minor version. 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci\file hpi_version.h 78c2ecf20Sopenharmony_ci*/ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#ifndef _HPI_VERSION_H 108c2ecf20Sopenharmony_ci#define _HPI_VERSION_H 118c2ecf20Sopenharmony_ci 128c2ecf20Sopenharmony_ci/* Use single digits for versions less that 10 to avoid octal. */ 138c2ecf20Sopenharmony_ci/* *** HPI_VER is the only edit required to update version *** */ 148c2ecf20Sopenharmony_ci/** HPI version */ 158c2ecf20Sopenharmony_ci#define HPI_VER HPI_VERSION_CONSTRUCTOR(4, 14, 3) 168c2ecf20Sopenharmony_ci 178c2ecf20Sopenharmony_ci/** HPI version string in dotted decimal format */ 188c2ecf20Sopenharmony_ci#define HPI_VER_STRING "4.14.03" 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ci/** Library version as documented in hpi-api-versions.txt */ 218c2ecf20Sopenharmony_ci#define HPI_LIB_VER HPI_VERSION_CONSTRUCTOR(10, 4, 0) 228c2ecf20Sopenharmony_ci 238c2ecf20Sopenharmony_ci/** Construct hpi version number from major, minor, release numbers */ 248c2ecf20Sopenharmony_ci#define HPI_VERSION_CONSTRUCTOR(maj, min, r) ((maj << 16) + (min << 8) + r) 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci/** Extract major version from hpi version number */ 278c2ecf20Sopenharmony_ci#define HPI_VER_MAJOR(v) ((int)(v >> 16)) 288c2ecf20Sopenharmony_ci/** Extract minor version from hpi version number */ 298c2ecf20Sopenharmony_ci#define HPI_VER_MINOR(v) ((int)((v >> 8) & 0xFF)) 308c2ecf20Sopenharmony_ci/** Extract release from hpi version number */ 318c2ecf20Sopenharmony_ci#define HPI_VER_RELEASE(v) ((int)(v & 0xFF)) 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#endif 34