added codes about AndroidVersion and SOC
This commit is contained in:
18
inc/hgl/platform/Android.h
Normal file
18
inc/hgl/platform/Android.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
struct AndroidVersion
|
||||
{
|
||||
unsigned int major;
|
||||
unsigned int minor;
|
||||
unsigned int patch;
|
||||
|
||||
char postfix;
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据版本号取得Android的APILevel,如若出错返回-1
|
||||
*/
|
||||
const int GetAndroidAPILevel(const AndroidVersion &);
|
||||
}//namespace hgl
|
35
inc/hgl/platform/SOC.h
Normal file
35
inc/hgl/platform/SOC.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#pragma once
|
||||
|
||||
#include<hgl/TypeFunc.h>
|
||||
|
||||
namespace hgl
|
||||
{
|
||||
enum class SOCVendor
|
||||
{
|
||||
Unknow=0,
|
||||
|
||||
Qualcomm, ///<高通
|
||||
Hisilicon, ///<海思
|
||||
Samsung, ///<三星
|
||||
MediaTek, ///<联发科
|
||||
//Rockchip, ///<瑞芯微
|
||||
//Intel, ///<英特尔
|
||||
Unisoc, ///<展锐
|
||||
Spreadtrum, ///<展讯
|
||||
JLQ, ///<瓴盛
|
||||
//TI, ///<德州仪器
|
||||
|
||||
ENUM_CLASS_RANGE(Unknow,JLQ)
|
||||
};
|
||||
|
||||
struct SOCInfo
|
||||
{
|
||||
SOCVendor vendor;
|
||||
char model[16];
|
||||
};
|
||||
|
||||
/**
|
||||
* 根据收集到的SOC信息,解晰具体的SOC厂商和主要型号
|
||||
*/
|
||||
bool ParseSOCInfo(SOCInfo &,const char *);
|
||||
}//namespace hgl
|
Reference in New Issue
Block a user