1 #pragma once 2 #include "config.hpp" 3 #include "cpld.hpp" 4 #include "gpio.hpp" 5 6 #include <nlohmann/json.hpp> 7 8 #include <iostream> 9 10 enum class ConfigType 11 { 12 gpio, 13 cpld 14 }; 15 16 // this struct represents button interface 17 struct 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 }; 27