idzio: Add configuration file

This commit is contained in:
Tau
2019-09-28 23:29:12 -04:00
parent a0664a4008
commit 2907c1a1b5
6 changed files with 324 additions and 24 deletions

34
idzio/config.h Normal file
View File

@ -0,0 +1,34 @@
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
struct idz_shifter_config {
bool auto_neutral;
};
struct idz_di_config {
wchar_t device_name[64];
wchar_t brake_axis[16];
wchar_t accel_axis[16];
uint8_t start;
uint8_t view_chg;
uint8_t shift_dn;
uint8_t shift_up;
};
struct idz_io_config {
uint8_t vk_test;
uint8_t vk_service;
uint8_t vk_coin;
wchar_t mode[8];
struct idz_shifter_config shifter;
struct idz_di_config di;
};
void idz_di_config_load(struct idz_di_config *cfg, const wchar_t *filename);
void idz_io_config_load(struct idz_io_config *cfg, const wchar_t *filename);
void idz_shifter_config_load(
struct idz_shifter_config *cfg,
const wchar_t *filename);