blob: 7678d2584f1dc5ad92e3ac034fa0efce29c0cf21 [file] [log] [blame]
Delphine CC Chiuccd7db02023-02-09 14:48:53 +08001#pragma once
2#include "config.h"
3
4#include "cpld.hpp"
5#include "gpio.hpp"
6
7#include <nlohmann/json.hpp>
8
9#include <iostream>
10
11enum class ConfigType
12{
13 gpio,
14 cpld
15};
16
17// this struct represents button interface
18struct ButtonConfig
19{
20 ConfigType type;
21 std::string formFactorName; // name of the button interface
22 std::vector<GpioInfo> gpios; // holds single or group gpio config
23 CpldInfo cpld; // holds single cpld config
24 std::vector<int> fds; // store all the fds listen io event which
25 // mapped with the gpio or cpld
26 nlohmann::json extraJsonInfo; // corresponding to button interface
27};