1 /* This is a generated file. */ 2 3 #include "ucd90160.hpp" 4 5 namespace witherspoon 6 { 7 namespace power 8 { 9 10 using namespace ucd90160; 11 using namespace std::string_literals; 12 13 const DeviceMap UCD90160::deviceMap 14 { 15 %for ucd_data in ucd90160s: 16 {${ucd_data['index']}, 17 DeviceDefinition{ 18 "${ucd_data['path']}", 19 20 RailNames{ 21 %for rail in ucd_data['RailNames']: 22 "${rail}"s, 23 %endfor 24 }, 25 26 GPIConfigs{ 27 %for gpi_config in ucd_data['GPIConfigs']: 28 <% 29 poll = str(gpi_config['poll']).lower() 30 %>\ 31 GPIConfig{${gpi_config['gpi']}, ${gpi_config['pinID']}, "${gpi_config['name']}"s, ${poll}, extraAnalysisType::${gpi_config['analysis']}}, 32 %endfor 33 }, 34 35 GPIOAnalysis{ 36 %for gpio_analysis in ucd_data['GPIOAnalysis']: 37 {extraAnalysisType::${gpio_analysis['type']}, 38 GPIOGroup{ 39 "${gpio_analysis['path']}", 40 gpio::Value::${gpio_analysis['gpio_value']}, 41 [](auto& ucd, const auto& callout) { 42 ucd.${gpio_analysis['error_function']}(callout); 43 }, 44 optionFlags::${gpio_analysis['option_flags']}, 45 GPIODefinitions{ 46 %for gpio_defs in gpio_analysis['GPIODefinitions']: 47 GPIODefinition{${gpio_defs['gpio']}, "${gpio_defs['callout']}"s}, 48 %endfor 49 } 50 } 51 }, 52 %endfor 53 } 54 } 55 }, 56 %endfor 57 }; 58 59 } // namespace power 60 } // namespace witherspoon 61