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