blob: 7678d2584f1dc5ad92e3ac034fa0efce29c0cf21 [file] [log] [blame]
#pragma once
#include "config.h"
#include "cpld.hpp"
#include "gpio.hpp"
#include <nlohmann/json.hpp>
#include <iostream>
enum class ConfigType
{
gpio,
cpld
};
// this struct represents button interface
struct ButtonConfig
{
ConfigType type;
std::string formFactorName; // name of the button interface
std::vector<GpioInfo> gpios; // holds single or group gpio config
CpldInfo cpld; // holds single cpld config
std::vector<int> fds; // store all the fds listen io event which
// mapped with the gpio or cpld
nlohmann::json extraJsonInfo; // corresponding to button interface
};