1 #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 11 enum class ConfigType 12 { 13 gpio, 14 cpld 15 }; 16 17 // this struct represents button interface 18 struct 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 }; 28