platform/config.c: Add struct pcbid_config

This commit is contained in:
Tau 2019-08-20 18:44:47 -04:00
parent a34d845730
commit 8774b83f9c
2 changed files with 22 additions and 0 deletions

View File

@ -135,6 +135,22 @@ void nusec_config_load(struct nusec_config *cfg, const wchar_t *filename)
filename); filename);
} }
void pcbid_config_load(struct pcbid_config *cfg, const wchar_t *filename)
{
assert(cfg != NULL);
assert(filename != NULL);
cfg->enable = GetPrivateProfileIntW(L"pcbid", L"enable", 1, filename);
GetPrivateProfileStringW(
L"pcbid",
L"serialNo",
L"ACAE01A99999999",
cfg->serial_no,
_countof(cfg->serial_no),
filename);
}
void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename) void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename)
{ {
assert(cfg != NULL); assert(cfg != NULL);

View File

@ -30,6 +30,11 @@ struct nusec_config {
wchar_t billing_pub[MAX_PATH]; wchar_t billing_pub[MAX_PATH];
}; };
struct pcbid_config {
bool enable;
wchar_t serial_no[17];
};
struct vfs_config { struct vfs_config {
bool enable; bool enable;
wchar_t amfs[MAX_PATH]; wchar_t amfs[MAX_PATH];
@ -49,4 +54,5 @@ void amvideo_config_load(struct amvideo_config *cfg, const wchar_t *filename);
void hwmon_config_load(struct hwmon_config *cfg, const wchar_t *filename); void hwmon_config_load(struct hwmon_config *cfg, const wchar_t *filename);
void misc_config_load(struct misc_config *cfg, const wchar_t *filename); void misc_config_load(struct misc_config *cfg, const wchar_t *filename);
void nusec_config_load(struct nusec_config *cfg, const wchar_t *filename); void nusec_config_load(struct nusec_config *cfg, const wchar_t *filename);
void pcbid_config_load(struct pcbid_config *cfg, const wchar_t *filename);
void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename); void vfs_config_load(struct vfs_config *cfg, const wchar_t *filename);